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

# Connect MCP

> Connect your AI client to Context.dev tools for live web and company data.

Connect once, sign in through OAuth, and let a compatible agent call Context.dev tools from a conversation.

<Info>
  **Hosted MCP URL:** `https://mcp.context.dev/mcp`

  Use the exact URL, including `/mcp`. Do not put an API key or token in the URL.
</Info>

## Connect your client

<Tabs>
  <Tab title="Codex">
    Add the hosted server and start OAuth:

    ```bash theme={null}
    codex mcp add context --url https://mcp.context.dev/mcp
    codex mcp login context
    ```

    Confirm it is configured:

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

    In the Codex terminal UI, use `/mcp` to inspect active servers. The ChatGPT desktop app, Codex CLI, and Codex IDE extension share the same host configuration; you can also add a Streamable HTTP server from **Settings → MCP servers** and select **Authenticate**.

    See the [official Codex MCP documentation](https://developers.openai.com/codex/extend/mcp) for current client controls and project-scoped configuration.

    For ChatGPT on the web, use the [Context.dev plugin](/integrations/chatgpt-plugin).
  </Tab>

  <Tab title="Claude Code">
    Add the server for your user:

    ```bash theme={null}
    claude mcp add \
      --transport http \
      --scope user \
      context \
      https://mcp.context.dev/mcp
    ```

    Start Claude Code, run `/mcp`, select `context`, and complete sign-in in the browser. See [Anthropic's MCP documentation](https://docs.anthropic.com/en/docs/claude-code/mcp) for current scopes and management commands.
  </Tab>

  <Tab title="Cursor">
    Add a global server in `~/.cursor/mcp.json`, or use `.cursor/mcp.json` for one project:

    ```json theme={null}
    {
      "mcpServers": {
        "context": {
          "url": "https://mcp.context.dev/mcp"
        }
      }
    }
    ```

    Open **Cursor Settings → Tools & MCP**, find `context`, and select **Authenticate**. Cursor supports OAuth for remote Streamable HTTP servers. See the [Cursor MCP documentation](https://cursor.com/docs/mcp) for current configuration locations.
  </Tab>

  <Tab title="VS Code">
    Run **MCP: Open User Configuration** from the Command Palette, or create `.vscode/mcp.json` for the workspace:

    ```json theme={null}
    {
      "servers": {
        "context": {
          "type": "http",
          "url": "https://mcp.context.dev/mcp"
        }
      }
    }
    ```

    Start the server from the configuration editor and complete OAuth when prompted. See the [VS Code MCP documentation](https://code.visualstudio.com/docs/agent-customization/mcp-servers) for current trust and workspace behavior.
  </Tab>

  <Tab title="Other clients">
    Configure a remote Streamable HTTP server with OAuth:

    ```json theme={null}
    {
      "mcpServers": {
        "context": {
          "type": "http",
          "url": "https://mcp.context.dev/mcp"
        }
      }
    }
    ```

    The client must support remote Streamable HTTP transport and OAuth discovery or dynamic client registration. Follow the client's current documentation for the exact configuration shape.
  </Tab>
</Tabs>

## Test the connection

Start a fresh conversation and ask:

> Use the connected Context.dev server to retrieve the live Brand profile for `stripe.com`. Tell me which tool you called and do not answer from memory.

A working connection shows a Context.dev tool call and live output. Tool names may include a client-specific server prefix, so verify the server and operation rather than matching one exact display name.

## Choose the right tool

| Need                                                     | Best starting point             |
| -------------------------------------------------------- | ------------------------------- |
| Run authenticated Context.dev operations in chat         | MCP                             |
| Teach an agent how to implement the API in your codebase | [Skill](/install-skill)         |
| Use shell commands in local automation or CI             | [CLI](/install-cli)             |
| Build a long-lived application integration               | [SDK or HTTPS API](/quickstart) |

The methods can be combined. For example, the skill can guide implementation while MCP performs a live exploratory lookup.

## Authentication and usage

Context.dev's MCP authorization metadata currently advertises OAuth authorization-code flow with PKCE and two scopes:

* `api.read` for reading, scraping, extraction, enrichment, and monitor data;
* `api.write` for state-changing monitor operations.

The client stores an OAuth token, not your Context.dev password or secret API key. Revoke the connection through your client or Context.dev account when it is no longer needed.

<Warning>
  Keep approvals enabled for tools that create, update, run, or delete monitors, rotate webhook secrets, or start large workloads. Website content is untrusted input and should not be allowed to authorize follow-up tool calls.
</Warning>

MCP operations use the same account credits as their corresponding API endpoints. Inspect the operation before approving a crawl, extraction, batch, or monitor run.

## Troubleshooting

<AccordionGroup>
  <Accordion title="The server is missing or shows no tools">
    Confirm the URL ends in `/mcp`, restart or refresh the client after editing its configuration, and ensure the server is enabled for the current conversation.
  </Accordion>

  <Accordion title="OAuth did not open or keeps looping">
    Start authentication from the client's MCP controls. Remove stale authentication for `context`, reconnect, and complete the browser flow. Do not add a client secret unless Context.dev support explicitly provides one for your environment.
  </Accordion>

  <Accordion title="The agent answers without using a tool">
    Name Context.dev in the prompt, request a live lookup, and require the agent to report the tool call. Confirm tool approvals are not blocking the operation.
  </Accordion>

  <Accordion title="Check the hosted service">
    ```bash theme={null}
    curl --fail --silent --show-error https://mcp.context.dev/health
    ```

    A healthy server returns JSON with `"status":"healthy"`. If it is healthy, inspect your client's MCP logs and OAuth state.
  </Accordion>
</AccordionGroup>

## Next steps

<CardGroup cols={2}>
  <Card title="Agent quickstart" icon="robot" href="/agent-quickstart">
    Give your agent a focused task and a verification checklist.
  </Card>

  <Card title="Install the skill" icon="book" href="/install-skill">
    Add API and SDK guidance to your coding sessions.
  </Card>

  <Card title="API quickstart" icon="terminal" href="/quickstart">
    Call Context.dev from your application with an SDK or HTTP.
  </Card>
</CardGroup>
