Help us improve
Share bugs, ideas, or general feedback.
Sourcegraph MCP plugin for Claude Code
npx claudepluginhub sourcegraph-community/sourcegraph-claudecode-pluginUse Sourcegraph MCP from Claude Code for code search, navigation, history, and Deep Search.
Share bugs, ideas, or general feedback.
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>