What Is an MCP Server?

Resources  ·  Concepts

Model Context Protocol (MCP) is an open standard that defines how AI models connect to external tools, data sources, and services. An MCP server is the other side of that connection: a process that exposes a set of named tools an AI model can discover and invoke. Think of it as a structured API layer designed specifically for AI agents — one where the model can read tool descriptions in natural language and decide when and how to call them, rather than being hard-coded to call a specific endpoint.

DocketLayer publishes an MCP server that exposes the same court docket capabilities as the REST API. If you're building an agent in Claude, Cursor, or any other MCP-compliant environment, the MCP server is often the faster integration path.

What MCP Is

MCP was introduced by Anthropic in late 2024 as an open protocol for tool use in AI systems. The core idea is that AI models are increasingly capable of using external tools to complete tasks — searching the web, querying databases, calling APIs — but every tool integration was previously bespoke. Each model had its own function-calling format, each tool had to be re-integrated for each model, and there was no standard for how a model should discover what a tool can do.

MCP standardizes that surface. An MCP server declares its tools in a schema the model can read — each tool has a name, a description in plain language, and a typed parameter list. The model reads the schema, decides when a tool is relevant to the task at hand, and calls it. The server executes the call and returns a result. The model incorporates the result into its response or uses it to decide what to do next.

Because the protocol is open and standardized, a single MCP server works with any MCP-compliant client. Build the server once; it works with Claude, Cursor, Windsurf, and any other host that implements the protocol.

How It Works

An MCP server exposes its capabilities over a transport layer — either local stdio, for servers that run as a subprocess on the same machine, or HTTP with Server-Sent Events, for remote servers. DocketLayer's MCP server uses stdio transport: it runs as a Node.js subprocess on your machine, launched and managed by your MCP client. Add the package to your client's configuration using npx, and the client handles the process lifecycle.

When an MCP client starts, it launches the server subprocess and requests the tool list. The server responds with a schema for each tool: the tool name, a description the model can use to decide when it's relevant, and the parameters it accepts. That schema is what the AI model reads — it's written to be understood by the model, not just by code.

When the model decides to call a tool, it sends a structured invocation to the client, which forwards it to the subprocess. The server executes the tool — in DocketLayer's case, that means constructing an x402 payment transaction with the locally configured wallet, querying the API, and returning the normalized result. The model sees the result as part of its context and can reason over it, cite it, or use it to trigger the next step in a workflow.

From the developer's perspective, MCP integration means pointing your AI client at the package via npx. You don't write tool-calling logic by hand; the model figures out when to call which tool.

MCP Clients

An MCP client is any AI host that implements the protocol — the environment where the model runs and where tools get invoked. Common MCP clients include:

  • Claude Desktop and claude.ai — Anthropic's own interfaces support MCP servers directly, configurable through a JSON settings file
  • Cursor — the AI-native code editor supports MCP servers as part of its agent tooling
  • Windsurf — Codeium's editor with native MCP support
  • Custom agents — any application built with the Anthropic API, the OpenAI API, or another model provider can implement MCP client behavior using available SDKs

The DocketLayer MCP server is compatible with any client that supports the stdio transport, which covers Claude Desktop, Cursor, Windsurf, and any agent framework that can manage a local subprocess.

DocketLayer as an MCP Server

The DocketLayer MCP server is an npm package (@docketlayer/mcp-server) that exposes seven tools via stdio transport. Configure your MCP client to run it via npx — no separate install required. Three tools are free; four are paid via x402.

A minimal MCP client configuration:

{
  "mcpServers": {
    "docketlayer": {
      "command": "npx",
      "args": ["-y", "@docketlayer/mcp-server"],
      "env": {
        "DOCKETLAYER_WALLET_PRIVATE_KEY": "your_base58_private_key"
      }
    }
  }
}

Free tools — available without payment:

  • docketlayer_status — returns the full court registry and system health. Use this to check coverage or verify connectivity.
  • docketlayer_court_list — returns all courts with their codes, coverage status, and case ID formats. The right starting point for building a jurisdiction-aware workflow.
  • docketlayer_pricing — returns current pricing for paid tools.

Paid tools — each call costs $0.99 via x402:

  • docketlayer_case_query — full case context and docket activity for a known case number. Accepts an optional last_checked timestamp to return only changes since the last query.
  • docketlayer_case_monitor — lightweight change indicator. Returns whether a case has changed and when, without the full docket payload. Lower cost per check when you only need to know whether to look deeper.
  • docketlayer_case_batch — query up to 50 cases in a single call. Each successful case costs $0.99; failed cases are not billed.
  • docketlayer_wallet_info — returns the signing-key state for the configured wallet and recent callback delivery history. Costs $0.99.

The MCP server handles payment transparently as part of tool execution — it signs transactions locally using the wallet private key, sends the x402 payment header to the API, and returns the result. Your agent needs a funded Solana wallet; beyond that, the payment layer is invisible.

REST API vs. MCP Server

Both interfaces reach the same data. The right choice depends on where you're building.

Use the REST API when you're writing application code that calls DocketLayer directly — a backend service, a scheduled job, a webhook handler. The REST API gives you explicit control over request structure, response handling, and retry logic. It's the right interface for production systems where you're managing the integration yourself.

Use the MCP server when you're building with an AI agent as the orchestrator — a Claude prompt that monitors cases and summarizes activity, a Cursor agent that checks docket status as part of a research workflow, a custom agent built on the Anthropic API. The MCP server lets the model decide when to query, what parameters to use, and how to incorporate the result, without you writing that logic explicitly. It's the right interface when the model is doing the reasoning and you want to give it capable tools rather than prescribing every step.

Further Reading