You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/api/mcp/index.mdx
+31Lines changed: 31 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -35,6 +35,37 @@ For programmatic access without storing credentials, use OAuth 2.0 with device f
35
35
36
36
Before using OAuth, you must create an OAuth application in your Sourcegraph instance. Follow the instructions [here](/admin/oauth_apps#creating-an-oauth-app). (Note: you will need the `user:all` scope)
37
37
38
+
#### Registering the MCP Server
39
+
40
+
Once you have your Client ID, you can register the MCP server in your client using that ID.
41
+
42
+
If your client does not natively support specifying an OAuth 2.0 Client ID, you can use `mcp-remote` as a fallback. Add the following configuration to the relevant section for MCP servers of your client to use the `stdio` transport with the following configuration:
<li>Replace `your-sourcegraph-instance.com` with your Sourcegraph instance URL and `<your-client-id>` with the ID of the client you registered in the prerequisites step.</li>
65
+
<li>When using the `mcp-remote` fallback, ensure the OAuth client you use has one of it's redirect URI set to `http://localhost:3334`.</li>
0 commit comments