modelcontextprotocol / modelcontextprotocol/python-sdk
Trailing slash in `.well-known/oauth-protected-resource` response may violate “Canonical Server URI” requirement
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 24.3k
- Forks
- 4k
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 31
Description
Question
As I understand it, https://your-mcp.com/.well-known/oauth-protected-resource should return:
{
"resource": "https://your-mcp.com",
"authorization_servers": [
"https://your-auth.com"
],
"scopes_supported": [],
"bearer_methods_supported": [
"header"
]
}
However, it actually returns:
{
"resource": "https://your-mcp.com/",
"authorization_servers": [
"https://your-auth.com/"
],
"scopes_supported": [],
"bearer_methods_supported": [
"header"
]
}
Note the trailing / in both the resource and authorization_servers values.
According to the MCP spec’s “resource-parameter-implementation” section, I believe this violates the requirement for canonicalization:
https://modelcontextprotocol.io/specification/2025-06-18/basic/authorization#resource-parameter-implementation
Is this a bug, or am I misunderstanding the requirement?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the implementation of the .well-known/oauth-protected-resource response and compare its resource and authorization_servers values with the linked MCP canonicalization requirement. Confirm the expected trailing-slash behavior, then identify or add coverage for the response values so completion can be verified.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api, authentication
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100