MCP setup
@crawlpipe/mcp is a stdio MCP server that wraps the same /v1/legal/*
endpoints documented in the API reference — every tool
call is a real, metered REST request under the hood, so usage shows up in
Usage exactly like direct API calls.
Run it
npx @crawlpipe/mcpNo install step needed for most MCP clients — they invoke npx on demand.
Configuration
The server reads two environment variables:
| Variable | Required | Meaning |
|---|---|---|
CRAWLPIPE_API_KEY | Yes | An API key from API Keys in the portal (cp_live_…) |
CRAWLPIPE_BASE_URL | No | Overrides the API base URL (defaults to https://api.crawlpipe.com) — useful for local development against http://localhost:8000 |
Claude Desktop / Claude Code:
{
"mcpServers": {
"crawlpipe": {
"command": "npx",
"args": ["-y", "@crawlpipe/mcp"],
"env": {
"CRAWLPIPE_API_KEY": "cp_live_a1b2c3d4e5f6…"
}
}
}
}Or via Claude Code CLI:
claude mcp add crawlpipe -e CRAWLPIPE_API_KEY=cp_live_... -- npx -y @crawlpipe/mcpCursor / Codex / VS Code Extensions (Roo Code, Cline):
Add to your MCP settings file (e.g. cline_mcp_settings.json or Cursor MCP settings):
{
"mcpServers": {
"crawlpipe": {
"command": "npx",
"args": ["-y", "@crawlpipe/mcp"],
"env": {
"CRAWLPIPE_API_KEY": "cp_live_a1b2c3d4e5f6…"
}
}
}
}ChatGPT:
- ChatGPT Desktop App / MCP Connectors: Use the stdio MCP JSON config above in your MCP client settings.
- ChatGPT Web / Custom GPT Actions: Import the OpenAPI specification directly at
https://api.crawlpipe.com/openapi.jsonand set authentication headerX-API-Key: cp_live_a1b2c3d4e5f6….
Tools
| Tool | REST mapping |
|---|---|
legal_search(q, mode?, filters?) | GET /v1/legal/search |
legal_get_document(id, at?, include?) | GET /v1/legal/documents/{id} |
legal_get_effectivity(id, at?) | GET /v1/legal/documents/{id}/effectivity |
legal_get_relations(id, direction?, types?) | GET /v1/legal/documents/{id}/relations |
legal_changes(since, filters?) | GET /v1/legal/changes |
crawlpipe_usage() | GET /v1/usage |
Tool descriptions are written for agent consumption — they include the vocab
enums (doc_type, eff_status, relation_type, …) and the same citation
guidance as RAG with the search API, so an agent
calling legal_search gets a ready-to-cite result without extra prompting.
Metering
Because the MCP server calls the same REST API with your key, every tool
invocation is metered exactly like the equivalent REST call — legal_search
with mode: "hybrid" costs 2 units through MCP too. There's no separate MCP
pricing or quota.