Windsurf ยท install guide
Install Context7 MCP in Windsurf
In Windsurf, open the Cascade MCP settings and add a server named context7 with url https://mcp.context7.com/mcp, or paste the JSON on this page into Windsurf's MCP config file. Restart Windsurf, then add use context7 to a prompt.
Windsurf takes the same remote URL as Cursor and needs no local process. Context7 publishes no Windsurf instructions of its own, so this page is written from the MCP config format Windsurf accepts.
{
"mcpServers": {
"context7": {
"url": "https://mcp.context7.com/mcp"
}
}
}Add Context7 to Windsurf
Windsurf reads MCP servers from a JSON file with an mcpServers object, the same shape Cursor uses. Context7 is a remote HTTP server, so the entry is a name and a url and nothing else: no command, no args, no local package.
The reliable route is through the editor rather than the filesystem. Windsurf exposes its MCP servers in the Cascade settings, with a button to add one and an option to edit the raw JSON. Adding it there writes the file for you, in the right place, in the right format.
- Open Cascade, then its settings, and find the MCP servers section.
- Add a server named context7 with url https://mcp.context7.com/mcp, or use the raw JSON option and paste the block above.
- Restart Windsurf so Cascade picks the server up.
- Add use context7 to a prompt that needs current library docs.
Where the MCP config file lives
If you would rather edit the file directly, it is the one the MCP settings panel writes, and it sits in Windsurf's own support directory rather than in your project. On macOS and Linux that has commonly been ~/.codeium/windsurf/mcp_config.json, with the equivalent under your user profile on Windows.
That location has moved between Windsurf releases, so treat it as a starting point rather than a guarantee. If the file is not there, open the MCP settings panel and use its edit option, which always points at whatever path your build actually uses. Whatever the path, the contents are the mcpServers block above.
Confirming it connected
Windsurf has no equivalent of claude mcp list, so the check is the MCP settings panel: context7 should appear as a server, and the tools it exposes should be listed under it. Two tools mean the handshake succeeded.
The functional test is a prompt that needs current documentation, with use context7 attached. If Cascade answers without ever calling the server, the server is not connected regardless of what the panel implies, and a restart is the first thing to try.
- context7 is listed in the MCP settings panel.
- resolve-library-id and get-library-docs appear as its tools.
- A prompt with use context7 visibly calls the server.
If you also use Claude Code
Keep one registration per machine. Adding this JSON in Windsurf while also running claude mcp add gives you two independent clients talking to the same remote endpoint, which is fine, but adding context7 twice inside one client is not. Duplicate names in a single client are a known source of a tool-name collision error.
If something breaks after adding it in a second place, /troubleshooting covers the specific error strings.
Optional API key
Try it without a key first. For higher rate limits and private library docs, create a key at context7.com/dashboard and send it as an Authorization Bearer header against https://mcp.context7.com/mcp. In JSON-configured clients that means adding a headers object alongside the url.