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

# MCP Docs Setup

> Connect AI tools to Emerge documentation via MCP

The Model Context Protocol (MCP) allows AI tools to search and query documentation directly. An MCP server is automatically generated for these docs.

<Note>
  **Looking for the Query API MCP server?** This page covers the **documentation MCP server**. For AI agent access to the Query API (data retrieval), see [Query API MCP Setup](/ai/mcp-query-setup).
</Note>

## MCP Servers

Emerge provides two MCP servers:

| Server            | Purpose                     | URL                              |
| ----------------- | --------------------------- | -------------------------------- |
| **Documentation** | Search and query these docs | `https://docs.emergedata.ai/mcp` |
| **Query API**     | Retrieve user data          | `https://mcp.emergedata.ai/mcp`  |

This page covers the **Documentation MCP server** setup. For Query API MCP server setup, see [Query API MCP Setup](/ai/mcp-query-setup).

## Documentation MCP Server URL

```
https://docs.emergedata.ai/mcp
```

**Transport**: Streamable HTTP (`http`)

## Setup by tool

<Tabs>
  <Tab title="Claude Code">
    ### Add MCP server

    ```bash theme={null}
    claude mcp add --transport http emerge https://docs.emergedata.ai/mcp
    ```

    ### Verify connection

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

    You should see:

    ```
    emerge: https://docs.emergedata.ai/mcp (connected)
    ```

    ### Usage

    Claude Code will automatically use the docs when relevant:

    ```bash theme={null}
    claude "How do I implement delta queries in Emerge?"
    ```
  </Tab>

  <Tab title="Claude Desktop">
    ### Configuration file

    Update `claude_desktop_config.json`:

    ```json theme={null}
    {
      "mcpServers": {
        "emerge": {
          "command": "",
          "url": "https://docs.emergedata.ai/mcp"
        }
      }
    }
    ```
  </Tab>

  <Tab title="Cursor">
    ### Configuration file

    Create or edit `.cursor/mcp.json` in your project root:

    ```json theme={null}
    {
      "mcpServers": {
        "Emerge": {
          "type": "http",
          "url": "https://docs.emergedata.ai/mcp"
        }
      }
    }
    ```

    ### Global configuration

    For all projects, add to your global Cursor settings:

    1. Open Cursor
    2. Press `Cmd/Ctrl + ,` for settings
    3. Search for "MCP"
    4. Add the server configuration

    ### Usage

    Once configured, Cursor can:

    * Answer questions about Emerge API in chat
    * Generate integration code with context
    * Explain error messages and suggest fixes
  </Tab>

  <Tab title="VS Code">
    ### MCP configuration

    Create `.vscode/mcp.json` in your workspace:

    ```json theme={null}
    {
      "mcpServers": {
        "Emerge": {
          "type": "http",
          "url": "https://docs.emergedata.ai/mcp"
        }
      }
    }
    ```

    ### With GitHub Copilot

    If using Copilot Chat, the MCP connection provides:

    * Accurate Emerge API suggestions
    * Code completion with real examples
    * Documentation-backed explanations

    ### With other AI extensions

    Any VS Code AI extension supporting MCP can use this configuration.
  </Tab>

  <Tab title="Codex CLI">
    ### Add MCP server

    ```bash theme={null}
    codex mcp add emerge --url https://docs.emergedata.ai/mcp
    ```

    ### Verify connection

    ```bash theme={null}
    codex mcp list
    ```
  </Tab>

  <Tab title="Windsurf">
    ### Configuration file

    Update `mcp_config.json`:

    ```json theme={null}
    {
      "mcpServers": {
        "emerge": {
          "url": "https://docs.emergedata.ai/mcp",
          "headers": {}
        }
      }
    }
    ```
  </Tab>
</Tabs>

## Verifying the connection

After setup, test the connection by asking your AI tool:

> "Search the Emerge documentation for how to handle callbacks"

The AI should:

1. Query the MCP server
2. Find the callbacks documentation
3. Return a detailed answer with code examples

If the AI gives a generic response or says it can't find information, the MCP connection may not be configured correctly.

## Troubleshooting

<AccordionGroup>
  <Accordion title="AI doesn't use the MCP server">
    Some AI tools require explicit activation:

    * Restart the tool after adding configuration
    * Check that the config file is in the correct location
    * Verify the URL is exactly `https://docs.emergedata.ai/mcp`
    * Verify transport is `http` (not `sse`)
  </Accordion>

  <Accordion title="Connection timeout">
    The MCP server should respond within seconds. If timeouts occur:

    * Check your internet connection
    * Try accessing the URL in a browser
    * Contact support if the issue persists
  </Accordion>

  <Accordion title="Outdated responses">
    The MCP server reflects the current live documentation. If responses seem outdated:

    * The AI may be using cached context
    * Start a new conversation
    * Explicitly ask it to search the docs again
  </Accordion>
</AccordionGroup>

## What the AI can access

The MCP server provides access to:

<Check>All guide pages (Link API, Query API, etc.)</Check>
<Check>API reference documentation</Check>
<Check>Code examples in TypeScript and Python</Check>
<Check>Troubleshooting and best practices</Check>

The AI cannot:

* Access your API credentials
* Make API calls on your behalf
* See your application's data

## Next steps

<CardGroup cols={2}>
  <Card title="Contextual Menu" icon="list" href="/ai/contextual-menu">
    One-click AI integrations on every page
  </Card>

  <Card title="Examples" icon="play" href="/ai/examples">
    See AI workflow examples
  </Card>
</CardGroup>
