MCP Directory

How to add Sourcerer MCP to Cursor

Semantic code search & navigation for AI agents — jump to the exact functions and chunks instead of reading whole files. Paste the config into ~/.cursor/mcp.json and restart Cursor.

Last updated June 14, 2026 · 116 · stdio · apikey

Cursor config for Sourcerer MCP

go install github.com/st3v3nmw/sourcerer-mcp/cmd/sourcerer@latest
{
  "mcpServers": {
    "sourcerer-mcp": {
      "command": "sourcerer",
      "args": [],
      "env": {
        "OPENAI_API_KEY": "your-openai-api-key",
        "SOURCERER_WORKSPACE_ROOT": "/path/to/your/project"
      }
    }
  }
}

Setup steps

  1. 1Open Cursor → Settings → MCP → Add new MCP server (or edit ~/.cursor/mcp.json directly).
  2. 2Paste the Sourcerer MCP config below into the "mcpServers" object.
  3. 3Fill in placeholder secrets, then save.
  4. 4Cursor reloads MCP servers automatically — check Settings → MCP for a green status dot.
  5. 5Ask Cursor to use one of Sourcerer MCP's tools to confirm it's connected.

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)

What Sourcerer MCP can do in Cursor

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.

Security

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 + Cursor FAQ

Where is the Cursor config file?

Cursor reads MCP servers from ~/.cursor/mcp.json. Paste the Sourcerer MCP config there under the "mcpServers" key and restart the client.

Is Sourcerer MCP safe to use with Cursor?

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.

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

View repo Full Sourcerer MCP page