Title: FastMCP Auth Context in tools · Issue #638 · modelcontextprotocol/python-sdk · GitHub
Open Graph Title: FastMCP Auth Context in tools · Issue #638 · modelcontextprotocol/python-sdk
X Title: FastMCP Auth Context in tools · Issue #638 · modelcontextprotocol/python-sdk
Description: I wanted to know how I can get the Auth context within the tools/resources. Couldn't find any documentation or examples for it. I was able to add Oauth to my server and it completes the login flow. But I need to pass the auth token to th...
Open Graph Description: I wanted to know how I can get the Auth context within the tools/resources. Couldn't find any documentation or examples for it. I was able to add Oauth to my server and it completes the login flow....
X Description: I wanted to know how I can get the Auth context within the tools/resources. Couldn't find any documentation or examples for it. I was able to add Oauth to my server and it completes the login f...
Opengraph URL: https://github.com/modelcontextprotocol/python-sdk/issues/638
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"FastMCP Auth Context in tools","articleBody":"I wanted to know how I can get the Auth context within the tools/resources. Couldn't find any documentation or examples for it. I was able to add Oauth to my server and it completes the login flow. But I need to pass the auth token to the tools being called. Is that possible right now or is it still to be implemented","author":{"url":"https://github.com/anant-singh","@type":"Person","name":"anant-singh"},"datePublished":"2025-05-06T14:52:15.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":5},"url":"https://github.com/638/python-sdk/issues/638"}
| 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:41e34a45-e5dd-65ab-9ee3-adb0dcddee6e |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | ED70:425E5:3D2EF31:54E2399:6A60F791 |
| html-safe-nonce | fe30ae486e99866cfaa9978a007788545c83ed4d2427bd3481a30e7a4c1a4a76 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFRDcwOjQyNUU1OjNEMkVGMzE6NTRFMjM5OTo2QTYwRjc5MSIsInZpc2l0b3JfaWQiOiIxODg3OTMyMzEyMTYxNjc5MjQ5IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 8210b6bd3971e7b9596a2753fd2ab42017fc6167d9f7e0fc16f0c7d58923614b |
| hovercard-subject-tag | issue:3043114504 |
| 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/638/issue_layout |
| twitter:image | https://opengraph.githubassets.com/1afdc8a9d3fd5d71dffe36b2fa0f1b3eb2c11817ddce098cc59a4f436d03ba14/modelcontextprotocol/python-sdk/issues/638 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/1afdc8a9d3fd5d71dffe36b2fa0f1b3eb2c11817ddce098cc59a4f436d03ba14/modelcontextprotocol/python-sdk/issues/638 |
| og:image:alt | I wanted to know how I can get the Auth context within the tools/resources. Couldn't find any documentation or examples for it. I was able to add Oauth to my server and it completes the login flow.... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | anant-singh |
| hostname | github.com |
| expected-hostname | github.com |
| None | 01a0f3379195d313175de239776b09dd4a079d5b2ea29dd9c37e85cd4cd5e990 |
| 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 | 00ca1a9089c8f2453e5d118d0554c8a26883d159 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width