MCP Protocol
Complete Model Context Protocol specification for CrawlForge MCP. Learn how to implement custom MCP clients and integrate with any AI framework.
What is MCP?
The Model Context Protocol (MCP) is an open standard created by Anthropic that enables AI assistants to securely access external data sources and tools. It defines a standardized way for AI models to discover, invoke, and receive results from external services.
Built on standard JSON-RPC for universal compatibility
API key authentication and rate limiting built-in
Add custom tools without changing the protocol
Server Configuration
Configure your MCP client to connect to the CrawlForge MCP server.
Tool Discovery
MCP clients discover available tools by calling the tools/list method.
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
name | string | Required | - | Tool identifier (e.g., "fetch_url") Example: fetch_url |
description | string | Required | - | Human-readable tool description Example: Fetch and parse HTML content from a URL |
inputSchema | object | Required | - | JSON Schema defining tool parameters Example: { "type": "object", "properties": {...} } |
Tool Invocation
Invoke tools using the tools/call method with tool name and arguments.
await in JavaScript or async/await in Python to wait for results.Response Format
Tool responses follow the standard MCP format with content, metadata, and error handling.
MCP Message Structure
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
method | string | Required | - | MCP method name (e.g., "tools/call") Example: tools/call |
params | object | Required | - | Method-specific parameters Example: { "name": "fetch_url", "arguments": {...} } |
id | string | Required | - | Unique request identifier for correlation Example: req_12345 |
Error Codes
| Code | Name | Description |
|---|---|---|
-32700 | Parse Error | Invalid JSON |
-32600 | Invalid Request | Malformed request object |
-32601 | Method Not Found | Unknown MCP method |
-32602 | Invalid Params | Missing or invalid parameters |
-32603 | Internal Error | Server error during execution |
-32001 | Insufficient Credits | Not enough credits to execute tool |
Best Practices
Use Unique Request IDs
Generate unique IDs for each request to correlate responses
Handle Errors Gracefully
Check for both JSON-RPC errors and tool-specific errors
Implement Timeouts
Set reasonable timeouts for tool calls (10-30 seconds)
Monitor Credit Usage
Track _meta.credits_remaining in responses
Troubleshooting
For detailed troubleshooting, see the Claude Desktop guide or contact support.