Title: `AuthSettings.issuer_url` is required in resource-server-only mode but never used · Issue #3702 · modelcontextprotocol/python-sdk · GitHub
Open Graph Title: `AuthSettings.issuer_url` is required in resource-server-only mode but never used · Issue #3702 · modelcontextprotocol/python-sdk
X Title: `AuthSettings.issuer_url` is required in resource-server-only mode but never used · Issue #3702 · modelcontextprotocol/python-sdk
Description: Release line: 2.x (main @ 754254c) Following up on #3283, where it was noted that token_verifier= shouldn't make you invent an authorization server. I didn't find an issue tracking that, so here's one. What happens For a server that only...
Open Graph Description: Release line: 2.x (main @ 754254c) Following up on #3283, where it was noted that token_verifier= shouldn't make you invent an authorization server. I didn't find an issue tracking that, so here's ...
X Description: Release line: 2.x (main @ 754254c) Following up on #3283, where it was noted that token_verifier= shouldn't make you invent an authorization server. I didn't find an issue tracking that, so...
Opengraph URL: https://github.com/modelcontextprotocol/python-sdk/issues/3702
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"`AuthSettings.issuer_url` is required in resource-server-only mode but never used","articleBody":"Release line: 2.x (main @ 754254c0)\n\nFollowing up on #3283, where it was noted that `token_verifier=` shouldn't make you invent an authorization server. I didn't find an issue tracking that, so here's one.\n\n**What happens**\n\nFor a server that only verifies bearer tokens (`token_verifier=`, no `auth_server_provider`, `resource_server_url=None`):\n\n- `AuthSettings(resource_server_url=None)` fails validation: `issuer_url` field required.\n- `MCPServer(token_verifier=...)` without `auth=` raises \"Cannot specify auth_server_provider or token_verifier without auth settings\".\n- With a placeholder such as `issuer_url=\"https://placeholder.invalid\"`, everything works: only `/mcp` is mounted, a missing token gets 401 and a valid one gets 200. The value is never read. It's only used when `auth_server_provider` is set (server.py:1218) or when the PRM document is served (server.py:1277).\n\nMinor related point: `resource_server_url` is typed `AnyHttpUrl | None` but declared with `Field(...)`, so `None` has to be passed explicitly.\n\n**What I expected**\n\nTo configure a resource-server-only setup without a made-up URL.\n\n**Possible shape**\n\n- `issuer_url: AnyHttpUrl | None = None` and `resource_server_url: AnyHttpUrl | None = None`.\n- Validate that `issuer_url` is set when `resource_server_url` is set, since the PRM `authorization_servers` needs an entry, and when `auth_server_provider` is used.\n- Existing configs behave the same. The only change is that the placeholder is no longer needed.\n\nThe alternative would be to allow `token_verifier=` without `auth=` at all, but that's a bigger change. Does the first shape fit, or would you prefer something different? I'm happy to implement whichever you prefer.\n\nRepro script: https://gist.github.com/AkshayShah03/92d4d4eb6dcbbfa15c7f374e30e506a5\n\n_Investigation and repro done with AI assistance; I ran it and checked the output._","author":{"url":"https://github.com/AkshayShah03","@type":"Person","name":"AkshayShah03"},"datePublished":"2026-10-13T23:15:19Z","url":"https://github.com/modelcontextprotocol/python-sdk/issues/3702"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:4e98dc93-b24a-20ef-7088-7b2ad4bfba48 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | DAC2:3DF0BE:7742C:9D664:6B00B8FB |
| html-safe-nonce | ae814608c981b65ed0687d1cd378b875df66e8c18934ec039005cd8bca9ddee8 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEQUMyOjNERjBCRTo3NzQyQzo5RDY2NDo2QjAwQjhGQiIsInZpc2l0b3JfaWQiOiI2NzA2ODIxNjMxODYxMzczMTc5IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | bfb0a733257dbd513d87e6909c2c02f13c7dbd5ba9ed18d83fc45305f4508a42 |
| hovercard-subject-tag | issue:5839162458 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/modelcontextprotocol/python-sdk/3702/issue_layout |
| twitter:image | https://opengraph.githubassets.com/f930c62dce0d53d9500d83a0483e420fc7df3e0cab1376a4ece8fb6375c9d96f/modelcontextprotocol/python-sdk/issues/3702 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/f930c62dce0d53d9500d83a0483e420fc7df3e0cab1376a4ece8fb6375c9d96f/modelcontextprotocol/python-sdk/issues/3702 |
| og:image:alt | Release line: 2.x (main @ 754254c) Following up on #3283, where it was noted that token_verifier= shouldn't make you invent an authorization server. I didn't find an issue tracking that, so here's ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | AkshayShah03 |
| hostname | github.com |
| expected-hostname | github.com |
| None | 1d07c25977adfc5ff6acb0a962a9bc168c07afbda6fef765f9761c350c2ae4a2 |
| turbo-cache-control | no-preview |
| go-import | github.com/modelcontextprotocol/python-sdk git https://github.com/modelcontextprotocol/python-sdk.git |
| octolytics-dimension-user_id | 182288589 |
| octolytics-dimension-user_login | modelcontextprotocol |
| octolytics-dimension-repository_id | 862584018 |
| octolytics-dimension-repository_nwo | modelcontextprotocol/python-sdk |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 862584018 |
| octolytics-dimension-repository_network_root_nwo | modelcontextprotocol/python-sdk |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 5429cbfc6aca8c7b9a086a3c8f47400346f38cc9 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width