Sourcerer

v1.0.0Developer Toolsstable

MCP for semantic code search & navigation that reduces token waste

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 for semantic code search & navigation that reduces token waste

MCP for semantic code search & navigation that reduces token waste

This server falls under the Developer Tools category on MCPgee, the world's largest MCP server directory with 33,000+ servers.

Features

  • MCP for semantic code search & navigation that reduces token

Use Cases

Search code semantically to navigate without excessive token overhead.
Locate functions, classes, and modules with intelligent code search.
st3v3nmw

Maintainer

LicenseMIT
Languagego
Versionv1.0.0
UpdatedMay 6, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx sourcerer

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 is an MCP server for semantic code search and navigation that helps AI agents work efficiently without burning through token budgets. Instead of reading entire files to find relevant code, agents can issue conceptual searches and jump directly to the specific functions, classes, or modules they need. It uses OpenAI embeddings to index your codebase and supports Go, JavaScript, TypeScript, Python, and Markdown out of the box.

Prerequisites

  • Go 1.21 or later installed, OR Homebrew on macOS for the tap-based install
  • An OpenAI API key for generating code embeddings (OPENAI_API_KEY)
  • An MCP-compatible client such as Claude Code or Claude Desktop
  • A local codebase to index (the workspace root path is required at startup)
1

Install the sourcerer binary

Install via go install or Homebrew. The go install approach works on any platform; the Homebrew tap is the easiest option on macOS.

# 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

Set your OpenAI API key

Sourcerer uses OpenAI's embedding API to build a semantic index of your code. Export your API key in your shell or set it in your MCP client configuration.

export OPENAI_API_KEY=sk-...
3

Add sourcerer to Claude Code

The quickest way to register the server with Claude Code is the claude mcp add command. It sets the required environment variables and registers the server in one step.

claude mcp add sourcerer \
  -e OPENAI_API_KEY=your-openai-api-key \
  -e SOURCERER_WORKSPACE_ROOT=$(pwd) \
  -- sourcerer
4

Or configure via mcp.json

Alternatively add the server to your project's mcp.json or Claude Desktop config. Set SOURCERER_WORKSPACE_ROOT to the absolute path of the repository you want indexed.

{
  "mcpServers": {
    "sourcerer": {
      "command": "sourcerer",
      "env": {
        "OPENAI_API_KEY": "your-openai-api-key",
        "SOURCERER_WORKSPACE_ROOT": "/absolute/path/to/your/project"
      }
    }
  }
}
5

Index your workspace

On first use, ask the agent to index the workspace using the index_workspace tool. This builds the semantic vector index from your source files. You can monitor progress with get_index_status.

6

Search your codebase semantically

Use semantic_search to find code by concept rather than exact text. Use get_chunk_code to retrieve the full source of a specific chunk, and find_similar_chunks to locate analogous patterns elsewhere in the codebase.

Sourcerer Examples

Client configuration

MCP client config for sourcerer with the required environment variables.

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

Prompts to try

Example prompts that use sourcerer's semantic search to navigate a codebase efficiently.

- "Find all functions related to user authentication and token validation"
- "Search for code that handles database connection pooling"
- "Locate the error handling middleware for HTTP requests"
- "Find similar patterns to the retry logic in the payments module"
- "Show me where the caching layer is initialized and configured"

Troubleshooting Sourcerer

Index build fails with OpenAI API errors

Verify your OPENAI_API_KEY is valid and has not exceeded its rate limit or quota. The embedding API requires an active key with sufficient credits. Check your usage at platform.openai.com.

sourcerer binary not found after installation

If installed via go install, ensure $GOPATH/bin (typically ~/go/bin) is in your PATH. Run: export PATH=$PATH:$(go env GOPATH)/bin. For Homebrew, run: brew link sourcerer.

Files are not appearing in search results

Only Go, JavaScript, TypeScript, Python, and Markdown files are currently indexed. Verify SOURCERER_WORKSPACE_ROOT points to the correct directory and re-run the index_workspace tool to rebuild the index after adding new files.

Frequently Asked Questions about Sourcerer

What is Sourcerer?

Sourcerer is a Model Context Protocol (MCP) server that mcp for semantic code search & navigation that reduces token waste 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. 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": { "command": "npx", "args": ["-y", "sourcerer"] } } }

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