> ## Documentation Index
> Fetch the complete documentation index at: https://docs.routemcp.io/llms.txt
> Use this file to discover all available pages before exploring further.

# MCP Server

> Connect the RouteMCP API docs directly to your AI tools using the hosted MCP server.

The RouteMCP API documentation is available as a hosted **Model Context Protocol (MCP) server**. Connect it to your AI tool of choice so you can ask questions about the API, generate integration code, and explore endpoints without leaving your IDE.

<Info>
  Use the contextual menu at the top of any page to connect with one click — select **Connect to Cursor** or **Connect to VS Code**.
</Info>

## What the MCP server exposes

The MCP server gives AI agents a `search` tool to query your documentation. Once connected, your AI can:

* Look up endpoint schemas, parameters, and response shapes
* Retrieve authentication and rate limit details
* Answer questions about the Connect widget and field mappings
* Generate accurate integration code grounded in the actual API

## Connect to Cursor

<Steps>
  <Step title="Open MCP settings">
    Press `Cmd + Shift + P` (or `Ctrl + Shift + P` on Windows) to open the command palette, search for **Open MCP settings**, and select **Add custom MCP**.
  </Step>

  <Step title="Add the server">
    In `mcp.json`, add the following:

    ```json mcp.json theme={null}
    {
      "mcpServers": {
        "RouteMCP": {
          "url": "https://docs.routemcp.io/mcp"
        }
      }
    }
    ```

    <Tip>
      Use the **Copy MCP server URL** option in the contextual menu at the top of this page to get the exact URL for this project.
    </Tip>
  </Step>

  <Step title="Verify">
    In Cursor's chat, ask: *"What tools do you have available?"* — the RouteMCP MCP server should appear.
  </Step>
</Steps>

## Connect to VS Code

<Steps>
  <Step title="Create the MCP config file">
    In your project root, create `.vscode/mcp.json` and add:

    ```json .vscode/mcp.json theme={null}
    {
      "servers": {
        "RouteMCP": {
          "type": "http",
          "url": "https://docs.routemcp.io/mcp"
        }
      }
    }
    ```
  </Step>

  <Step title="Reload VS Code">
    Reload the window and open GitHub Copilot chat — the RouteMCP server will be available as a tool.
  </Step>
</Steps>

## Connect to Claude

<Steps>
  <Step title="Open Claude settings">
    In Claude, navigate to **Settings → Connectors** and select **Add custom connector**.
  </Step>

  <Step title="Add the server">
    Fill in the details:

    * **Name**: RouteMCP API
    * **URL**: `https://docs.routemcp.io/mcp`

    Select **Add**.
  </Step>

  <Step title="Use it in chat">
    Click the attachments button (plus icon) in Claude chat and select the RouteMCP MCP server before asking your question.
  </Step>
</Steps>

## Connect via Claude Code

Run the following command in your terminal:

```bash theme={null}
claude mcp add --transport http RouteMCP https://docs.routemcp.io/mcp
```

Verify it's registered:

```bash theme={null}
claude mcp list
```

## Connect to Antigravity

<Steps>
  <Step title="Open MCP config">
    In your project root, navigate to `.gemini/antigravity/` and open (or create) the `mcp_config.json` file.
  </Step>

  <Step title="Add the server">
    Add the RouteMCP server to your config:

    ```json .gemini/antigravity/mcp_config.json theme={null}
    {
      "mcpServers": {
        "RouteMCP": {
          "serverUrl": "https://docs.routemcp.io/mcp"
        }
      }
    }
    ```

    <Tip>
      Antigravity uses `serverUrl` (not `url`) as the key for HTTP-based MCP servers.
    </Tip>
  </Step>

  <Step title="Verify">
    Start a new conversation in Antigravity and ask: *"What tools do you have available?"* — the RouteMCP MCP server and its `search_router_mcp_api` tool should appear.
  </Step>
</Steps>

## Connect via npx

Install with a single command that works in any MCP-compatible tool:

```bash theme={null}
npx add-mcp https://docs.routemcp.io/mcp
```
