Skip to main content
plugin

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

Install into Claude Code · Plugin marketplace All methods and platforms ↓
/plugin install sourcegraph@claude-plugins-official
/plugin marketplace add anthropics/claude-plugins-official
Open on GitHub

What 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-official

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

Similar plugins

Plugins catalog →
searching-sourcegraph cline searching-sourcegraph tells the agent which Sourcegraph MCP tool to reach for and in what order. Useful when you need to find an implementation or make sense of an unfamiliar system. CX Codex +1 1,800installs Sourcegraph MCP Server sourcegraph-community Connects an agent to Sourcegraph code search and navigation. Use it when an MCP client needs repository discovery, symbol lookup, or change inspection. CX Codex +1 ★ 14repo stars discernment-nudge official anthropics discernment-nudge — a plugin for Claude Code and Claude.ai that appends two or three short questions after a substantive answer. Helps check key facts, probe the reasoning, and spot missing context. ★ 198,522repo stars academy-guide official anthropics academy-guide is a Claude Code plugin that points users to Claude Academy courses, tutorials, and use cases. It responds to questions about using Claude. ★ 198,522repo stars claude-api official anthropics This plugin adds Claude API and SDK guidance for building LLM-powered applications. Install it when your project needs a Claude integration. ★ 198,522repo stars example-skills official anthropics example-skills — a plugin for Claude Code and Claude.ai with a set of sample skills. Demonstrates how to build skills, MCP servers, artifacts, web tests, and internal communication tools. ★ 198,522repo stars document-skills official anthropics Document processing suite for Excel, Word, PowerPoint, and PDF files. Equips the assistant to inspect and generate common document formats. ★ 198,522repo stars impeccable pbakaus impeccable — a Claude Code plugin that gives the agent a designer's vocabulary and 24 commands for working with interfaces. Kick it off at any stage, from gathering product context to the final polish pass. ★ 114,575repo stars

Project sponsors

Companies that keep this analytics open