S

Sourcegraph streaming search API

REST discovered

Details
URL
https://sourcegraph.com/.api/search/stream
Docs
https://sourcegraph.com/docs/api/stream-api
Authentication
Sourcegraph access token api_key discovered Get key ↗
Authorization: token <credential>

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.

OAuth 2.0 oauth2 discovered
Authorization: Bearer <credential>
OAuth 2.0 — self-onboarding

Point your MCP client at the server URL and approve access in the browser. The server supports OAuth Dynamic Client Registration (RFC 7591), so the client registers itself automatically — no developer-portal app, client_id, or client_secret to create.

Sourcegraph service-account M2M OAuth client oauth2_cc discovered Set up OAuth ↗

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.