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.

已驗證Streamable HTTP可網頁執行知識與記憶開發者工具

概覽

AI 產生的概覽

面向 Sourcegraph 執行個體的遠端 MCP 端點,讓助理搜尋程式碼、導覽符號並檢視程式碼變更。

可以做什麼
  • 跨儲存庫進行關鍵字與語意程式碼搜尋
  • 探索儲存庫並讀取檔案
  • 透過跳至定義與尋找參照導覽符號
  • 檢視 diff 與程式碼變更
適用情境
當助理需要回答關於託管在 Sourcegraph Cloud 或私有 Sourcegraph 部署上的大型或多儲存庫程式碼庫問題時適用,例如找出某個符號在哪裡定義或被使用,或檢視改了什麼。
執行需求
需要一個 Sourcegraph 執行個體(Cloud 或私有)及其主機名稱,用來存取該主機上的標準 MCP 端點。驗證由 Sourcegraph 處理,通常為瀏覽器 OAuth(預設)或 Sourcegraph 存取權杖,視 MCP 用戶端而定。
安裝前請注意
存取權限取決於你的 Sourcegraph 帳號及其儲存庫權限;若使用存取權杖而非 OAuth,該權杖屬於需妥善保管的憑證。查詢與程式碼內容會傳送到你的 Sourcegraph 執行個體,若使用 Sourcegraph Cloud 則可能是第三方託管服務。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Sourcegraph MCP Server,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

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:

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

來源:README.md,提交 979b4e1

工具

0
SourceWeft 尚未讀取此伺服器的工具。

版本歷史

1
  1. v0.1.0最新Sep 16, 2026

評分

已滿足適用檢查項的 40%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通必需25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式必需10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分

    請在儲存庫或註冊中心條目中宣告授權條款。