
How to add Sourcerer MCP to Windsurf
Semantic code search & navigation for AI agents — jump to the exact functions and chunks instead of reading whole files. Paste the config into ~/.codeium/windsurf/mcp_config.json and restart Windsurf.
Last updated June 14, 2026 · 116★ · stdio · apikey
Windsurf config for Sourcerer MCP
go install github.com/st3v3nmw/sourcerer-mcp/cmd/sourcerer@latest{
"mcpServers": {
"sourcerer-mcp": {
"command": "sourcerer",
"args": [],
"env": {
"OPENAI_API_KEY": "your-openai-api-key",
"SOURCERER_WORKSPACE_ROOT": "/path/to/your/project"
}
}
}
}Setup steps
- 1Open Windsurf → Cascade → the hammer/MCP icon → Configure (or edit ~/.codeium/windsurf/mcp_config.json).
- 2Paste the Sourcerer MCP config below.
- 3Fill in placeholder secrets, then save.
- 4Click Refresh in the MCP panel.
- 5Sourcerer MCP's tools become available to Cascade.
Before you start
- OpenAI API key (for generating embeddings; local embedding support is planned)
- Git — the workspace must be a git repository (respects .gitignore files)
- Add .sourcerer/ to .gitignore (stores the embedded vector database)
- Install the sourcerer binary via Go (go install) or Homebrew (st3v3nmw/tap)
What Sourcerer MCP can do in Windsurf
semantic_searchFind relevant code using semantic search.
get_chunk_codeRetrieve specific chunks by ID.
find_similar_chunksFind similar chunks.
index_workspaceManually trigger re-indexing of the workspace.
get_index_statusCheck indexing progress.
Security
Requires an OpenAI API key (passed via the OPENAI_API_KEY environment variable) to generate embeddings; code chunks are sent to OpenAI's API for embedding. Must be run inside a git repository and respects .gitignore. Add the .sourcerer/ directory (which stores the embedded vector database) to .gitignore.
Sourcerer MCP + Windsurf FAQ
Where is the Windsurf config file?
Windsurf reads MCP servers from ~/.codeium/windsurf/mcp_config.json. Paste the Sourcerer MCP config there under the "mcpServers" key and restart the client.
Is Sourcerer MCP safe to use with Windsurf?
Requires an OpenAI API key (passed via the OPENAI_API_KEY environment variable) to generate embeddings; code chunks are sent to OpenAI's API for embedding. Must be run inside a git repository and respects .gitignore. Add the .sourcerer/ directory (which stores the embedded vector database) to .gitignore.
Do I need an OpenAI API key?
Yes. An OpenAI API key is required to generate embeddings. Local embedding support is planned.
Which languages are supported?
Go, JavaScript, Markdown, Python, and TypeScript are supported. C, C++, Java, Ruby, Rust, and others are planned.
How do I install it?
Install the binary with `go install github.com/st3v3nmw/sourcerer-mcp/cmd/sourcerer@latest`, or via Homebrew: `brew tap st3v3nmw/tap` then `brew install st3v3nmw/tap/sourcerer`.