MCPJam / MCPJam/inspector

[BUG] OAuth Debugger ignoring custom Okta authorization server

Open
#1,002 5 comments 0 reactions 1 assignee Claimed by @fporcaro View on GitHub
bug
Dominant language
TypeScript
Stars
2.2k
Forks
283
Avg merge
11h 47m
Merged PRs (30d)
737

Description

# Issue

An Okta instance provides a default OAuth authorization server .okta.com/oauth2/default, but it is common to create custom authorization servers so you can limit the scopes that can be used when requesting tokens and those have a custom issuer .okta.com/oauth2/.

When returning the oauth-protected-resource payload, we are returning the url of a custom authorization server. When MCP Jam hits the .well-known/oauth-authorization-server to get the details, it always uses the default auth server for the base domain, which is the default authorization server for the tenant, which doesn't have the same/correct audience, scopes or keys as the custom auth server.

# Expected Behavior

If a custom issuer is returned, that should be the base url for the .well-known/oauth-authorization-server call. For example, if the oauth-protected-resource returns a payload like this:
```
{
"Resource":"https://awesome-mcp-server.example.com/mcp",
"Authorization Servers":[
"https://my-okta-tenant.okta.com/oauth2/xyz123"
]
}
```
Then the oauth-authorization-server well-known endpoint details should be fetched using the following url:
`https://my-okta-tenant.okta.com/oauth2/xyz123/.well-known/oauth-authorization-server`

# Platform

- `npx` on Windows

I do have an MCP server displaying this issue if you reach out for details, I can provide them.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.