Use Sourcegraph MCP from Claude Code for code search, navigation, history, and Deep Search.
Sourcegraph plugin for Claude Code that adds:
searching-sourcegraph skill for disciplined search workflows (with supporting workflows and query patterns)claude --version)mcp scopeSet the required environment variables in your shell profile (.zshrc, .bashrc, etc.):
export SOURCEGRAPH_ENDPOINT="https://sourcegraph.example.com"
export SOURCEGRAPH_ACCESS_TOKEN="<your-token>"
Add this repository as a marketplace, then install the plugin:
# From a local clone
claude plugin marketplace add ./sourcegraph-claudecode-plugin
# Or directly from GitHub
claude plugin marketplace add sourcegraph-community/sourcegraph-claudecode-plugin
Then install:
claude plugin install sourcegraph@sourcegraph-claudecode-plugin
Restart Claude Code after installing.
Load the plugin for a single session without installing permanently:
claude --plugin-dir ./sourcegraph-claudecode-plugin
Run /reload-plugins after making changes during a session.
If you only want the Sourcegraph MCP tools without the skills, add the server directly:
claude mcp add --transport http sourcegraph \
"${SOURCEGRAPH_ENDPOINT}/.api/mcp" \
--header "Authorization: token ${SOURCEGRAPH_ACCESS_TOKEN}"
After installing, confirm everything loaded:
/help should list sourcegraph:searching-sourcegraph/mcp should show the sourcegraph MCP server as connected.
├── .claude-plugin/
│ ├── plugin.json
│ └── marketplace.json
├── .mcp.json
├── skills/
│ └── searching-sourcegraph/
│ ├── SKILL.md
│ ├── query-patterns.md
│ ├── examples/
│ │ └── common-searches.md
│ └── workflows/
│ ├── implementing-feature.md
│ ├── understanding-code.md
│ ├── debugging-issue.md
│ ├── fixing-bug.md
│ └── code-review.md
└── README.md
The plugin installs one skill: searching-sourcegraph. Claude auto-invokes it when you need to search or navigate code via Sourcegraph. It includes workflows for implementing features, understanding code, debugging issues, fixing bugs, and code review.
${SOURCEGRAPH_ENDPOINT}/.api/mcp"type": "http")Authorization: token <token>Own this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimOwn this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimBased on adoption, maintenance, documentation, and repository signals. Not a security audit or endorsement.
npx claudepluginhub sourcegraph-community/sourcegraph-claudecode-plugin --plugin sourcegraphTeaches Claude how to use sverklo's code intelligence MCP tools — semantic search, blast-radius, PR review, codebase audit, persistent memory
CodeAlive context engine for semantic code search and AI-powered codebase Q&A. Enables AI coding agents to understand entire codebases beyond just open files — search across all indexed repositories, trace cross-service dependencies, discover usage patterns, and get synthesized answers to architectural questions. Includes a lightweight code exploration subagent, authentication hooks, and multiple search modes (fast lexical, semantic, and deep cross-cutting). Works standalone or alongside the CodeAlive MCP server for direct tool access via the Model Context Protocol.
Codebase intelligence — semantic search workflows, dependency graph analysis, and context artifact exploration for SocratiCode
Semantic code analysis MCP server providing intelligent code understanding, refactoring suggestions, and codebase navigation through language server protocol integration.
Code examples from global open source for developers and AI assistants
Local-first hybrid semantic code search with dependency graphs and cross-repo search. Powered by CocoIndex, Tree-sitter, pgvector, and Ollama.