Title: Auth for MCP - Starlette middleware vs. OAuthAuthorizationServerProvider · Issue #702 · modelcontextprotocol/python-sdk · GitHub
Open Graph Title: Auth for MCP - Starlette middleware vs. OAuthAuthorizationServerProvider · Issue #702 · modelcontextprotocol/python-sdk
X Title: Auth for MCP - Starlette middleware vs. OAuthAuthorizationServerProvider · Issue #702 · modelcontextprotocol/python-sdk
Description: There has been some discussion in this repo and in the TypeScript MCP repo regarding authentication with MCP servers. The Python SDK includes an OAuthAuthorizationServerProvider example for implementing authentication. What was the motiv...
Open Graph Description: There has been some discussion in this repo and in the TypeScript MCP repo regarding authentication with MCP servers. The Python SDK includes an OAuthAuthorizationServerProvider example for impleme...
X Description: There has been some discussion in this repo and in the TypeScript MCP repo regarding authentication with MCP servers. The Python SDK includes an OAuthAuthorizationServerProvider example for impleme...
Opengraph URL: https://github.com/modelcontextprotocol/python-sdk/issues/702
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Auth for MCP - Starlette middleware vs. OAuthAuthorizationServerProvider","articleBody":"There has been some discussion in this repo and in the [TypeScript MCP repo](https://github.com/modelcontextprotocol/modelcontextprotocol/issues/205) regarding authentication with MCP servers.\n\nThe Python SDK includes an [OAuthAuthorizationServerProvider example](https://github.com/modelcontextprotocol/python-sdk/tree/main/examples/servers/simple-auth) for implementing authentication.\n\nWhat was the motivation behind introducing this? It seems that authentication could be implemented more directly—and in my opinion, more simply—using Starlette middleware. Additionally, OAuthAuthorizationServerProvider appears to assume user input as part of the flow, whereas MCP servers will often act as backend resource servers without direct user interaction.","author":{"url":"https://github.com/Westerby","@type":"Person","name":"Westerby"},"datePublished":"2025-05-13T08:14:00Z","url":"https://github.com/modelcontextprotocol/python-sdk/issues/702"}
| 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:7b3d1b9c-152e-7530-48b3-ef040a30c5ec |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | DC50:270616:8AFC8:BA033:6B00B8D7 |
| html-safe-nonce | adb61d0a36ba42ab16b89a085e0da3b7835781c271ebc244c2c7fef84140cf01 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEQzUwOjI3MDYxNjo4QUZDODpCQTAzMzo2QjAwQjhENyIsInZpc2l0b3JfaWQiOiIyMzk4NTMzNjA2NDYxOTc4ODM5IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 3812cd2a38b7cf6d226cc86e896524ae7657d1fc07402230f912448f646bc3ce |
| hovercard-subject-tag | issue:3059166764 |
| 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/702/issue_layout |
| twitter:image | https://opengraph.githubassets.com/d013271df92670611440c14777ca5a2e7d4392aca090c2d35e3b067ced4fb755/modelcontextprotocol/python-sdk/issues/702 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/d013271df92670611440c14777ca5a2e7d4392aca090c2d35e3b067ced4fb755/modelcontextprotocol/python-sdk/issues/702 |
| og:image:alt | There has been some discussion in this repo and in the TypeScript MCP repo regarding authentication with MCP servers. The Python SDK includes an OAuthAuthorizationServerProvider example for impleme... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | Westerby |
| 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