MCP.so
Sign In

Sourcegraph MCP Server

@E-Kuerschner

Basic information

Category

Other

Transports

stdio

Author

E-Kuerschner

About Sourcegraph MCP Server

Local MCP Server that searches for React prop usage via Sourcegraph API

Sourcegraph MCP Server config

No standard config provided

This server doesn't expose a parseable MCP config block in its README. See the repository for install instructions.

Repository

Sourcegraph MCP Server tools

Tool list not available yet

This listing does not currently have a tool list to display. This does not mean the server has no tools; check its documentation for supported capabilities.

We auto-extract tools from the README. The maintainer can list them under a ## Tools heading to populate this section.

Overview

What is Sourcegraph MCP Server?

An MCP server that integrates with Sourcegraph to provide code search and analysis capabilities to LLMs. It requires a Sourcegraph access token and is built from TypeScript.

How to use Sourcegraph MCP Server?

Build the server from TypeScript with yarn run build, then configure your MCP client (e.g., Cursor or Claude Desktop) with the server. Set the SRC_ACCESS_TOKEN environment variable and optionally SRC_ENDPOINT. Verify installation by prompting the LLM to use the testSourcegraphConnection tool.

Key features of Sourcegraph MCP Server

  • Test connection to Sourcegraph and return version information.
  • Search code in Sourcegraph with a given query.
  • Retrieve specific file contents from a repository.
  • Search for usage of a specific prop of a React component.

Use cases of Sourcegraph MCP Server

  • Query codebases directly from an LLM to answer coding questions.
  • Retrieve file contents for analysis or context.
  • Verify connectivity to a Sourcegraph instance before deeper searches.
  • Find all usages of a React component prop across repositories.

Frequently asked questions

1

What do I need to use Sourcegraph MCP Server?

A valid Sourcegraph API access token and either a local environment or MCP server configuration. The token is set as the `SRC_ACCESS_TOKEN` environment variable.

2

Can I use Sourcegraph MCP Server with my own Sourcegraph instance?

Yes. Set the `SRC_ENDPOINT` environment variable to your instance URL. If omitted, it defaults to `https://sourcegraph.com`.

3

How do I verify that Sourcegraph MCP Server is working correctly?

Prompt your MCP client to use the `testSourcegraphConnection` tool. It will attempt to connect and return Sourcegraph version information.

4

What tools does Sourcegraph MCP Server expose to an LLM?

Four tools: `testSourcegraphConnection`, `search`, `getFileContent`, and `searchReactPropUsage`. Their names and descriptions are listed in the README.

5

How do I install Sourcegraph MCP Server for Cursor?

Run the optional `install_cursor.sh` script, which walks you through setting environment variables and configures Cursor automatically.

Comments

More Other MCP servers