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

# Windsurf

> Set up and use the OpenCX MCP server in Windsurf — MCP settings and JSON configuration.

Windsurf supports <Tooltip tip="An open standard that lets AI assistants interact with external tools and data sources.">MCP</Tooltip> servers through **`mcp_config.json`**, which Cascade reads when you use MCP tools. See [Cascade MCP integration](https://docs.windsurf.com/windsurf/cascade/mcp) in the Windsurf docs for the latest UI.

## Setup

<Steps>
  <Step title="Open the config file">
    From the Command Palette (**Shift+Command+P** / **Ctrl+Shift+P**), run **Windsurf: Configure MCP Servers**, or edit the file directly:

    * **macOS / Linux:** `~/.codeium/windsurf/mcp_config.json`
    * **Windows:** `%USERPROFILE%\.codeium\windsurf\mcp_config.json`

    You can also open it from the **MCPs** menu in the Cascade panel, then choose the option to view or edit the raw config.
  </Step>

  <Step title="Add the OpenCX server">
    Use the same structure as in [Get Started](/mcp/install) under the **Windsurf** tab:

    ```json theme={"dark"}
    {
      "mcpServers": {
        "opencx": {
          "command": "npx",
          "args": ["-y", "@opencx/mcp"],
          "env": {
            "OPENCX_API_KEY": "your-api-key-here"
          }
        }
      }
    }
    ```

    Replace `your-api-key-here` with your [OpenCX API key](https://platform.open.cx/settings/access).
  </Step>

  <Step title="Restart and verify">
    Fully quit and reopen Windsurf so Cascade picks up changes. In Cascade, ask: *"List my recent chat sessions."*
  </Step>
</Steps>

## Tips

* Keep the API key out of shared repos. Windsurf supports interpolation such as `${env:OPENCX_API_KEY}` in `command`, `args`, and `env` fields so you can read the key from your shell environment instead of pasting it into the file.
* If the server fails to start, run `npx -y @opencx/mcp` in a terminal to confirm Node and network access.

***

## Related Documentation

<CardGroup cols={2}>
  <Card title="Get Started" icon="download" href="/mcp/install">
    API key setup and all client configs
  </Card>

  <Card title="Cursor" icon="text-slash" href="/mcp/clients/cursor">
    Similar mcpServers JSON shape
  </Card>

  <Card title="VS Code" icon="code" href="/mcp/clients/vscode">
    Microsoft editor MCP via mcp.json
  </Card>

  <Card title="Troubleshooting" icon="wrench" href="/mcp/troubleshooting">
    Common issues and fixes
  </Card>
</CardGroup>
