Sourcerer

v1.0.0Developer Toolsstable

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

claude-codecode-analysiscode-navigationcode-searchmcp
Share:
113
Stars
0
Downloads
0
Weekly
0/5

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

Perform semantic code search to find functions and classes without reading entire files.
Navigate code efficiently and reduce token usage in AI coding workflows.
Jump directly to relevant code sections using conceptual search.
st3v3nmw

Maintainer

LicenseMIT License
Languagego
Versionv1.0.0
UpdatedMay 6, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx sourcerer-mcp

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

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)
1

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/sourcerer
2

Add 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) \
  -- sourcerer
3

Or 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"
      }
    }
  }
}
4

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.

5

Monitor indexing progress

For large codebases, indexing can take a few minutes. Use the get_index_status tool to check progress before starting searches.

6

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.

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.

Quick Config Preview

{ "mcpServers": { "sourcerer-mcp": { "command": "npx", "args": ["-y", "sourcerer-mcp"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

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.

33,000+ ServersFree & Open SourceStep-by-Step Guides