Summary
cmd mcp auth fails against the AWS MCP Server (https://aws-mcp.us-east-1.api.aws/mcp). The
browser opens AWS Sign-in and immediately shows a 400 Bad Request page.
Steps to reproduce
- cmd mcp add --transport http aws-mcp
https://aws-mcp.us-east-1.api.aws/mcp?oauth=initialize
- cmd mcp auth aws-mcp
- Complete the browser flow → 400 page
Root cause
AWS Sign-in requires the resource parameter (the resource server identifier) on the
authorization request. buildAuthorizationUrl() in the OAuth client only sends response_type,
client_id, redirect_uri, code_challenge, code_challenge_method, scope, state — never resource.
Confirmed with curl: the same client registration + PKCE flow returns 302 (sign-in redirect)
with resource=https://aws-mcp.us-east-1.api.aws/mcp and 400 without it. The resource value is
available in the protected-resource metadata (WWW-Authenticate header → resource_metadata →
resource field), but fetchProtectedResourceMetadata() discards it.
Expected Behavior
cmd mcp auth aws-mcp should complete the OAuth flow: the browser opens AWS Sign-in, the user authorizes, and the token is stored so the AWS MCP tools become available.
Actual Behavior
The browser opens AWS Sign-in but immediately shows a 400 Bad Request page ("You may have typed the address incorrectly or you may have used an outdated link"). No token is stored; cmd mcp auth --status aws-mcp reports "No authentication stored".
Steps to reproduce the issue
- cmd mcp add --transport http aws-mcp "https://aws-mcp.us-east-1.api.aws/mcp?oauth=initialize"
- cmd mcp auth aws-mcp
- Browser opens → AWS Sign-in returns 400 Bad Request
- cmd mcp auth --status aws-mcp → "No authentication stored for 'aws-mcp'"
Root cause (confirmed with curl): AWS Sign-in requires the resource parameter on the
authorization request. buildAuthorizationUrl() only sends response_type, client_id,
redirect_uri, code_challenge, code_challenge_method, scope, state — never resource. The same
PKCE flow returns 302 (sign-in redirect) when resource=https://aws-mcp.us-east-1.api.aws/mcp is
appended, and 400 without it. The value is available in the protected-resource metadata
(WWW-Authenticate header → resource_metadata), but fetchProtectedResourceMetadata() discards
it.
Command Code Version
1.27.1 (updated from 1.19.0)
Operating System
Windows
Terminal/IDE
No response
Shell
No response
Session file (optional)
No response
Fix prompt (optional)
No response
Additional context
No response
Summary
cmd mcp auth fails against the AWS MCP Server (https://aws-mcp.us-east-1.api.aws/mcp). The
browser opens AWS Sign-in and immediately shows a 400 Bad Request page.
Steps to reproduce
https://aws-mcp.us-east-1.api.aws/mcp?oauth=initialize
Root cause
AWS Sign-in requires the resource parameter (the resource server identifier) on the
authorization request. buildAuthorizationUrl() in the OAuth client only sends response_type,
client_id, redirect_uri, code_challenge, code_challenge_method, scope, state — never resource.
Confirmed with curl: the same client registration + PKCE flow returns 302 (sign-in redirect)
with resource=https://aws-mcp.us-east-1.api.aws/mcp and 400 without it. The resource value is
available in the protected-resource metadata (WWW-Authenticate header → resource_metadata →
resource field), but fetchProtectedResourceMetadata() discards it.
Expected Behavior
cmd mcp auth aws-mcp should complete the OAuth flow: the browser opens AWS Sign-in, the user authorizes, and the token is stored so the AWS MCP tools become available.
Actual Behavior
The browser opens AWS Sign-in but immediately shows a 400 Bad Request page ("You may have typed the address incorrectly or you may have used an outdated link"). No token is stored; cmd mcp auth --status aws-mcp reports "No authentication stored".
Steps to reproduce the issue
Root cause (confirmed with curl): AWS Sign-in requires the resource parameter on the
authorization request. buildAuthorizationUrl() only sends response_type, client_id,
redirect_uri, code_challenge, code_challenge_method, scope, state — never resource. The same
PKCE flow returns 302 (sign-in redirect) when resource=https://aws-mcp.us-east-1.api.aws/mcp is
appended, and 400 without it. The value is available in the protected-resource metadata
(WWW-Authenticate header → resource_metadata), but fetchProtectedResourceMetadata() discards
it.
Command Code Version
1.27.1 (updated from 1.19.0)
Operating System
Windows
Terminal/IDE
No response
Shell
No response
Session file (optional)
No response
Fix prompt (optional)
No response
Additional context
No response