Sourcegraph MCP Server

io.github.sourcegraphPublished by GitHub account sourcegraphv0.1.0Updated Oct 24, 2026

Sourcegraph code search, semantic search, go-to-definition, find-references, and diff search.

VerifiedStreamable HTTPWeb executableKnowledge & MemoryDeveloper Tools

Overview

AI-generated overview

Remote MCP endpoint for a Sourcegraph instance that lets an assistant search code, navigate symbols and explore code changes.

What you can do
  • Search code across repositories with keyword and semantic search
  • Discover repositories and read files
  • Navigate symbols with go-to-definition and find-references
  • Explore diffs and code changes
When to use it
Useful when an assistant needs to answer questions about a large or multi-repository codebase hosted on Sourcegraph Cloud or a private Sourcegraph deployment, such as finding where a symbol is defined or used, or reviewing what changed.
Requirements
A Sourcegraph instance (Cloud or private) and its hostname, used to reach the standard MCP endpoint at that host. Authentication is handled by Sourcegraph, typically browser-based OAuth (the default) or a Sourcegraph access token, depending on the MCP client.
Before you install
Access is tied to your Sourcegraph account and its repository permissions; an access token, if used instead of OAuth, is a credential to protect. Queries and code content are sent to your Sourcegraph instance, which may be a third-party hosted service if you use Sourcegraph Cloud.

Installation

In SourceWeft

  1. Open Sourcegraph MCP Server in the dashboard and add it to a workspace.
  2. Enable the server for the chats that should use its tools.

Web executable via Streamable HTTP. Remote servers run from the web runtime once configured in a workspace.

Other MCP clients

Follow the launch instructions in the repository.

README

Sourcegraph MCP Server

This registry entry represents the Sourcegraph MCP server for a Sourcegraph instance. It can be configured against Sourcegraph Cloud or a private Sourcegraph deployment, so users can connect MCP-compatible clients to their own Sourcegraph server.

At a high level, the Sourcegraph MCP server gives agents and applications access to Sourcegraph code search and code intelligence capabilities through a standard MCP interface. That includes common workflows such as repository discovery, file reads, keyword and semantic search, symbol navigation, references, and code-change exploration.

Configuration

Configure the server with the hostname of your Sourcegraph instance. This entry uses the standard Sourcegraph MCP endpoint:

https://{sourcegraph_hostname}/.api/mcp

For private Sourcegraph instances, set sourcegraph_hostname to your internal or company-hosted Sourcegraph server hostname.

Authentication is handled by Sourcegraph. Depending on the MCP client, this is typically done with browser-based OAuth or a Sourcegraph access token. This MCP config defaults to OAuth.

Notes

This README intentionally keeps client-specific setup details light because MCP integration steps can change over time. For the current Sourcegraph MCP server behavior, supported authentication modes, and client-specific setup instructions, see the official Sourcegraph documentation:

https://sourcegraph.com/docs/api/mcp#sourcegraph-mcp-server

Source: README.md at commit 979b4e1

Tools

0
SourceWeft has not read this server's tools yet.

Version history

1
  1. v0.1.0LatestSep 16, 2026

Score

40% of the applicable checks met

How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.

  • Reached in the last 30 daysRequired25 pts

    Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.

  • Auth declaredRequired10 pts

    Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.

  • Tools listed15 pts

    Answer tools/list without a credential, or ship a package that starts in a sandbox without one.

  • DescriptionRequired15 pts
  • Logo10 pts
  • Documentation15 pts
  • License10 pts

    Declare a license in the repository or the registry entry.