Medium
Any website can read answers sent with the person's cookies
MCPS-CORS-001Why it mattersThe server repeats whatever Origin it gets and allows credentials. If sign-in uses cookies, any page a signed-in person opens can call the server as that person and read the answer.
How to fixAllow credentials only for a fixed list of origins, never for the Origin a request sends.
- Request
POST https://api.medplum.com/mcp/stream (initialize, Origin: https://probe.invalid)- Answer
401- What we saw
Access-Control-Allow-Origin: https://probe.invalid; Access-Control-Allow-Credentials: true
Seen in the server's answer
SpecFetch Standard, CORS protocol and credentials
Medium
Sign-in metadata names another resource
MCPS-AUTH-005Why it mattersThe resource field must be the server's own address (RFC 9728, Section 3.3). Clients that follow the RFC throw the document away, and a mismatch is how one server gets passed off as another.
How to fixSet resource to this endpoint's exact address.
- Request
GET https://api.medplum.com/.well-known/oauth-protected-resource- What we saw
resource: https://api.medplum.com/ (expected https://api.medplum.com/mcp/stream)
Seen in the server's answer
SpecRFC 9728, Section 3.3 (Protected Resource Metadata Validation)
Low
PKCE plain method offered
MCPS-AUTH-008Why it mattersWith plain, the challenge equals the secret, so anyone who sees the request sees the secret.
How to fixOffer S256 only.
- Request
GET https://api.medplum.com/.well-known/oauth-authorization-server- What we saw
code_challenge_methods_supported: ["S256","plain"]
Seen in the server's answer
SpecRFC 9700, Section 2.1.1 (PKCE: S256)
Low
Implicit flow advertised
MCPS-AUTH-009Why it mattersThe implicit flow puts the access token in the browser's address. RFC 9700 advises against it, and OAuth 2.1 drops it.
How to fixRemove token from response_types_supported and use the code flow with PKCE.
- Request
GET https://api.medplum.com/.well-known/oauth-authorization-server- What we saw
response_types_supported: ["code","id_token","token id_token"]
Seen in the server's answer
SpecRFC 9700, Section 2.1.2 (Implicit Grant)
Low
Issuer in the authorization response not advertised
MCPS-AUTH-011Why it mattersReturning iss (RFC 9207) lets a client tell which server answered, which stops mix-up attacks between servers. The MCP spec says SHOULD now and expects a future revision to make it MUST.
How to fixReturn iss in authorization responses and set authorization_response_iss_parameter_supported to true.
- Request
GET https://api.medplum.com/.well-known/oauth-authorization-server- What we saw
authorization_response_iss_parameter_supported: null
Seen in the server's answer
SpecMCP 2026-07-28, Authorization: Authorization Response ValidationRFC 9207, Section 2.3
Low
Refresh tokens without an advertised revocation endpoint
MCPS-AUTH-012Why it mattersA long-lived refresh token that leaks keeps working until it expires.
How to fixPublish a revocation_endpoint (RFC 7009) and rotate refresh tokens.
- Request
GET https://api.medplum.com/.well-known/oauth-authorization-server- What we saw
refresh_token granted; no revocation_endpoint
Seen in the server's answer
SpecRFC 7009 (Token Revocation); RFC 8414, Section 2 (revocation_endpoint)