Sourcegraph MCP server
Yes. Sourcegraph publishes an official MCP server at an address made for your account (https://{sourcegraph_hostname}/.api/mcp). It's hosted. It offers 9 tools.
Official: published in the official MCP Registry as io.github.sourcegraph/mcp, from the sourcegraph GitHub account. Maintained by Stuart Brameld.
Sourcegraph MCP server review
65/100
Sourcegraph's Sourcegraph MCP Server scores 65/100 on MartechDB's Agent Readiness Index: easy to connect an AI agent to, with a few gaps.
The good
Hosted by Sourcegraph: connect by URL, with nothing to install
Documented, with 9 tools known
Published to the official MCP Registry
The bad
Needs a paid plan, with no free trial
Not checked yet: how you sign in. Anything not checked scores nothing.
Official MCP server
Sourcegraph MCP Server
Sourcegraph code search, semantic search, go-to-definition, find-references, and diff search.
- Address
- https://{sourcegraph_hostname}/.api/mcp Fill in the parts in braces for your account.
- Runs
- Hosted
- Sign-in
- Vendor docs
- Cost to use
- Plan: Enterprise · No free access
- Official MCP Registry
-
Listed as
io.github.sourcegraph/mcp· published 26 Mar 2026 - How we know it's official
-
- Published in the official MCP Registry as io.github.sourcegraph/mcp, from the sourcegraph GitHub account.
- Documentation
- sourcegraph.com/docs/api/mcp
- Source code
- github.com/sourcegraph-community/mcpregistry
- Tools
- 9 tools · from Sourcegraph's documentation
- First seen
- 26 Mar 2026
- Last checked
- We can't check it: its address is different for each account.
Sourcegraph MCP Server tools (9)
The server needs sign-in before it lists its tools, so these are as Sourcegraph's documentation names them (read 3 Oct 2026). They may be out of date.
-
read_fileRead file contents with line numbers and support for specific ranges and revisions.
-
list_filesList files and directories in a repository path.
-
list_reposSearch and list repositories by name substring.
-
keyword_searchPerform exact keyword code searches.
-
evaluatorRun sandboxed Lua scripts for aggregation, cross-referencing, and computation over search results.
-
commit_searchSearch commits by message, author, content, files, and date ranges.
-
diff_searchSearch actual code changes for specific patterns across repositories.
-
code_finderFind relevant code using a fast search agent.
-
deepsearch_readRead a Deep Search conversation and return the markdown content of the questions and answers.
Connect your AI to Sourcegraph
Add the official Sourcegraph MCP server to Claude, ChatGPT or your editor.
Connect Sourcegraph MCP to Claude
Claude.ai and Claude Desktop
Open Customize, then Connectors.
Click +, then Add custom connector.
Name it Sourcegraph, paste the address below and click Add.
Connect Sourcegraph MCP to ChatGPT
Open Settings, then Apps, then Advanced settings.
Turn on Developer mode, then click Create.
Name it Sourcegraph and paste the address below.
ChatGPT usually only connects to servers with self-serve sign-in or none.
Connect Sourcegraph MCP to Cursor
Opens Cursor if it's installed. If nothing happens, use the JSON below.
Connect Sourcegraph MCP to VS Code
Opens VS Code if it's installed. Otherwise add the JSON settings from the Cursor tab to your .vscode/mcp.json.
Sourcegraph MCP server questions
Does Sourcegraph have an official MCP server?
Yes. Sourcegraph publishes its MCP server itself. It's in the official MCP Registry, published under Sourcegraph's name. MartechDB only lists servers a vendor publishes, never community copies.
What is the Sourcegraph MCP server URL?
The address is https://{sourcegraph_hostname}/.api/mcp, with the parts in braces filled in for your Sourcegraph account.
How do I connect Sourcegraph MCP to Claude, ChatGPT or Cursor?
In Claude, add https://{sourcegraph_hostname}/.api/mcp as a custom connector (Customize, Connectors, Add custom connector). In Cursor, use the Add to Cursor link on MartechDB's page, or paste the JSON settings into your mcp.json. In Claude Code, run: claude mcp add --transport http sourcegraph 'https://{sourcegraph_hostname}/.api/mcp'
What can the Sourcegraph MCP server do?
It offers 9 tools, including read_file, list_files, list_repos, keyword_search and evaluator (as its documentation names them, read on 3 Oct 2026).
Is the Sourcegraph MCP server in the official MCP Registry?
Yes, as io.github.sourcegraph/mcp.
Is the Sourcegraph MCP server free to use?
No, it needs a paid plan. Plan needed: Enterprise. From Sourcegraph's own pages, checked on 7 Oct 2026.
What are the alternatives to Sourcegraph's MCP server?
In Developer tools, the most agent-friendly alternatives with an official MCP server are Devcycle (100/100), LaunchDarkly (97/100), Cekura (97/100), Linear (95/100) and Jam (95/100). Sourcegraph scores 65/100 on the same index.
Alternatives to Sourcegraph's MCP server
Vendors in Developer tools with an official MCP server, the most agent-friendly first. Sourcegraph scores 65/100.
Compare all 32 Developer tools vendors →Use with AI
Connect your AI to MartechDB
Then ask it about Sourcegraph, or any of the 1,850 marketing tools with an official MCP server. Free, no sign-in.
Claude.ai and Claude Desktop
Open Customize, then Connectors.
Click +, then Add custom connector.
Name it MartechDB, paste the address below and click Add. There's no sign-in.
The free plan allows one custom connector. On Team and Enterprise plans, an owner adds the connector first.
Claude Code
Run this in your terminal:
ChatGPT
Open Settings, then Apps, then Advanced settings.
Turn on Developer mode, then click Create.
Name it MartechDB, paste the address below and choose No authentication.
Developer mode is on Plus and Pro plans, and on Business, Enterprise and Edu if an admin allows it.
API
The same data as JSON, with no sign-in. See the OpenAPI description for every endpoint and field.
CLI
Search the directory and print the command to connect a vendor's server, from your terminal. Needs Node 18 or later. View on npm
Show that your MCP server is verified
If you work at Sourcegraph, add this badge to your MCP docs or README. It's free, it's the same for every vendor, and it updates from our daily checks: it shows uptime while the server responds, and says so if it stops.
Something wrong or out of date? Suggest a correction or email us, and we'll check it against the evidence. Every correction we make is listed on Corrections.