> ## 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.

# Windsurf

> Add the 2extract MCP server to Windsurf so Cascade can provision proxies while you build.

Windsurf exposes MCP servers to Cascade, its agent. Configuration is a JSON file, editable by hand or through the UI.

***

## Add the server

Open **Settings** → **Cascade** → **MCP Servers** → **Add Server** → **Add custom server**, which opens `mcp_config.json`:

| Platform      | Path                                              |
| :------------ | :------------------------------------------------ |
| macOS / Linux | `~/.codeium/windsurf/mcp_config.json`             |
| Windows       | `%USERPROFILE%\.codeium\windsurf\mcp_config.json` |

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

<Note>
  Windsurf uses `serverUrl` for remote servers, where most other clients use `url`. If your version rejects the config, check the shape in **Settings** → **Cascade** → **MCP Servers**, then fill in the same three values: the URL `https://mcp.2extract.com/mcp`, Streamable HTTP, and the `Authorization: Bearer` header.
</Note>

***

## Verify

Press the refresh control in the MCP Servers panel, then ask Cascade:

> What is my 2extract balance?

<Check>
  Cascade calls the tool and reports the number. Available tools are listed under the server entry in settings.
</Check>

***

## Troubleshooting

<AccordionGroup>
  <Accordion title="Server does not appear after saving">
    Use the refresh control in the MCP Servers panel - Windsurf does not always re-read the file automatically. If that fails, restart the editor.
  </Accordion>

  <Accordion title="Tool limit reached">
    Windsurf caps how many MCP tools it will expose to Cascade at once. Our server contributes 19. If you run several servers, disable the ones you are not using, or turn off individual tools in the server's settings entry.
  </Accordion>

  <Accordion title="Unauthorized on every call">
    Check the header reads `Bearer 2xt_...` - the word, a space, the key. A trailing newline from copy-paste also breaks it.
  </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>
