MCP Directory

Sourcerer MCP

Semantic code search & navigation for AI agents — jump to the exact functions and chunks instead of reading whole files.

Unverified
stdio (local)
API key
Stale
Go

Add to your client

Copy the config for your MCP client and paste it into its config file.

Install / run
go install github.com/st3v3nmw/sourcerer-mcp/cmd/sourcerer@latest

Paste into ~/Library/Application Support/Claude/claude_desktop_config.json

{
  "mcpServers": {
    "sourcerer-mcp": {
      "command": "sourcerer",
      "args": [],
      "env": {
        "OPENAI_API_KEY": "your-openai-api-key",
        "SOURCERER_WORKSPACE_ROOT": "/path/to/your/project"
      }
    }
  }
}

Step-by-step guides: Add to Claude Desktop · Add to Cursor · Add to Windsurf

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)

About Sourcerer MCP

Sourcerer MCP gives AI agents semantic search and navigation over a codebase so they can find and retrieve only the relevant functions, classes, and code chunks instead of reading whole files — dramatically reducing token usage. It uses Tree-sitter to parse files into ASTs and extract chunks with stable IDs, watches the filesystem (fsnotify) and respects .gitignore for automatic re-indexing, and stores OpenAI-generated embeddings in a persistent chromem-go vector database under .sourcerer/db/.

Tools & capabilities (5)

semantic_search

Find relevant code using semantic search.

get_chunk_code

Retrieve specific chunks by ID.

find_similar_chunks

Find similar chunks.

index_workspace

Manually trigger re-indexing of the workspace.

get_index_status

Check indexing progress.

When to use it

  • Let AI agents find relevant code conceptually without reading entire files, reducing token usage and cognitive load
  • Jump directly to specific functions, classes, methods, or types by semantic relevance
  • Discover code similar to a given chunk across the codebase
  • Keep a semantic index automatically up to date as files change in a git repository

Security notes

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 FAQ

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

How do I add it to Claude Code?

Run: `claude mcp add sourcerer -e OPENAI_API_KEY=your-openai-api-key -e SOURCERER_WORKSPACE_ROOT=$(pwd) -- sourcerer`.

Where is the index stored?

In the .sourcerer/db/ directory using chromem-go for persistent vector storage. Add .sourcerer/ to your .gitignore.

Alternatives to Sourcerer MCP

Compare all alternatives →

Microsoft's official browser-automation MCP using Playwright's accessibility tree (no vision model).

Featured
Verified
stdio (local)
No auth
TypeScript
12 tools
Updated 13 days agoRepo

Up-to-date, version-specific library documentation injected into your coding agent.

Verified
stdio (local)
API key
TypeScript
2 tools
Updated 17 days agoRepo

LSP-powered coding agent toolkit: semantic symbol search, references and structural edits.

Verified
stdio (local)
No auth
Python
11 tools
Updated 15 days agoRepo