Resources · Claude connector

Claude Sourcegraph connectorWhat Claude can do in your Sourcegraph account.

The Claude Sourcegraph connector exposes 13 tools. 12 read code, history and repositories, 1 writes by starting a Deep Search conversation, and 0 are undocumented. Below: what Claude can reach, what your admins control, and where it stops.

Verified Trustpilot reviews · AI, automation & growth agency

Overview

What changes when Claude can query Sourcegraph

Instead of copying files into the chat, you let Claude search your Sourcegraph instance directly: code, commit history, diffs and symbol references, private repositories included, as far as your own permissions go. Claude picks the right search on its own, reads the files it needs and answers with the actual lines in front of it.

An answer grounded in your code. keyword_search and nls_search find the place, read_file brings back the exact lines, and go_to_definition with find_references follow a symbol in both directions.

The story behind a change. commit_search, diff_search and compare_revisions dig into history, so a question like who introduced this call, and when, gets a sourced answer.

Long questions handed to Deep Search. deepsearch opens a Deep Search conversation inside Sourcegraph, and deepsearch_read reopens one that already exists.

What it will not do: no listed tool edits a file, opens a pull request or pushes a commit. The only write is the Deep Search conversation itself. Claude also sees only repositories you can already open in Sourcegraph. Nothing runs on its own: no search fires when code is merged. For flows that react to events, the Integrations hub covers automation tools, a different job, and the Claude connectors page lists the rest.

Vocabulary

Five words before you connect

The vocabulary around this connector, in one minute.

Connector
A link you set up once between Claude and an account you already have, so Claude can work in that account while it answers you.
Tool
One named action the connector gives Claude. Claude picks the tools it needs on its own, and the directory sheet lists them by name.
Authorization
The sign-in screen of the service itself, where you grant the access Claude uses afterwards. Given once per person, and revocable.
Approval
The confirmation Claude waits for before it goes ahead with something that changes your account, shown in the conversation.
MCP
The shared standard connectors are built on: it is what lets an assistant like Claude talk to an outside service such as Sourcegraph.
Connect

Connect the Claude Sourcegraph connector in three steps

  1. 01

    Find Sourcegraph in Claude

    Open Claude's settings, go to Customize then Connectors, and look Sourcegraph up in the list. On a Team or Enterprise workspace, an Owner or Primary Owner enables the connector before members can each sign in.

  2. 02

    Start the connection

    Click Connect on its row, then sign in to Sourcegraph in the browser window it opens. If the link breaks, Disconnect and connect again. The window belongs to Sourcegraph, not to Claude.

  3. 03

    Read the authorization screen

    Check what the screen asks for before accepting. It belongs to Sourcegraph and sets what the access covers. You can later take that access back from the Sourcegraph side too.

Tools

The 13 tools, split by what they do

Sourcegraph gives Claude 13 tools: 12 that read your account, 1 that change something in it.

Two groups here: what Claude reads, and the one tool that creates something. Tool names stay exactly as Claude shows them.

  • 12 read
  • 1 write

What Claude reads (12)

12 tools

Twelve tools that search, list and read code and history without changing anything in your repositories.

compare_revisions

Compares two specific revisions of the code and returns what differs between them, so Claude can explain what moved from one to the other.

When it helps
you need to see what changed between two tags or two branches before reading anything else.

Sourcesourcegraph.com · October 1, 2026 ↗

deepsearch_read

Reads an existing Deep Search conversation and returns its questions and answers as markdown text, which Sourcegraph presents as a way to reopen or summarize earlier results.

When it helps
a Deep Search conversation already exists and you want its findings back in the chat.

Sourcesourcegraph.com · October 1, 2026 ↗

find_references

Starting from the place where a symbol is defined, finds every reference to it in the code that Sourcegraph indexes, so Claude can see where it is used.

When it helps
you want the full list of places that rely on a function before anyone touches it.

Sourcesourcegraph.com · October 1, 2026 ↗

get_contributor_repos

Finds the repositories in which a given contributor has made commits, according to Sourcegraph's documentation of the tool, and returns that list of repositories to Claude.

When it helps
you need to know which projects a given contributor has worked on before asking about their code.

Sourcesourcegraph.com · October 1, 2026 ↗

go_to_definition

Goes from a place where a symbol is used to the place where it is defined, across repositories, with what Sourcegraph calls compiler-level accuracy.

When it helps
a file calls a function you do not know and you want its real definition.

Sourcesourcegraph.com · October 1, 2026 ↗

list_files

Lists the files and directories found at a given path inside a repository.

When it helps
you want the layout of a part of a repository before reading any single file.
Watch out
results stop at 1000 entries, so a very large directory needs a narrower path.

Sourcesourcegraph.com · October 1, 2026 ↗

list_repos

Searches repositories by a substring of their name and lists the ones that match, which gives Claude the exact repository names to use in later searches.

When it helps
you remember only part of a repository's name and want the exact one before searching inside it.

Sourcesourcegraph.com · October 1, 2026 ↗

read_file

Returns the contents of a file with line numbers, and can target a specific range of lines or a specific revision.

When it helps
the right file is found and you want Claude to work from its exact lines.
Watch out
a file over 128KB comes back as its first 200 lines with a truncation notice.

Sourcesourcegraph.com · October 1, 2026 ↗

What Claude creates (1)

1 tool

One tool that starts a Deep Search conversation in Sourcegraph. It does not touch code. No source spells out its confirmation, so the general rule below applies.

deepsearch

Approval: see the rule

Creates a new Deep Search conversation inside Sourcegraph to work through a complex question about your codebase, the kind of multi-step research that can span one or many repositories.

What Claude asks for
no source describes a confirmation for this tool, so the general approval rule below is what covers it.
When it helps
a question is too broad for one search and needs several steps of research.
Watch out
Sourcegraph's documentation says its default endpoint cannot create Deep Search conversations, and which endpoint this connector uses is not documented.

Sourcesourcegraph.com · October 1, 2026 ↗

Approvals

What Claude checks with you first

By default, Claude stops and asks before each action it takes on an account for someone. The prompt appears in the conversation when it matters.

On Team and Enterprise workspaces, owners decide whether a member may let some actions through without a prompt each time. They can also limit what a connector may do for the whole organization, for instance keeping reading on and writing off. That choice binds everyone. Claude works with your rights and nothing beyond: Sourcegraph says users only read data from repositories they could already access.

Plans

Which plans include it

None of the 819 sheets in the official directory shows plan availability, so the answer for this connector is published nowhere.

The published rule is general: remote connectors are open to all users on Claude, Cowork, Claude Desktop and mobile. On Team and Enterprise, an Owner or Primary Owner opens a connector for the organization before members can connect. Sourcegraph applies its own conditions to its server, set by its offers rather than by Claude. For the live state, check the connector's sheet in the official directory.

Limits

Where this connector stops

A connector is not an automation. Claude calls these tools while it answers you, so no search starts when code is merged or a build fails.

Everything specific here comes from Sourcegraph's own documentation of its server: no Claude help article covers this connector. A tool list that is mostly reading is a floor, not a promise. The verified badge in the directory is not a security audit either, and Anthropic states on every sheet that it neither picks the tools a publisher exposes nor guarantees how they behave. Sourcegraph's documentation also restricts its server to some of its own offers, which is worth checking with your Sourcegraph admin.

Need help

Need help connecting Sourcegraph to Claude?

A person reads every message.

FAQ

Questions about the Claude Sourcegraph connector

01What can Claude do with the Sourcegraph connector?
Claude can search and read the code your Sourcegraph instance indexes, private and multi-repository setups included. Its 13 listed tools cover keyword and natural language search, reading files and folders, listing repositories, following a symbol to its definition or references, searching commits and diffs, comparing two revisions, finding where an author contributed, and starting or reopening Deep Search conversations. Sourcegraph documents every one of them under its exact name, so no tool on this page is a guess.
02Can Claude change code or push commits through Sourcegraph?
No, none of the listed tools edits a file, opens a pull request or pushes a commit. Twelve of the 13 tools only read. The single writing tool, deepsearch, creates a new Deep Search conversation inside Sourcegraph to research a question; it leaves your repositories untouched. A list that is mostly reading remains an observed floor rather than a guarantee, since an administrator can open actions that no public sheet shows.
03Does Claude ask before starting a Deep Search?
By default, yes: Claude asks for confirmation before each action it takes on an account for someone. No source describes a specific confirmation for deepsearch, so that general rule is what covers it. On Team and Enterprise workspaces, owners decide whether members may let some actions run without a prompt each time. On the Sourcegraph side, a site admin can also remove deepsearch from the tool list altogether, after which calls to it are rejected.
04Which Claude plans is the Sourcegraph connector available on?
No official source publishes plan availability connector by connector, and none of the 819 directory sheets shows it. The general rule is that remote connectors are open to all users on Claude, Cowork, Claude Desktop and mobile, with an Owner or Primary Owner enabling them first on Team and Enterprise. Sourcegraph sets its own conditions for its server on its side. The connector's sheet in the official directory is the only place that shows the current state for your account.
05Can Claude see every repository in our Sourcegraph instance?
No. Sourcegraph says MCP access control is separate from repository permissions, and users can only read data from repositories they are already allowed to access. Claude works with those rights and nothing more. On top of that, Sourcegraph checks an MCP access permission granted by default to every signed-in user, and users without it get a 403 forbidden error. A site admin can also remove single tools from the list Claude sees.
06Why does Claude only get part of a large file or folder?
Because Sourcegraph caps what one call returns. A file over 128KB comes back as its first 200 lines with a truncation notice, and read_file can target a specific range of lines instead. Folder listings stop at 1000 entries, so a very large directory needs a narrower path. Sourcegraph's own documentation is the source for both limits. Separately, a private repository you cannot open in Sourcegraph stays out of reach, since users only read data from repositories they are already allowed to access.
07Claude or an automation tool for working with our codebase?
They do different jobs. With this connector you ask questions about your code in a conversation and Claude searches, reads and explains with the real lines in front of it, which suits investigation and onboarding. An automation tool runs steps on its own when something happens, like a merge or a failed build, and nothing in this connector starts without a request. Recurring checks on every commit belong to an automation tool.