
How to add Sourcerer MCP to Claude Desktop
Semantic code search & navigation for AI agents — jump to the exact functions and chunks instead of reading whole files. Paste the config into ~/Library/Application Support/Claude/claude_desktop_config.json and restart Claude Desktop.
Last updated June 14, 2026 · 116★ · stdio · apikey
Claude Desktop 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 Claude Desktop → Settings → Developer → Edit Config (this opens ~/Library/Application Support/Claude/claude_desktop_config.json).
- 2Paste the Sourcerer MCP config below under the top-level "mcpServers" key.
- 3Fill in any placeholder secrets (API keys, paths) in the snippet.
- 4Save the file, then fully quit and reopen Claude Desktop.
- 5Open a chat and confirm Sourcerer MCP's tools appear under the 🔌 tools menu.
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 Claude Desktop
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 + Claude Desktop FAQ
Where is the Claude Desktop config file?
Claude Desktop reads MCP servers from ~/Library/Application Support/Claude/claude_desktop_config.json. Paste the Sourcerer MCP config there under the "mcpServers" key and restart the client.
Is Sourcerer MCP safe to use with Claude Desktop?
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`.