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

# Cursor

> Add the 2extract MCP server to Cursor, globally or per project, and provision proxies from the editor.

Cursor reads MCP servers from a JSON file. You choose whether the server is available everywhere or only inside one repository.

***

## Global or per project?

| File                 | Scope          | Use when                                           |
| :------------------- | :------------- | :------------------------------------------------- |
| `~/.cursor/mcp.json` | Every project  | It is your personal key and you want it everywhere |
| `.cursor/mcp.json`   | One repository | The whole team should get the same tools           |

<Warning>
  A project-level `.cursor/mcp.json` is usually committed. Do not put a real API key in it - add the file to `.gitignore`, or use the global file instead.
</Warning>

***

## Add the server

```json mcp.json icon="brackets-curly" theme={null}
{
  "mcpServers": {
    "2extract": {
      "url": "https://mcp.2extract.com/mcp",
      "headers": {
        "Authorization": "Bearer 2xt_YOUR_API_KEY"
      }
    }
  }
}
```

Already have servers configured? Add `2extract` as another key inside the existing `mcpServers` object.

***

## Verify

Open **Settings** → **Cursor Settings** → **MCP**. `2extract` should show as connected, with its tools listed.

Then, in the chat panel with Agent mode active:

> What is my 2extract balance?

<Check>
  A number comes back. The tool call is shown inline, and you can expand it to see exactly what was sent.
</Check>

***

## Troubleshooting

<AccordionGroup>
  <Accordion title="Server shows as disconnected in Settings">
    Check the URL keeps the `/mcp` path. `https://mcp.2extract.com` on its own serves a web page, not the protocol.

    Then use the refresh control next to the server in the MCP settings panel - Cursor does not always re-read the file on save.
  </Accordion>

  <Accordion title="Tools are listed but never used">
    Tools are only available in **Agent** mode. In Ask mode the model can see them but will not call them.
  </Accordion>

  <Accordion title="Everything returns unauthorized">
    The `Authorization` header must read `Bearer 2xt_...` - the word, a space, the key. If you pasted from a terminal, check for a trailing newline inside the quotes.
  </Accordion>

  <Accordion title="Project config works for you but not for a teammate">
    Expected, if the key is yours. Each person needs their own key with their own scopes - keys are per account, and usage is billed to whoever owns the key.
  </Accordion>
</AccordionGroup>

***

## Next steps

<CardGroup cols={2}>
  <Card title="Usage Examples" icon="terminal" href="/ai/mcp-server/usage-examples">
    Sessions from request to connection string.
  </Card>

  <Card title="Tools" icon="wrench" href="/ai/mcp-server/tools">
    Everything the agent can call.
  </Card>
</CardGroup>
