# sourcegraph

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.

- plugin · `type=plugin` · Claude Code · ★ 4 repo stars
- Author: sourcegraph-community
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/sourcegraph-community/sourcegraph-claudecode-plugin
- Updated: 2026-09-14
- Security check: automated, 2026-11-16 (text and 3 script files) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/plugins/sourcegraph

## What it 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.

## Install

### Claude Code (native platform)

**Plugin marketplace**
In the agent chat (not a shell):
```text
/plugin install sourcegraph@claude-plugins-official
```
In the agent chat (not a shell):
```text
/plugin marketplace add anthropics/claude-plugins-official
```

## When to use it
- 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
- 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.

## Similar
- [searching-sourcegraph](https://affpapa.org/en/nevibecode/skills/searching-sourcegraph.md) — skill · 1800 installs
- [Sourcegraph MCP Server](https://affpapa.org/en/nevibecode/mcp/sourcegraph-mcp-server.md) — MCP server · ★ 14 repo stars
- [discernment-nudge](https://affpapa.org/en/nevibecode/plugins/discernment-nudge.md) — plugin · ★ 198522 repo stars
- [academy-guide](https://affpapa.org/en/nevibecode/plugins/academy-guide.md) — plugin · ★ 198522 repo stars
- [claude-api](https://affpapa.org/en/nevibecode/plugins/claude-api.md) — plugin · ★ 198522 repo stars
- [example-skills](https://affpapa.org/en/nevibecode/plugins/example-skills.md) — plugin · ★ 198522 repo stars
- [document-skills](https://affpapa.org/en/nevibecode/plugins/document-skills.md) — plugin · ★ 198522 repo stars
- [impeccable](https://affpapa.org/en/nevibecode/plugins/impeccable.md) — plugin · ★ 114575 repo stars

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
