﻿> ## 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 the Context.dev MCP server

> Give Claude, Cursor, Codex, ChatGPT, VS Code, and other AI agents secure access to Context.dev through OAuth.

Connect your AI agent to Context.dev once, then ask it to scrape, search, extract, parse, enrich, or monitor the web directly from chat.

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

  Context.dev uses OAuth. You sign in through your browser, so you do not need to paste an API key into your MCP configuration.
</Info>

## Connect your client

Choose your client and follow the steps below. Use the exact hosted URL, including `/mcp`.

<Tabs>
  <Tab title="Claude">
    ### Claude, Cowork, and Claude Desktop

    <Steps>
      <Step title="Add a custom connector">
        Open **Customize → Connectors**, select **+**, then choose **Add custom connector**.

        On Team and Enterprise plans, an organization owner must first add Context.dev from **Organization settings → Connectors**.
      </Step>

      <Step title="Enter the Context.dev MCP URL">
        Name the connector `Context.dev` and enter:

        ```text theme={null}
        https://mcp.context.dev/mcp
        ```

        Leave the optional OAuth client ID and client secret fields empty.
      </Step>

      <Step title="Connect your account">
        Select **Add**, then **Connect**. Sign in to Context.dev in the browser window and approve access.
      </Step>

      <Step title="Enable it in a conversation">
        Select the **+** button beside the composer, open **Connectors**, and enable Context.dev.
      </Step>
    </Steps>

    ### Claude Code

    Add the hosted server for your user:

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

    Start Claude Code, run `/mcp`, select `context`, and complete the browser sign-in.
  </Tab>

  <Tab title="Cursor">
    Open your global MCP configuration at `~/.cursor/mcp.json` and add:

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

    Then open **Cursor Settings → Tools & MCP**:

    1. Find `context`.
    2. Select **Authenticate**.
    3. Sign in to Context.dev in the browser window.
    4. Confirm that Cursor shows the server as connected.

    Use `.cursor/mcp.json` instead if you only want Context.dev available in one project.
  </Tab>

  <Tab title="Codex">
    Add the hosted server:

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

    Authenticate:

    ```bash terminal theme={null}
    codex mcp login context
    ```

    Run `codex mcp list` to verify the connection. In the Codex CLI, use `/mcp` to inspect the available Context.dev tools.

    You can also add the server from **Settings → MCP servers** in the ChatGPT desktop app or Codex IDE extension. Choose **Streamable HTTP**, enter the hosted URL, save, restart the client, and select **Authenticate**.
  </Tab>

  <Tab title="ChatGPT desktop">
    <Steps>
      <Step title="Open MCP settings">
        Open the ChatGPT desktop app, go to **Settings → MCP servers**, and select **Add server**.
      </Step>

      <Step title="Add Context.dev">
        Name the server `Context.dev`, choose **Streamable HTTP**, and enter:

        ```text theme={null}
        https://mcp.context.dev/mcp
        ```
      </Step>

      <Step title="Restart and authenticate">
        Save the server, restart the app, and select **Authenticate** beside Context.dev. Complete the browser sign-in.
      </Step>

      <Step title="Confirm the connection">
        Enter `/mcp` in the composer to view the connected server and its tools.
      </Step>
    </Steps>

    <Note>
      ChatGPT on the web uses workspace plugins for remote MCP tools and does not read the MCP configuration from your computer.
    </Note>
  </Tab>

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

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

    Start the server from the inline action above its configuration. VS Code opens a browser for OAuth the first time it connects.
  </Tab>

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

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

    Your client must support remote Streamable HTTP MCP servers and OAuth. When prompted, sign in to Context.dev and approve access.
  </Tab>
</Tabs>

## Verify the connection

Start a new conversation and ask:

> Use Context.dev to retrieve the live brand profile for stripe.com. Tell me which Context.dev tool you called.

A working connection calls `get-brand` or `brand-retrieve-unified` and returns live data. If the agent answers from memory without making a tool call, confirm that Context.dev is enabled for the conversation.

## What your agent can do

The MCP server exposes the callable operations in the [public Context.dev API](/introduction), plus a visual brand card.

| Capability                  | Tools                                                                                                              |
| --------------------------- | ------------------------------------------------------------------------------------------------------------------ |
| Parse files                 | `parse-document`                                                                                                   |
| Scrape pages and sites      | `web-scrape-html`, `web-scrape-markdown`, `web-scrape-images`, `web-scrape-sitemap`, `web-crawl`, `web-screenshot` |
| Search and extract          | `web-search`, `web-extract`                                                                                        |
| Brand intelligence          | `get-brand`, `brand-retrieve-unified`, `web-styleguide`, `web-fonts`                                               |
| Products and classification | `brand-ai-product`, `brand-ai-products`, `web-naics`, `web-sic`                                                    |
| Cache warming               | `utility-prefetch`                                                                                                 |
| Monitor management          | `list-monitors`, `create-monitor`, `get-monitor`, `update-monitor`, `delete-monitor`                               |
| Monitor runs                | `run-monitor-now`, `list-monitor-runs`, `get-monitor-run`, `list-account-runs`                                     |
| Monitor changes and usage   | `list-monitor-changes`, `list-changes`, `get-change`, `list-monitor-credit-usage`, `rotate-monitor-webhook-secret` |

### Prompts to try

<CardGroup cols={2}>
  <Card title="Research a website" icon="magnifying-glass">
    Scrape the Acme pricing page and summarize every plan, limit, and billing interval.
  </Card>

  <Card title="Extract structured data" icon="brackets-curly">
    Extract all open engineering roles from this careers site as JSON with title, location, and application URL.
  </Card>

  <Card title="Parse a document" icon="file-lines">
    Parse this PDF and return its tables as clean Markdown, preserving the section hierarchy.
  </Card>

  <Card title="Monitor a change" icon="radar">
    Create a daily monitor for this changelog and notify me only about new product releases.
  </Card>
</CardGroup>

## Authentication and permissions

Context.dev uses OAuth 2.0 Authorization Code flow with PKCE. The MCP client receives scoped tokens; it never receives your Context.dev password or API key.

The server requests:

* `api.read` for parsing, scraping, searching, extraction, enrichment, and reading monitor data
* `api.write` for creating, updating, deleting, or manually running monitors and rotating webhook secrets

<Warning>
  Monitor tools can change persistent account state. Keep tool approvals enabled and review calls to `create-monitor`, `update-monitor`, `delete-monitor`, `run-monitor-now`, and `rotate-monitor-webhook-secret`.
</Warning>

MCP calls use your Context.dev account and consume the same credits as the corresponding API operations. See [pricing](https://context.dev/pricing) and [monitor credit usage](/api-reference/monitors/credit-usage).

## Troubleshooting

<AccordionGroup>
  <Accordion title="The server does not appear or shows zero tools">
    Confirm that the URL is exactly `https://mcp.context.dev/mcp`, including `/mcp`. Restart or refresh the client after editing its configuration, then make sure Context.dev is enabled for the current conversation.
  </Accordion>

  <Accordion title="The browser sign-in did not open">
    Open the client's MCP settings and select **Authenticate** or **Connect** beside Context.dev. In Claude Code, run `/mcp`. In Codex, run `codex mcp login context`.
  </Accordion>

  <Accordion title="Authentication loops or returns 401">
    Clear the saved authentication for Context.dev in your client, reconnect, and complete the browser flow again. Do not add an API key or OAuth secret to the URL.
  </Accordion>

  <Accordion title="The agent answers without calling Context.dev">
    Enable Context.dev for the conversation and name it explicitly in the prompt. In clients with tool controls, confirm that the relevant Context.dev tools are enabled.
  </Accordion>

  <Accordion title="Check whether the hosted server is online">
    Run:

    ```bash terminal theme={null}
    curl -fsS https://mcp.context.dev/health
    ```

    A healthy server returns a JSON response with a healthy status. If it is healthy but your client cannot connect, inspect the client's MCP output log and reconnect.
  </Accordion>
</AccordionGroup>

## Next steps

<CardGroup cols={2}>
  <Card title="Browse the API" icon="code" href="/introduction">
    See the endpoints and data available through the MCP tools.
  </Card>

  <Card title="Monitor websites" icon="radar" href="/guides/monitor-website-changes">
    Learn how monitor targets, schedules, changes, and webhooks work.
  </Card>

  <Card title="Install the skill" icon="book-open" href="/install-skill">
    Teach your agent when and how to use Context.dev while writing code.
  </Card>
</CardGroup>
