Data as of
Context7 for Windsurf: Setup & Config
Context7 retrieves current library documentation and code examples for Windsurf.
What you can do with Context7 in Windsurf
Ground coding assistance in targeted library documentation, including version-specific examples.
- Find examples for a particular framework or package version.
- Configure an agent to fetch documentation automatically for library questions.
Before you start: Context7 in Windsurf
- Node.js 18 or later for the setup CLI
- A compatible coding agent or MCP client
This is a setup command, not a persistent server launch. Choose MCP mode during setup. Manual HTTP configuration passes a key in the CONTEXT7_API_KEY header, not an environment variable. A free API key is recommended for higher limits.
Context7 Windsurf configuration
Choose Windsurf configuration scope
For Context7, open macOS/Linux: ~/.codeium/windsurf/mcp_config.json Windows: %USERPROFILE%\.codeium\windsurf\mcp_config.json. Merge into mcpServers; remote endpoints use serverUrl.
Add Context7 to Windsurf
Use the context7-mcp entry below in mcpServers. Keep Context7's documented http connection fields and your other Windsurf entries.
Check Context7 in Windsurf
Context7: Refresh MCP in Windsurf settings and inspect Cascade’s tools.
Config file · macOS/Linux: ~/.codeium/windsurf/mcp_config.json
Windows: %USERPROFILE%\.codeium\windsurf\mcp_config.json
{
"mcpServers": {
"context7-mcp": {
"serverUrl": "https://mcp.context7.com/mcp"
}
}
}Context7 tools available to Windsurf
Context7's stored tool list documents 2 tools; compare it with Windsurf's connected tool list, because the stored list is not a live check.
- resolve-library-id
After refreshing Context7 in Windsurf settings, check Cascade's tool list for resolve-library-id.
- query-docs
After refreshing Context7 in Windsurf settings, check Cascade's tool list for query-docs.
Retrieve task-relevant documentation for an exact Context7 library ID.
Troubleshooting Context7 in Windsurf
- For Context7, Windsurf reads serverUrl (mcp.context7.com), not url. Refresh the connection and check the tools exposed to Cascade.
- Context7: check http connectivity to mcp.context7.com from Windsurf; a stdio command is not a replacement for this endpoint.
- Transport mismatch: Context7's catalog lists stdio; the displayed Windsurf configuration uses http.
- Known limitation: Community-contributed documentation is not guaranteed accurate, complete, or secure.
- Known limitation: The backend, parsing engine, and crawler are not included in the repository.
- Known limitation: Higher rate limits are tied to using an API key.
- General Windsurf troubleshooting lives in the /clients/windsurf guide.
Context7 — details. Windsurf guide