
Sourcegraph MCP Server
io.github.sourcegraph由 GitHub 账号 sourcegraph 发布v0.1.0更新于 Oct 24, 2026
Sourcegraph code search, semantic search, go-to-definition, find-references, and diff search.
概览
面向 Sourcegraph 实例的远程 MCP 端点,让助手搜索代码、导航符号并查看代码变更。
- 可以做什么
- 跨仓库进行关键词与语义代码搜索
- 发现仓库并读取文件
- 通过跳转定义和查找引用导航符号
- 查看 diff 与代码变更
- 适用场景
- 当助手需要回答关于托管在 Sourcegraph Cloud 或私有 Sourcegraph 部署上的大型或多仓库代码库的问题时适用,例如查找某个符号在哪里定义或被使用,或查看改动了什么。
- 运行要求
- 需要一个 Sourcegraph 实例(Cloud 或私有)及其主机名,用于访问该主机上的标准 MCP 端点。认证由 Sourcegraph 处理,通常为浏览器 OAuth(默认)或 Sourcegraph 访问令牌,具体取决于 MCP 客户端。
安装
在 SourceWeft 中
- 打开 控制台中的 Sourcegraph MCP Server,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Web executable,通过 Streamable HTTP。 远程服务在工作区中配置后即可从网页运行时运行。
其他 MCP 客户端
参照 仓库 中的启动说明。
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:
来源:README.md,提交 979b4e1
工具
0版本历史
1- v0.1.0最新Sep 16, 2026
评分
已满足适用检查项的 40%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通必需25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式必需10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分
请在仓库或注册中心条目中声明许可证。