Repository navigation
Description
Question
I'm trying to connect Grok Bot to T3 Code's remote MCP endpoint using OAuth over Tailscale HTTPS. Discovery and dynamic client registration succeed, but the OAuth client stops before requesting the authorization endpoint. Is there a known interoperability requirement or a supported configuration we should check?
I'm not claiming this is a T3 Code server bug: the available evidence does not explain why the client stops after registration.
Setup
- MCP endpoint:
https://<machine>.<tailnet>.ts.net/mcp(private hostname redacted). - Tailscale Serve forwards HTTPS to T3 Code at
http://127.0.0.1:3773. - Tailscale TCP reachability to port 443 was verified, and the OAuth requests below reached T3 Code.
- Client user-agent recorded by the server:
Cursor/1.0.0(Grok Bot). - A separate static-bearer connector can successfully read a T3 project. It is not the OAuth connector being tested.
- Exact installed T3 Code version/build: not captured in this investigation. The source references below were inspected at commit
202d5b5616e3edf65706371e2b8a9c4f486d0a96; this is not a claim that the running server matches that commit.
Reproduction
- Add a new remote MCP connector pointing at
https://<machine>.<tailnet>.ts.net/mcp, with no Authorization header, no supplied client ID/client secret, and no manually configured scopes. - Start normal OAuth authentication for that connector.
- Grok Bot reports authentication failed. No T3
/connect-agentapproval page opens.
For clarity, the Grok Bot connector setup arguments were equivalent to:
{
"name": "t3code-oauth",
"url": "https://<machine>.<tailnet>.ts.net/mcp"
}The separate authentication request selected that connector and its default account, without forcing reauthentication. These are connector-management arguments, not the actual OAuth HTTP payloads. We have not captured the DCR request/response bodies or the client's internal error.
Sanitized server trace
On 2026-11-06, Asia/Taipei (UTC+8), the first attempt showed:
18:00:34 POST /mcp 401
18:00:34 POST /mcp 401
18:00:35 GET /.well-known/oauth-protected-resource/mcp 200
18:00:35 GET /.well-known/oauth-authorization-server 200
18:00:35 GET /.well-known/oauth-protected-resource/mcp 200
18:00:35 POST /oauth/mcp/register 201
18:00:35 GET /.well-known/oauth-authorization-server 200
18:00:35 POST /oauth/mcp/register 201
A second authentication attempt showed:
18:02:18 POST /mcp 401
18:02:18 GET /.well-known/oauth-protected-resource/mcp 200
18:02:19 GET /.well-known/oauth-authorization-server 200
18:02:19 POST /oauth/mcp/register 201
The corresponding McpOAuth.register spans were successful. In the inspected window there were no requests to:
/oauth/mcp/authorize/connect-agent- the approval/decision endpoints
/oauth/mcp/token
The initial unauthenticated /mcp 401s appear to be expected discovery probes, rather than proof of the failure.
Grok Bot also displays: “Grok Bot reaches this server through your connected tailnet from your chats. It can't be checked from here.” We do not know whether this generic UI message is relevant; the server trace confirms that discovery and registration reached the server.
Relevant source findings
At the inspected commit:
- OAuth metadata advertises public-client authorization-code OAuth with PKCE S256, without a refresh-token grant.
- Token response schema has no refresh token. We have no evidence that this causes the client failure.
- Outside-agent documentation describes OAuth approval and recommends T3 Connect for hosted bots. This test uses a Tailscale HTTPS endpoint; we have not tested T3 Connect as a comparison.
- MCP session access handling explains why the static bearer fallback is not equivalent to OAuth Full access: an operate session without a runtime ceiling defaults to
approval-required. We want to use the normal OAuth consent flow, not bypass that ceiling.
Hermes was able to complete OAuth against T3 Code according to the user, but its exact configuration and a comparable trace have not been independently collected.
Expected result
The client should proceed from discovery/DCR to /oauth/mcp/authorize, open /connect-agent, allow the user to choose the intended access level, and exchange the code normally.
Questions
- Are there known Grok Bot/Cursor OAuth interoperability issues where registration returns 201 but authorization never starts?
- Is OAuth over a reachable Tailscale Serve HTTPS endpoint supported for this client, or is T3 Connect required for reasons beyond network reachability?
- Are there specific metadata/DCR response fields or client settings to check for this symptom?
- Which additional non-secret server diagnostics would help distinguish a T3 compatibility issue from a client-side failure?
No credentials, authorization codes, PKCE values, cookies, private hostname, or raw request/response bodies are included here.
Activity
juliusmarminge commentedon Nov 6, 2026
Thanks for the careful trace. I couldn't reproduce a server-side stop on current main (
202d5b5616, the commit you inspected).What I ran, against a fresh server:
auth()from@modelcontextprotocol/sdk1.29.0), once against the server directly and once through an HTTPS proxy that forwards like Tailscale Serve (it keepsHostand setsX-Forwarded-Proto: https, with a hosted-stylehttps://redirect URI). Both runs made the same requests as your trace:GET /oauth/mcp/authorizereturned302to/connect-agent. Every advertised URL used thehttps://<host>origin, includingissuer,authorization_endpointandresource.grokCLI 1.0.70, whose MCP OAuth client is rmcp, got the401and readWWW-Authenticate: Bearer resource_metadata=…. It then reported "Server supports OAuth but has no stored tokens", which is the expected state before sign-in.Answers to your questions:
/oauth/mcp/register. The server isn't involved again until the client opens/oauth/mcp/authorize. So when no authorize request arrives, the client gave up on its own side after reading the registration response.X-Forwarded-Protofor this case. The docs suggest T3 Connect for hosted agents only because of reachability: the hosted service has to reach the address, and so does the browser where you approve."grant_types": ["authorization_code"]because T3 Code issues no refresh tokens (tracked in https://git.cafe/pingdotgg/t3code/issues/26748), even when the client requestsrefresh_token. A client that requires refresh tokens could stop here. Apart from that field, the reference client accepts the metadata and the registration response as-is.grant_types,response_types,token_endpoint_auth_methodandscope, and only the host of eachredirect_urisentrygrant_typesin the 201 responset3 --version)With the client's error text and the DCR request shape, we can tell whether the cause is the
refresh_tokengrant or something else.killtw commentedon Nov 6, 2026
Thanks for testing both the SDK client and the HTTPS proxy case. Your clarification means we should not treat T3 Connect as a requirement when both the hosted client and approval browser can reach the Tailscale endpoint.
The exact visible Grok Bot error is only
t3code-oauth 授權失敗(“t3code-oauth authentication failed”). The connector status exposesneedsAuth/authentication_required, with no underlying OAuth exception. The tailnet sentence quoted in the issue is separate UI text, not a more specific OAuth error.Our connector was configured without an Authorization header, explicit client ID/secret, or manually specified scopes. These configuration facts do not tell us what the OAuth client actually put in the DCR body: we have not captured its
grant_types,response_types,token_endpoint_auth_method,scope, or redirect hosts. The sanitized trace we collected contains request paths and status codes, not the registration payloads. The installed T3 version also remains unverified; the source commit in the issue should not be read as the running build version.So the remaining evidence gap is precisely the client's DCR payload and post-registration error (plus the running server version). We cannot yet confirm or rule out the refresh-token compatibility hypothesis. No server-side authentication settings have been changed as a workaround, and we have not bypassed the runtime ceiling.
Is there a supported server-side logging option that captures just the non-secret DCR fields you listed, without recording credentials, authorization codes, or full redirect URLs? That would help obtain the missing request shape safely on a subsequent explicitly approved attempt.
juliusmarminge commentedon Nov 6, 2026
The
Cursor/1.0.0user agent in your trace is the MCP OAuth client inside Cursor's agent SDK (@cursor/sdk1.2.0). I ran that client against a fresh T3 Code server on current main (c8267db9ac), with a connector set up like yours: one HTTP MCP URL, no Authorization header, no client ID or secret, no scopes. It made the same requests as your trace and then stopped:This is the request shape it registered with (logo URL dropped):
{ "redirect_uris": ["https://www.cursor.com/agents/mcp/oauth/callback", "http://localhost:8787/callback"], "token_endpoint_auth_method": "none", "grant_types": ["authorization_code", "refresh_token"], "response_types": ["code"], "client_name": "Cursor", "scope": "orchestration:read orchestration:operate" }T3 Code answered
201with"grant_types": ["authorization_code"]. The client saved that registration as returned. It didn't reject it.The
refresh_tokenhypothesis is ruled out. I ran the same client a second time through a proxy that addedrefresh_tokento thegrant_typesin the response, and the request sequence was identical: the client still stops afterregister.Stopping after
registeris the client's normal pre-sign-in state. After registration, Cursor's client builds the authorization URL and puts the connector inrequires_authentication, which it reports asneedsAuth. That matches the status you see. The URL is stored in that state, and the app hosting the client has to open it or show it to you. T3 Code isn't contacted again until someone opens that URL. That's why no/oauth/mcp/authorizerequest shows up in your trace.I also built the authorization request the client would send, with its registered
client_id, PKCE S256, its scope and theresourceparameter. For both registered redirect URIs,GET /oauth/mcp/authorizereturned302to/connect-agent, so T3 Code accepts it.So nothing on the T3 Code side is stopping the flow. The missing step is in Grok Bot: it has the sign-in URL but shows "authentication failed" instead of letting you open it. Check whether Grok Bot shows a sign-in or connect link for the connector, and open it in a browser that can reach your tailnet. After you approve, the browser returns to
https://www.cursor.com/agents/mcp/oauth/callback. If Grok Bot never shows that link, the Grok Bot or Cursor developers can tell you how to get it.About logging: T3 Code has no option that logs DCR request fields, and the
McpOAuth.registerspan records only whether registration succeeded. You shouldn't need it, because the request shape above is what this client sends.Closing this since the server side works as designed. If Grok Bot does open the sign-in page and something fails after that, reply here with the step that fails.