Sourcegraph MCP Server

السجل الرسمي أدوات المطورين

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

التثبيت

أضف هذا إلى إعدادات MCP في عميلك (Claude Desktop: claude_desktop_config.json، وCursor: ‏.cursor/mcp.json، ويستخدم VS Code وغيره الصيغة نفسها «mcpServers»).

Remote (streamable-http)
Claude Code
claude mcp add --transport http sourcegraph-mcp-server 'https://{sourcegraph_hostname}/.api/mcp'
إعداد JSON (Claude Desktop وCursor وVS Code)
{
    "mcpServers": {
        "sourcegraph-mcp-server": {
            "type": "http",
            "url": "https://{sourcegraph_hostname}/.api/mcp"
        }
    }
}

التوثيق

مأخوذ من ملف README للمشروع على GitHub ويُحدَّث أسبوعيًا. تفتح الروابط على GitHub.

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

الأسئلة الشائعة

ما هو Sourcegraph MCP Server؟

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

كيف أثبّت Sourcegraph MCP Server؟

يعمل كخادم بعيد. في Claude Code: claude mcp add --transport http sourcegraph-mcp-server 'https://{sourcegraph_hostname}/.api/mcp'. وفي العملاء الآخرين، الصق إعداد JSON من هذه الصفحة في إعدادات MCP الخاصة بهم.

هل يحتاج Sourcegraph MCP Server إلى مفتاح API؟

لا يذكر إدراجه في السجل أي مفتاح أو سر إلزامي. قد تتطلب بعض الميزات حسابًا لدى الخدمة التي يتصل بها.

هل Sourcegraph MCP Server مفتوح المصدر؟

شيفرته علنية على GitHub، لكن المستودع لا يعلن ترخيصًا قياسيًا.

من يصون Sourcegraph MCP Server؟

ينشره sourcegraph-community. يدرجه AI.tn لكنه لا يصونه ولا يوصي به.

من سجل MCP الرسمي. الإدراج ليس توصية: راجع شيفرة الخادم وصلاحياته قبل منحه الوصول إلى بياناتك.