sourcerer-mcp
by st3v3nmw·★ 113·Score 44
MCP server for semantic code search that helps AI agents navigate codebases efficiently without token waste.
Overview
Sourcerer MCP is a specialized MCP server designed to help AI agents work with codebases more efficiently. Instead of reading entire files, it allows agents to search conceptually and jump directly to specific functions, classes, and code chunks they need. The server uses Tree-sitter to parse code, extracts meaningful chunks with stable IDs, and maintains a vector database using OpenAI embeddings for semantic search. It supports multiple programming languages including Go, JavaScript, Python, and TypeScript.
Try asking AI
After installing, here are 5 things you can ask your AI assistant:
When to choose this
Choose Sourcerer when working with large codebases and you need AI agents to efficiently find relevant code without reading entire files.
When NOT to choose this
Avoid if you need offline operation or have concerns about vendor lock-in to OpenAI for embeddings.
Tools this server exposes
5 tools extracted from the READMEsemantic_searchFind relevant code using semantic search
get_chunk_codeRetrieve specific chunks by ID
find_similar_chunksFind similar chunks of code
index_workspaceManually trigger re-indexing of the codebase
get_index_statusCheck indexing progress of the codebase
Comparable tools
Installation
Installation
Go
go install github.com/st3v3nmw/sourcerer-mcp/cmd/sourcerer@latestHomebrew
brew tap st3v3nmw/tap
brew install st3v3nmw/tap/sourcererConfiguration for Claude Code
claude mcp add sourcerer -e OPENAI_API_KEY=your-openai-api-key -e SOURCERER_WORKSPACE_ROOT=$(pwd) -- sourcerermcp.json Configuration
{
"mcpServers": {
"sourcerer": {
"command": "sourcerer",
"env": {
"OPENAI_API_KEY": "your-openai-api-key",
"SOURCERER_WORKSPACE_ROOT": "/path/to/your/project"
}
}
}
}FAQ
- What programming languages are supported?
- Currently supported: Go, JavaScript, Markdown, Python, TypeScript. Planned: C, C++, Java, Ruby, Rust, and others.
- What are the system requirements?
- Requires an OpenAI API key for generating embeddings, Git repository (respects .gitignore files), and a .sourcerer/ directory added to .gitignore.
On Hacker News
Recent discussion from the developer community.
- Story by st3v3nmw · 2025-08-30
Compare sourcerer-mcp with
Last updated · Auto-generated from public README + GitHub signals.