MCP Server ========== ApiCrate is available as an MCP (Model Context Protocol) server. Connect any MCP-compatible AI agent to access all 21 tools. Endpoint -------- The MCP server is available at: ``https://api.apicrate.io/mcp/`` Transport is **Streamable HTTP**. Authenticate every request with your API key in the ``X-API-Key`` header. Client Setup ------------ Claude Desktop ^^^^^^^^^^^^^^ Add the following to your ``claude_desktop_config.json``: .. code-block:: json { "mcpServers": { "apicrate": { "type": "streamableHttp", "url": "https://api.apicrate.io/mcp/", "headers": { "X-API-Key": "ac_usr_your_key_here" } } } } Claude Code ^^^^^^^^^^^ Add a ``.mcp.json`` file to your project root: .. code-block:: json { "mcpServers": { "apicrate": { "type": "http", "url": "https://api.apicrate.io/mcp/", "headers": { "X-API-Key": "ac_usr_your_key_here" } } } } Or register the server from the command line: .. code-block:: bash claude mcp add apicrate --type http --url https://api.apicrate.io/mcp/ --header "X-API-Key: ac_usr_your_key_here" Cursor ^^^^^^ Add the following to your Cursor MCP configuration: .. code-block:: json { "mcpServers": { "apicrate": { "type": "streamableHttp", "url": "https://api.apicrate.io/mcp/", "headers": { "X-API-Key": "ac_usr_your_key_here" } } } } Other Clients ^^^^^^^^^^^^^ Any MCP client that supports the **Streamable HTTP** transport can connect to ApiCrate. Point the client at the URL above and pass your API key in the ``X-API-Key`` header. Verify ------ Once connected, ask your agent a simple question to confirm everything works: *"What country has code DE?"* The agent should call the ``lookup_country`` tool and return information about Germany. Next Steps ---------- * :doc:`tools/index` -- browse all 21 available tools. * :doc:`credits` -- understand how credits and billing work.