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

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

  2. Add Context7 to Windsurf

    Use the context7-mcp entry below in mcpServers. Keep Context7's documented http connection fields and your other Windsurf entries.

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

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.

Context7: full stored tool descriptions

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

Frequently asked questions

Windsurf reads Context7 under mcpServers in ~/.codeium/windsurf/mcp_config.json on macOS/Linux; Windows uses %USERPROFILE%\.codeium\windsurf\mcp_config.json.

Windsurf's context7-mcp example uses http. The Context7 catalog lists stdio; these instructions follow the stored configuration instead.

Windsurf connects Context7 to mcp.context7.com using serverUrl.

Context7's stored list contains 2 tools, including resolve-library-id, query-docs. Compare those names with Windsurf's connected tool list; the stored list is not a live check.

Include the Context7-compatible ID in your request to bypass the library-matching step.

No. The repository contains the MCP server, while the supporting API backend, parser, and crawler remain private.