sourcegraph.com
Sourcegraph provides code search, code navigation, repository analysis, and related developer tooling for source code across many repositories. It is offered as Sourcegraph Cloud and self-hosted deployments, with separate analytics features for usage and performance data.
Sourcegraph exposes a GraphQL debug API, a streaming search HTTP API, a newer external HTTP API at `/api-reference`, an MCP server, an analytics HTTP API on analytics.sourcegraph.com, and the `src` CLI; all documented surfaces require authentication.
- Sourcegraph MCP serverdetected
- Sourcegraph streaming search APIdiscovered
- Sourcegraph external APIdiscovered
- Sourcegraph Analytics APIdiscovered
- Sourcegraph GraphQL debug APIdiscovered
- Sourcegraph CLI (src)discovered
Create a personal or service-account access token in your Sourcegraph instance. The docs reference Settings > Access tokens for users and service-account Access tokens for service accounts; start from creating an access token or service accounts. Use the mcp scope for MCP-only access when desired.
$ src loginAcquired by the CLI — running src login opens the auth flow and stores the credential.
Create a service account, then open that account's Access tokens > M2M credentials and click Create M2M credential as documented in service accounts. Save the generated client_id and client_secret, then exchange them for a short-lived bearer token with the Sourcegraph OAuth token endpoint. Select scopes appropriate to the target API.
Sign in to your Sourcegraph Account, open the Sourcegraph Analytics access tokens management page, and create an analytics access token. Export it for scripts as ACCESS_TOKEN.
conventions · 1/8 published
- integrations.json✗
/.well-known/integrations.json - llms.txt✗
/llms.txt - API catalog✗
/.well-known/api-catalog - OpenAPI document✗
/api/schema/, /openapi.json, /swagger.json, /api/openapi.json, or /v1/openapi.json - MCP server card✗
/.well-known/mcp/server-card.json - OAuth protected resource✓https://sourcegraph.com/.well-known/oauth-protected-resource
- Agent card✗
/.well-known/agent-card.json - Agent skills✗
/.well-known/agent-skills/index.json
Publish these signals → /publishing