sourcegraph — Claude Code plugin for code search and setup
Connect Claude Code to Sourcegraph to search code and navigate repositories. Use it to explore a codebase, investigate bugs, or trace the impact of a refactor.
no license ★ 4 updated 2026-09-14
/plugin install sourcegraph@claude-plugins-official
/plugin marketplace add anthropics/claude-plugins-officialWhat sourcegraph does
The plugin adds a Sourcegraph MCP server and the searching-sourcegraph skill. Claude Code can use them to search code, follow references, inspect commits and diffs, and navigate to definitions. The skill includes workflows for code exploration, feature work, debugging, bug fixes, and reviews.
You need Claude Code version 1.0.33 or later, a Sourcegraph instance with MCP enabled, and an access token scoped to mcp. Set SOURCEGRAPH_ENDPOINT and SOURCEGRAPH_ACCESS_TOKEN in your shell profile. The plugin connects to /.api/mcp/all, since its workflows depend on navigation and Deep Search tools that are missing from Sourcegraph’s curated default endpoint.
What it helps with
- find symbol definitions and references across repositories
- trace where a function is used
- explore unfamiliar parts of a codebase
- check refactor impact across a project
- inspect related commits and diffs while debugging
Example prompts for the agent
- Find this function’s definition and its uses across my repositories.
- Explore this part of the codebase and explain how data flows through it.
- Search related commits and diffs to investigate this bug.
How to install sourcegraph
Plugin marketplace
/plugin install sourcegraph@claude-plugins-official/plugin marketplace add anthropics/claude-plugins-officialStep by step, with commands for each platform: Claude Code plugins: marketplaces, installing, and building your own
Questions about sourcegraph
How do I install sourcegraph in Claude Code?
Add the marketplace with /plugin marketplace add anthropics/claude-plugins-official, then install the plugin with /plugin install sourcegraph@claude-plugins-official.
What does the sourcegraph plugin do?
It connects Claude Code to Sourcegraph’s MCP server and adds a skill for code search and navigation. The skill also provides workflows for debugging, feature work, and code review.
What does sourcegraph require to work in Claude Code?
You need Claude Code version 1.0.33 or later, a Sourcegraph instance with MCP enabled, and an access token with the mcp scope. Set SOURCEGRAPH_ENDPOINT and SOURCEGRAPH_ACCESS_TOKEN in your shell profile.