Conversation
vigoo
reviewed
Mar 16, 2026
vigoo
reviewed
Mar 16, 2026
vigoo
approved these changes
Mar 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #2823
Setup
Now there are two ways to see
authworking (default, and direct auth token).Working with both
MCP Inspectoras well asClaude Desktop configured with mcp-remoteAuth with MCP Inspector
This is more involved in terms of logging into provider (similar to http) etc.
MCP inspector was the best client to test if this auth works with MCP server.
The only way to show this is a video (there is nothing else to do other than playing with MCP client)
mcp_auth_h.mov
If no authentication done, then
Auth with Claude Desktop
Configure the following in
claude_desktop_config.json. Now when you open Claude Desktop, it will start connecting to this MCP server.{ "mcpServers": { "golem": { "command": "npx", "args": [ "mcp-remote", "http://localhost:9007/mcp", "--header", "Host: localhost:9007", "--allow-http" ] } } }If you have already been using
mcp-remote, then make sure to delete cache(My browser was already logged into my gmail :))
claude_auth_mcp.mov
Auth using direct token
In a way this has to obviously work, because in the above workflow, bearer token is send as auth header in every subsequent request, fully session managed by the client.
Obviously, generate your open-id-token yourself (you are not using Golem to do this) - and this is possible in many ways,and if you have configured the redirect-url in your app with the correct details that can do the whole workflow of OpenID (such as authorize, redirect, exchange auth code for tokens etc) and get an open-id-token. We will document this too, given different MCP clients behave differently.
PS: How to generate open-id token (for being able to configure bearer token directly)
Given the app in Google is configured with a redirect URL
https:/./developers.google.com/oauthplaygroundUse your own OAuth credentials, and enter client-id and client-secretAuthorize APIsExchange authorisation code for tokensid_token(that long bas64 string)Amp's validation
(I think, this has been really tricky to get it "working", would like to not make much change in the workflow)
Reuse with http api's things
Note that, this is not an exact copy of http when it comes to OIDC workflow, but obviously there is a lot in common, so I reused as much as possible. In the case of MCP, the clients take part in most of the things - essentially, as par spec, clients (inspector as an example) drives the flow. What does that mean? It mean unlike http apis (where golem does the job of oauth client with the help of infos of client-id and secret), MCP client (claude or inspector) needs to construct the authorisation URLs themselvevs, call
/tokenand manage token by itself. But obviously, these clients don't have the info (client_id) so it won't or can't talk to google/microsoft direclty. This kind of implies, in the MCP case, golem act like more of a proxy. Claude or Inspector simply drive the flow against golem mcp auth proxy (and it internally does whetever needed with google).