mcp

v1.21.0
@chainpatrol/mcp Checked 3 days ago Published 6 days ago

The official ChainPatrol MCP server — every public API capability as an MCP tool

The official ChainPatrol MCP server. Every public API operation is available as a tool, so an agent never has to drop down to raw HTTP. The server ships with the CLI, which already handles login: Point an MCP client at that command. For Claude Code:

Summary extracted from the README.

@chainpatrol/mcp

The official ChainPatrol MCP server. Every public API operation is available as a tool, so an agent never has to drop down to raw HTTP.

Use it

The server ships with the CLI, which already handles login:

npm install -g @chainpatrol/cli
chainpatrol login
chainpatrol mcp        # speaks MCP on stdio

Point an MCP client at that command. For Claude Code:

{
  "mcpServers": {
    "chainpatrol": {
      "command": "chainpatrol",
      "args": ["mcp"],
    },
  },
}

For a service account, set CHAINPATROL_API_KEY instead of logging in.

What it exposes

  • Tools — one per public API operation: asset checks and search, reports, proposal review, suspected threats and detection configs, takedowns, threats, metrics, healthchecks, and organization management.
  • Resources — the large value lists (chainpatrol://enums/asset_type) and the guides explaining what a proposal label or reject reason means.
  • Prompts — the organization healthcheck, trend search, and weekly customer-success sweep.

Most tools are scoped to one organization and there is no implicit default, so call user_orgs first and pass the slug explicitly.

Configuration

Variable Purpose
CHAINPATROL_API_KEY API key; takes precedence over a stored login.
CHAINPATROL_API_URL API base URL. Defaults to https://app.chainpatrol.io.
CHAINPATROL_CONFIG_DIR Where credentials are read from.
CHAINPATROL_MCP_TOOLS Comma-separated tool names to expose. Everything, by default.

CHAINPATROL_MCP_TOOLS exists only to trade breadth for context budget — it is not an access control. Authorization is enforced by the API against the credential in use. Both entry points read it: chainpatrol-mcp, and chainpatrol mcp, where an explicit --tools takes precedence.

The tool surface is generated

src/generated/tools.json is produced from the external tRPC router by yarn tools:generate, so a tool exists for every public operation by construction rather than by hand. yarn tools:check fails when the committed manifest no longer matches the router, and runs in CI — a new API endpoint cannot ship without the MCP surface catching up.

Two deliberate gaps, both listed with reasons in the manifest's excluded array: /internal/* paths, and the three inbound webhook receivers (Cloudflare, GitHub, Notion) that third-party services call and users do not.