Title: When no authorization is required dont fail on missing user scope 401 Unauthorized by yonigottesman · Pull Request #615 · modelcontextprotocol/python-sdk · GitHub
Open Graph Title: When no authorization is required dont fail on missing user scope 401 Unauthorized by yonigottesman · Pull Request #615 · modelcontextprotocol/python-sdk
X Title: When no authorization is required dont fail on missing user scope 401 Unauthorized by yonigottesman · Pull Request #615 · modelcontextprotocol/python-sdk
Description: While developing a mcp server that wil run locally I want to use the sse protocal and not stdio. Because im running local i dont need any authentication, but the default RequireAuthMiddleware will fail if if not isinstance(auth_user, AuthenticatedUser). I want the solution to be if not isinstance(auth_user, AuthenticatedUser) and self.required_scopes: so if there are no required scopes I wont have to do anything and i can just connect to the server withtout any autherization How Has This Been Tested? I tested it locally to work with cursor
Open Graph Description: While developing a mcp server that wil run locally I want to use the sse protocal and not stdio. Because im running local i dont need any authentication, but the default RequireAuthMiddleware will ...
X Description: While developing a mcp server that wil run locally I want to use the sse protocal and not stdio. Because im running local i dont need any authentication, but the default RequireAuthMiddleware will ...
Opengraph URL: https://github.com/modelcontextprotocol/python-sdk/pull/615
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:14cf3bdb-28ac-07f0-089d-f1715994b725 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | 96C6:3DA5AD:2F05F9D:445C87A:6A60F22C |
| html-safe-nonce | e09c47aa2c55d4a994ea713b5e570abf8e42302305bc25b9b61cbfdc0245eea2 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5NkM2OjNEQTVBRDoyRjA1RjlEOjQ0NUM4N0E6NkE2MEYyMkMiLCJ2aXNpdG9yX2lkIjoiMjQ5Mjg2ODQ1MjgyNDQ0NTQ4NCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | a96d7052f7d71a438e8adde2d20a43148b171209674f2211405fe67c71fce1ce |
| hovercard-subject-tag | pull_request:2495462885 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,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/modelcontextprotocol/python-sdk/pull/615/files |
| twitter:image | https://avatars.githubusercontent.com/u/4004127?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/4004127?s=400&v=4 |
| og:image:alt | While developing a mcp server that wil run locally I want to use the sse protocal and not stdio. Because im running local i dont need any authentication, but the default RequireAuthMiddleware will ... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 01a0f3379195d313175de239776b09dd4a079d5b2ea29dd9c37e85cd4cd5e990 |
| turbo-cache-control | no-preview |
| diff-view | unified |
| 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 | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 00ca1a9089c8f2453e5d118d0554c8a26883d159 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width