Sourcerer
An MCP server for semantic code search & navigation that helps AI agents work efficiently without burning through costly tokens. Instead of reading entire files, agents can search conceptually and jump directly to the specific functions, classes, and
What is Sourcerer?
Sourcerer is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to mcp server for semantic code search & navigation that helps ai agents work efficiently without burning through costly tokens. instead of reading entire files, agents can search conceptually and jump d...
An MCP server for semantic code search & navigation that helps AI agents work efficiently without burning through costly tokens. Instead of reading entire files, agents can search conceptually and jump directly to the specific functions, classes, and
This server falls under the Developer Tools category on MCPgee, the world's largest MCP server directory with 33,000+ servers.
Features
- An MCP server for semantic code search & navigation that hel
Use Cases
Maintainer
Works with
Installation
Manual Installation
npx sourcerer-mcpConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
How to Set Up and Use Sourcerer
Sourcerer MCP is an MCP server for semantic code search and navigation that helps AI agents work efficiently in large codebases without burning through costly token budgets. Instead of reading entire files to find relevant code, agents can perform conceptual searches using natural language and jump directly to specific functions, classes, or modules. It uses OpenAI embeddings to build a searchable vector index of your project, and exposes tools for semantic search, chunk retrieval, and similarity finding — supporting Go, JavaScript, TypeScript, Python, and Markdown.
Prerequisites
- Go 1.21 or later installed, OR Homebrew on macOS
- An OpenAI API key for generating code embeddings (OPENAI_API_KEY)
- An MCP-compatible client such as Claude Code or Claude Desktop
- A local project directory to index (set as SOURCERER_WORKSPACE_ROOT)
Install the sourcerer binary
Install sourcerer via go install or the Homebrew tap. Both methods produce the same binary.
# Via Go
go install github.com/st3v3nmw/sourcerer-mcp/cmd/sourcerer@latest
# Via Homebrew (macOS)
brew tap st3v3nmw/tap
brew install st3v3nmw/tap/sourcererAdd sourcerer to Claude Code in one command
The claude mcp add command registers the server and sets the required environment variables. Run it from the root of the project you want to index.
claude mcp add sourcerer \
-e OPENAI_API_KEY=sk-your-openai-key \
-e SOURCERER_WORKSPACE_ROOT=$(pwd) \
-- sourcererOr configure via mcp.json for Claude Desktop
Add the server entry to your mcp.json or claude_desktop_config.json. Use the absolute path for SOURCERER_WORKSPACE_ROOT.
{
"mcpServers": {
"sourcerer": {
"command": "sourcerer",
"env": {
"OPENAI_API_KEY": "sk-your-openai-key",
"SOURCERER_WORKSPACE_ROOT": "/absolute/path/to/your/project"
}
}
}
}Index your workspace
On first run, trigger workspace indexing. Ask the AI agent to call the index_workspace tool, or include it in your initial prompt. Indexing reads all supported source files and creates vector embeddings.
Monitor indexing progress
For large codebases, indexing can take a few minutes. Use the get_index_status tool to check progress before starting searches.
Perform semantic searches
Use semantic_search to find code by concept, get_chunk_code to retrieve a specific chunk's full source, and find_similar_chunks to locate analogous patterns elsewhere in the codebase.
Sourcerer Examples
Client configuration
Claude Desktop / mcp.json config for sourcerer with both required environment variables.
{
"mcpServers": {
"sourcerer": {
"command": "sourcerer",
"env": {
"OPENAI_API_KEY": "sk-your-openai-key",
"SOURCERER_WORKSPACE_ROOT": "/path/to/your/project"
}
}
}
}Prompts to try
Example prompts that demonstrate semantic code navigation with sourcerer.
- "Find the function that handles JWT token refresh and show me its implementation"
- "Search for all code related to rate limiting and throttling"
- "Locate where database transactions are opened and committed"
- "Find code similar to the payment retry logic in the billing module"
- "Show me how environment configuration is loaded at startup"Troubleshooting Sourcerer
Embedding generation fails with rate limit or quota errors
The OpenAI embeddings API has rate limits. For large codebases, indexing may hit those limits. Check your usage at platform.openai.com and consider upgrading your tier. The index_workspace tool will resume from where it left off if re-run.
sourcerer not found after go install
Ensure $(go env GOPATH)/bin is in your PATH. Add to your shell profile: export PATH=$PATH:$(go env GOPATH)/bin and restart your shell. Verify with: which sourcerer.
Search returns no results after indexing
Verify SOURCERER_WORKSPACE_ROOT is set to the correct absolute path. Only .go, .js, .ts, .py, and .md files are indexed. Use get_index_status to confirm the index was built successfully and check the file count against your expectations.
Frequently Asked Questions about Sourcerer
What is Sourcerer?
Sourcerer is a Model Context Protocol (MCP) server that mcp server for semantic code search & navigation that helps ai agents work efficiently without burning through costly tokens. instead of reading entire files, agents can search conceptually and jump directly to the specific functions, classes, and It connects AI assistants to external tools and data sources through a standardized interface.
How do I install Sourcerer?
Follow the installation instructions on the Sourcerer GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.
Which AI clients work with Sourcerer?
Sourcerer works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.
Is Sourcerer free to use?
Yes, Sourcerer is open source and available under the MIT License license. You can use it freely in both personal and commercial projects.
Sourcerer Alternatives — Similar Developer Tools Servers
Looking for alternatives to Sourcerer? Here are other popular developer tools servers you can use with Claude, Cursor, and VS Code.
Ecc
★ 188.2kThe agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.
Javaguide
★ 155.8kJava 面试 & 后端通用面试指南,覆盖计算机基础、数据库、分布式、高并发、系统设计与 AI 应用开发
Gemini CLI
★ 104.5kA secure MCP server that wraps the Google Gemini CLI, allowing clients to query Gemini models using local OAuth sessions without requiring an API key. It provides tools for model interaction and diagnostics with built-in protection against command in
Awesome MCP Servers
★ 87.3k⭐ Curated list of Model Context Protocol (MCP) servers - tools that extend Claude Desktop, Cursor, Windsurf, and other MCP clients with custom capabilities.
MCP Servers
★ 86.0kModel Context Protocol Servers
CC Switch
★ 77.5kA cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Gemini CLI & Hermes Agent. Only official website: ccswitch.io
Browse More Developer Tools MCP Servers
Explore all developer tools servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.
Set Up Sourcerer in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
Ready to use Sourcerer?
Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.