Title: Context object (layered, per-request) · Issue #2895 · modelcontextprotocol/python-sdk · GitHub
Open Graph Title: Context object (layered, per-request) · Issue #2895 · modelcontextprotocol/python-sdk
X Title: Context object (layered, per-request) · Issue #2895 · modelcontextprotocol/python-sdk
Description: The handler-facing context: per-request client identity/capabilities/version reachable from handlers, transport info under a namespace, legacy session surface quarantined. Several other issues in this milestone add fields to this object,...
Open Graph Description: The handler-facing context: per-request client identity/capabilities/version reachable from handlers, transport info under a namespace, legacy session surface quarantined. Several other issues in t...
X Description: The handler-facing context: per-request client identity/capabilities/version reachable from handlers, transport info under a namespace, legacy session surface quarantined. Several other issues in t...
Opengraph URL: https://github.com/modelcontextprotocol/python-sdk/issues/2895
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Context object (layered, per-request)","articleBody":"The handler-facing context: per-request client identity/capabilities/version reachable from handlers, transport info under a namespace, legacy session surface quarantined. Several other issues in this milestone add fields to this object, so settling its shape early unblocks them.\n\n## What's in it\n\n- Layered/namespaced shape (e.g. `ctx.transport.…`; legacy-only verbs/state quarantined).\n- Per-request client info / capabilities / protocol version reachable from handlers (fed from `_meta` in the modern era, from the connection in legacy).\n- Per-request `logLevel` gate: no `notifications/message` unless the request opted in.\n- OTel and user `meta=` keys coexist with the envelope.\n- Typed per-transport context replaces the raw-Starlette-`Request` carrier; auth/headers reachable.\n\n## Conformance\n\n- (SDK API surface — proven via in-repo tests)\n- Together with _Backwards compatibility \u0026 version negotiation_, _New HTTP serving path (modern + dual-era)_, _Capabilities API + server/discover handler_, _subscriptions/listen_: the per-request-logging and capability-enforcement checks inside `server-stateless` run (not skip) and pass\n\n## Dependencies\n\n- Depends on: none\n\n## References\n\n- [Base protocol (_meta)](https://modelcontextprotocol.io/specification/draft/basic/index)\n- [SEP-2575](https://github.com/modelcontextprotocol/modelcontextprotocol/pull/2575)\n","author":{"url":"https://github.com/maxisbey","@type":"Person","name":"maxisbey"},"datePublished":"2026-06-17T11:11:59.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":2},"url":"https://github.com/2895/python-sdk/issues/2895"}
| 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:2f18742f-3a86-647c-e0e2-456b1c0061ab |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | DF8E:61DF9:AD0667:F66BC4:6A588981 |
| html-safe-nonce | 5f3bf1ff9e8f8fd91b6b87b23ec60d5331dc220c02ebcbd2d663e70740912ffa |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJERjhFOjYxREY5OkFEMDY2NzpGNjZCQzQ6NkE1ODg5ODEiLCJ2aXNpdG9yX2lkIjoiNzY2NjQwODUyNTExMjMxNDI0MSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 917e9d6c15342809d4d4f64a7301ef17443e8db658374b0b2a2a7ee89350e871 |
| hovercard-subject-tag | issue:4682673840 |
| 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/2895/issue_layout |
| twitter:image | https://opengraph.githubassets.com/065e3fffe9f7bed63ee49d7438960dd8ea1ea5b573464de17b5c40fe878e42c4/modelcontextprotocol/python-sdk/issues/2895 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/065e3fffe9f7bed63ee49d7438960dd8ea1ea5b573464de17b5c40fe878e42c4/modelcontextprotocol/python-sdk/issues/2895 |
| og:image:alt | The handler-facing context: per-request client identity/capabilities/version reachable from handlers, transport info under a namespace, legacy session surface quarantined. Several other issues in t... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | maxisbey |
| hostname | github.com |
| expected-hostname | github.com |
| None | 5f2a0c7865178af3d91dd9f13b0cdfc3c73a2529c873d2780bb4c01271a57ec6 |
| 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 | 8aae7b8d6caacacf5c66eaeb2702d8dc88d85b4a |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width