{
  "issues": [
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1747",
      "id": 3699750949,
      "node_id": "I_kwDOM2n80s7chbgl",
      "number": 1747,
      "title": "Standardize timeout values to floats in seconds",
      "user": {
        "login": "maxisbey",
        "id": 224885523,
        "node_id": "U_kgDODWd7Ew",
        "avatar_url": "https://avatars.githubusercontent.com/u/224885523?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/maxisbey",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 9230423596,
          "node_id": "LA_kwDOM2n80s8AAAACJi0WLA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/breaking%20change",
          "name": "breaking change",
          "color": "000000",
          "default": false,
          "description": "Will break existing deployments when updated without changes"
        },
        "1": {
          "id": 9230424293,
          "node_id": "LA_kwDOM2n80s8AAAACJi0Y5Q",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/v2",
          "name": "v2",
          "color": "5d2a87",
          "default": false,
          "description": "Ideas, requests and plans for v2 of the SDK which will incorporate major changes and fixes"
        },
        "2": {
          "id": 9354757189,
          "node_id": "LA_kwDOM2n80s8AAAACLZZERQ",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/enhancement",
          "name": "enhancement",
          "color": "11b5cc",
          "default": true,
          "description": "Request for a new feature that's not currently supported"
        },
        "3": {
          "id": 9354767859,
          "node_id": "LA_kwDOM2n80s8AAAACLZZt8w",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P1",
          "name": "P1",
          "color": "895d17",
          "default": false,
          "description": "Significant bug affecting many users, highly requested feature"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 0,
      "created_at": "2025-12-05T17:23:46Z",
      "updated_at": "2025-12-05T17:43:30Z",
      "closed_at": null,
      "author_association": "CONTRIBUTOR",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "## Summary\n\nStandardize all timeout parameters across the SDK to use floats representing seconds, following Python ecosystem conventions.\n\n## Problem\n\nTimeout values in the SDK may use inconsistent units or types across different modules. The Python ecosystem (stdlib, httpx, starlette) consistently uses floats representing seconds for timeouts.\n\n## Goal\n\n- All timeout parameters should be `float` type representing seconds\n- Follow the principle: \"be lax in what you receive and strict in what you return\"\n- Align with conventions from httpx, starlette, and Python standard library\n\n---\n\n<sub>[AI Disclaimer](https://gist.github.com/maxisbey/6123d132484e4c533eab519a2800693d)</sub>",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1747/reactions",
        "total_count": 0,
        "+1": 0,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1746",
      "id": 3699721404,
      "node_id": "I_kwDOM2n80s7chUS8",
      "number": 1746,
      "title": "Support multiple MCP protocol versions",
      "user": {
        "login": "maxisbey",
        "id": 224885523,
        "node_id": "U_kgDODWd7Ew",
        "avatar_url": "https://avatars.githubusercontent.com/u/224885523?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/maxisbey",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 9230424293,
          "node_id": "LA_kwDOM2n80s8AAAACJi0Y5Q",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/v2",
          "name": "v2",
          "color": "5d2a87",
          "default": false,
          "description": "Ideas, requests and plans for v2 of the SDK which will incorporate major changes and fixes"
        },
        "1": {
          "id": 9354757189,
          "node_id": "LA_kwDOM2n80s8AAAACLZZERQ",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/enhancement",
          "name": "enhancement",
          "color": "11b5cc",
          "default": true,
          "description": "Request for a new feature that's not currently supported"
        },
        "2": {
          "id": 9354770246,
          "node_id": "LA_kwDOM2n80s8AAAACLZZ3Rg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P2",
          "name": "P2",
          "color": "d2b457",
          "default": false,
          "description": "Moderate issues affecting some users, edge cases, potentially valuable feature"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 0,
      "created_at": "2025-12-05T17:12:12Z",
      "updated_at": "2025-12-05T17:12:12Z",
      "closed_at": null,
      "author_association": "CONTRIBUTOR",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "## Summary\n\nHandle different MCP protocol versions gracefully, particularly for proxy/gateway use cases where servers may be on older spec versions.\n\n## Problem\n\n- Proxies connecting to third-party MCP servers may encounter older protocol versions\n- Per spec, if `mcp-protocol-version` header is not set in HTTP transport, SDK should assume `2025-03-26`\n- Currently unclear how version mismatches are handled\n\n## Goal\n\n- Graceful handling of protocol version negotiation\n- Clear behavior when connecting to servers on different versions\n- Support for proxies that need to bridge different versions\n\n---\n\n<sub>[AI Disclaimer](https://gist.github.com/maxisbey/6123d132484e4c533eab519a2800693d)</sub>",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1746/reactions",
        "total_count": 0,
        "+1": 0,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1745",
      "id": 3699712849,
      "node_id": "I_kwDOM2n80s7chSNR",
      "number": 1745,
      "title": "Remove jsonschema dependency",
      "user": {
        "login": "maxisbey",
        "id": 224885523,
        "node_id": "U_kgDODWd7Ew",
        "avatar_url": "https://avatars.githubusercontent.com/u/224885523?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/maxisbey",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 9230424293,
          "node_id": "LA_kwDOM2n80s8AAAACJi0Y5Q",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/v2",
          "name": "v2",
          "color": "5d2a87",
          "default": false,
          "description": "Ideas, requests and plans for v2 of the SDK which will incorporate major changes and fixes"
        },
        "1": {
          "id": 9354757189,
          "node_id": "LA_kwDOM2n80s8AAAACLZZERQ",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/enhancement",
          "name": "enhancement",
          "color": "11b5cc",
          "default": true,
          "description": "Request for a new feature that's not currently supported"
        },
        "2": {
          "id": 9354772110,
          "node_id": "LA_kwDOM2n80s8AAAACLZZ-jg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P3",
          "name": "P3",
          "color": "c7df49",
          "default": false,
          "description": "Nice to haves, rare edge cases"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 0,
      "created_at": "2025-12-05T17:09:41Z",
      "updated_at": "2025-12-05T17:09:41Z",
      "closed_at": null,
      "author_association": "CONTRIBUTOR",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "## Summary\n\nRemove the `jsonschema` package as a dependency.\n\n## Motivation\n\n- Reduces the SDK's dependency footprint\n- Part of lazy imports / startup time improvements\n- Pydantic can handle validation needs\n\n## Related\n\n- #1617 - Lazy imports\n\n---\n\n<sub>[AI Disclaimer](https://gist.github.com/maxisbey/6123d132484e4c533eab519a2800693d)</sub>",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1745/reactions",
        "total_count": 0,
        "+1": 0,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1744",
      "id": 3699708493,
      "node_id": "I_kwDOM2n80s7chRJN",
      "number": 1744,
      "title": "Improve exception tracebacks for easier debugging",
      "user": {
        "login": "maxisbey",
        "id": 224885523,
        "node_id": "U_kgDODWd7Ew",
        "avatar_url": "https://avatars.githubusercontent.com/u/224885523?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/maxisbey",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 9230424293,
          "node_id": "LA_kwDOM2n80s8AAAACJi0Y5Q",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/v2",
          "name": "v2",
          "color": "5d2a87",
          "default": false,
          "description": "Ideas, requests and plans for v2 of the SDK which will incorporate major changes and fixes"
        },
        "1": {
          "id": 9354757189,
          "node_id": "LA_kwDOM2n80s8AAAACLZZERQ",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/enhancement",
          "name": "enhancement",
          "color": "11b5cc",
          "default": true,
          "description": "Request for a new feature that's not currently supported"
        },
        "2": {
          "id": 9354770246,
          "node_id": "LA_kwDOM2n80s8AAAACLZZ3Rg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P2",
          "name": "P2",
          "color": "d2b457",
          "default": false,
          "description": "Moderate issues affecting some users, edge cases, potentially valuable feature"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 0,
      "created_at": "2025-12-05T17:08:13Z",
      "updated_at": "2025-12-05T17:08:13Z",
      "closed_at": null,
      "author_association": "CONTRIBUTOR",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "## Summary\n\nMake exception tracebacks clearer and easier to understand by reducing asyncio/anyio wrapper noise.\n\n## Problem\n\n- Exceptions are often wrapped in multiple layers of asyncio/anyio task group machinery\n- Tracebacks are hard to read and don't clearly point to the root cause\n- The `raise_exception` flag is not consistently respected\n- Errors from deep inside task groups obscure the actual failure point\n\n## Goal\n\n- Cleaner tracebacks that point to user code, not SDK internals\n- Raise exceptions from the main context where possible\n- Reduce nesting of exception wrappers\n\n## Related\n\n- #743 - RuntimeError but the actual root cause is not logged correctly\n- #396 - MCP Server: Inconsistent Exception Handling in @app.call_tool\n- #1401 - ClientSession Error Handling\n- #1742 - Introduce typed error classes with metadata\n\n---\n\n<sub>[AI Disclaimer](https://gist.github.com/maxisbey/6123d132484e4c533eab519a2800693d)</sub>",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1744/reactions",
        "total_count": 0,
        "+1": 0,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1743",
      "id": 3699695487,
      "node_id": "I_kwDOM2n80s7chN9_",
      "number": 1743,
      "title": "Extract OAuth flow logic into reusable components for proxy use cases",
      "user": {
        "login": "maxisbey",
        "id": 224885523,
        "node_id": "U_kgDODWd7Ew",
        "avatar_url": "https://avatars.githubusercontent.com/u/224885523?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/maxisbey",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 9230424293,
          "node_id": "LA_kwDOM2n80s8AAAACJi0Y5Q",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/v2",
          "name": "v2",
          "color": "5d2a87",
          "default": false,
          "description": "Ideas, requests and plans for v2 of the SDK which will incorporate major changes and fixes"
        },
        "1": {
          "id": 9301360597,
          "node_id": "LA_kwDOM2n80s8AAAACKmd_1Q",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/auth",
          "name": "auth",
          "color": "92ad2d",
          "default": false,
          "description": "Issues and PRs related to Authentication / OAuth"
        },
        "2": {
          "id": 9354757189,
          "node_id": "LA_kwDOM2n80s8AAAACLZZERQ",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/enhancement",
          "name": "enhancement",
          "color": "11b5cc",
          "default": true,
          "description": "Request for a new feature that's not currently supported"
        },
        "3": {
          "id": 9354770246,
          "node_id": "LA_kwDOM2n80s8AAAACLZZ3Rg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P2",
          "name": "P2",
          "color": "d2b457",
          "default": false,
          "description": "Moderate issues affecting some users, edge cases, potentially valuable feature"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 0,
      "created_at": "2025-12-05T17:03:25Z",
      "updated_at": "2025-12-05T17:03:25Z",
      "closed_at": null,
      "author_association": "CONTRIBUTOR",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "## Summary\n\nRefactor OAuth implementation so the flow logic and state machine are usable by server-side proxy services, not just client-side browser flows.\n\n## Problem\n\nThe SDK's OAuth implementation is designed for local client-side flows (opening a browser locally). The business logic is embedded inside an httpx auth module, making it hard to reuse for other scenarios.\n\nWhile individual helper functions have been extracted (PKCE utilities, token exchange, discovery), the core state machine that orchestrates the OAuth flow is not reusable. Proxy services that need to perform OAuth on behalf of users currently have to reimplement significant portions of the flow themselves.\n\n## Goal\n\n- Extract the OAuth state machine / flow orchestration into a reusable component\n- Support server-side proxy patterns where OAuth happens on behalf of downstream clients\n- Make it easier to correctly follow the OAuth specs without reimplementing from scratch\n- Keep existing client-side flows working\n\n## Related\n\n- #1240 - Implement OAuth relying on Authlib\n\n---\n\n<sub>[AI Disclaimer](https://gist.github.com/maxisbey/6123d132484e4c533eab519a2800693d)</sub>",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1743/reactions",
        "total_count": 0,
        "+1": 0,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1742",
      "id": 3699693502,
      "node_id": "I_kwDOM2n80s7chNe-",
      "number": 1742,
      "title": "Introduce typed error classes with metadata",
      "user": {
        "login": "maxisbey",
        "id": 224885523,
        "node_id": "U_kgDODWd7Ew",
        "avatar_url": "https://avatars.githubusercontent.com/u/224885523?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/maxisbey",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 9230423596,
          "node_id": "LA_kwDOM2n80s8AAAACJi0WLA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/breaking%20change",
          "name": "breaking change",
          "color": "000000",
          "default": false,
          "description": "Will break existing deployments when updated without changes"
        },
        "1": {
          "id": 9230424293,
          "node_id": "LA_kwDOM2n80s8AAAACJi0Y5Q",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/v2",
          "name": "v2",
          "color": "5d2a87",
          "default": false,
          "description": "Ideas, requests and plans for v2 of the SDK which will incorporate major changes and fixes"
        },
        "2": {
          "id": 9354757189,
          "node_id": "LA_kwDOM2n80s8AAAACLZZERQ",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/enhancement",
          "name": "enhancement",
          "color": "11b5cc",
          "default": true,
          "description": "Request for a new feature that's not currently supported"
        },
        "3": {
          "id": 9354770246,
          "node_id": "LA_kwDOM2n80s8AAAACLZZ3Rg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P2",
          "name": "P2",
          "color": "d2b457",
          "default": false,
          "description": "Moderate issues affecting some users, edge cases, potentially valuable feature"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 0,
      "created_at": "2025-12-05T17:02:41Z",
      "updated_at": "2025-12-05T17:43:21Z",
      "closed_at": null,
      "author_association": "CONTRIBUTOR",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "## Summary\n\nReplace generic exceptions with SDK-native error classes that include useful metadata like fault attribution, retryability, and HTTP details.\n\n## Problem\n\nThe SDK currently raises generic exceptions from various layers (httpx, anyio, task groups) with no context about:\n- Whether the error is retryable\n- Who is at fault (client, server, network, protocol violation)\n- HTTP status codes and response bodies (often discarded)\n\nThis makes it hard for users to build robust error handling.\n\n## Goal\n\nA hierarchy of typed errors like:\n- `McpError` (base) with `fault`, `is_retryable`, `http_status_code`, `response_body`\n- `McpTransportError` for connection/network issues\n- `McpProtocolError` for invalid JSON-RPC responses\n- `McpAuthError` for 401/403 responses\n\n---\n\n<sub>[AI Disclaimer](https://gist.github.com/maxisbey/6123d132484e4c533eab519a2800693d)</sub>",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1742/reactions",
        "total_count": 0,
        "+1": 0,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1741",
      "id": 3699691728,
      "node_id": "I_kwDOM2n80s7chNDQ",
      "number": 1741,
      "title": "Support pluggable logging for structured output and correlation IDs",
      "user": {
        "login": "maxisbey",
        "id": 224885523,
        "node_id": "U_kgDODWd7Ew",
        "avatar_url": "https://avatars.githubusercontent.com/u/224885523?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/maxisbey",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 9230424293,
          "node_id": "LA_kwDOM2n80s8AAAACJi0Y5Q",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/v2",
          "name": "v2",
          "color": "5d2a87",
          "default": false,
          "description": "Ideas, requests and plans for v2 of the SDK which will incorporate major changes and fixes"
        },
        "1": {
          "id": 9354757189,
          "node_id": "LA_kwDOM2n80s8AAAACLZZERQ",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/enhancement",
          "name": "enhancement",
          "color": "11b5cc",
          "default": true,
          "description": "Request for a new feature that's not currently supported"
        },
        "2": {
          "id": 9354770246,
          "node_id": "LA_kwDOM2n80s8AAAACLZZ3Rg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P2",
          "name": "P2",
          "color": "d2b457",
          "default": false,
          "description": "Moderate issues affecting some users, edge cases, potentially valuable feature"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 0,
      "created_at": "2025-12-05T17:02:04Z",
      "updated_at": "2025-12-05T17:02:04Z",
      "closed_at": null,
      "author_association": "CONTRIBUTOR",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "## Summary\n\nAllow users to inject their own logger for structured logging, correlation IDs, and integration with their logging infrastructure.\n\n## Problem\n\nThe SDK uses standard Python `logging.getLogger(__name__)` which produces unstructured, multi-line output that's hard to correlate in log aggregation systems.\n\n- Can't correlate logs from a single request when debugging\n- Multi-line log entries break standard log parsing\n- No built-in support for correlation IDs across request lifecycle\n\n## Goal\n\nLet users configure a custom logger factory so they can use structured logging (JSON), add correlation IDs, and integrate with tools like structlog.\n\n---\n\n<sub>[AI Disclaimer](https://gist.github.com/maxisbey/6123d132484e4c533eab519a2800693d)</sub>",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1741/reactions",
        "total_count": 0,
        "+1": 0,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1740",
      "id": 3699689458,
      "node_id": "I_kwDOM2n80s7chMfy",
      "number": 1740,
      "title": "Fix stateless HTTP mode with elicitation and sampling",
      "user": {
        "login": "maxisbey",
        "id": 224885523,
        "node_id": "U_kgDODWd7Ew",
        "avatar_url": "https://avatars.githubusercontent.com/u/224885523?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/maxisbey",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 7511840554,
          "node_id": "LA_kwDOM2n80s8AAAABv72XKg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/bug",
          "name": "bug",
          "color": "d73a4a",
          "default": true,
          "description": "Something isn't working"
        },
        "1": {
          "id": 9230424293,
          "node_id": "LA_kwDOM2n80s8AAAACJi0Y5Q",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/v2",
          "name": "v2",
          "color": "5d2a87",
          "default": false,
          "description": "Ideas, requests and plans for v2 of the SDK which will incorporate major changes and fixes"
        },
        "2": {
          "id": 9354770246,
          "node_id": "LA_kwDOM2n80s8AAAACLZZ3Rg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P2",
          "name": "P2",
          "color": "d2b457",
          "default": false,
          "description": "Moderate issues affecting some users, edge cases, potentially valuable feature"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 0,
      "created_at": "2025-12-05T17:01:18Z",
      "updated_at": "2025-12-05T17:01:18Z",
      "closed_at": null,
      "author_association": "CONTRIBUTOR",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "## Summary\n\nStateless HTTP mode currently doesn't work correctly when using elicitation or sampling features.\n\n## Problem\n\nWhen running in stateless HTTP mode (`stateless_http=True`), the SDK fails to properly handle elicitation and sampling requests. The context required for these bidirectional interactions isn't properly established in stateless mode.\n\n## Open Questions\n\n- Stateless HTTP isn't currently part of the MCP specification\n- There are upcoming spec changes around statelessness that will affect this area\n- Unclear whether to fix now, wait for spec, or remove the feature entirely\n\n## Related SEPs\n\n- [SEP-1442: Make MCP Stateless (by default)](https://github.com/modelcontextprotocol/modelcontextprotocol/issues/1442)\n- [SEP-1359: Protocol-Level Sessions for MCP](https://github.com/modelcontextprotocol/modelcontextprotocol/issues/1359)\n\n---\n\n<sub>[AI Disclaimer](https://gist.github.com/maxisbey/6123d132484e4c533eab519a2800693d)</sub>",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1740/reactions",
        "total_count": 0,
        "+1": 0,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1739",
      "id": 3699672107,
      "node_id": "I_kwDOM2n80s7chIQr",
      "number": 1739,
      "title": "Support clean server shutdown",
      "user": {
        "login": "maxisbey",
        "id": 224885523,
        "node_id": "U_kgDODWd7Ew",
        "avatar_url": "https://avatars.githubusercontent.com/u/224885523?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/maxisbey",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 9230424293,
          "node_id": "LA_kwDOM2n80s8AAAACJi0Y5Q",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/v2",
          "name": "v2",
          "color": "5d2a87",
          "default": false,
          "description": "Ideas, requests and plans for v2 of the SDK which will incorporate major changes and fixes"
        },
        "1": {
          "id": 9354757189,
          "node_id": "LA_kwDOM2n80s8AAAACLZZERQ",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/enhancement",
          "name": "enhancement",
          "color": "11b5cc",
          "default": true,
          "description": "Request for a new feature that's not currently supported"
        },
        "2": {
          "id": 9354767859,
          "node_id": "LA_kwDOM2n80s8AAAACLZZt8w",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P1",
          "name": "P1",
          "color": "895d17",
          "default": false,
          "description": "Significant bug affecting many users, highly requested feature"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 0,
      "created_at": "2025-12-05T16:56:10Z",
      "updated_at": "2025-12-05T16:56:10Z",
      "closed_at": null,
      "author_association": "CONTRIBUTOR",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "## Summary\n\nProvide a reliable way to cleanly shut down a running MCP server, ensuring all resources are properly released.\n\n## Motivation\n\n- Currently there's no clean way to stop a running server programmatically\n- Resources (connections, tasks, file handles) may not be properly cleaned up on shutdown\n- Important for testing, graceful restarts, and production deployments\n\n## Goal\n\n- API for triggering graceful shutdown\n- Proper cleanup of all active sessions and transports\n- Configurable shutdown timeout / drain period\n\n---\n\n<sub>[AI Disclaimer](https://gist.github.com/maxisbey/6123d132484e4c533eab519a2800693d)</sub>",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1739/reactions",
        "total_count": 0,
        "+1": 0,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1738",
      "id": 3699669952,
      "node_id": "I_kwDOM2n80s7chHvA",
      "number": 1738,
      "title": "Rename types.py fields from camelCase to snake_case",
      "user": {
        "login": "maxisbey",
        "id": 224885523,
        "node_id": "U_kgDODWd7Ew",
        "avatar_url": "https://avatars.githubusercontent.com/u/224885523?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/maxisbey",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 9230423596,
          "node_id": "LA_kwDOM2n80s8AAAACJi0WLA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/breaking%20change",
          "name": "breaking change",
          "color": "000000",
          "default": false,
          "description": "Will break existing deployments when updated without changes"
        },
        "1": {
          "id": 9230424293,
          "node_id": "LA_kwDOM2n80s8AAAACJi0Y5Q",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/v2",
          "name": "v2",
          "color": "5d2a87",
          "default": false,
          "description": "Ideas, requests and plans for v2 of the SDK which will incorporate major changes and fixes"
        },
        "2": {
          "id": 9354757189,
          "node_id": "LA_kwDOM2n80s8AAAACLZZERQ",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/enhancement",
          "name": "enhancement",
          "color": "11b5cc",
          "default": true,
          "description": "Request for a new feature that's not currently supported"
        },
        "3": {
          "id": 9354767859,
          "node_id": "LA_kwDOM2n80s8AAAACLZZt8w",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P1",
          "name": "P1",
          "color": "895d17",
          "default": false,
          "description": "Significant bug affecting many users, highly requested feature"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 0,
      "created_at": "2025-12-05T16:55:35Z",
      "updated_at": "2025-12-05T17:43:16Z",
      "closed_at": null,
      "author_association": "CONTRIBUTOR",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "## Summary\n\nRename fields in the types module from camelCase to snake_case to follow Python naming conventions.\n\n## Motivation\n\n- Python convention is snake_case for attributes and variables\n- Current camelCase naming was inherited from the JSON schema / TypeScript origins\n- Makes the API feel more Pythonic\n\n## Migration\n\n- Use Pydantic field aliases to maintain wire compatibility\n- Add deprecation warnings for camelCase access during transition period\n\n## Related\n\n- Part of broader types.py restructuring for v2\n- #1737 - Remove RootModels\n\n---\n\n<sub>[AI Disclaimer](https://gist.github.com/maxisbey/6123d132484e4c533eab519a2800693d)</sub>",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1738/reactions",
        "total_count": 0,
        "+1": 0,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1737",
      "id": 3699667873,
      "node_id": "I_kwDOM2n80s7chHOh",
      "number": 1737,
      "title": "Remove Pydantic RootModels from types module",
      "user": {
        "login": "maxisbey",
        "id": 224885523,
        "node_id": "U_kgDODWd7Ew",
        "avatar_url": "https://avatars.githubusercontent.com/u/224885523?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/maxisbey",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 9230423596,
          "node_id": "LA_kwDOM2n80s8AAAACJi0WLA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/breaking%20change",
          "name": "breaking change",
          "color": "000000",
          "default": false,
          "description": "Will break existing deployments when updated without changes"
        },
        "1": {
          "id": 9230424293,
          "node_id": "LA_kwDOM2n80s8AAAACJi0Y5Q",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/v2",
          "name": "v2",
          "color": "5d2a87",
          "default": false,
          "description": "Ideas, requests and plans for v2 of the SDK which will incorporate major changes and fixes"
        },
        "2": {
          "id": 9354757189,
          "node_id": "LA_kwDOM2n80s8AAAACLZZERQ",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/enhancement",
          "name": "enhancement",
          "color": "11b5cc",
          "default": true,
          "description": "Request for a new feature that's not currently supported"
        },
        "3": {
          "id": 9354767859,
          "node_id": "LA_kwDOM2n80s8AAAACLZZt8w",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P1",
          "name": "P1",
          "color": "895d17",
          "default": false,
          "description": "Significant bug affecting many users, highly requested feature"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 0,
      "created_at": "2025-12-05T16:55:01Z",
      "updated_at": "2025-12-05T17:43:07Z",
      "closed_at": null,
      "author_association": "CONTRIBUTOR",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "## Summary\n\nRemove the use of Pydantic `RootModel` wrappers in the types module where they add complexity without clear benefit.\n\n## Motivation\n\n- RootModels add indirection that makes the types harder to work with\n- Many of these could be replaced with simpler type aliases or direct types\n- The types should ideally be generated from the spec, and RootModels complicate that path\n\n## Related\n\n- Part of broader types.py restructuring for v2\n\n---\n\n<sub>[AI Disclaimer](https://gist.github.com/maxisbey/6123d132484e4c533eab519a2800693d)</sub>",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1737/reactions",
        "total_count": 0,
        "+1": 0,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1736",
      "id": 3699641141,
      "node_id": "I_kwDOM2n80s7chAs1",
      "number": 1736,
      "title": "Simplify client API to single context manager",
      "user": {
        "login": "maxisbey",
        "id": 224885523,
        "node_id": "U_kgDODWd7Ew",
        "avatar_url": "https://avatars.githubusercontent.com/u/224885523?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/maxisbey",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 9230423596,
          "node_id": "LA_kwDOM2n80s8AAAACJi0WLA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/breaking%20change",
          "name": "breaking change",
          "color": "000000",
          "default": false,
          "description": "Will break existing deployments when updated without changes"
        },
        "1": {
          "id": 9230424293,
          "node_id": "LA_kwDOM2n80s8AAAACJi0Y5Q",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/v2",
          "name": "v2",
          "color": "5d2a87",
          "default": false,
          "description": "Ideas, requests and plans for v2 of the SDK which will incorporate major changes and fixes"
        },
        "2": {
          "id": 9354757189,
          "node_id": "LA_kwDOM2n80s8AAAACLZZERQ",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/enhancement",
          "name": "enhancement",
          "color": "11b5cc",
          "default": true,
          "description": "Request for a new feature that's not currently supported"
        },
        "3": {
          "id": 9354765360,
          "node_id": "LA_kwDOM2n80s8AAAACLZZkMA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P0",
          "name": "P0",
          "color": "a81d34",
          "default": false,
          "description": "Broken core functionality, security issues, critical missing feature"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 0,
      "created_at": "2025-12-05T16:46:47Z",
      "updated_at": "2025-12-05T17:43:01Z",
      "closed_at": null,
      "author_association": "CONTRIBUTOR",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "## Summary\n\nCombine `stdio_client` (and other transport clients) with `ClientSession` into a single, unified client interface that requires only one context manager.\n\n## Motivation\n\nCurrently, using a client requires nested context managers:\n\n```python\nasync with stdio_client(...) as (read, write):\n    async with ClientSession(read, write) as session:\n        await session.initialize()\n        # ...\n```\n\nThis is verbose and exposes transport internals (streams) that most users don't need to interact with.\n\n## Goal\n\nA simpler pattern like:\n\n```python\nasync with Client(transport=\"stdio\", ...) as client:\n    await client.initialize()\n    # ...\n```\n\nThe transport and session setup should be handled internally.\n\n## Related\n\n- #1735 - Replace anyio memory streams\n- #1690 - Introduce a shared Transport abstraction\n\n---\n\n<sub>[AI Disclaimer](https://gist.github.com/maxisbey/6123d132484e4c533eab519a2800693d)</sub>",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1736/reactions",
        "total_count": 0,
        "+1": 0,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1735",
      "id": 3699629551,
      "node_id": "I_kwDOM2n80s7cg93v",
      "number": 1735,
      "title": "Replace anyio memory streams with a simpler transport abstraction",
      "user": {
        "login": "maxisbey",
        "id": 224885523,
        "node_id": "U_kgDODWd7Ew",
        "avatar_url": "https://avatars.githubusercontent.com/u/224885523?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/maxisbey",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 9230423596,
          "node_id": "LA_kwDOM2n80s8AAAACJi0WLA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/breaking%20change",
          "name": "breaking change",
          "color": "000000",
          "default": false,
          "description": "Will break existing deployments when updated without changes"
        },
        "1": {
          "id": 9230424293,
          "node_id": "LA_kwDOM2n80s8AAAACJi0Y5Q",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/v2",
          "name": "v2",
          "color": "5d2a87",
          "default": false,
          "description": "Ideas, requests and plans for v2 of the SDK which will incorporate major changes and fixes"
        },
        "2": {
          "id": 9354757189,
          "node_id": "LA_kwDOM2n80s8AAAACLZZERQ",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/enhancement",
          "name": "enhancement",
          "color": "11b5cc",
          "default": true,
          "description": "Request for a new feature that's not currently supported"
        },
        "3": {
          "id": 9354767859,
          "node_id": "LA_kwDOM2n80s8AAAACLZZt8w",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P1",
          "name": "P1",
          "color": "895d17",
          "default": false,
          "description": "Significant bug affecting many users, highly requested feature"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 0,
      "created_at": "2025-12-05T16:42:58Z",
      "updated_at": "2025-12-05T17:42:38Z",
      "closed_at": null,
      "author_association": "CONTRIBUTOR",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "## Summary\n\nRemove or replace the use of anyio memory streams (`MemoryObjectSendStream` / `MemoryObjectReceiveStream`) in the transport layer with something more straightforward.\n\n## Motivation\n\nThe current memory stream approach:\n- Swallows errors/exceptions in ways that are hard to debug\n- Adds complexity to the transport layer\n- Makes it difficult to trace message flow and understand failures\n\n## Goal\n\nA simpler transport primitive that:\n- Propagates errors clearly\n- Is easier to reason about and debug\n- Reduces the conceptual overhead for contributors\n\n## Related\n\n- #1690 - Introduce a shared Transport abstraction\n- #1691 - Simplify and harden session lifecycle\n\n---\n\n<sub>[AI Disclaimer](https://gist.github.com/maxisbey/6123d132484e4c533eab519a2800693d)</sub>",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1735/reactions",
        "total_count": 0,
        "+1": 0,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1734",
      "id": 3699619104,
      "node_id": "I_kwDOM2n80s7cg7Ug",
      "number": 1734,
      "title": "Audit and document the MCP server publishing experience",
      "user": {
        "login": "maxisbey",
        "id": 224885523,
        "node_id": "U_kgDODWd7Ew",
        "avatar_url": "https://avatars.githubusercontent.com/u/224885523?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/maxisbey",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 9230424293,
          "node_id": "LA_kwDOM2n80s8AAAACJi0Y5Q",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/v2",
          "name": "v2",
          "color": "5d2a87",
          "default": false,
          "description": "Ideas, requests and plans for v2 of the SDK which will incorporate major changes and fixes"
        },
        "1": {
          "id": 9354757189,
          "node_id": "LA_kwDOM2n80s8AAAACLZZERQ",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/enhancement",
          "name": "enhancement",
          "color": "11b5cc",
          "default": true,
          "description": "Request for a new feature that's not currently supported"
        },
        "2": {
          "id": 9354770246,
          "node_id": "LA_kwDOM2n80s8AAAACLZZ3Rg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P2",
          "name": "P2",
          "color": "d2b457",
          "default": false,
          "description": "Moderate issues affecting some users, edge cases, potentially valuable feature"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 0,
      "created_at": "2025-12-05T16:39:38Z",
      "updated_at": "2025-12-05T16:44:18Z",
      "closed_at": null,
      "author_association": "CONTRIBUTOR",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "## Summary\n\nReview and document the end-to-end experience of publishing an MCP server to PyPI, identifying friction points and opportunities for improvement.\n\n## Motivation\n\n- Many users ask questions about how to properly package and publish their MCP servers\n- The current experience may have unnecessary friction or missing guidance\n- Understanding the UX gaps informs what SDK improvements or documentation is needed\n\n## Goal\n\n- Document the current publishing workflow step-by-step\n- Identify pain points and common mistakes\n- Propose improvements (whether docs, tooling, or SDK changes)\n\n---\n\n<sub>[AI Disclaimer](https://gist.github.com/maxisbey/6123d132484e4c533eab519a2800693d)</sub>",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1734/reactions",
        "total_count": 0,
        "+1": 0,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1733",
      "id": 3699617659,
      "node_id": "I_kwDOM2n80s7cg697",
      "number": 1733,
      "title": "Refactor examples to use PEP 723 inline script metadata",
      "user": {
        "login": "maxisbey",
        "id": 224885523,
        "node_id": "U_kgDODWd7Ew",
        "avatar_url": "https://avatars.githubusercontent.com/u/224885523?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/maxisbey",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 9230424293,
          "node_id": "LA_kwDOM2n80s8AAAACJi0Y5Q",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/v2",
          "name": "v2",
          "color": "5d2a87",
          "default": false,
          "description": "Ideas, requests and plans for v2 of the SDK which will incorporate major changes and fixes"
        },
        "1": {
          "id": 9354757189,
          "node_id": "LA_kwDOM2n80s8AAAACLZZERQ",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/enhancement",
          "name": "enhancement",
          "color": "11b5cc",
          "default": true,
          "description": "Request for a new feature that's not currently supported"
        },
        "2": {
          "id": 9354767859,
          "node_id": "LA_kwDOM2n80s8AAAACLZZt8w",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P1",
          "name": "P1",
          "color": "895d17",
          "default": false,
          "description": "Significant bug affecting many users, highly requested feature"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 0,
      "created_at": "2025-12-05T16:39:10Z",
      "updated_at": "2025-12-05T16:44:13Z",
      "closed_at": null,
      "author_association": "CONTRIBUTOR",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "## Summary\n\nSimplify the examples directory by using [PEP 723 inline script metadata](https://peps.python.org/pep-0723/) instead of individual `pyproject.toml` files per example.\n\n## Motivation\n\n- Current examples are verbose - each needs its own `pyproject.toml`, directory structure, and `__main__.py`\n- This adds friction for users trying to understand or copy examples\n- PEP 723 (supported by `uv run`) allows dependencies to be declared inline in a single script file\n\n## Goal\n\nExamples that are single self-contained `.py` files runnable with `uv run example.py`, making them easier to read, copy, and adapt.\n\n---\n\n<sub>[AI Disclaimer](https://gist.github.com/maxisbey/6123d132484e4c533eab519a2800693d)</sub>",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1733/reactions",
        "total_count": 0,
        "+1": 0,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1732",
      "id": 3699614053,
      "node_id": "I_kwDOM2n80s7cg6Fl",
      "number": 1732,
      "title": "Rename FastMCP to MCPServer and restructure constructor",
      "user": {
        "login": "maxisbey",
        "id": 224885523,
        "node_id": "U_kgDODWd7Ew",
        "avatar_url": "https://avatars.githubusercontent.com/u/224885523?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/maxisbey",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 9230423596,
          "node_id": "LA_kwDOM2n80s8AAAACJi0WLA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/breaking%20change",
          "name": "breaking change",
          "color": "000000",
          "default": false,
          "description": "Will break existing deployments when updated without changes"
        },
        "1": {
          "id": 9230424293,
          "node_id": "LA_kwDOM2n80s8AAAACJi0Y5Q",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/v2",
          "name": "v2",
          "color": "5d2a87",
          "default": false,
          "description": "Ideas, requests and plans for v2 of the SDK which will incorporate major changes and fixes"
        },
        "2": {
          "id": 9354757189,
          "node_id": "LA_kwDOM2n80s8AAAACLZZERQ",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/enhancement",
          "name": "enhancement",
          "color": "11b5cc",
          "default": true,
          "description": "Request for a new feature that's not currently supported"
        },
        "3": {
          "id": 9354765360,
          "node_id": "LA_kwDOM2n80s8AAAACLZZkMA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P0",
          "name": "P0",
          "color": "a81d34",
          "default": false,
          "description": "Broken core functionality, security issues, critical missing feature"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 0,
      "created_at": "2025-12-05T16:37:57Z",
      "updated_at": "2025-12-05T17:42:26Z",
      "closed_at": null,
      "author_association": "CONTRIBUTOR",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "## Summary\n\nRename `FastMCP` to `MCPServer` (or similar) and restructure so that transport-specific options are passed to `run()` rather than the constructor.\n\n## Motivation\n\n- The name \"FastMCP\" was inherited from the original external project but doesn't clearly convey what it is\n- The constructor currently accepts many HTTP-specific options (`host`, `port`, `stateless_http`, etc.) that only apply when running with a specific transport\n- This couples server definition with transport configuration\n\n## Goal\n\n- Clear, descriptive name for the high-level server class\n- Constructor focused on server identity and capabilities\n- Transport-specific options moved to `run()` or transport configuration\n\n---\n\n<sub>[AI Disclaimer](https://gist.github.com/maxisbey/6123d132484e4c533eab519a2800693d)</sub>",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1732/reactions",
        "total_count": 0,
        "+1": 0,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1731",
      "id": 3699613920,
      "node_id": "I_kwDOM2n80s7cg6Dg",
      "number": 1731,
      "title": "Content types should have default values for Literal type fields",
      "user": {
        "login": "maxisbey",
        "id": 224885523,
        "node_id": "U_kgDODWd7Ew",
        "avatar_url": "https://avatars.githubusercontent.com/u/224885523?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/maxisbey",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 9230424293,
          "node_id": "LA_kwDOM2n80s8AAAACJi0Y5Q",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/v2",
          "name": "v2",
          "color": "5d2a87",
          "default": false,
          "description": "Ideas, requests and plans for v2 of the SDK which will incorporate major changes and fixes"
        },
        "1": {
          "id": 9354757189,
          "node_id": "LA_kwDOM2n80s8AAAACLZZERQ",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/enhancement",
          "name": "enhancement",
          "color": "11b5cc",
          "default": true,
          "description": "Request for a new feature that's not currently supported"
        },
        "2": {
          "id": 9354767859,
          "node_id": "LA_kwDOM2n80s8AAAACLZZt8w",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P1",
          "name": "P1",
          "color": "895d17",
          "default": false,
          "description": "Significant bug affecting many users, highly requested feature"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 0,
      "created_at": "2025-12-05T16:37:54Z",
      "updated_at": "2025-12-05T16:46:34Z",
      "closed_at": null,
      "author_association": "CONTRIBUTOR",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "## Problem\n\nContent types like `TextContent` and `ImageContent` require passing `type=\"text\"` or `type=\"image\"` explicitly, even though these are single-value `Literal` types.\n\n**Current definitions:**\n```python\nclass TextContent(BaseModel):\n    type: Literal[\"text\"]  # No default\n    text: str\n\nclass ImageContent(BaseModel):\n    type: Literal[\"image\"]  # No default\n    data: str\n    mimeType: str\n```\n\n**Current usage (verbose):**\n```python\nTextContent(type=\"text\", text=\"hello\")\nImageContent(type=\"image\", data=\"...\", mimeType=\"image/png\")\n```\n\nPR #1292 already added defaults for `method: Literal` fields on request and notification types - could do the same thing here.\n\n## Related\n\n- #837 (type system complexity / developer friction)\n\n<sub>[AI Disclaimer](https://gist.github.com/maxisbey/6123d132484e4c533eab519a2800693d)</sub>",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1731/reactions",
        "total_count": 0,
        "+1": 0,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1730",
      "id": 3699613078,
      "node_id": "I_kwDOM2n80s7cg52W",
      "number": 1730,
      "title": "Result types should inherit from JSONRPCResponse",
      "user": {
        "login": "maxisbey",
        "id": 224885523,
        "node_id": "U_kgDODWd7Ew",
        "avatar_url": "https://avatars.githubusercontent.com/u/224885523?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/maxisbey",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 9230423596,
          "node_id": "LA_kwDOM2n80s8AAAACJi0WLA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/breaking%20change",
          "name": "breaking change",
          "color": "000000",
          "default": false,
          "description": "Will break existing deployments when updated without changes"
        },
        "1": {
          "id": 9230424293,
          "node_id": "LA_kwDOM2n80s8AAAACJi0Y5Q",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/v2",
          "name": "v2",
          "color": "5d2a87",
          "default": false,
          "description": "Ideas, requests and plans for v2 of the SDK which will incorporate major changes and fixes"
        },
        "2": {
          "id": 9354757189,
          "node_id": "LA_kwDOM2n80s8AAAACLZZERQ",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/enhancement",
          "name": "enhancement",
          "color": "11b5cc",
          "default": true,
          "description": "Request for a new feature that's not currently supported"
        },
        "3": {
          "id": 9354765360,
          "node_id": "LA_kwDOM2n80s8AAAACLZZkMA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P0",
          "name": "P0",
          "color": "a81d34",
          "default": false,
          "description": "Broken core functionality, security issues, critical missing feature"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 0,
      "created_at": "2025-12-05T16:37:41Z",
      "updated_at": "2025-12-05T17:42:17Z",
      "closed_at": null,
      "author_association": "CONTRIBUTOR",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "## Problem\n\nResult types like `CallToolResult` inherit from `Result`, not `JSONRPCResponse`. This means they're missing the `jsonrpc: \"2.0\"` and `id` fields.\n\n**Current inheritance:**\n```\nResult (types.py:133)\n└── meta: dict | None\n\nJSONRPCResponse (types.py:168) - separate, not inheriting from Result\n├── jsonrpc: Literal[\"2.0\"]\n├── id: RequestId\n└── result: dict\n\nCallToolResult (types.py:1363) extends Result\n└── Missing jsonrpc, id fields\n```\n\nThe SDK has to manually wrap every result to add the JSON-RPC envelope before sending (`session.py:386-389`):\n\n```python\njsonrpc_response = JSONRPCResponse(\n    jsonrpc=\"2.0\",\n    id=request_id,\n    result=response.model_dump(by_alias=True, mode=\"json\", exclude_none=True),\n)\n```\n\nSame pattern as the notification inheritance issue - might be worth rethinking the type hierarchy.\n\n## Related\n\n- #837 (type system complexity)\n- #1207 (excessive generics)\n\n<sub>[AI Disclaimer](https://gist.github.com/maxisbey/6123d132484e4c533eab519a2800693d)</sub>",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1730/reactions",
        "total_count": 0,
        "+1": 0,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1729",
      "id": 3699612339,
      "node_id": "I_kwDOM2n80s7cg5qz",
      "number": 1729,
      "title": "Notification types should inherit from JSONRPCNotification",
      "user": {
        "login": "maxisbey",
        "id": 224885523,
        "node_id": "U_kgDODWd7Ew",
        "avatar_url": "https://avatars.githubusercontent.com/u/224885523?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/maxisbey",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 9230423596,
          "node_id": "LA_kwDOM2n80s8AAAACJi0WLA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/breaking%20change",
          "name": "breaking change",
          "color": "000000",
          "default": false,
          "description": "Will break existing deployments when updated without changes"
        },
        "1": {
          "id": 9230424293,
          "node_id": "LA_kwDOM2n80s8AAAACJi0Y5Q",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/v2",
          "name": "v2",
          "color": "5d2a87",
          "default": false,
          "description": "Ideas, requests and plans for v2 of the SDK which will incorporate major changes and fixes"
        },
        "2": {
          "id": 9354757189,
          "node_id": "LA_kwDOM2n80s8AAAACLZZERQ",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/enhancement",
          "name": "enhancement",
          "color": "11b5cc",
          "default": true,
          "description": "Request for a new feature that's not currently supported"
        },
        "3": {
          "id": 9354765360,
          "node_id": "LA_kwDOM2n80s8AAAACLZZkMA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P0",
          "name": "P0",
          "color": "a81d34",
          "default": false,
          "description": "Broken core functionality, security issues, critical missing feature"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 0,
      "created_at": "2025-12-05T16:37:24Z",
      "updated_at": "2025-12-05T17:42:13Z",
      "closed_at": null,
      "author_association": "CONTRIBUTOR",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "## Problem\n\nNotification types like `ProgressNotification` inherit from `Notification`, not `JSONRPCNotification`. This means they're missing the `jsonrpc: \"2.0\"` field.\n\n**Current inheritance:**\n```\nNotification (types.py:125)\n├── method: MethodT\n├── params: NotificationParamsT\n└── NO jsonrpc field\n\nJSONRPCNotification (types.py:161) extends Notification\n└── jsonrpc: Literal[\"2.0\"]  ← adds this field\n\nProgressNotification (types.py:745) extends Notification\n└── Missing jsonrpc field\n```\n\nThe SDK has to manually wrap every notification to add the JSON-RPC envelope before sending (`session.py:370-373`):\n\n```python\njsonrpc_notification = JSONRPCNotification(\n    jsonrpc=\"2.0\",\n    **notification.model_dump(by_alias=True, mode=\"json\", exclude_none=True),\n)\n```\n\nMight be worth restructuring the type hierarchy here so the wrapping isn't needed.\n\n## Related\n\n- #837 (type system complexity)\n- #1207 (excessive generics)\n- #1399 (ServerNotification only accepts fixed types)\n\n<sub>[AI Disclaimer](https://gist.github.com/maxisbey/6123d132484e4c533eab519a2800693d)</sub>",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1729/reactions",
        "total_count": 0,
        "+1": 0,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1728",
      "id": 3699602203,
      "node_id": "I_kwDOM2n80s7cg3Mb",
      "number": 1728,
      "title": "Add ergonomic test client for testing MCP servers",
      "user": {
        "login": "maxisbey",
        "id": 224885523,
        "node_id": "U_kgDODWd7Ew",
        "avatar_url": "https://avatars.githubusercontent.com/u/224885523?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/maxisbey",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 9230424293,
          "node_id": "LA_kwDOM2n80s8AAAACJi0Y5Q",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/v2",
          "name": "v2",
          "color": "5d2a87",
          "default": false,
          "description": "Ideas, requests and plans for v2 of the SDK which will incorporate major changes and fixes"
        },
        "1": {
          "id": 9354757189,
          "node_id": "LA_kwDOM2n80s8AAAACLZZERQ",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/enhancement",
          "name": "enhancement",
          "color": "11b5cc",
          "default": true,
          "description": "Request for a new feature that's not currently supported"
        },
        "2": {
          "id": 9354765360,
          "node_id": "LA_kwDOM2n80s8AAAACLZZkMA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P0",
          "name": "P0",
          "color": "a81d34",
          "default": false,
          "description": "Broken core functionality, security issues, critical missing feature"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 0,
      "created_at": "2025-12-05T16:34:14Z",
      "updated_at": "2025-12-05T16:44:02Z",
      "closed_at": null,
      "author_association": "CONTRIBUTOR",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "## Summary\n\nProvide a dedicated test client that simplifies testing MCP servers without the boilerplate of manually setting up transports, streams, and context managers.\n\n## Motivation\n\nCurrently, testing an MCP server requires:\n- Setting up `stdio_client` or similar transport\n- Managing multiple nested context managers (transport + session)\n- Wiring up memory streams manually\n\nThis creates friction for both SDK users writing tests for their servers and for the SDK's own test suite.\n\n## Goal\n\nSomething analogous to FastAPI's `TestClient` / Starlette's test client pattern - a simple way to instantiate a client against a server instance and make requests without transport ceremony.\n\n---\n\n<sub>[AI Disclaimer](https://gist.github.com/maxisbey/6123d132484e4c533eab519a2800693d)</sub>",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1728/reactions",
        "total_count": 0,
        "+1": 0,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1727",
      "id": 3699130128,
      "node_id": "I_kwDOM2n80s7cfD8Q",
      "number": 1727,
      "title": "StreamableHTTPSessionManager returns 400 instead of 404 for unknown session ID",
      "user": {
        "login": "johnw188",
        "id": 6454,
        "node_id": "MDQ6VXNlcjY0NTQ=",
        "avatar_url": "https://avatars.githubusercontent.com/u/6454?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/johnw188",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 7511840554,
          "node_id": "LA_kwDOM2n80s8AAAABv72XKg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/bug",
          "name": "bug",
          "color": "d73a4a",
          "default": true,
          "description": "Something isn't working"
        },
        "1": {
          "id": 9354761244,
          "node_id": "LA_kwDOM2n80s8AAAACLZZUHA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/ready%20for%20work",
          "name": "ready for work",
          "color": "2b9402",
          "default": false,
          "description": "Enough information for someone to start working on"
        },
        "2": {
          "id": 9354765360,
          "node_id": "LA_kwDOM2n80s8AAAACLZZkMA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P0",
          "name": "P0",
          "color": "a81d34",
          "default": false,
          "description": "Broken core functionality, security issues, critical missing feature"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 0,
      "created_at": "2025-12-05T14:10:38Z",
      "updated_at": "2025-12-05T15:05:57Z",
      "closed_at": null,
      "author_association": "MEMBER",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "## Description\n\n`StreamableHTTPSessionManager._handle_stateful_request()` returns HTTP 400 Bad Request when a session ID is provided but not found in the server instances. According to the MCP spec, this should be HTTP 404 Not Found.\n\n## Spec Reference\n\nFrom the [Streamable HTTP transport spec](https://modelcontextprotocol.io/specification/2025-03-26/basic/transports#session-management):\n\n> Servers that require a session ID SHOULD respond to requests without an `Mcp-Session-Id` header (other than initialization) with **HTTP 400 Bad Request**.\n\n> The server MAY terminate the session at any time, after which it MUST respond to requests containing that session ID with **HTTP 404 Not Found**.\n\n> When a client receives HTTP 404 in response to a request containing an `Mcp-Session-Id`, it MUST start a new session by sending a new `InitializeRequest` without a session ID attached.\n\n## Current Behavior\n\nIn `src/mcp/server/streamable_http_manager.py`, the `_handle_stateful_request` method:\n\n```python\nif request_mcp_session_id is not None and request_mcp_session_id in self._server_instances:\n    # Handle existing session\n    ...\nelif request_mcp_session_id is None:\n    # Create new session\n    ...\nelse:\n    # Session ID provided but not found\n    response = Response(\n        \"Bad Request: No valid session ID provided\",\n        status_code=HTTPStatus.BAD_REQUEST,  # ← Should be NOT_FOUND (404)\n    )\n```\n\n## Expected Behavior\n\nThe `else` branch should return 404 Not Found:\n\n```python\nelse:\n    response = Response(\n        \"Not Found: Session not found\",\n        status_code=HTTPStatus.NOT_FOUND,\n    )\n```\n\n## Why This Matters\n\nThe distinction matters for client behavior:\n- **400** indicates a malformed request - clients may retry or report an error\n- **404** indicates the session doesn't exist - clients know to re-initialize\n\nThe transport layer (`streamable_http.py`) correctly implements this in `_validate_session()`, but the manager layer has its own session lookup that doesn't follow the same pattern.\n\n## Note\n\nThe TypeScript SDK's `StreamableHTTPServerTransport` correctly returns 404 for session mismatch in its `validateSession` method.",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1727/reactions",
        "total_count": 0,
        "+1": 0,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1726",
      "id": 3697448606,
      "node_id": "I_kwDOM2n80s7cYpae",
      "number": 1726,
      "title": "Abstraction for Message-Oriented Transports (Broker/PubSub Support)",
      "user": {
        "login": "sathwikshetty33",
        "id": 175965461,
        "node_id": "U_kgDOCn0FFQ",
        "avatar_url": "https://avatars.githubusercontent.com/u/175965461?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/sathwikshetty33",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {},
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 0,
      "created_at": "2025-12-05T04:24:38Z",
      "updated_at": "2025-12-05T04:24:38Z",
      "closed_at": null,
      "author_association": "NONE",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "# Feature Request: Abstraction for Message-Oriented Transports (Broker/PubSub Support)\n\n### Is your feature request related to a problem? Please describe.\nThe current SDK `Transport` and `Server/Client` implementations rely heavily on `anyio` streams (byte-oriented communication). This works perfectly for Stdio and SSE, where data arrives as a continuous stream of bytes and requires framing (e.g., newline delimiters or content-length headers).\n\nHowever, I am implementing an MCP architecture using **Message Brokers** (RabbitMQ/Kafka/NATS) as the transport layer. In these systems:\n1. **Discrete Payloads:** Data arrives as discrete, complete payloads (Message-Oriented), not byte streams.\n2. **Redundant Framing:** The \"Framing\" logic in the current SDK is redundant because the broker already delineates messages.\n3. **Impedance Mismatch:** Forcing a Message Broker library (like `pika` or `aiokafka`) to behave like an `anyio` byte stream requires writing complex adapter boilerplate to \"fake\" a stream just to satisfy the SDK's entry points.\n\n### Describe the solution you'd like\nI propose adding a first-class `MessageTransport` interface (or extending the current `Transport` abstraction) that allows injecting/extracting fully formed `JSONRPCMessage` objects directly, bypassing the byte-stream/framing layer.\n\n**Proposed Interface Idea:**\n\n```python\n# Instead of read_stream / write_stream dealing in bytes\nclass MessageTransport(ABC):\n    \n    async def start(self):\n        \"\"\"Connect to broker\"\"\"\n        pass\n\n    async def send_message(self, message: JSONRPCMessage):\n        \"\"\"\n        Directly handles the Pydantic object.\n        Implementation handles serialization and publishing to the Broker.\n        \"\"\"\n        pass\n\n    async def receive_message(self) -> JSONRPCMessage:\n        \"\"\"\n        Yields complete messages from the Broker subscription.\n        No need for internal buffering or newline scanning.\n        \"\"\"\n        pass",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1726/reactions",
        "total_count": 0,
        "+1": 0,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1724",
      "id": 3696723555,
      "node_id": "I_kwDOM2n80s7cV4Zj",
      "number": 1724,
      "title": "Support for synchronous auth flow with separate re-entry",
      "user": {
        "login": "jake-mayer",
        "id": 247881944,
        "node_id": "U_kgDODsZg2A",
        "avatar_url": "https://avatars.githubusercontent.com/u/247881944?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/jake-mayer",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {},
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 0,
      "created_at": "2025-12-04T21:44:12Z",
      "updated_at": "2025-12-04T21:44:12Z",
      "closed_at": null,
      "author_association": "NONE",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "### Description\n\nI work on the Google ADK and we are adding support for PRM-based authentication. We would like to use the OAuthClientProvider reference library, but it is unfortunately incompatible with the existing ADK usage pattern.\n\nGoogle ADK usage pattern\n```\nevents = agent.run('call my tool')  # without auth\nfor event in events:\n  # find auth request and handle it (e.g. open web url, etc.)\n\nevents = agent.run(/* auth response */)\nfor event in events:\n  # get tool call result\n```\nReference for exact details (https://google.github.io/adk-docs/tools-custom/authentication)\n\nThis pattern requires that the authorization request URL be surfaced to the caller and the initial flow be ended, only to be re-started again later once the authorization code is available. This is similar to how the MCP typescript reference library functions, while the python library requires a continuous flow mediated by async callbacks.\n\nIf support for this additional pattern is acceptable with the python SDK maintainers, I'm able to make a contribution, and would like to get consensus on one of the following designs:\n1. Core implementation is refactored into the synchronous pattern, and the asynchronous pattern is maintained as a thin layer over this.\n2. A single implementation is maintained and accepts a constructor param governing which pattern it should use.\n3. A separate implementation is maintained for each pattern, re-using some core components of the library wherever possible.\n\nThanks!\n\n### References\n\n_No response_",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1724/reactions",
        "total_count": 0,
        "+1": 0,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1723",
      "id": 3696328455,
      "node_id": "I_kwDOM2n80s7cUX8H",
      "number": 1723,
      "title": "`auth` specification in `ClientSessionGroup`",
      "user": {
        "login": "erwang01",
        "id": 15204179,
        "node_id": "MDQ6VXNlcjE1MjA0MTc5",
        "avatar_url": "https://avatars.githubusercontent.com/u/15204179?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/erwang01",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {},
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 0,
      "created_at": "2025-12-04T20:05:12Z",
      "updated_at": "2025-12-04T20:05:12Z",
      "closed_at": null,
      "author_association": "NONE",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "### Description\n\nIt would be nice for the `ClientSessionGroup` to be OAuth compatible by allowing us to specify the OAuth `httpx.Auth` provider when passing in the `ServerParameters` rather than passing the bearer tokens manually via the `headers` field. This will allow us to do the OAuth token exchange flow straight from the `ClientSessionGroup`.\n\n### References\n\nHere is the singleton `ClientSession` example of an OAuth flow: https://github.com/modelcontextprotocol/python-sdk/blob/main/examples/clients/simple-auth-client/mcp_simple_auth_client/main.py\n\nIt would be nice to have an example of a `ClientSessionGroup` using that same flow.",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1723/reactions",
        "total_count": 0,
        "+1": 0,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1717",
      "id": 3690658760,
      "node_id": "I_kwDOM2n80s7b-vvI",
      "number": 1717,
      "title": "UnboundLocalError in send_request when response_or_error is not assigned",
      "user": {
        "login": "maxisbey",
        "id": 224885523,
        "node_id": "U_kgDODWd7Ew",
        "avatar_url": "https://avatars.githubusercontent.com/u/224885523?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/maxisbey",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 7511840554,
          "node_id": "LA_kwDOM2n80s8AAAABv72XKg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/bug",
          "name": "bug",
          "color": "d73a4a",
          "default": true,
          "description": "Something isn't working"
        },
        "1": {
          "id": 9354761244,
          "node_id": "LA_kwDOM2n80s8AAAACLZZUHA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/ready%20for%20work",
          "name": "ready for work",
          "color": "2b9402",
          "default": false,
          "description": "Enough information for someone to start working on"
        },
        "2": {
          "id": 9354767859,
          "node_id": "LA_kwDOM2n80s8AAAACLZZt8w",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P1",
          "name": "P1",
          "color": "895d17",
          "default": false,
          "description": "Significant bug affecting many users, highly requested feature"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 0,
      "created_at": "2025-12-03T15:12:51Z",
      "updated_at": "2025-12-03T16:43:39Z",
      "closed_at": null,
      "author_association": "CONTRIBUTOR",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "## Description\n\nWe received a report of intermittent `UnboundLocalError` exceptions occurring in `send_request()`:\n\n```\nUnboundLocalError: cannot access local variable 'response_or_error' where it is not associated with a value\n```\n\nThe error originates from `mcp/shared/session.py` at the line that checks `isinstance(response_or_error, JSONRPCError)`.\n\n## Code Structure\n\nThe current code structure in `send_request()` is:\n\n```python\ntry:\n    with anyio.fail_after(timeout):\n        response_or_error = await response_stream_reader.receive()\nexcept TimeoutError:\n    raise McpError(...)\n\n# response_or_error is used here, outside the inner try/except\nif isinstance(response_or_error, JSONRPCError):\n    raise McpError(response_or_error.error)\n```\n\n## Analysis\n\nFor `UnboundLocalError` to occur, execution must reach the `isinstance` check without `response_or_error` ever being assigned. Under normal Python semantics this should be impossible:\n\n- If `receive()` completes → variable is assigned\n- If `receive()` raises `TimeoutError` → caught, `McpError` raised, never reaches the check\n- If `receive()` raises other exceptions → propagates up, never reaches the check\n\n## Theories\n\n### 1. anyio `fail_after` race condition\n\nThere was a documented race condition in anyio ([agronholm/anyio#589](https://github.com/agronholm/anyio/issues/589)) where `fail_after()` could incorrectly suppress exceptions. The scenario:\n\n1. `receive()` is executing\n2. Timeout deadline is exceeded at the exact moment\n3. Cancellation exception is raised but incorrectly suppressed by the cancel scope\n4. Execution continues as if the try block succeeded\n5. But the assignment never completed\n\nThis was reportedly fixed in anyio 4.0 via [PR #591](https://github.com/agronholm/anyio/pull/591), but there may be remaining edge cases.\n\n### 2. Unhandled exceptions from `receive()`\n\n`MemoryObjectReceiveStream.receive()` can raise:\n- `EndOfStream` - if stream closed from sender side\n- `ClosedResourceError` - if stream explicitly closed\n\nNeither is caught by `except TimeoutError`, so they would propagate. However, this should prevent reaching the `isinstance` check, not cause `UnboundLocalError`.\n\n### 3. Exception group interaction (Python 3.11+)\n\nWith task groups, exceptions can be wrapped in `ExceptionGroup`. The `except TimeoutError` clause does not catch `ExceptionGroup` containing `TimeoutError`. However, this still shouldn't allow execution to continue to the `isinstance` check.\n\n## Environment\n\n- Reported on: anyio >= 4.5\n- Python: 3.10+\n\n<sub>[AI Disclaimer](https://gist.github.com/maxisbey/6123d132484e4c533eab519a2800693d)</sub>",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1717/reactions",
        "total_count": 0,
        "+1": 0,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": [
        1718
      ]
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1708",
      "id": 3679754997,
      "node_id": "I_kwDOM2n80s7bVJr1",
      "number": 1708,
      "title": "ClientSession for mcp sse_client throws httpx.ReadTimeout after session has been initialized in docker container",
      "user": {
        "login": "cmakasy",
        "id": 165396618,
        "node_id": "U_kgDOCdvAig",
        "avatar_url": "https://avatars.githubusercontent.com/u/165396618?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/cmakasy",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {},
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 1,
      "created_at": "2025-12-01T08:00:11Z",
      "updated_at": "2025-12-03T22:06:49Z",
      "closed_at": null,
      "author_association": "NONE",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "### Initial Checks\n\n- [x] I confirm that I'm using the latest version of MCP Python SDK\n- [x] I confirm that I searched for my issue in https://github.com/modelcontextprotocol/python-sdk/issues before opening this issue\n\n### Description\n\nWe are implementing a FastAPI mcp client that uses an external sse server ```(http://localhost:9000/sse)```.  Form this code we created a dockerfile that runs into an httpx.ReadTimeout Exception\nRunning the client from the docker image shows the following output:\n```\n      INFO   Started server process [276]\n      INFO   Waiting for application startup.\n🌀 Tâche d'initialisation MCP lancée en arrière-plan.\n🚀 Initialisation de la session MCP...\n      INFO   Application startup complete.\nSSE CLIENT passed\n initialized – protocol version: meta=None protocolVersion='2024-11-05' capabilities=ServerCapabilities(experimental=None, logging=LoggingCapability(), prompts=PromptsCapability(listChanged=True), resources=ResourcesCapability(subscribe=False, listChanged=True), tools=ToolsCapability(listChanged=True), completions=CompletionsCapability()) serverInfo=Implementation(name='papylot-mcp-server', title=None, version='0.0.1', websiteUrl=None, icons=None) instructions=None\n✅ MCP session initialized.\nPING meta=None\n```\nAfter a couple of time a ```httpx.ReadTimeout``` will be shown.\n\nFull exception:\n```\nTraceback (most recent call last):\n  File \"/usr/local/lib/python3.12/site-packages/mcp/client/sse.py\", line 73, in sse_reader\n    async for sse in event_source.aiter_sse():\n  File \"/usr/local/lib/python3.12/site-packages/httpx_sse/_api.py\", line 39, in aiter_sse\n    async for line in self._response.aiter_lines():\n  File \"/usr/local/lib/python3.12/site-packages/httpx/_models.py\", line 1031, in aiter_lines\n    async for text in self.aiter_text():\n  File \"/usr/local/lib/python3.12/site-packages/httpx/_models.py\", line 1018, in aiter_text\n    async for byte_content in self.aiter_bytes():\n  File \"/usr/local/lib/python3.12/site-packages/httpx/_models.py\", line 997, in aiter_bytes\n    async for raw_bytes in self.aiter_raw():\n  File \"/usr/local/lib/python3.12/site-packages/httpx/_models.py\", line 1055, in aiter_raw\n    async for raw_stream_bytes in self.stream:\n  File \"/usr/local/lib/python3.12/site-packages/httpx/_client.py\", line 176, in __aiter__\n    async for chunk in self._stream:\n  File \"/usr/local/lib/python3.12/site-packages/httpx/_transports/default.py\", line 270, in __aiter__\n    with map_httpcore_exceptions():\n         ^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/usr/local/lib/python3.12/contextlib.py\", line 158, in __exit__\n    self.gen.throw(value)\n  File \"/usr/local/lib/python3.12/site-packages/httpx/_transports/default.py\", line 118, in map_httpcore_exceptions\n    raise mapped_exc(message) from exc\nhttpx.ReadTimeout\n```\n\n\n### Example Code\n\n```Python\nimport os\nimport re\nimport json\nimport asyncio\nimport httpx\nfrom fastapi import FastAPI, Query\nfrom dotenv import load_dotenv\nfrom mcp import ClientSession\nfrom pydantic_ai import Agent\n# from groq import Groq\nfrom fastmcp import FastMCP\nfrom contextlib import asynccontextmanager\nfrom mcp.client.sse import sse_client\n\nasync def init_mcp_background():\n      async with  sse_client(\"http://localhost:9000/sse\") as (read, write):\n            async with ClientSession(read, write) as sess:\n                session = sess\n                await session.initialize()\n                print(\"✅ MCP session initialized.\")\n\n                ping = await session.send_ping()\n                print(\"ping\",ping)\n                \n                #print(\"info\",info)\n                tools = await session.list_tools()\n                print(\"Available TOOLS\", tools.tools)\n\n                # 🔁 Boucle qui garde la connexion active\n                while True:\n                    await asyncio.sleep(10) \n\n@asynccontextmanager\nasync def lifespan(app: FastAPI):\n    asyncio.create_task(init_mcp_background())\n    print(\"🌀 Tâche d'initialisation MCP lancée en arrière-plan.\")\n    yield\n\napp = FastAPI(lifespan=lifespan)\n    @app.get(\"/query\")\nasync def get_response(question: str = Query(..., description=\"La question de l'utilisateur\")):\n    \n    return{\"question\", question}\n\n\nwith the dockerfile for image creation:\n\n# syntax=docker/dockerfile:1\n## DOCKERFILE to containerize BACKEND ##\nFROM python:3.12-slim\nWORKDIR /app\n# copy requirements\nCOPY ./requirements.txt /app/requirements.txt\n# install requirements\nRUN pip install --no-cache-dir --upgrade -r /app/requirements.txt\n# copy source code\nCOPY .  /app\n# where are we\nRUN pwd\n# what do we have\nRUN ls -lR\n# run application\nCMD [\"fastapi\", \"run\", \"API/api.py\", \"--proxy-headers\", \"--port\", \"8011\"]\n```\n\n### Python & MCP Python SDK\n\n```Text\nFor the dockerfile we are using: :3.12-slim\nand the requirement.txt is\n\nfastmcp==2.12.4\nmcp==1.16.0\npydantic_ai==1.0.14\npython-dotenv==1.1.1\nfastapi-mcp==0.3.4\nfastapi[standard]>=0.115.12\n```",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1708/reactions",
        "total_count": 0,
        "+1": 0,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1705",
      "id": 3675317429,
      "node_id": "I_kwDOM2n80s7bEOS1",
      "number": 1705,
      "title": "Document and provide hooks for sandboxing file and network access in MCP tools",
      "user": {
        "login": "dgenio",
        "id": 12731907,
        "node_id": "MDQ6VXNlcjEyNzMxOTA3",
        "avatar_url": "https://avatars.githubusercontent.com/u/12731907?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/dgenio",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {},
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 0,
      "created_at": "2025-11-28T15:49:02Z",
      "updated_at": "2025-11-28T15:49:02Z",
      "closed_at": null,
      "author_association": "NONE",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "### Description\n\n## Summary\n\nMCP tools and resources built with the Python SDK can, by default, access the full file system, network, and environment of the host process. This is powerful but risky, especially when:\n\n- servers are installed from third parties, or\n- LLM agents can call tools based on prompt-injected instructions.\n\nThe SDK should clearly document this and provide hooks/patterns for limiting capabilities.\n\n## Proposal\n\n1. **Document security considerations**\n\n   - Add a “Security considerations” section explicitly calling out:\n     - file system access,\n     - network access,\n     - environment variables and credentials.\n\n2. **Provide capability hooks**\n\n   - Offer configuration points or helper utilities to:\n     - restrict file access to specific directories (allowlist),\n     - restrict outbound network calls to certain hosts/domains,\n     - prevent access to environment variables by default.\n\n3. **Encourage process-level sandboxing**\n\n   - Provide guidance on running MCP servers in:\n     - containers with minimal privileges,\n     - separate processes with limited OS capabilities.\n\n## Why this matters\n\n- **Defense in depth:** Even if application code is careful, configuration mistakes or third-party code can introduce risk.\n- **Prompt-injection mitigation:** Restricting what tools can do reduces the impact of malicious prompts.\n- **Operational guidance:** Many users are new to MCP and benefit from clear security best practices.\n\n## Acceptance criteria\n\n- [ ] Documentation clearly describes the security implications of running MCP servers and tools.\n- [ ] There are example patterns for restricting file and network access.\n- [ ] Where feasible, the SDK exposes hooks or configuration points for capability control.\n\n\n### References\n\n_No response_",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1705/reactions",
        "total_count": 0,
        "+1": 0,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1702",
      "id": 3675298470,
      "node_id": "I_kwDOM2n80s7bEJqm",
      "number": 1702,
      "title": "Clarify and improve behavior when tool output fails schema validation",
      "user": {
        "login": "dgenio",
        "id": 12731907,
        "node_id": "MDQ6VXNlcjEyNzMxOTA3",
        "avatar_url": "https://avatars.githubusercontent.com/u/12731907?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/dgenio",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {},
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 0,
      "created_at": "2025-11-28T15:40:46Z",
      "updated_at": "2025-11-28T15:40:46Z",
      "closed_at": null,
      "author_association": "NONE",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "### Description\n\n## Summary\n\nTools can declare `outputSchema`, and the SDK validates the returned value against this schema **after** the tool executes. If validation fails:\n\n- the tool’s side effects (DB writes, external calls, etc.) have already occurred,\n- the client receives an error that may not clearly indicate the state of the underlying operation.\n\nThis issue proposes clarifying the behavior and exploring patterns to reduce confusion and risk.\n\n## Problems\n\n- **Side effects happen before validation:** There is no built-in notion of a “transactional” tool whose effects are rolled back on validation failure.\n- **Ambiguous client behavior:** Clients do not know whether they should retry after a validation error, since the tool may have partially succeeded.\n\n## Proposal\n\n1. **Clarify semantics in documentation**\n\n   - Document that:\n     - tool execution occurs before validation,\n     - validation failures indicate an inconsistency between implementation and declared schema.\n\n2. **Provide patterns for transactional tools**\n\n   - Offer a decorator or pattern (`@mcp.tool(transactional=True)`) for tools where users implement their own rollback logic, or\n   - provide guidance on using explicit “job status” resources that separate side effects from the final structured response.\n\n3. **Distinct error indication**\n\n   - Use a specific error code / category for “output schema validation failed” so clients can treat it differently from generic tool failures.\n\n## Why this matters\n\n- **Correctness:** Users understand what has happened when a validation error is returned.\n- **Resilience:** Clear patterns for dealing with side effects reduce the likelihood of inconsistent states.\n- **Schema evolution:** Changing schemas becomes less surprising when the semantics are well-documented.\n\n## Acceptance criteria\n\n- [ ] Behavior on output schema validation failure is clearly documented.\n- [ ] Validation errors use a distinct, documented error code/category.\n- [ ] Recommended patterns are documented for tools with significant side effects.\n\n\n### References\n\n_No response_",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1702/reactions",
        "total_count": 0,
        "+1": 0,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1701",
      "id": 3675296025,
      "node_id": "I_kwDOM2n80s7bEJEZ",
      "number": 1701,
      "title": "Define and document the public Python SDK API surface",
      "user": {
        "login": "dgenio",
        "id": 12731907,
        "node_id": "MDQ6VXNlcjEyNzMxOTA3",
        "avatar_url": "https://avatars.githubusercontent.com/u/12731907?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/dgenio",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 9230423596,
          "node_id": "LA_kwDOM2n80s8AAAACJi0WLA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/breaking%20change",
          "name": "breaking change",
          "color": "000000",
          "default": false,
          "description": "Will break existing deployments when updated without changes"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 1,
      "created_at": "2025-11-28T15:39:36Z",
      "updated_at": "2025-12-05T17:42:05Z",
      "closed_at": null,
      "author_association": "NONE",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "### Description\n\n## Summary\n\nThe Python SDK exposes a variety of classes and functions across packages and submodules. Some are clearly meant to be public, others are internal but not marked as such. Tests and user code sometimes rely on internals (e.g. private attributes).\n\nThis makes it hard for users to know what is safe to depend on and hard for maintainers to evolve internals without risking breakage.\n\n## Problems\n\n- **Ambiguous boundaries:** It’s not always clear which symbols in `mcp.*` and subpackages are part of the supported public API.\n- **Private attribute usage:** Some tests/examples access internal attributes (e.g. `_mcp_server`), which blurs the line between public and internal.\n- **Versioning risk:** Changes to internal structures can accidentally turn into breaking changes for users who imported them directly.\n\n## Proposal\n\n1. **Define an explicit public API**\n\n   - Use `__all__` and/or a `mcp.public` (or similar) module to list what is considered stable public API.\n   - Document the intended public surface in the README or a dedicated “API Reference”.\n\n2. **Mark internals clearly**\n\n   - Move clearly internal modules into an `_internal` subpackage where possible.\n   - Use leading underscores and documentation to indicate non-public attributes.\n\n3. **Gradual tightening**\n\n   - Update examples and tests to use only public APIs where feasible.\n   - Where users are expected to interact with lower-level constructs, expose them via documented, stable paths.\n\n## Why this matters\n\n- **Stability:** Users can rely on documented APIs without fear of accidental breakage.\n- **Refactorability:** Internal changes become safer when the public surface is well-defined.\n- **Onboarding:** New users can quickly see which APIs are meant for them.\n\n## Acceptance criteria\n\n- [ ] A documented list of public, supported APIs for the Python SDK.\n- [ ] Internal modules/types are clearly marked (e.g., `_internal` packages) where appropriate.\n- [ ] Examples and tests avoid relying on private attributes when a public alternative exists.\n- [ ] Future changes can be evaluated against this public surface for compatibility.\n\n\n### References\n\n_No response_",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1701/reactions",
        "total_count": 0,
        "+1": 0,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1700",
      "id": 3675278106,
      "node_id": "I_kwDOM2n80s7bEEsa",
      "number": 1700,
      "title": "Refactor func_metadata() into smaller components for schema & metadata generation",
      "user": {
        "login": "dgenio",
        "id": 12731907,
        "node_id": "MDQ6VXNlcjEyNzMxOTA3",
        "avatar_url": "https://avatars.githubusercontent.com/u/12731907?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/dgenio",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {},
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 0,
      "created_at": "2025-11-28T15:32:34Z",
      "updated_at": "2025-11-28T15:32:34Z",
      "closed_at": null,
      "author_association": "NONE",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "### Description\n\n## Summary\n\n`func_metadata()` in `src/mcp/server/fastmcp/utilities/func_metadata.py` is a large function that handles:\n\n- signature introspection,\n- parameter/return type analysis,\n- JSON schema generation,\n- special handling for various container and model types.\n\nThis centralizes important logic, but its size and responsibility make it difficult to understand, test, and extend.\n\n## Problems\n\n- **Complexity:** Many branching code paths for different types (Pydantic, dataclasses, TypedDict, primitives, etc.).\n- **Maintenance:** Adding new type handling or fixing edge cases requires navigating a large function.\n- **Testing:** Hard to write targeted tests for individual behaviors without exercising the entire function.\n\n## Proposal\n\n1. **Decompose into smaller functions**\n\n   For example:\n\n   - `extract_parameters(fn) -> list[Parameter]`\n   - `build_arg_model(params) -> PydanticModel | None`\n   - `build_output_model(return_type) -> PydanticModel | None`\n   - `create_converters(...) -> Callable`\n\n2. **Use a strategy/registry for type handling**\n\n   - Allow registering handlers for specific type families (Pydantic, TypedDict, dataclasses, etc.).\n   - This reduces the need for a long series of `if isinstance(...)` checks in one place.\n\n3. **Add targeted unit tests**\n\n   - Test each helper independently, covering edge cases.\n   - Keep some higher-level tests that ensure the overall metadata behavior remains consistent.\n\n## Why this matters\n\n- **Extensibility:** Easier to support new type patterns without making `func_metadata()` even larger.\n- **Reliability:** Smaller, well-tested pieces reduce the risk of regressions when making changes.\n- **Readability:** Contributors can understand and modify the code more easily.\n\n## Acceptance criteria\n\n- [ ] `func_metadata()` is decomposed into smaller, focused helpers.\n- [ ] There is a clear extension mechanism for adding support for new types.\n- [ ] Unit tests cover individual behaviors; existing integration tests still pass.\n\n\n### References\n\n_No response_",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1700/reactions",
        "total_count": 0,
        "+1": 0,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1696",
      "id": 3675185800,
      "node_id": "I_kwDOM2n80s7bDuKI",
      "number": 1696,
      "title": "Clarify semantics, limitations, and naming for stateless HTTP mode",
      "user": {
        "login": "dgenio",
        "id": 12731907,
        "node_id": "MDQ6VXNlcjEyNzMxOTA3",
        "avatar_url": "https://avatars.githubusercontent.com/u/12731907?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/dgenio",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 9354757189,
          "node_id": "LA_kwDOM2n80s8AAAACLZZERQ",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/enhancement",
          "name": "enhancement",
          "color": "11b5cc",
          "default": true,
          "description": "Request for a new feature that's not currently supported"
        },
        "1": {
          "id": 9354761244,
          "node_id": "LA_kwDOM2n80s8AAAACLZZUHA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/ready%20for%20work",
          "name": "ready for work",
          "color": "2b9402",
          "default": false,
          "description": "Enough information for someone to start working on"
        },
        "2": {
          "id": 9354772110,
          "node_id": "LA_kwDOM2n80s8AAAACLZZ-jg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P3",
          "name": "P3",
          "color": "c7df49",
          "default": false,
          "description": "Nice to haves, rare edge cases"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 0,
      "created_at": "2025-11-28T14:56:45Z",
      "updated_at": "2025-12-03T20:20:35Z",
      "closed_at": null,
      "author_association": "NONE",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "### Description\n\n## Summary\n\nThe SDK exposes a `stateless_http` mode for Streamable HTTP, where each request is handled with a new transport/session. This is useful for some deployment environments, but it has important implications:\n\n- no true session continuity,\n- repeated initialization overhead,\n- some MCP features are effectively unavailable.\n\nThese tradeoffs are not clearly documented today, and the name “stateless” can be misleading.\n\n## Problems\n\n- **Session semantics:** Creating a fresh session per HTTP request means:\n  - multi-turn interactions are harder (the server cannot rely on server-side state),\n  - progress notifications and long-running operations have limited usefulness.\n- **Performance:** Initial negotiation and setup happen on every request.\n- **Feature behavior:** Certain MCP features implicitly depend on session continuity but may silently degrade in stateless mode.\n- **Naming:** “stateless” suggests no server-side state at all, but in practice there is still per-request state and protocol semantics.\n\n## Proposal\n\n1. **Document limitations explicitly**\n\n   - List which features and patterns work differently or not at all in stateless mode:\n     - long-running tools,\n     - interactions that rely on server-side session state,\n     - any features that require persistent IDs beyond a single request.\n\n2. **Clarify recommended usage**\n\n   - Explain when `stateless_http` is appropriate (e.g., simple request/response tools behind serverless endpoints).\n   - Provide patterns for using sticky sessions or other mechanisms when stateful behavior is required.\n\n3. **Consider naming improvements**\n\n   - If possible without breaking compatibility, clarify naming in code and docs (e.g., “ephemeral” or “per-request” mode), or:\n   - at least add documentation that explains what “stateless” means in this context.\n\n## Why this matters\n\n- **User expectations:** Server authors and operators can make informed decisions about whether to use stateless mode.\n- **Debuggability:** Clear semantics reduce surprises when features behave differently.\n- **Performance:** Documentation can encourage appropriate deployment patterns (e.g., caching initialization results where possible).\n\n## Acceptance criteria\n\n- [ ] Documentation for Streamable HTTP and `stateless_http` explicitly describes:\n  - behavior,\n  - limitations,\n  - recommended use cases.\n- [ ] It is clear which MCP features require stateful sessions.\n- [ ] The naming and semantics of stateless mode are explained to avoid confusion.\n\n\n### References\n\n_No response_",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1696/reactions",
        "total_count": 0,
        "+1": 0,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": [
        1697
      ]
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1692",
      "id": 3674801821,
      "node_id": "I_kwDOM2n80s7bCQad",
      "number": 1692,
      "title": "Revisit single-use semantics of StreamableHTTPSessionManager.run()",
      "user": {
        "login": "dgenio",
        "id": 12731907,
        "node_id": "MDQ6VXNlcjEyNzMxOTA3",
        "avatar_url": "https://avatars.githubusercontent.com/u/12731907?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/dgenio",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 9082681979,
          "node_id": "LA_kwDOM2n80s8AAAACHV66ew",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/needs%20confirmation",
          "name": "needs confirmation",
          "color": "aaaaaa",
          "default": false,
          "description": "Needs confirmation that the PR is actually required or needed."
        },
        "1": {
          "id": 9354757189,
          "node_id": "LA_kwDOM2n80s8AAAACLZZERQ",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/enhancement",
          "name": "enhancement",
          "color": "11b5cc",
          "default": true,
          "description": "Request for a new feature that's not currently supported"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 0,
      "created_at": "2025-11-28T12:41:55Z",
      "updated_at": "2025-12-03T20:18:46Z",
      "closed_at": null,
      "author_association": "NONE",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "### Description\n\n## Summary\n\n`StreamableHTTPSessionManager` currently enforces that `run()` can only be called once per instance. This is documented but not explained, and it complicates:\n\n- testing (each test must construct a new manager), and\n- any scenario that might want to reuse the manager for restarts.\n\nIt would be useful to either:\n\n- make `run()` safely reusable, or\n- codify and enforce single-use semantics in a clearer way.\n\n## Problems\n\n- **Testing:** Requiring a new manager instance for each run increases boilerplate and can hide lifecycle issues.\n- **Unclear constraints:** Users have to discover via runtime errors that `run()` is single-use, without an obvious reason.\n- **Lifecycle complexity:** The single-use constraint is a hint that some internal state (task groups, resource stacks) is not being fully reset.\n\n## Proposal\n\n1. **Investigate why single-use is required**\n\n   - Document what internal state is left behind after `run()` completes (e.g., background tasks, queues).\n   - Determine whether these can be safely reset at the start of the next `run()`.\n\n2. **Either: make `run()` reusable...**\n\n   - Reset internal state (task groups, lists of tasks, queues) before each `run()`.\n   - Ensure proper cleanup in `finally` blocks so the manager returns to a clean state.\n\n3. **...or explicitly codify single-use semantics**\n\n   - If reuse is fundamentally unsafe, consider:\n     - modelling the manager as a consumable object (e.g., via documentation and type hints),\n     - or returning a token/handle that marks the manager as “exhausted” after `run()`.\n\n## Why this matters\n\n- **Developer experience:** Easier to write tests that exercise multiple lifecycles.\n- **Robustness:** Cleaning up state between runs reduces the risk of hidden leaks or race conditions.\n- **Clarity:** Either outcome (reusable or explicitly consumable) is better than a hidden constraint.\n\n## Acceptance criteria\n\n- [ ] The rationale for single-use semantics is documented (if they remain).\n- [ ] Either:\n  - [ ] `run()` can be safely called multiple times on the same instance, **or**\n  - [ ] Single-use semantics are enforced and clearly documented.\n- [ ] Tests cover repeated calls to `run()` and confirm expected behavior.\n\n\n### References\n\n_No response_",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1692/reactions",
        "total_count": 0,
        "+1": 0,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1691",
      "id": 3674796773,
      "node_id": "I_kwDOM2n80s7bCPLl",
      "number": 1691,
      "title": "Simplify and harden session lifecycle with an explicit state machine",
      "user": {
        "login": "dgenio",
        "id": 12731907,
        "node_id": "MDQ6VXNlcjEyNzMxOTA3",
        "avatar_url": "https://avatars.githubusercontent.com/u/12731907?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/dgenio",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 9230424293,
          "node_id": "LA_kwDOM2n80s8AAAACJi0Y5Q",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/v2",
          "name": "v2",
          "color": "5d2a87",
          "default": false,
          "description": "Ideas, requests and plans for v2 of the SDK which will incorporate major changes and fixes"
        },
        "1": {
          "id": 9354757189,
          "node_id": "LA_kwDOM2n80s8AAAACLZZERQ",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/enhancement",
          "name": "enhancement",
          "color": "11b5cc",
          "default": true,
          "description": "Request for a new feature that's not currently supported"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 1,
      "created_at": "2025-11-28T12:40:25Z",
      "updated_at": "2025-12-03T20:15:36Z",
      "closed_at": null,
      "author_association": "NONE",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "### Description\n\n## Summary\n\nServer and client sessions use an internal initialization state machine combined with various flags and manual `AsyncExitStack` management. Stateless mode complicates this further by setting an \"Initialized\" state early as a workaround.\n\nThis makes the lifecycle hard to reason about and contributes to subtle bugs (e.g., past issues like #756 in stateless mode).\n\n## Problems\n\n- **Scattered state management:** Initialization and teardown logic are spread across methods and files.\n- **Special cases for stateless mode:** Stateless HTTP sets the session as initialized even though no real protocol negotiation has occurred.\n- **Resource management risk:** If initialization fails midway, transport tasks and resources may not be cleaned up reliably.\n- **Testing difficulty:** Tests often bypass parts of the lifecycle using in-memory transports.\n\n## Proposal\n\n1. **Introduce an explicit session state machine**\n\n   Represent distinct states as separate types, for example:\n\n   - `UninitializedSession`\n   - `NegotiatingSession`\n   - `ActiveSession`\n   - `ClosedSession`\n   - `StatelessSession` (for per-request / ephemeral cases)\n\n   Each state exposes only the operations that are valid in that state, and transitions return the next state type.\n\n2. **Model stateless mode explicitly**\n\n   - Instead of marking a stateful session as \"Initialized\" prematurely, model stateless HTTP as a dedicated `StatelessSession` type with a simpler lifecycle.\n   - Make behavior differences clear in code and docs.\n\n3. **Centralize resource cleanup**\n\n   - Ensure that all lifecycle paths (happy path, error, cancellation) lead through code that:\n     - cancels outstanding tasks,\n     - closes transports,\n     - releases resources stored in `AsyncExitStack`.\n\n## Why this matters\n\n- **Reliability:** Fewer edge cases and surprise states where messages can be processed incorrectly.\n- **Debuggability:** Easier to reason about what can happen in each state.\n- **Extensibility:** Adding new lifecycle behavior (e.g., resuming sessions) becomes more manageable.\n\n## Acceptance criteria\n\n- [ ] Session lifecycle is represented via explicit types or a clearly defined state machine.\n- [ ] Stateless HTTP mode uses a dedicated path rather than setting \"Initialized\" as a hack.\n- [ ] All entry/exit paths of sessions ensure proper cleanup of transports and tasks.\n- [ ] Tests cover state transitions, including error cases and stateless/stat eful differences.\n\n### References\n\n_No response_",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1691/reactions",
        "total_count": 0,
        "+1": 0,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1690",
      "id": 3674755200,
      "node_id": "I_kwDOM2n80s7bCFCA",
      "number": 1690,
      "title": "Introduce a shared Transport abstraction to reduce stdio/SSE/WebSocket/HTTP duplication",
      "user": {
        "login": "dgenio",
        "id": 12731907,
        "node_id": "MDQ6VXNlcjEyNzMxOTA3",
        "avatar_url": "https://avatars.githubusercontent.com/u/12731907?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/dgenio",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 9082681979,
          "node_id": "LA_kwDOM2n80s8AAAACHV66ew",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/needs%20confirmation",
          "name": "needs confirmation",
          "color": "aaaaaa",
          "default": false,
          "description": "Needs confirmation that the PR is actually required or needed."
        },
        "1": {
          "id": 9230423596,
          "node_id": "LA_kwDOM2n80s8AAAACJi0WLA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/breaking%20change",
          "name": "breaking change",
          "color": "000000",
          "default": false,
          "description": "Will break existing deployments when updated without changes"
        },
        "2": {
          "id": 9230424293,
          "node_id": "LA_kwDOM2n80s8AAAACJi0Y5Q",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/v2",
          "name": "v2",
          "color": "5d2a87",
          "default": false,
          "description": "Ideas, requests and plans for v2 of the SDK which will incorporate major changes and fixes"
        },
        "3": {
          "id": 9354757189,
          "node_id": "LA_kwDOM2n80s8AAAACLZZERQ",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/enhancement",
          "name": "enhancement",
          "color": "11b5cc",
          "default": true,
          "description": "Request for a new feature that's not currently supported"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 0,
      "created_at": "2025-11-28T12:27:34Z",
      "updated_at": "2025-12-05T17:41:14Z",
      "closed_at": null,
      "author_association": "NONE",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "## Summary\n\nThe SDK currently implements multiple server and client transports (stdio, SSE, WebSocket, Streamable HTTP). Each one has its own message loop, error handling, and resource management logic with significant duplication.\n\nThis makes it harder to:\n\n- fix bugs consistently across transports,\n- add new transports, and\n- ensure feature parity between them.\n\nA small `Transport` abstraction could centralize most of the shared behavior.\n\n## Problems\n\n- **Duplication:** Similar read/write loops and error handling are repeated in:\n  - `src/mcp/server/stdio.py`\n  - `src/mcp/server/sse.py`\n  - `src/mcp/server/websocket.py`\n  - `src/mcp/server/streamable_http.py`\n- **Inconsistent behavior:** Features like cancellation, error mapping, and shutdown can diverge between transports.\n- **Maintenance cost:** Adding a new transport or changing session semantics requires updating each implementation.\n\n## Proposal\n\n1. **Define a `Transport` protocol/interface**\n\n   For example:\n\n   ```python\n   class Transport(Protocol):\n       async def connect(self) -> None: ...\n       async def send_message(self, message: JSONType) -> None: ...\n       async def receive_message(self) -> JSONType | None: ...\n       async def close(self) -> None: ...\n    ```\n\n* Implementations handle encoding details (JSON lines, SSE, WebSocket frames, HTTP streaming).\n\n2. **Refactor sessions to depend on `Transport`**\n\n   * `BaseSession` (and server/client sessions) should operate on a `Transport` instance rather than transport-specific primitives.\n   * Transport-agnostic session logic (request routing, error mapping) lives in one place.\n\n3. **Align behavior across transports**\n\n   * Standardize behavior for:\n\n     * connection setup/teardown,\n     * error handling,\n     * cancellation and shutdown semantics.\n\n4. **Incremental migration**\n\n   * Start with one or two transports (e.g. stdio + Streamable HTTP) to validate the abstraction.\n   * Gradually migrate remaining transports.\n\n## Why this matters\n\n* **Consistency:** Users can expect the same semantics regardless of transport choice.\n* **Easier maintenance:** Bug fixes and feature additions happen once, in a shared layer.\n* **Future-proofing:** Adding new transports becomes easier and less error-prone.\n\n## Acceptance criteria\n\n* [ ] A `Transport` interface (or equivalent) is defined for server and client usage.\n* [ ] At least two transports are refactored to use the shared abstraction.\n* [ ] Session logic no longer duplicates transport-specific read/write loops.\n* [ ] Tests verify identical semantics (errors, cancellation, shutdown) across transports.",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1690/reactions",
        "total_count": 0,
        "+1": 0,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1684",
      "id": 3674645928,
      "node_id": "I_kwDOM2n80s7bBqWo",
      "number": 1684,
      "title": "Refactor global contextvars request context into explicit parameters",
      "user": {
        "login": "dgenio",
        "id": 12731907,
        "node_id": "MDQ6VXNlcjEyNzMxOTA3",
        "avatar_url": "https://avatars.githubusercontent.com/u/12731907?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/dgenio",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 9082681979,
          "node_id": "LA_kwDOM2n80s8AAAACHV66ew",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/needs%20confirmation",
          "name": "needs confirmation",
          "color": "aaaaaa",
          "default": false,
          "description": "Needs confirmation that the PR is actually required or needed."
        },
        "1": {
          "id": 9230423596,
          "node_id": "LA_kwDOM2n80s8AAAACJi0WLA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/breaking%20change",
          "name": "breaking change",
          "color": "000000",
          "default": false,
          "description": "Will break existing deployments when updated without changes"
        },
        "2": {
          "id": 9230424293,
          "node_id": "LA_kwDOM2n80s8AAAACJi0Y5Q",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/v2",
          "name": "v2",
          "color": "5d2a87",
          "default": false,
          "description": "Ideas, requests and plans for v2 of the SDK which will incorporate major changes and fixes"
        },
        "3": {
          "id": 9354757189,
          "node_id": "LA_kwDOM2n80s8AAAACLZZERQ",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/enhancement",
          "name": "enhancement",
          "color": "11b5cc",
          "default": true,
          "description": "Request for a new feature that's not currently supported"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 1,
      "created_at": "2025-11-28T11:52:12Z",
      "updated_at": "2025-12-05T17:41:09Z",
      "closed_at": null,
      "author_association": "NONE",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "### Description\n\n## Summary\n\nThe Python SDK currently uses a global `contextvars.ContextVar` (e.g. `request_ctx`) to hold per-request state for the server. This enables convenience helpers like `get_request_context()`, but it also introduces implicit dependencies and makes testing, debugging, and refactoring harder.\n\nThis proposal suggests moving towards **explicit context passing** in handlers and eventually **deprecating global request context access**, with a migration path.\n\n## Background\n\nToday, the low-level server and FastMCP rely on a global `ContextVar` that holds a `RequestContext`. Handler code can implicitly call `get_request_context()` without any indication in the function signature that it depends on request-local state.\n\nThis has several drawbacks:\n\n- **Hidden dependencies:** Functions depend on ambient state, not their parameters.\n- **Debugging complexity:** Stack traces do not show where the context came from.\n- **Testability:** Unit tests must set up `ContextVar` state or fall back to full integration tests.\n- **Refactoring risk:** Moving code between modules can silently break if context assumptions change.\n\n## Proposal\n\n### Phase 1 – Explicit context in handler signatures\n\n1. Make `RequestContext` (or a higher-level `Context`) an **explicit parameter** for all tool/resource handlers at the low-level server boundary.\n2. At the FastMCP layer, inject the context explicitly into handler callsites instead of relying on global `ContextVar` lookups.\n3. Keep `get_request_context()` for now, but document it as **deprecated** and implemented in terms of the explicit parameter passing.\n\n### Phase 2 – Internal-only use (or removal) of `ContextVar`\n\n4. Refactor internal call chains so that the `RequestContext` is always passed as an argument rather than read from a global.\n5. Limit any remaining `ContextVar` usage to:\n   - bridging with external frameworks (if needed), or\n   - cross-cutting concerns like tracing where explicit parameter threading is impossible.\n6. Remove `get_request_context()` (or keep only as a thin, clearly discouraged compatibility helper).\n\n### Migration and compatibility\n\n- Provide an explicit, documented pattern for handlers that need context:\n  - e.g. `async def tool(ctx: Context, ...) -> ...`\n- Keep the current behavior working for at least one minor release, with deprecation warnings where appropriate.\n- Update examples and docs to promote explicit context usage.\n\n## Why this matters\n\n- **Testability:** Handlers become pure-ish functions with explicit dependencies.\n- **Debugging:** It’s easier to follow how context flows through the system.\n- **Robustness:** Less risk of accidental context leakage across concurrent requests.\n- **API clarity:** Users see, in signatures, that a handler depends on request context.\n\n## Acceptance criteria\n\n- [ ] All public handler registration paths can accept an explicit context parameter.\n- [ ] Core server internals pass `RequestContext` explicitly rather than relying on `ContextVar`.\n- [ ] `get_request_context()` is either deprecated or clearly documented as a compatibility shim.\n- [ ] Tests no longer need to directly manipulate global request `ContextVar` state.\n- [ ] Documentation updated to show explicit context patterns as the recommended approach.\n\n\n### References\n\n_No response_",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1684/reactions",
        "total_count": 0,
        "+1": 0,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1678",
      "id": 3672841478,
      "node_id": "I_kwDOM2n80s7a6x0G",
      "number": 1678,
      "title": "test_streamable_http.py isn't covered by test coverage",
      "user": {
        "login": "felixweinberger",
        "id": 3823880,
        "node_id": "MDQ6VXNlcjM4MjM4ODA=",
        "avatar_url": "https://avatars.githubusercontent.com/u/3823880?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/felixweinberger",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 9354757189,
          "node_id": "LA_kwDOM2n80s8AAAACLZZERQ",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/enhancement",
          "name": "enhancement",
          "color": "11b5cc",
          "default": true,
          "description": "Request for a new feature that's not currently supported"
        },
        "1": {
          "id": 9354761244,
          "node_id": "LA_kwDOM2n80s8AAAACLZZUHA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/ready%20for%20work",
          "name": "ready for work",
          "color": "2b9402",
          "default": false,
          "description": "Enough information for someone to start working on"
        },
        "2": {
          "id": 9354772110,
          "node_id": "LA_kwDOM2n80s8AAAACLZZ-jg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P3",
          "name": "P3",
          "color": "c7df49",
          "default": false,
          "description": "Nice to haves, rare edge cases"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 0,
      "created_at": "2025-11-27T19:47:10Z",
      "updated_at": "2025-12-02T17:41:45Z",
      "closed_at": null,
      "author_association": "CONTRIBUTOR",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "### Initial Checks\n\n- [x] I confirm that I'm using the latest version of MCP Python SDK\n- [x] I confirm that I searched for my issue in https://github.com/modelcontextprotocol/python-sdk/issues before opening this issue\n\n### Description\n\nWe have a lot of `pragma: no cover` in this test file: https://github.com/modelcontextprotocol/python-sdk/blob/f54b18a5f91b5cbab501668bd145a47245fe842e/tests/shared/test_streamable_http.py#L123\n\nEspecially on the server itself, run_app, etc etc. indicating we're not correctly capturing the test coverage here.\n\nDiscussed with @maxisbey and this is likely due to Multiprocessing so we need to restructure tests here to not use MP\n\n### Example Code\n\n```Python\n\n```\n\n### Python & MCP Python SDK\n\n```Text\nlatest\n```",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1678/reactions",
        "total_count": 0,
        "+1": 0,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1676",
      "id": 3669288385,
      "node_id": "I_kwDOM2n80s7atOXB",
      "number": 1676,
      "title": "MCP client doesn't not initialize new session when getting 404 session not found",
      "user": {
        "login": "david-nominal",
        "id": 194858310,
        "node_id": "U_kgDOC51NRg",
        "avatar_url": "https://avatars.githubusercontent.com/u/194858310?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/david-nominal",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 7511840554,
          "node_id": "LA_kwDOM2n80s8AAAABv72XKg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/bug",
          "name": "bug",
          "color": "d73a4a",
          "default": true,
          "description": "Something isn't working"
        },
        "1": {
          "id": 9354761244,
          "node_id": "LA_kwDOM2n80s8AAAACLZZUHA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/ready%20for%20work",
          "name": "ready for work",
          "color": "2b9402",
          "default": false,
          "description": "Enough information for someone to start working on"
        },
        "2": {
          "id": 9354770246,
          "node_id": "LA_kwDOM2n80s8AAAACLZZ3Rg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P2",
          "name": "P2",
          "color": "d2b457",
          "default": false,
          "description": "Moderate issues affecting some users, edge cases, potentially valuable feature"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 1,
      "created_at": "2025-11-26T22:51:16Z",
      "updated_at": "2025-12-02T17:41:16Z",
      "closed_at": null,
      "author_association": "NONE",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "### Initial Checks\n\n- [x] I confirm that I'm using the latest version of MCP Python SDK\n- [x] I confirm that I searched for my issue in https://github.com/modelcontextprotocol/python-sdk/issues before opening this issue\n\n### Description\n\nPer https://modelcontextprotocol.io/specification/2025-11-25/basic/transports#session-management\n```\nWhen a client receives HTTP 404 in response to a request containing an MCP-Session-Id, it MUST start a new session by sending a new InitializeRequest without a session ID attached.\n```\nThis is not the case with the python client. It just sends a session terminated error in [streamable_http.py](https://github.com/modelcontextprotocol/python-sdk/blob/5983a650cc07d2dc6c6ba098e99d3545889157a9/src/mcp/client/streamable_http.py#L277)\n\n### Example Code\n\n```Python\n\n```\n\n### Python & MCP Python SDK\n\n```Text\nmcp: 1.22.0\npython: 3.14.0\n```",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1676/reactions",
        "total_count": 0,
        "+1": 0,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1675",
      "id": 3669186144,
      "node_id": "I_kwDOM2n80s7as1Zg",
      "number": 1675,
      "title": "Streamable HTTP transport drops requests immediately after `initialize`",
      "user": {
        "login": "AydarDD",
        "id": 83745786,
        "node_id": "MDQ6VXNlcjgzNzQ1Nzg2",
        "avatar_url": "https://avatars.githubusercontent.com/u/83745786?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/AydarDD",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 7511840554,
          "node_id": "LA_kwDOM2n80s8AAAABv72XKg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/bug",
          "name": "bug",
          "color": "d73a4a",
          "default": true,
          "description": "Something isn't working"
        },
        "1": {
          "id": 9354761244,
          "node_id": "LA_kwDOM2n80s8AAAACLZZUHA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/ready%20for%20work",
          "name": "ready for work",
          "color": "2b9402",
          "default": false,
          "description": "Enough information for someone to start working on"
        },
        "2": {
          "id": 9354767859,
          "node_id": "LA_kwDOM2n80s8AAAACLZZt8w",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P1",
          "name": "P1",
          "color": "895d17",
          "default": false,
          "description": "Significant bug affecting many users, highly requested feature"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 0,
      "created_at": "2025-11-26T22:11:14Z",
      "updated_at": "2025-12-02T17:31:05Z",
      "closed_at": null,
      "author_association": "NONE",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "### Initial Checks\n\n- [x] I confirm that I'm using the latest version of MCP Python SDK\n- [x] I confirm that I searched for my issue in https://github.com/modelcontextprotocol/python-sdk/issues before opening this issue\n\n### Description\n\nSolution: https://github.com/modelcontextprotocol/python-sdk/pull/1674\n\n**Title:** Streamable HTTP transport drops requests immediately after `initialize`\n\n**Summary**\nWhen using a server over Streamable HTTP, the first `session.list_tools()` (and sometimes a few follow-up requests) can intermittently return an empty tool list right after `session.initialize()` succeeds. This happens even though the server has already provided tool metadata during initialization.\n\n**Steps to Reproduce**\n1. Start `examples/servers/simple-streamablehttp`.\n2. Run a client that calls `session.initialize()` and immediately follows with `session.list_tools()`.\n3. Repeat quickly; roughly 1 in 5 iterations returns an empty list.\n\n**Expected Behavior**\nOnce `initialize` completes, the client transport should be ready to send subsequent JSON-RPC requests and receive their responses reliably.\n\n**Actual Behavior**\nThere is a race inside `streamable_http.streamablehttp_client`: the `post_writer` task is started with `tg.start_soon`, so the caller can enqueue requests before the writer task has finished subscribing to the in-memory stream. Because the stream buffer size is 0, those requests can be dropped, leading to empty responses or timeouts.\n\n**Proposed Fix**\nStart `post_writer` with `tg.start(...)`, mirroring the SSE transport. This blocks until the writer task signals readiness via `TaskStatus.started`, guaranteeing that the zero-buffer stream is ready before yielding to the caller. Two new stress tests (`test_streamablehttp_no_race_condition_on_consecutive_requests` and `test_streamablehttp_rapid_request_sequence`) cover the regression.\n\n**Impact**\nStreamable HTTP transports become much more reliable in real deployments that issue back-to-back requests (initialize → list_tools, quick polling, etc.), preventing confusing empty tool listings and retry storms.\n\n\n### Example Code\n\n```Python\n# reproduce_streamablehttp_race.py\nimport anyio\n\nfrom mcp.client.session import ClientSession\nfrom mcp.client.streamable_http import streamablehttp_client\n\n\nSERVER_URL = \"http://127.0.0.1:8000/mcp\"\nITERATIONS = 100\n\n\nasync def main() -> None:\n    failures = 0\n\n    for i in range(ITERATIONS):\n        async with streamablehttp_client(SERVER_URL) as (read_stream, write_stream, _):\n            async with ClientSession(read_stream, write_stream) as session:\n                result = await session.initialize()\n                tools = await session.list_tools()\n                if not tools.tools:\n                    failures += 1\n                    print(f\"[{i}] list_tools returned EMPTY! session.initialize -> list_tools race hit.\")\n                else:\n                    print(f\"[{i}] ok: {len(tools.tools)} tools\")\n\n    if failures:\n        raise SystemExit(f\"Race reproduced: {failures}/{ITERATIONS} iterations failed\")\n\n    print(\"No failures observed (try increasing ITERATIONS or lower server CPU).\")\n\n\nif __name__ == \"__main__\":\n    anyio.run(main)\n```\n\n### Python & MCP Python SDK\n\n```Text\nlatest\n```",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1675/reactions",
        "total_count": 0,
        "+1": 0,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1671",
      "id": 3664340785,
      "node_id": "I_kwDOM2n80s7aaWcx",
      "number": 1671,
      "title": "ServerSession methods (create_message, elicit_form) don't expose progress_callback parameter",
      "user": {
        "login": "maxisbey",
        "id": 224885523,
        "node_id": "U_kgDODWd7Ew",
        "avatar_url": "https://avatars.githubusercontent.com/u/224885523?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/maxisbey",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 9354757189,
          "node_id": "LA_kwDOM2n80s8AAAACLZZERQ",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/enhancement",
          "name": "enhancement",
          "color": "11b5cc",
          "default": true,
          "description": "Request for a new feature that's not currently supported"
        },
        "1": {
          "id": 9354761244,
          "node_id": "LA_kwDOM2n80s8AAAACLZZUHA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/ready%20for%20work",
          "name": "ready for work",
          "color": "2b9402",
          "default": false,
          "description": "Enough information for someone to start working on"
        },
        "2": {
          "id": 9354770246,
          "node_id": "LA_kwDOM2n80s8AAAACLZZ3Rg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P2",
          "name": "P2",
          "color": "d2b457",
          "default": false,
          "description": "Moderate issues affecting some users, edge cases, potentially valuable feature"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 0,
      "created_at": "2025-11-25T19:33:53Z",
      "updated_at": "2025-11-25T19:35:10Z",
      "closed_at": null,
      "author_association": "CONTRIBUTOR",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "## Summary\n\nThe `ServerSession` high-level methods for sending requests to clients (`create_message`, `elicit_form`) don't expose the `progress_callback` parameter, even though the underlying `BaseSession.send_request()` fully supports it.\n\nThis means servers can't easily receive progress notifications from clients during sampling or elicitation requests.\n\n## Current Behavior\n\n```python\n# ServerSession.elicit_form() - no progress_callback parameter\nasync def elicit_form(\n    self,\n    message: str,\n    requestedSchema: types.ElicitRequestedSchema,\n    related_request_id: types.RequestId | None = None,\n) -> types.ElicitResult:\n    return await self.send_request(...)  # progress_callback not passed through\n\n# ServerSession.create_message() - same issue\nasync def create_message(\n    self,\n    messages: list[types.SamplingMessage],\n    *,\n    max_tokens: int,\n    # ... other params ...\n    related_request_id: types.RequestId | None = None,\n) -> types.CreateMessageResult:\n    return await self.send_request(...)  # progress_callback not passed through\n```\n\n## Expected Behavior\n\n```python\n# Should be able to pass progress_callback\nresult = await server_session.elicit_form(\n    message=\"Please provide your details\",\n    requestedSchema=schema,\n    progress_callback=lambda progress, total, msg: print(f\"Progress: {progress}/{total} - {msg}\")\n)\n\nresult = await server_session.create_message(\n    messages=messages,\n    max_tokens=1000,\n    progress_callback=lambda progress, total, msg: print(f\"Sampling progress: {progress}/{total}\")\n)\n```\n\n## Context\n\n- The MCP spec supports bidirectional progress notifications - clients CAN send `notifications/progress` back to servers during request handling\n- `BaseSession.send_request()` already supports `progress_callback` parameter\n- `ClientSession.call_tool()` exposes `progress_callback` for the client→server direction\n- The TypeScript SDK exposes this via `RequestOptions.onprogress` in both `createMessage()` and `elicitInput()`\n- Tests in `tests/shared/test_progress_notifications.py` demonstrate the bidirectional flow works\n\n## Suggested Fix\n\nAdd `progress_callback: ProgressFnT | None = None` parameter to:\n- `ServerSession.create_message()`\n- `ServerSession.elicit_form()`\n- Any other `ServerSession` methods that send requests to clients\n\nAnd pass it through to `send_request()`.",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1671/reactions",
        "total_count": 0,
        "+1": 0,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1665",
      "id": 3661286173,
      "node_id": "I_kwDOM2n80s7aOssd",
      "number": 1665,
      "title": "URL Validation on Client Metadata is too strict",
      "user": {
        "login": "antdres",
        "id": 243663356,
        "node_id": "U_kgDODoYB_A",
        "avatar_url": "https://avatars.githubusercontent.com/u/243663356?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/antdres",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 7511840554,
          "node_id": "LA_kwDOM2n80s8AAAABv72XKg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/bug",
          "name": "bug",
          "color": "d73a4a",
          "default": true,
          "description": "Something isn't working"
        },
        "1": {
          "id": 9301360597,
          "node_id": "LA_kwDOM2n80s8AAAACKmd_1Q",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/auth",
          "name": "auth",
          "color": "92ad2d",
          "default": false,
          "description": "Issues and PRs related to Authentication / OAuth"
        },
        "2": {
          "id": 9354761244,
          "node_id": "LA_kwDOM2n80s8AAAACLZZUHA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/ready%20for%20work",
          "name": "ready for work",
          "color": "2b9402",
          "default": false,
          "description": "Enough information for someone to start working on"
        },
        "3": {
          "id": 9354770246,
          "node_id": "LA_kwDOM2n80s8AAAACLZZ3Rg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P2",
          "name": "P2",
          "color": "d2b457",
          "default": false,
          "description": "Moderate issues affecting some users, edge cases, potentially valuable feature"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 1,
      "created_at": "2025-11-25T02:42:34Z",
      "updated_at": "2025-12-02T14:54:21Z",
      "closed_at": null,
      "author_association": "NONE",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "### Initial Checks\n\n- [x] I confirm that I'm using the latest version of MCP Python SDK\n- [x] I confirm that I searched for my issue in https://github.com/modelcontextprotocol/python-sdk/issues before opening this issue\n\n### Description\n\nPydantic AnyHttpUrl is too strict for client metadata validation.  https://datatracker.ietf.org/doc/html/rfc7591#section-2 specifies that all fields are optional. Empty strings are commonly emitted when there's no value.  \n\nIn addition fields like client_uri are informational and I'm not sure they should even be validated as http.  Any URL should technically be supported including non-http URLs.  In general, I think the SDK should only apply strict pydantic validation where it affects the security or functioning of the client.\n\n1 validation error for OAuthClientInformationFull\nclient_uri\n  Input should be a valid URL, input is empty [type=url_parsing, input_value='', input_type=str]\n    For further information visit https://errors.pydantic.dev/2.11/v/url_parsing\n\n### Example Code\n\n```Python\n\n```\n\n### Python & MCP Python SDK\n\n```Text\n1.21.1\n```",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1665/reactions",
        "total_count": 0,
        "+1": 0,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1664",
      "id": 3660977040,
      "node_id": "I_kwDOM2n80s7aNhOQ",
      "number": 1664,
      "title": "User-Agent header in sHTTP transport is not forwarded to auth flow",
      "user": {
        "login": "LucaButBoring",
        "id": 131398524,
        "node_id": "U_kgDOB9T7fA",
        "avatar_url": "https://avatars.githubusercontent.com/u/131398524?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/LucaButBoring",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 7511840554,
          "node_id": "LA_kwDOM2n80s8AAAABv72XKg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/bug",
          "name": "bug",
          "color": "d73a4a",
          "default": true,
          "description": "Something isn't working"
        },
        "1": {
          "id": 9301360597,
          "node_id": "LA_kwDOM2n80s8AAAACKmd_1Q",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/auth",
          "name": "auth",
          "color": "92ad2d",
          "default": false,
          "description": "Issues and PRs related to Authentication / OAuth"
        },
        "2": {
          "id": 9354761244,
          "node_id": "LA_kwDOM2n80s8AAAACLZZUHA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/ready%20for%20work",
          "name": "ready for work",
          "color": "2b9402",
          "default": false,
          "description": "Enough information for someone to start working on"
        },
        "3": {
          "id": 9354770246,
          "node_id": "LA_kwDOM2n80s8AAAACLZZ3Rg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P2",
          "name": "P2",
          "color": "d2b457",
          "default": false,
          "description": "Moderate issues affecting some users, edge cases, potentially valuable feature"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 0,
      "created_at": "2025-11-25T00:15:37Z",
      "updated_at": "2025-12-02T14:49:47Z",
      "closed_at": null,
      "author_association": "CONTRIBUTOR",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "### Initial Checks\n\n- [x] I confirm that I'm using the latest version of MCP Python SDK\n- [x] I confirm that I searched for my issue in https://github.com/modelcontextprotocol/python-sdk/issues before opening this issue\n\n### Description\n\nPassing a custom `User-Agent` header to the sHTTP transport, e.g. [here](https://github.com/modelcontextprotocol/python-sdk/blob/27279bc157cbc03f7fe7758fd55a4b34c5652f42/examples/clients/simple-auth-client/mcp_simple_auth_client/main.py#L214-L220) does not result in auth flow requests including that user agent. There also does not appear to be any way to customize this behavior externally to the SDK itself.\n\nIn particular, this becomes a problem when working with AWS WAF, as one of its [baseline rules](https://docs.aws.amazon.com/waf/latest/developerguide/aws-managed-rule-groups-baseline.html#aws-managed-rule-groups-baseline-crs) is to require all requests to include a `User-Agent` header, to filter out low-grade spam.\n\nI am currently recommending to internal teams that they disable this rule for the time being, but this is not a great solution for them, as it means removing an application guardrail to work around an SDK limitation.\n\n### Example Code\n\n```Python\nprint(\"📡 Opening StreamableHTTP transport connection with auth...\")\nasync with streamablehttp_client(\n    url=self.server_url,\n    auth=oauth_auth,\n    timeout=timedelta(seconds=60),\n    headers={\n        \"User-Agent\": \"mcp-python-sdk/0.1.0\",\n    },\n) as (read_stream, write_stream, get_session_id):\n    await self._run_session(read_stream, write_stream, get_session_id)\n```\n\n### Python & MCP Python SDK\n\nLatest SDK commit: [27279bc](https://github.com/modelcontextprotocol/python-sdk/commit/27279bc157cbc03f7fe7758fd55a4b34c5652f42) (1.22.0)\nPython 3.13.2",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1664/reactions",
        "total_count": 0,
        "+1": 0,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1661",
      "id": 3660737830,
      "node_id": "I_kwDOM2n80s7aMm0m",
      "number": 1661,
      "title": "Streamable HTTP Transport Doesn't Handle 202 Accepted Responses",
      "user": {
        "login": "yadgire7",
        "id": 47882001,
        "node_id": "MDQ6VXNlcjQ3ODgyMDAx",
        "avatar_url": "https://avatars.githubusercontent.com/u/47882001?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/yadgire7",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 7511840603,
          "node_id": "LA_kwDOM2n80s8AAAABv72XWw",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/question",
          "name": "question",
          "color": "d876e3",
          "default": true,
          "description": "Further information is requested"
        },
        "1": {
          "id": 9082681979,
          "node_id": "LA_kwDOM2n80s8AAAACHV66ew",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/needs%20confirmation",
          "name": "needs confirmation",
          "color": "aaaaaa",
          "default": false,
          "description": "Needs confirmation that the PR is actually required or needed."
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 1,
      "created_at": "2025-11-24T22:23:03Z",
      "updated_at": "2025-12-02T14:43:02Z",
      "closed_at": null,
      "author_association": "NONE",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "### Initial Checks\n\n- [x] I confirm that I'm using the latest version of MCP Python SDK\n- [x] I confirm that I searched for my issue in https://github.com/modelcontextprotocol/python-sdk/issues before opening this issue\n\n### Description\n\nThe `StreamableHTTPTransport._handle_post_request()` method returns immediately when receiving a `202 Accepted` HTTP status code without making the required GET request to retrieve the SSE stream, causing `session.list_tools()` and other JSON-RPC requests to timeout indefinitely.\n\n## Steps to Reproduce\n\n1. Connect to an MCP server that returns `202 Accepted` for POST requests\n2. Call `session.list_tools()` or any other JSON-RPC request method\n3. Observe that the call times out after the configured timeout period\n\n\n\n\n### Example Code\n\n```Python\nimport asyncio\nfrom mcp import ClientSession\nfrom mcp.client.streamable_http import streamablehttp_client\n\nasync def test():\n    server_url = \"https://example.com/mcp\"  # Server that returns 202 Accepted\n    \n    async with streamablehttp_client(server_url) as (read, write, _):\n        async with ClientSession(read, write) as session:\n            await session.initialize()\n            # This will timeout if server returns 202 Accepted\n            tools = await asyncio.wait_for(session.list_tools(), timeout=30.0)\n\nasyncio.run(test())\n```\n\n### Python & MCP Python SDK\n\n```Text\nPython: 3.12.x\nSDK: 1.22.0\n```",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1661/reactions",
        "total_count": 0,
        "+1": 0,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1657",
      "id": 3658687045,
      "node_id": "I_kwDOM2n80s7aEyJF",
      "number": 1657,
      "title": "[FastMCP] Add 'include_in_context' argument to @resource decorator",
      "user": {
        "login": "rinaldofesta",
        "id": 5622471,
        "node_id": "MDQ6VXNlcjU2MjI0NzE=",
        "avatar_url": "https://avatars.githubusercontent.com/u/5622471?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/rinaldofesta",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 9082681979,
          "node_id": "LA_kwDOM2n80s8AAAACHV66ew",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/needs%20confirmation",
          "name": "needs confirmation",
          "color": "aaaaaa",
          "default": false,
          "description": "Needs confirmation that the PR is actually required or needed."
        },
        "1": {
          "id": 9354757189,
          "node_id": "LA_kwDOM2n80s8AAAACLZZERQ",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/enhancement",
          "name": "enhancement",
          "color": "11b5cc",
          "default": true,
          "description": "Request for a new feature that's not currently supported"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 0,
      "created_at": "2025-11-24T12:34:34Z",
      "updated_at": "2025-12-02T14:21:23Z",
      "closed_at": null,
      "author_association": "NONE",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "## Is your feature request related to a problem? Please describe.\n\nCurrently, in FastMCP, if a developer wants to hint that a resource is critical and should be included in the model's context window by default (e.g., operational guidelines or system prompts), they need to manually understand and set the `annotations` field with a priority score.\n\nWhile the protocol spec defines priority (0.0 - 1.0), it is not immediately obvious to a Python developer how to assert \"Always include this.\" The current method is slightly verbose and less discoverable:\n\n```python\n# Current way\n@mcp.resource(\"uri\", annotations=Annotations(priority=1.0)) \ndef my_resource(): \n    return \"...\"\n```\n\n## Describe the solution you'd like\n\nI propose adding a boolean argument `include_in_context` (defaulting to `False`) to the `FastMCP.resource` decorator.\n\nThis would provide a high-level, Pythonic abstraction over the priority annotation. Setting this to `True` would automatically set the underlying resource priority to 1.0 (indicating maximum priority for context inclusion).\n\n### Proposed Usage\n\n```python\nfrom mcp.server.fastmcp import FastMCP\n\nmcp = FastMCP(\"Demo\")\n\n@mcp.resource(\n    \"guidelines://ops\", \n    include_in_context=True  # Developer intent is clear here\n)\ndef operational_guidelines():\n    return \"...\"\n```\n\n### Implementation Details\n\nWhen `include_in_context=True`:\n- Automatically creates `Annotations(priority=1.0)` if no annotations exist\n- Overrides the priority field to 1.0 if annotations are explicitly provided\n- Preserves other annotation fields (like `audience`)\n\n## Why this is valuable\n\n1. **Developer Experience (DX)**: It reduces cognitive load. Developers don't need to look up the specific float values for priority; they can just use a boolean flag.\n\n2. **Readability**: `include_in_context=True` explicitly states the intent of the resource code-side.\n\n3. **Discoverability**: It makes the concept of \"default context\" more accessible to new MCP users.\n\n4. **Consistency**: Similar to how other frameworks provide high-level abstractions for common patterns.\n\n## Additional context\n\nI have reviewed `src/mcp/server/fastmcp/server.py` and believe this can be implemented by modifying the resource decorator to check this boolean and update the annotations before registration.\n\nI am happy to submit a PR for this feature. As this would be my first contribution to the project, I wanted to validate the naming convention (`include_in_context` vs `auto_load` vs `priority_high`) and approach before pushing code.\n\nThis complements the work being done in #1475 for dynamic annotations and #1468 for annotation support.",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1657/reactions",
        "total_count": 0,
        "+1": 0,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": [
        1677
      ]
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1656",
      "id": 3658374522,
      "node_id": "I_kwDOM2n80s7aDl16",
      "number": 1656,
      "title": "FastMCP configures logging on init, which messes up application-level logging",
      "user": {
        "login": "pfaion",
        "id": 7101194,
        "node_id": "MDQ6VXNlcjcxMDExOTQ=",
        "avatar_url": "https://avatars.githubusercontent.com/u/7101194?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/pfaion",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 7511840554,
          "node_id": "LA_kwDOM2n80s8AAAABv72XKg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/bug",
          "name": "bug",
          "color": "d73a4a",
          "default": true,
          "description": "Something isn't working"
        },
        "1": {
          "id": 9354761244,
          "node_id": "LA_kwDOM2n80s8AAAACLZZUHA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/ready%20for%20work",
          "name": "ready for work",
          "color": "2b9402",
          "default": false,
          "description": "Enough information for someone to start working on"
        },
        "2": {
          "id": 9354770246,
          "node_id": "LA_kwDOM2n80s8AAAACLZZ3Rg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P2",
          "name": "P2",
          "color": "d2b457",
          "default": false,
          "description": "Moderate issues affecting some users, edge cases, potentially valuable feature"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 0,
      "created_at": "2025-11-24T11:13:13Z",
      "updated_at": "2025-12-02T14:18:03Z",
      "closed_at": null,
      "author_association": "NONE",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "### Initial Checks\n\n- [x] I confirm that I'm using the latest version of MCP Python SDK\n- [x] I confirm that I searched for my issue in https://github.com/modelcontextprotocol/python-sdk/issues before opening this issue\n\n### Description\n\nHi everyone, thanks for maintaining the Python SDK for MCP!\n\nI've noticed that the `FastMCP` class configures the logging ecosystem on `__init__()`, both by adding custom handlers and calling `logging.basicConfig(...)`. This will conflict with any logging setup that any application using the MCP SDK will use.\n\nPlease note that the best practice for logging is:\n- library code should never configure logging behavior\n- application entrypoints should configure logging behavior\n\nPlease refer to the [official logging HowTo, section \"Configuring Logging for a Library\"](https://docs.python.org/3/howto/logging.html#configuring-logging-for-a-library):\n\n> It is strongly advised that you do not add any handlers other than [NullHandler](https://docs.python.org/3/library/logging.handlers.html#logging.NullHandler) to your library’s loggers. This is because the configuration of handlers is the prerogative of the application developer who uses your library. The application developer knows their target audience and what handlers are most appropriate for their application: if you add handlers ‘under the hood’, you might well interfere with their ability to carry out unit tests and deliver logs which suit their requirements.\n\nFor the sake of easy quickstarts, I'd advice to create some module specifically meant for quickstarts that runs a FastMCP server, taking care of setting up the rich logging as well before. But keep it separated from the main library usage of FastMCP server, so applications using it don't get their logging config messed up.\n\n### Example Code\n\n```Python\n\n```\n\n### Python & MCP Python SDK\n\n```Text\n1.22.0\n```",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1656/reactions",
        "total_count": 0,
        "+1": 0,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1650",
      "id": 3653412124,
      "node_id": "I_kwDOM2n80s7ZwqUc",
      "number": 1650,
      "title": "DCR Handler Requires Both authorization_code and refresh_token Grant Types (RFC 7591 Non-Compliant)",
      "user": {
        "login": "gazzadownunder",
        "id": 32623517,
        "node_id": "MDQ6VXNlcjMyNjIzNTE3",
        "avatar_url": "https://avatars.githubusercontent.com/u/32623517?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/gazzadownunder",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 7511840554,
          "node_id": "LA_kwDOM2n80s8AAAABv72XKg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/bug",
          "name": "bug",
          "color": "d73a4a",
          "default": true,
          "description": "Something isn't working"
        },
        "1": {
          "id": 7511840581,
          "node_id": "LA_kwDOM2n80s8AAAABv72XRQ",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/good%20first%20issue",
          "name": "good first issue",
          "color": "7057ff",
          "default": true,
          "description": "Good for newcomers"
        },
        "2": {
          "id": 9301360597,
          "node_id": "LA_kwDOM2n80s8AAAACKmd_1Q",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/auth",
          "name": "auth",
          "color": "92ad2d",
          "default": false,
          "description": "Issues and PRs related to Authentication / OAuth"
        },
        "3": {
          "id": 9354770246,
          "node_id": "LA_kwDOM2n80s8AAAACLZZ3Rg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P2",
          "name": "P2",
          "color": "d2b457",
          "default": false,
          "description": "Moderate issues affecting some users, edge cases, potentially valuable feature"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 0,
      "created_at": "2025-11-21T23:47:36Z",
      "updated_at": "2025-12-02T14:17:00Z",
      "closed_at": null,
      "author_association": "NONE",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "### Initial Checks\n\n- [x] I confirm that I'm using the latest version of MCP Python SDK\n- [x] I confirm that I searched for my issue in https://github.com/modelcontextprotocol/python-sdk/issues before opening this issue\n\n### Description\n\n## Description\n\nThe Dynamic Client Registration (DCR) handler in the MCP Python SDK incorrectly requires **both** `authorization_code` and `refresh_token` grant types during client registration. This contradicts [RFC 7591](https://datatracker.ietf.org/doc/html/rfc7591) which states that refresh tokens should be optional.\n\n## Current Behavior\n\nThe validation in `mcp/server/auth/handlers/register.py` (lines 71-78) rejects client registrations that don't include both grant types:\n\n```python\nif not {\"authorization_code\", \"refresh_token\"}.issubset(set(client_metadata.grant_types)):\n    return PydanticJSONResponse(\n        content=RegistrationErrorResponse(\n            error=\"invalid_client_metadata\",\n            error_description=\"grant_types must be authorization_code and refresh_token\",\n        ),\n        status_code=400,\n    )\n```\n\nThis means clients **cannot** register with only `authorization_code` as a grant type, even though this should be valid per the OAuth 2.0/2.1 specifications.\n\n## Expected Behavior\n\nPer RFC 7591, refresh tokens are optional. The validation should only require `authorization_code` to be present:\n\n```python\nif \"authorization_code\" not in client_metadata.grant_types:\n    return PydanticJSONResponse(\n        content=RegistrationErrorResponse(\n            error=\"invalid_client_metadata\",\n            error_description=\"grant_types must include 'authorization_code'\",\n        ),\n        status_code=400,\n    )\n```\n\n## Why This Matters\n\n1. **RFC Compliance**: RFC 7591 explicitly states that refresh tokens are optional in OAuth flows\n2. **Client Flexibility**: Some clients may not need or want refresh token capabilities\n3. **Security**: Principle of least privilege - clients should only request the grant types they actually need\n4. **Interoperability**: This restriction may prevent valid OAuth clients from using MCP servers\n\n## Proposed Solution\n\nModify the validation in `mcp/server/auth/handlers/register.py` to:\n- Only require `authorization_code` in the grant_types list\n- Allow `refresh_token` to be optional\n- Update the error message to reflect the correct requirement\n\n## Impact\n\nThis change would:\n- ✅ Make the MCP SDK compliant with RFC 7591\n- ✅ Allow clients to register with only `authorization_code` if they don't need refresh tokens\n- ✅ Not break existing clients that register with both grant types\n- ✅ Improve security by allowing clients to request minimal permissions\n\n## Additional Context\n\nThis issue was originally reported against the fastmcp project: https://github.com/jlowin/fastmcp/issues/2460\n\nThe fastmcp project depends on the MCP Python SDK and will need to update its test suite once this fix is implemented.\n\n## Affected Files\n\n- `mcp/server/auth/handlers/register.py` (lines 71-78)\n\n## References\n\n- [RFC 7591 - OAuth 2.0 Dynamic Client Registration Protocol](https://datatracker.ietf.org/doc/html/rfc7591)\n- [OAuth 2.1 - Authorization Code Grant](https://datatracker.ietf.org/doc/html/draft-ietf-oauth-v2-1-11#section-4.1)\n\n\n### Example Code\n\n```Python\n\n```\n\n### Python & MCP Python SDK\n\n```Text\nPython Version: 3.13.1\nMCP Python SDK Version: 1.6.0\n```",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1650/reactions",
        "total_count": 0,
        "+1": 0,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1648",
      "id": 3648444929,
      "node_id": "I_kwDOM2n80s7ZdtoB",
      "number": 1648,
      "title": "ClientDisconnect returns HTTP 500",
      "user": {
        "login": "FanisPapakonstantinou",
        "id": 41926857,
        "node_id": "MDQ6VXNlcjQxOTI2ODU3",
        "avatar_url": "https://avatars.githubusercontent.com/u/41926857?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/FanisPapakonstantinou",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 7511840554,
          "node_id": "LA_kwDOM2n80s8AAAABv72XKg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/bug",
          "name": "bug",
          "color": "d73a4a",
          "default": true,
          "description": "Something isn't working"
        },
        "1": {
          "id": 9354761244,
          "node_id": "LA_kwDOM2n80s8AAAACLZZUHA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/ready%20for%20work",
          "name": "ready for work",
          "color": "2b9402",
          "default": false,
          "description": "Enough information for someone to start working on"
        },
        "2": {
          "id": 9354770246,
          "node_id": "LA_kwDOM2n80s8AAAACLZZ3Rg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P2",
          "name": "P2",
          "color": "d2b457",
          "default": false,
          "description": "Moderate issues affecting some users, edge cases, potentially valuable feature"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 1,
      "created_at": "2025-11-20T18:04:12Z",
      "updated_at": "2025-12-02T14:15:28Z",
      "closed_at": null,
      "author_association": "NONE",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "### Initial Checks\n\n- [x] I confirm that I'm using the latest version of MCP Python SDK\n- [x] I confirm that I searched for my issue in https://github.com/modelcontextprotocol/python-sdk/issues before opening this issue\n\n### Description\n\n\n`StreamableHTTPServerTransport._handle_post_request` in `mcp/server/streamable_http.py` incorrectly handles `starlette.requests.ClientDisconnect` exceptions.\n\n**Current behavior:**\n- Returns HTTP 500 (Internal Server Error)\n- Logs as ERROR with full traceback\n- Triggers production 5XX alerts\n\n## When This Occurs\n\nClientDisconnect happens during normal operations:\n- Network timeouts\n- User cancels request\n- Load balancer timeouts\n- Mobile client network interruptions\n\nThese are **client-side events**, not server failures.\n\n## Root Cause\n\n**File:** `src/mcp/server/streamable_http.py`\n**Line:** ~490-500\n\nThe broad `except Exception` handler catches `ClientDisconnect` and returns 500:\n\n```python\nexcept Exception as err:  # pragma: no cover\n    logger.exception(\"Error handling POST request\")  # ❌ Logs as ERROR\n    response = self._create_error_response(\n        f\"Error handling POST request: {err}\",\n        HTTPStatus.INTERNAL_SERVER_ERROR,  # ❌ Returns 500\n        INTERNAL_ERROR,\n    )\n    await response(scope, receive, send)\n```\n\n### Example Code\n\n## Reproduction\n\n### Steps\n\n**1. Install MCP SDK:**\n\npython3 -m venv venv\nsource venv/bin/activate\npip install mcp\n\n\n**2. Create `minimal_mcp_server.py` based on the documentation:**\n\n```python\n#!/usr/bin/env python3\nfrom mcp.server.fastmcp import FastMCP\n\nmcp = FastMCP(\"Bug Demo\", json_response=True)\n\n@mcp.tool()\ndef add(a: int, b: int) -> int:\n    \"\"\"Add two numbers\"\"\"\n    return a + b\n\nif __name__ == \"__main__\":\n    mcp.run(transport=\"streamable-http\")\n```\n\n**3. Create `test_client_disconnect.py`:**\n\n```python\n#!/usr/bin/env python3\nimport socket\nimport time\n\nsock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)\nsock.connect((\"localhost\", 8000))\n\n# Send headers claiming 100KB body\nheaders = (\n    b\"POST /mcp HTTP/1.1\\r\\n\"\n    b\"Host: localhost\\r\\n\"\n    b\"Content-Type: application/json\\r\\n\"\n    b\"Content-Length: 100000\\r\\n\"\n    b\"Accept: application/json, text/event-stream\\r\\n\"\n    b\"\\r\\n\"\n)\nsock.send(headers)\n\n# Send partial body then disconnect\nsock.send(b'{\"jsonrpc\": \"2.0\", \"method\": \"initialize\", \"params\": {')\ntime.sleep(0.05)\nsock.close()\n\nprint(\"✓ Client disconnect simulated\")\n```\n\n**4. Run:**\n\n# Terminal 1\n\n`python minimal_mcp_server.py`\n\n# Terminal 2\n\n` python test_client_disconnect.py` \n\n\n**5. Observe the bug in Terminal 1:**\n\n```tezt\nError handling POST request\nTraceback (most recent call last):\n  File \".../mcp/server/streamable_http.py\", line 351, in _handle_post_request\n    body = await request.body()\n           ^^^^^^^^^^^^^^^^^^^^\n  File \".../starlette/requests.py\", line 243, in body\n    async for chunk in self.stream():\n  File \".../starlette/requests.py\", line 237, in stream\n    raise ClientDisconnect()\nstarlette.requests.ClientDisconnect\n```\n\n### Python & MCP Python SDK\n\n```Text\nPython 3.12.9, MCP Python SDK v1.21.2\n```",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1648/reactions",
        "total_count": 0,
        "+1": 0,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1646",
      "id": 3646239394,
      "node_id": "I_kwDOM2n80s7ZVTKi",
      "number": 1646,
      "title": "Why synchronous @mcp.tool definition is not supported for parallelism?",
      "user": {
        "login": "MikeBai523",
        "id": 36026548,
        "node_id": "MDQ6VXNlcjM2MDI2NTQ4",
        "avatar_url": "https://avatars.githubusercontent.com/u/36026548?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/MikeBai523",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 7511840603,
          "node_id": "LA_kwDOM2n80s8AAAABv72XWw",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/question",
          "name": "question",
          "color": "d876e3",
          "default": true,
          "description": "Further information is requested"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 1,
      "created_at": "2025-11-20T09:08:17Z",
      "updated_at": "2025-12-03T23:00:54Z",
      "closed_at": null,
      "author_association": "NONE",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "### Question\n\nIn `mcp.server.fastmcp.utilities.func_metadata.FuncMetadata.call_fn_with_arg_validation`\n\n```python\nif fn_is_async:\n    return await fn(**arguments_parsed_dict)\nelse:\n    return fn(**arguments_parsed_dict)\n```\n\n\nIn FastMCP, if a tool is defined as a synchronous function, it will block the whole running loop instead of using to_thread().\n\nMay I know the consideration for it's different from FastAPI's concurrency model?\n\n### Additional Context\n\n_No response_",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1646/reactions",
        "total_count": 0,
        "+1": 0,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1641",
      "id": 3639034766,
      "node_id": "I_kwDOM2n80s7Y50OO",
      "number": 1641,
      "title": "MCP Server won't work with wildcard in \"Accept\" header and therefore is non‑compliant with HTTP spec",
      "user": {
        "login": "rh-fr",
        "id": 57899393,
        "node_id": "MDQ6VXNlcjU3ODk5Mzkz",
        "avatar_url": "https://avatars.githubusercontent.com/u/57899393?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/rh-fr",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 7511840603,
          "node_id": "LA_kwDOM2n80s8AAAABv72XWw",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/question",
          "name": "question",
          "color": "d876e3",
          "default": true,
          "description": "Further information is requested"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 1,
      "created_at": "2025-11-18T16:33:22Z",
      "updated_at": "2025-12-03T10:19:10Z",
      "closed_at": null,
      "author_association": "NONE",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "### Question\n\n### Use Case\nMy client sends a request to MCP Server with `Accept` header `*/*` (Same for `application/*, text/event-stream`). Server rejects this request because it expected strictly `application/json` or `application/json and text/event-stream` if  `json_response=False`.  \n\n### Expected\nAccording to the HTTP/1.1 spec (RFC 7231, section 5.3.2), the Accept header allows wildcard so values `*/*` and `application/*` should be valid, therefore server should accept them\n\n```\nfrom mcp.server.fastmcp import FastMCP\nfrom starlette.applications import Starlette\n\n...\n\nmcp_server: FastMCP = FastMCP(streamable_http_path=\"/\", stateless_http=True, json_response=True)\n\n...\n\napp: Starlette = mcp_server.streamable_http_app()\n```\nStart server: `uvicorn mcp-server:app --host 127.0.0.1 --port 8000 --log-level trace`\n\n### Example of Call\n```\n### Request\nPOST / HTTP/1.1.\nHost: localhost:8000.\nAccept-Encoding: gzip, deflate, br, zstd.\nConnection: keep-alive.\nUser-Agent: python-httpx/0.28.1.\nContent-Type: application/json.\nAccept: */*.\nContent-Length: 159.\n.\n\n{\"jsonrpc\":\"2.0\",\"id\":0,\"method\":\"initialize\",\"params\":{\"protocolVersion\":\"2025-06-18\",\"capabilities\":{},\"clientInfo\":{\"name\":\"mcp-client\",\"version\":\"1.0.0\"}}}\n\n\n### Response\nHTTP/1.1 406 Not Acceptable.\ndate: Tue, 18 Nov 2025 16:16:17 GMT.\nserver: uvicorn.\ncontent-type: application/json.\ncontent-length: 125.\n.\n\nT 127.0.0.1:8000 -> 127.0.0.1:61346 [AP] #107\n{\"jsonrpc\":\"2.0\",\"id\":\"server-error\",\"error\":{\"code\":-32600,\"message\":\"Not Acceptable: Client must accept application/json\"}}\n```\n\n### Additional Context\n\n- mcp 1.18.0\n- Python 3.11.13\n- uvicorn 0.38.0\n- starlette 0.49.1",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1641/reactions",
        "total_count": 0,
        "+1": 0,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1635",
      "id": 3630404824,
      "node_id": "I_kwDOM2n80s7YY5TY",
      "number": 1635,
      "title": "Using `Context` in resource definitions results in inccorect resource template classification",
      "user": {
        "login": "aarondiel",
        "id": 38919146,
        "node_id": "MDQ6VXNlcjM4OTE5MTQ2",
        "avatar_url": "https://avatars.githubusercontent.com/u/38919146?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/aarondiel",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 7511840554,
          "node_id": "LA_kwDOM2n80s8AAAABv72XKg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/bug",
          "name": "bug",
          "color": "d73a4a",
          "default": true,
          "description": "Something isn't working"
        },
        "1": {
          "id": 9354761244,
          "node_id": "LA_kwDOM2n80s8AAAACLZZUHA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/ready%20for%20work",
          "name": "ready for work",
          "color": "2b9402",
          "default": false,
          "description": "Enough information for someone to start working on"
        },
        "2": {
          "id": 9354770246,
          "node_id": "LA_kwDOM2n80s8AAAACLZZ3Rg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P2",
          "name": "P2",
          "color": "d2b457",
          "default": false,
          "description": "Moderate issues affecting some users, edge cases, potentially valuable feature"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 0,
      "created_at": "2025-11-16T11:25:03Z",
      "updated_at": "2025-11-16T16:01:29Z",
      "closed_at": null,
      "author_association": "NONE",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "### Initial Checks\n\n- [x] I confirm that I'm using the latest version of MCP Python SDK\n- [x] I confirm that I searched for my issue in https://github.com/modelcontextprotocol/python-sdk/issues before opening this issue\n\n### Description\n\n## expected behaivor / actual behavior\n\nlooking at the provided sample code i would assume `current_time` would show up as a regular resource, because it needs no arguments from the llm / user.\n\nhowever, is is only being listed as a resource template and cannot be invoked via the inspector.\n\n<img width=\"3471\" height=\"1521\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/3596e348-79c3-4840-9944-b3bba5fcebae\" />\n\n### Example Code\n\n```Python\nfrom contextlib import asynccontextmanager\nfrom mcp import ServerSession\nfrom mcp.server import FastMCP\nfrom mcp.server.fastmcp import Context\n\nclass AppContext:\n    pass\n\n@asynccontextmanager\nasync def lifespan(server: FastMCP):\n    yield AppContext()\n\nmcp = FastMCP(\"Demo\", lifespan=lifespan)\n\n@mcp.resource(\"time://current\")\nasync def current_time(ctx: Context[ServerSession, AppContext]):\n    return \"11:41\"\n```\n\n### Python & MCP Python SDK\n\n```Text\n`uv run python` shows `3.13.8`\n`uv pip freeze` shows `mcp==1.21.1`\n```",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1635/reactions",
        "total_count": 0,
        "+1": 0,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1628",
      "id": 3627353443,
      "node_id": "I_kwDOM2n80s7YNQVj",
      "number": 1628,
      "title": "Agents talking to MCP Server, SSL verification is failing. Has some been through this?",
      "user": {
        "login": "aniketwattamwar",
        "id": 34825918,
        "node_id": "MDQ6VXNlcjM0ODI1OTE4",
        "avatar_url": "https://avatars.githubusercontent.com/u/34825918?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/aniketwattamwar",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 7511840603,
          "node_id": "LA_kwDOM2n80s8AAAABv72XWw",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/question",
          "name": "question",
          "color": "d876e3",
          "default": true,
          "description": "Further information is requested"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 0,
      "created_at": "2025-11-14T22:13:15Z",
      "updated_at": "2025-11-14T22:13:15Z",
      "closed_at": null,
      "author_association": "NONE",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "### Question\n\nAgents talking to deployed MCP Server, SSL verification is failing. Has some been through this?\n\n### Additional Context\n\nI have a server up and running and is able to respond with an MCP client the list of tools.\nI then created an agent with crew AI following this - https://docs.crewai.com/en/mcp/streamable-http\nIf the MCP server is running on local it answers the questions asked to agent and works all fine.\n\nBut when I deploy it just changing the URL from localhost to deployed one gives SSL verification error as below:\n`httpx.ConnectError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1016)`\n\nI tried many things but always failing here. Any solution?",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1628/reactions",
        "total_count": 1,
        "+1": 1,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1625",
      "id": 3622421608,
      "node_id": "I_kwDOM2n80s7X6cRo",
      "number": 1625,
      "title": "Running Streamable HTTP Servers",
      "user": {
        "login": "cdreetz",
        "id": 117322020,
        "node_id": "U_kgDOBv4xJA",
        "avatar_url": "https://avatars.githubusercontent.com/u/117322020?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/cdreetz",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 7511840603,
          "node_id": "LA_kwDOM2n80s8AAAABv72XWw",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/question",
          "name": "question",
          "color": "d876e3",
          "default": true,
          "description": "Further information is requested"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 0,
      "created_at": "2025-11-13T18:57:31Z",
      "updated_at": "2025-11-13T18:58:15Z",
      "closed_at": null,
      "author_association": "NONE",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "### Question\n\nIs there a native MCP Python method to run a streaming http server running other peoples MCP implementations?  \n\nFor stdio there is no need to \"start\" a server as when you create a Stdio client connection is includes starting a stdio server. And I have found examples of running MCP as streaming http when you are creating an MCP in which you define the app, tools, and streaming http.  But if I want to run something like 'mcp-server-fetch' but as a streaming http server where I can then connect to that single server from different remote clients, what is the correct way to do so? \n\n Is it really just running the stdio server and wrapping it myself in a streaming http server?\n\n### Additional Context\n\n_No response_",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1625/reactions",
        "total_count": 0,
        "+1": 0,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1617",
      "id": 3618773866,
      "node_id": "I_kwDOM2n80s7Xshtq",
      "number": 1617,
      "title": "Lazy import in src/mcp/__init__.py",
      "user": {
        "login": "wuliang229",
        "id": 18244712,
        "node_id": "MDQ6VXNlcjE4MjQ0NzEy",
        "avatar_url": "https://avatars.githubusercontent.com/u/18244712?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/wuliang229",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 7511840603,
          "node_id": "LA_kwDOM2n80s8AAAABv72XWw",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/question",
          "name": "question",
          "color": "d876e3",
          "default": true,
          "description": "Further information is requested"
        },
        "1": {
          "id": 9230424293,
          "node_id": "LA_kwDOM2n80s8AAAACJi0Y5Q",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/v2",
          "name": "v2",
          "color": "5d2a87",
          "default": false,
          "description": "Ideas, requests and plans for v2 of the SDK which will incorporate major changes and fixes"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 2,
      "created_at": "2025-11-13T00:24:19Z",
      "updated_at": "2025-12-04T10:15:14Z",
      "closed_at": null,
      "author_association": "CONTRIBUTOR",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "### Description\n\nHas the MCP team considered lazy importing in the `mcp` package?\n\nRight now, if you import anything from mcp, it will run the mcp/__init__.py file, and it will import from all the submodules at the beginning. However, most people probably only need to develop for the server or client, but not both. Importing all the sub-modules will create a huge upfront cold start latency as more people are integrating MCP with their services in a auto-scaling format. Whenever a new server instance is cold-started, importing from MCP will take a non-trivial amount of time (~1s in my own laptop, it's usually slower on Cloud). \n\nWould love to draft a PR if this is worth the value.\n\n### References\n\n_No response_",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1617/reactions",
        "total_count": 0,
        "+1": 0,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1602",
      "id": 3608459270,
      "node_id": "I_kwDOM2n80s7XFLgG",
      "number": 1602,
      "title": "OAuth: 403 responses without insufficient_scope incorrectly retry with same token",
      "user": {
        "login": "maxisbey",
        "id": 224885523,
        "node_id": "U_kgDODWd7Ew",
        "avatar_url": "https://avatars.githubusercontent.com/u/224885523?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/maxisbey",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 9301360597,
          "node_id": "LA_kwDOM2n80s8AAAACKmd_1Q",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/auth",
          "name": "auth",
          "color": "92ad2d",
          "default": false,
          "description": "Issues and PRs related to Authentication / OAuth"
        },
        "1": {
          "id": 9354772110,
          "node_id": "LA_kwDOM2n80s8AAAACLZZ-jg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P3",
          "name": "P3",
          "color": "c7df49",
          "default": false,
          "description": "Nice to haves, rare edge cases"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 0,
      "created_at": "2025-11-10T15:04:21Z",
      "updated_at": "2025-11-10T15:33:49Z",
      "closed_at": null,
      "author_association": "CONTRIBUTOR",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "## Summary\n\nThe OAuth client unconditionally retries all 403 responses, even when the error is not `insufficient_scope`. This causes an unnecessary retry attempt with the same token that will fail for the same reason.\n\n## Location\n\n`src/mcp/client/auth/oauth2.py`, lines 662-681\n\n## The Bug\n\n```python\nelif response.status_code == 403:\n    error = self._extract_field_from_www_auth(response, \"error\")\n    \n    # Only performs step-up if error == \"insufficient_scope\"\n    if error == \"insufficient_scope\":\n        self._select_scopes(response)\n        token_response = yield await self._perform_authorization()\n        await self._handle_token_response(token_response)\n    \n    # BUG: Retries unconditionally, even when no new tokens were obtained\n    self._add_auth_header(request)\n    yield request\n```\n\nLines 679-681 execute regardless of whether step-up authorization occurred, causing a retry with the same credentials.\n\n## Expected vs Actual Behavior\n\n| Scenario | Expected | Actual |\n|----------|----------|--------|\n| 403 with `insufficient_scope` | Get new tokens → retry | ✅ Correct |\n| 403 with different error (e.g., `invalid_token`) | Raise error immediately | ❌ Retries once with same token, then fails |\n| 403 with no error field | Raise error immediately | ❌ Retries once with same token, then fails |\n\n## Impact\n\n- **Wasted network round-trip**: Client makes doomed retry request that will fail for the same reason\n- **Poor error feedback**: Delays error reporting by one request cycle  \n- **Spec non-compliance**: [MCP Authorization Spec](https://modelcontextprotocol.io/specification/draft/basic/authorization#scope-challenge-handling) implies retry only for `insufficient_scope`\n- **Resource waste**: Unnecessary load on server and client\n\n## Fix\n\nMove the retry logic inside the `if error == \"insufficient_scope\":` block and raise an error otherwise:\n\n```python\nelif response.status_code == 403:\n    error = self._extract_field_from_www_auth(response, \"error\")\n    \n    if error == \"insufficient_scope\":\n        try:\n            self._select_scopes(response)\n            token_response = yield await self._perform_authorization()\n            await self._handle_token_response(token_response)\n            \n            # Retry with new tokens\n            self._add_auth_header(request)\n            yield request\n        except Exception:\n            logger.exception(\"OAuth flow error\")\n            raise\n    else:\n        # Permanent authorization failure - cannot be resolved by retry\n        raise OAuthFlowError(\n            f\"Access forbidden: {error or 'insufficient permissions'}\"\n        )\n```\n\n## References\n\n- [RFC 6750 Section 3.1](https://datatracker.ietf.org/doc/html/rfc6750#section-3.1) - Defines `insufficient_scope` as the only 403 error code\n- [MCP Authorization Spec](https://modelcontextprotocol.io/specification/draft/basic/authorization#scope-challenge-handling) - Scope challenge handling\n\n---\n\n*Authored by Claude, reviewed by @maxisbey*",
      "closed_by": {
        "login": "maxisbey",
        "id": 224885523,
        "node_id": "U_kgDODWd7Ew",
        "avatar_url": "https://avatars.githubusercontent.com/u/224885523?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/maxisbey",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1602/reactions",
        "total_count": 0,
        "+1": 0,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": "reopened",
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1593",
      "id": 3601532672,
      "node_id": "I_kwDOM2n80s7WqwcA",
      "number": 1593,
      "title": "Implement SEP-990: Enterprise Managed Authorization (Extension)",
      "user": {
        "login": "felixweinberger",
        "id": 3823880,
        "node_id": "MDQ6VXNlcjM4MjM4ODA=",
        "avatar_url": "https://avatars.githubusercontent.com/u/3823880?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/felixweinberger",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 9301360597,
          "node_id": "LA_kwDOM2n80s8AAAACKmd_1Q",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/auth",
          "name": "auth",
          "color": "92ad2d",
          "default": false,
          "description": "Issues and PRs related to Authentication / OAuth"
        },
        "1": {
          "id": 9354757189,
          "node_id": "LA_kwDOM2n80s8AAAACLZZERQ",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/enhancement",
          "name": "enhancement",
          "color": "11b5cc",
          "default": true,
          "description": "Request for a new feature that's not currently supported"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": {
        "login": "BinoyOza-okta",
        "id": 202102938,
        "node_id": "U_kgDODAvYmg",
        "avatar_url": "https://avatars.githubusercontent.com/u/202102938?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/BinoyOza-okta",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "assignees": {
        "0": {
          "login": "BinoyOza-okta",
          "id": 202102938,
          "node_id": "U_kgDODAvYmg",
          "avatar_url": "https://avatars.githubusercontent.com/u/202102938?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/BinoyOza-okta",
          "type": "User",
          "user_view_type": "public",
          "site_admin": false
        }
      },
      "milestone": null,
      "comments": 3,
      "created_at": "2025-11-07T18:32:49Z",
      "updated_at": "2025-11-20T13:21:27Z",
      "closed_at": null,
      "author_association": "CONTRIBUTOR",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "This is a tracking issue for implementation of [SEP-990](https://github.com/modelcontextprotocol/modelcontextprotocol/issues/990).\n\n### Summary\n\nThis extension enables secure authorization of MCP clients within enterprise environments by leveraging existing enterprise Identity Provider (IdP) infrastructure. The Python SDK needs to implement client-side OAuth flows including OpenID Connect/SAML integration, RFC8693 Token Exchange to obtain Identity Assertion JWT Authorization Grants (ID-JAG), and RFC7523 JWT Bearer Grant flows. Server-side implementations need JWT validation including signature verification, claims validation, and replay prevention. This extension provides seamless single sign-on for users while enabling enterprise administrators to control which MCP servers can be accessed and enforce policies through existing IdP infrastructure.\n\n### Related Issues & PRs\n\n- **Implementation PRs**: n/a\n- **Related PRs**: n/a\n- **Related Issues**: n/a",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1593/reactions",
        "total_count": 0,
        "+1": 0,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1585",
      "id": 3596487727,
      "node_id": "I_kwDOM2n80s7WXgwv",
      "number": 1585,
      "title": "FastMCP import fails after httpx≥0.28 upgrade (TransportError removed)",
      "user": {
        "login": "ghbaud",
        "id": 14855188,
        "node_id": "MDQ6VXNlcjE0ODU1MTg4",
        "avatar_url": "https://avatars.githubusercontent.com/u/14855188?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/ghbaud",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 7511840554,
          "node_id": "LA_kwDOM2n80s8AAAABv72XKg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/bug",
          "name": "bug",
          "color": "d73a4a",
          "default": true,
          "description": "Something isn't working"
        },
        "1": {
          "id": 9287721887,
          "node_id": "LA_kwDOM2n80s8AAAACKZdjnw",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/needs%20repro",
          "name": "needs repro",
          "color": "e35211",
          "default": false,
          "description": "needs additional information to be able to reproduce bug"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 5,
      "created_at": "2025-11-06T16:06:27Z",
      "updated_at": "2025-11-12T03:13:02Z",
      "closed_at": null,
      "author_association": "NONE",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "\n**Title:** FastMCP import fails after httpx≥0.28 upgrade (TransportError removed)\n\n- MCP version: 1.20.0 (also happens on 1.18.x)\n- Python: 3.12.10 on Windows 11\n- Install method: local venv (`pip install mcp[cli]`)\n\n**Steps to reproduce**\n1. Create a fresh venv.\n2. `pip install mcp[cli]>=1.2.0`.\n3. Run `python -m mcp.dev path/to/server.py` or simply `from mcp.server.fastmcp import FastMCP`.\n\n**Observed error**\n```\nfrom mcp.client.sse import sse_client\n  File \".../site-packages/mcp/client/sse.py\", line 10, in <module>\n    from httpx_sse import aconnect_sse\n  File \".../site-packages/httpx_sse/_exceptions.py\", line 4, in <module>\n    class SSEError(httpx.TransportError):\nAttributeError: module 'httpx' has no attribute 'TransportError'\n```\n\n**Notes**\n- Resolver now picks `httpx 0.28.1` + `httpx-sse 0.4.3`.\n- `httpx` ≥0.28 removed/renamed `TransportError`; `httpx_sse` still subclasses it.\n- Pinning `httpx==0.26.0` avoids the crash but conflicts with MCP’s `httpx>=0.27.1`.\n- Temporary workaround is editing `.venv/Lib/site-packages/httpx_sse/_exceptions.py` to fall back to `httpx.HTTPError`; that isn’t sustainable.\n\n**Request**\nPlease pin MCP’s dependency stack to a compatible combination (e.g. `httpx<0.28`) or bump the required `httpx-sse` version so it handles the API change. If an official workaround already exists, documenting it would help downstream users. Thanks!\n",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1585/reactions",
        "total_count": 0,
        "+1": 0,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1581",
      "id": 3591729573,
      "node_id": "I_kwDOM2n80s7WFXGl",
      "number": 1581,
      "title": "Add RFC 9728 resource field validation for protected resource metadata discovery",
      "user": {
        "login": "maxisbey",
        "id": 224885523,
        "node_id": "U_kgDODWd7Ew",
        "avatar_url": "https://avatars.githubusercontent.com/u/224885523?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/maxisbey",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 7511840554,
          "node_id": "LA_kwDOM2n80s8AAAABv72XKg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/bug",
          "name": "bug",
          "color": "d73a4a",
          "default": true,
          "description": "Something isn't working"
        },
        "1": {
          "id": 9301360597,
          "node_id": "LA_kwDOM2n80s8AAAACKmd_1Q",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/auth",
          "name": "auth",
          "color": "92ad2d",
          "default": false,
          "description": "Issues and PRs related to Authentication / OAuth"
        },
        "2": {
          "id": 9354767859,
          "node_id": "LA_kwDOM2n80s8AAAACLZZt8w",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P1",
          "name": "P1",
          "color": "895d17",
          "default": false,
          "description": "Significant bug affecting many users, highly requested feature"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 0,
      "created_at": "2025-11-05T15:54:33Z",
      "updated_at": "2025-11-05T15:54:49Z",
      "closed_at": null,
      "author_association": "CONTRIBUTOR",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "## Problem\n\nPR #1548 implemented SEP-985 fallback discovery but is missing a critical security requirement from RFC 9728 Section 3.3.\n\n**RFC 9728 Section 3.3 requires:** The `resource` field in protected resource metadata responses MUST be validated to match the expected resource identifier. If values don't match, the metadata MUST be rejected.\n\nThis validation prevents impersonation attacks where a malicious server returns metadata claiming to describe a legitimate resource but containing attacker-controlled authorization servers.\n\n## What's Needed\n\nClient must validate:\n1. **Same origin validation:** Resource field must have same scheme, host, and port as the server\n2. **Path validation for path-based discovery:** When using `/.well-known/oauth-protected-resource/{path}`, the resource field must match or be a valid parent of the expected path\n3. **Fallback on mismatch:** Reject invalid metadata and try the next discovery URL in the fallback chain\n\n## Related\n\n- SEP-985: https://github.com/modelcontextprotocol/modelcontextprotocol/issues/985\n- RFC 9728 Section 3.3: https://datatracker.ietf.org/doc/html/rfc9728#section-3.3\n- PR #1548",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1581/reactions",
        "total_count": 0,
        "+1": 0,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": [
        1597
      ]
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1579",
      "id": 3590102487,
      "node_id": "I_kwDOM2n80s7V_J3X",
      "number": 1579,
      "title": "FastMCP read_resource() returns incorrect error code when resource not found",
      "user": {
        "login": "fennb",
        "id": 127930,
        "node_id": "MDQ6VXNlcjEyNzkzMA==",
        "avatar_url": "https://avatars.githubusercontent.com/u/127930?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/fennb",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 7511840554,
          "node_id": "LA_kwDOM2n80s8AAAABv72XKg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/bug",
          "name": "bug",
          "color": "d73a4a",
          "default": true,
          "description": "Something isn't working"
        },
        "1": {
          "id": 9331338299,
          "node_id": "LA_kwDOM2n80s8AAAACLDDsOw",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/improves%20spec%20compliance",
          "name": "improves spec compliance",
          "color": "9FD9BD",
          "default": false,
          "description": "When a change improves ability of SDK users to comply with spec definition"
        },
        "2": {
          "id": 9354761244,
          "node_id": "LA_kwDOM2n80s8AAAACLZZUHA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/ready%20for%20work",
          "name": "ready for work",
          "color": "2b9402",
          "default": false,
          "description": "Enough information for someone to start working on"
        },
        "3": {
          "id": 9354772110,
          "node_id": "LA_kwDOM2n80s8AAAACLZZ-jg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P3",
          "name": "P3",
          "color": "c7df49",
          "default": false,
          "description": "Nice to haves, rare edge cases"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 4,
      "created_at": "2025-11-05T09:31:33Z",
      "updated_at": "2025-11-16T02:02:06Z",
      "closed_at": null,
      "author_association": "CONTRIBUTOR",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "### Initial Checks\n\n- [x] I confirm that I'm using the latest version of MCP Python SDK\n- [x] I confirm that I searched for my issue in https://github.com/modelcontextprotocol/python-sdk/issues before opening this issue\n\n### Description\n\nIt appears to be unclear as to how an MCP server should respond to a read resource request if the resource is not found, however, FastMCP returns error code `0`, which seems likely incorrect regardless.\n\nIn the Error Handling part of the [protocol specification](https://modelcontextprotocol.io/specification/2025-06-18/server/resources#error-handling) it states:\n> Resource not found: `-32002`\n\nHowever, the python SDK's FastMCP [attempts to raise a ResourceError](https://github.com/modelcontextprotocol/python-sdk/blob/de2289dc93c2efb6d6b055eace20bcbfe61bce5c/src/mcp/server/fastmcp/server.py#L372), except it appears that code would never get executed because a [ValueError is raised in ResourceManager](https://github.com/modelcontextprotocol/python-sdk/blob/de2289dc93c2efb6d6b055eace20bcbfe61bce5c/src/mcp/server/fastmcp/resources/resource_manager.py#L103) first.\n\nThe net result of this is that servers implemented using FastMCP return the following for resource-not-found:\n```json\n{\"jsonrpc\":\"2.0\",\"id\":7,\"error\":{\"code\":0,\"message\":\"Unknown resource: https://example.com/does-not-exist\"}}\n```\n\nFor the purposes of comparison, I compared this to the (presumably reference) typescript implementation, which raises an MCP error with [InvalidParams: code -32602](https://github.com/modelcontextprotocol/typescript-sdk/blob/main/src/types.ts#L121) - [see here](https://github.com/modelcontextprotocol/typescript-sdk/blob/9757ace06efd6c9cdcb40ee6430ef4c956e6cbf8/src/server/mcp.ts#L353)\n\n`-32602` is notably _similar_ to `-32002`, but _also_ seemingly incorrect (though in a different way ☹).\n\nAs things stand today, it is rather difficult to reliably write clients that behave predictably due to this. I understand this may be more of a protocol specification problem than a python-sdk problem, but error code `0` seems incorrect either way, so thought I'd report it.\n\n### Example Code\n\nBasic server (anything will do):\n\n```Python\nfrom mcp.server.fastmcp import FastMCP\n\nmcp = FastMCP('Pydantic AI MCP Server')\nlog_level = 'unset'\n\n\n@mcp.resource('resource://user_name.txt', mime_type='text/plain')\nasync def user_name_resource() -> str:\n    return 'Alice'\n\n\nif __name__ == '__main__':\n    mcp.run(transport='streamable-http')\n```\n\nThen try to fetch any resource via whatever MCP client you like, eg (manual curl):\n```bash\nMCP_URL=\"http://localhost:8000/mcp\"\nSESSION_ID=\"\"\n\n# Step 1: Initialize and get session ID\necho \"1. Initializing MCP server...\"\nINIT_RESPONSE=$(curl -s -D - -X POST \"$MCP_URL\" \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Accept: application/json, text/event-stream\" \\\n  -d '{\n    \"jsonrpc\": \"2.0\",\n    \"method\": \"initialize\",\n    \"params\": {\n      \"protocolVersion\": \"2024-11-05\",\n      \"capabilities\": {},\n      \"clientInfo\": {\n        \"name\": \"test-mcp-script\",\n        \"version\": \"1.0.0\"\n      }\n    },\n    \"id\": 1\n  }')\n\n# Extract session ID from headers\nSESSION_ID=$(echo \"$INIT_RESPONSE\" | grep -i 'mcp-session-id:' | cut -d' ' -f2 | tr -d '\\r')\n\n# Try to read resource:\ncurl -s -X POST \"$MCP_URL\" \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Accept: application/json, text/event-stream\" \\\n  -H \"Mcp-Session-Id: $SESSION_ID\" \\\n  -d '{\n    \"jsonrpc\": \"2.0\",\n    \"method\": \"resources/read\",\n    \"params\": {\n      \"uri\": \"https://example.com/does-not-exist\"\n    },\n    \"id\": 7\n  }'\n\n# > event: message\n# > data: {\"jsonrpc\":\"2.0\",\"id\":7,\"error\":{\"code\":0,\"message\":\"Unknown resource: https://example.com/does-not-exist\"}}\n```\n\n### Python & MCP Python SDK\n\n```Text\n`main`\n```",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1579/reactions",
        "total_count": 0,
        "+1": 0,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1577",
      "id": 3588937508,
      "node_id": "I_kwDOM2n80s7V6tck",
      "number": 1577,
      "title": "Client tool call hangs forever if server crashes or connection dies when using streamable-http",
      "user": {
        "login": "gyang-xai",
        "id": 236455930,
        "node_id": "U_kgDODhgH-g",
        "avatar_url": "https://avatars.githubusercontent.com/u/236455930?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/gyang-xai",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 7511840554,
          "node_id": "LA_kwDOM2n80s8AAAABv72XKg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/bug",
          "name": "bug",
          "color": "d73a4a",
          "default": true,
          "description": "Something isn't working"
        },
        "1": {
          "id": 9354761244,
          "node_id": "LA_kwDOM2n80s8AAAACLZZUHA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/ready%20for%20work",
          "name": "ready for work",
          "color": "2b9402",
          "default": false,
          "description": "Enough information for someone to start working on"
        },
        "2": {
          "id": 9354770246,
          "node_id": "LA_kwDOM2n80s8AAAACLZZ3Rg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P2",
          "name": "P2",
          "color": "d2b457",
          "default": false,
          "description": "Moderate issues affecting some users, edge cases, potentially valuable feature"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 1,
      "created_at": "2025-11-05T02:57:42Z",
      "updated_at": "2025-11-05T10:37:49Z",
      "closed_at": null,
      "author_association": "NONE",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "### Initial Checks\n\n- [x] I confirm that I'm using the latest version of MCP Python SDK\n- [x] I confirm that I searched for my issue in https://github.com/modelcontextprotocol/python-sdk/issues before opening this issue\n\n### Description\n\nIf the server dies during a tool call before it sends a response the client will get stuck forever.\n\n### Example Code\n\n```Python\n# server.py\n\nfrom mcp.server.fastmcp import FastMCP\nimport sys\n\nmcp = FastMCP(\"StatefulServer\")\n\n@mcp.tool()\ndef greet(name: str = \"World\") -> str:\n    \"\"\"Greet someone by name.\"\"\"\n    sys.exit(0)\n    return f\"Hello, {name}!\"\n\n\nif __name__ == \"__main__\":\n    mcp.run(transport=\"streamable-http\")\n\n\n# client.py\n\nimport asyncio\n\nfrom mcp import ClientSession\nfrom mcp.client.streamable_http import streamablehttp_client\n\n\nasync def main():\n    # Connect to a streamable HTTP server\n    async with streamablehttp_client(\"http://localhost:8000/mcp\") as (\n        read_stream,\n        write_stream,\n        _,\n    ):\n        # Create a session using the client streams\n        async with ClientSession(read_stream, write_stream) as session:\n            # Initialize the connection\n            await session.initialize()\n\n            res = await session.call_tool(\"greet\", {\"name\": \"World\"})\n            print(res)\n\n\nif __name__ == \"__main__\":\n    asyncio.run(main())\n\n\n\n# Run server.py then client.py\n\n\n# client.py will hang forever in the tool call and never complete. I would expect it to throw an error since the connection died and it will never get a response.\n```\n\n### Python & MCP Python SDK\n\n```Text\nPython 3.13.7\nmcp 1.20.0\n```",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1577/reactions",
        "total_count": 1,
        "+1": 1,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1575",
      "id": 3586937514,
      "node_id": "I_kwDOM2n80s7VzFKq",
      "number": 1575,
      "title": "Fix flaky test test_notification_validation_error in test_88_random_error.py",
      "user": {
        "login": "maxisbey",
        "id": 224885523,
        "node_id": "U_kgDODWd7Ew",
        "avatar_url": "https://avatars.githubusercontent.com/u/224885523?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/maxisbey",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 7511840554,
          "node_id": "LA_kwDOM2n80s8AAAABv72XKg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/bug",
          "name": "bug",
          "color": "d73a4a",
          "default": true,
          "description": "Something isn't working"
        },
        "1": {
          "id": 9354772110,
          "node_id": "LA_kwDOM2n80s8AAAACLZZ-jg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P3",
          "name": "P3",
          "color": "c7df49",
          "default": false,
          "description": "Nice to haves, rare edge cases"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 0,
      "created_at": "2025-11-04T14:53:17Z",
      "updated_at": "2025-11-04T14:53:17Z",
      "closed_at": null,
      "author_association": "CONTRIBUTOR",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "### Initial Checks\n\n- [x] I confirm that I'm using the latest version of MCP Python SDK\n- [x] I confirm that I searched for my issue in https://github.com/modelcontextprotocol/python-sdk/issues before opening this issue\n\n### Description\n\nThe test is flaky. See: https://github.com/modelcontextprotocol/python-sdk/actions/runs/18879780622/job/53879347549?pr=1177\n\nOutput:\n\n```python\n________________________________________________________ test_notification_validation_error _________________________________________________________\n[gw3] win32 -- Python 3.11.9 D:\\a\\python-sdk\\python-sdk\\.venv\\Scripts\\python.exe\n  + Exception Group Traceback (most recent call last):\n  |   File \"D:\\a\\python-sdk\\python-sdk\\.venv\\Lib\\site-packages\\_pytest\\runner.py\", line 341, in from_call\n  |     result: TResult | None = func()\n  |                              ^^^^^^\n  |   File \"D:\\a\\python-sdk\\python-sdk\\.venv\\Lib\\site-packages\\_pytest\\runner.py\", line 242, in <lambda>\n    | ExceptionGroup: unhandled errors in a TaskGroup (1 sub-exception)\n    +-+---------------- 1 ----------------\n      | Traceback (most recent call last):\n      |   File \"D:\\a\\python-sdk\\python-sdk\\.venv\\Lib\\site-packages\\anyio\\streams\\memory.py\", line 111, in receive\n      |     return self.receive_nowait()\n      |            ^^^^^^^^^^^^^^^^^^^^^\n      |   File \"D:\\a\\python-sdk\\python-sdk\\.venv\\Lib\\site-packages\\anyio\\streams\\memory.py\", line 106, in receive_nowait\n      |     raise WouldBlock\n      | anyio.WouldBlock\n      | \n      | During handling of the above exception, another exception occurred:\n      | \n      | Traceback (most recent call last):\n      |   File \"D:\\a\\python-sdk\\python-sdk\\.venv\\Lib\\site-packages\\anyio\\_core\\_tasks.py\", line 115, in fail_after\n      |     yield cancel_scope\n      |   File \"D:\\a\\python-sdk\\python-sdk\\src\\mcp\\shared\\session.py\", line 272, in send_request\n      |     response_or_error = await response_stream_reader.receive()\n      |                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n      |   File \"D:\\a\\python-sdk\\python-sdk\\.venv\\Lib\\site-packages\\anyio\\streams\\memory.py\", line 119, in receive\n      |     await receive_event.wait()\n      |   File \"C:\\hostedtoolcache\\windows\\Python\\3.11.9\\x64\\Lib\\asyncio\\locks.py\", line 213, in wait\n      |     await fut\n      | asyncio.exceptions.CancelledError: Cancelled by cancel scope 177e80b7890\n      | \n      | During handling of the above exception, another exception occurred:\n      | \n      | Traceback (most recent call last):\n      |   File \"D:\\a\\python-sdk\\python-sdk\\src\\mcp\\shared\\session.py\", line 271, in send_request\n      |     with anyio.fail_after(timeout):\n      |   File \"C:\\hostedtoolcache\\windows\\Python\\3.11.9\\x64\\Lib\\contextlib.py\", line 158, in __exit__\n      |     self.gen.throw(typ, value, traceback)\n      |   File \"D:\\a\\python-sdk\\python-sdk\\.venv\\Lib\\site-packages\\anyio\\_core\\_tasks.py\", line 118, in fail_after\n      |     raise TimeoutError\n      | TimeoutError\n      | \n      | During handling of the above exception, another exception occurred:\n      | \n      | Traceback (most recent call last):\n      |   File \"D:\\a\\python-sdk\\python-sdk\\tests\\issues\\test_88_random_error.py\", line 90, in client\n      |     result = await session.call_tool(\"fast\")\n      |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n      |   File \"D:\\a\\python-sdk\\python-sdk\\src\\mcp\\client\\session.py\", line 340, in call_tool\n      |     result = await self.send_request(\n      |              ^^^^^^^^^^^^^^^^^^^^^^^^\n      |   File \"D:\\a\\python-sdk\\python-sdk\\src\\mcp\\shared\\session.py\", line 274, in send_request\n      |     raise McpError(\n      | mcp.shared.exceptions.McpError: Timed out while waiting for response to ClientRequest. Waited 0.05 seconds.\n      +------------------------------------\n```\n\n### Example Code\n\n```Python\n\n```\n\n### Python & MCP Python SDK\n\n```Text\n1.19.0\n```",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1575/reactions",
        "total_count": 0,
        "+1": 0,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1574",
      "id": 3586876049,
      "node_id": "I_kwDOM2n80s7Vy2KR",
      "number": 1574,
      "title": "Python SDK incorrectly validates Resource URIs as strict URLs, breaking relative paths",
      "user": {
        "login": "maxisbey",
        "id": 224885523,
        "node_id": "U_kgDODWd7Ew",
        "avatar_url": "https://avatars.githubusercontent.com/u/224885523?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/maxisbey",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 7511840554,
          "node_id": "LA_kwDOM2n80s8AAAABv72XKg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/bug",
          "name": "bug",
          "color": "d73a4a",
          "default": true,
          "description": "Something isn't working"
        },
        "1": {
          "id": 9354761244,
          "node_id": "LA_kwDOM2n80s8AAAACLZZUHA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/ready%20for%20work",
          "name": "ready for work",
          "color": "2b9402",
          "default": false,
          "description": "Enough information for someone to start working on"
        },
        "2": {
          "id": 9354770246,
          "node_id": "LA_kwDOM2n80s8AAAACLZZ3Rg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P2",
          "name": "P2",
          "color": "d2b457",
          "default": false,
          "description": "Moderate issues affecting some users, edge cases, potentially valuable feature"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 2,
      "created_at": "2025-11-04T14:36:27Z",
      "updated_at": "2025-11-25T21:39:28Z",
      "closed_at": null,
      "author_association": "CONTRIBUTOR",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "## Problem\n\nThe Python SDK is stricter than the MCP specification when validating resource URIs. It rejects relative paths like `'users/me'` that are valid according to the spec and accepted by the TypeScript SDK.\n\n### Error Example\n```python\nresource = types.Resource(name=\"test\", uri=\"users/me\")\n# ValidationError: Input should be a valid URL, relative URL without a base\n```\n\n## Root Cause\n\nThe Python SDK uses Pydantic's `AnyUrl` type for URI fields:\n\n**Python SDK** (types.py:434):\n```python\nuri: Annotated[AnyUrl, UrlConstraints(host_required=False)]\n```\n\n**TypeScript SDK** (types.ts:495):\n```typescript\nuri: z.string(),  // Plain string, no validation\n```\n\n## What the MCP Spec Says\n\nAccording to the [official MCP specification](https://modelcontextprotocol.io/specification/2025-06-18/schema), the `uri` field is defined as:\n- Type: `string` (plain string)\n- No JSON Schema format validation (no `\"format\": \"uri\"` constraint)\n\nThe spec intentionally allows any string value to support:\n- Relative paths: `'users/me'`\n- Custom schemes: `'custom://resource'`\n- File paths: `'file:///path'`\n- HTTP URLs: `'https://example.com'`\n- Application-specific identifiers\n\n## Impact\n\nThis breaks interoperability when Python clients receive resources from servers that use relative URIs or when Python servers want to return relative URIs. Affects:\n- Toolbox migration from TypeScript to Python (reported by @celine)\n- Any server using relative resource identifiers\n\n## Locations to Fix\n\nThe `AnyUrl` type needs to be changed to `str` in 6 locations in `src/mcp/types.py`:\n\n1. Line 434: `Resource.uri`\n2. Line 505: `ReadResourceRequestParams.uri`\n3. Line 523: `ResourceContents.uri`\n4. Line 573: `SubscribeRequestParams.uri`\n5. Line 594: `UnsubscribeRequestParams.uri`\n6. Line 612: `ResourceUpdatedNotificationParams.uri`\n\n## Test Case\n\n```python\n# Should accept all of these per spec:\nResource(name=\"test\", uri=\"users/me\")  # Relative path\nResource(name=\"test\", uri=\"file:///path\")  # File URL\nResource(name=\"test\", uri=\"custom://id\")  # Custom scheme\n```",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1574/reactions",
        "total_count": 1,
        "+1": 1,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1573",
      "id": 3586741292,
      "node_id": "I_kwDOM2n80s7VyVQs",
      "number": 1573,
      "title": "Fix flaky test test_response in test_streamable_http.py",
      "user": {
        "login": "maxisbey",
        "id": 224885523,
        "node_id": "U_kgDODWd7Ew",
        "avatar_url": "https://avatars.githubusercontent.com/u/224885523?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/maxisbey",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 7511840554,
          "node_id": "LA_kwDOM2n80s8AAAABv72XKg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/bug",
          "name": "bug",
          "color": "d73a4a",
          "default": true,
          "description": "Something isn't working"
        },
        "1": {
          "id": 9354772110,
          "node_id": "LA_kwDOM2n80s8AAAACLZZ-jg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P3",
          "name": "P3",
          "color": "c7df49",
          "default": false,
          "description": "Nice to haves, rare edge cases"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 0,
      "created_at": "2025-11-04T14:02:44Z",
      "updated_at": "2025-11-04T14:02:58Z",
      "closed_at": null,
      "author_association": "CONTRIBUTOR",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "### Initial Checks\n\n- [x] I confirm that I'm using the latest version of MCP Python SDK\n- [x] I confirm that I searched for my issue in https://github.com/modelcontextprotocol/python-sdk/issues before opening this issue\n\n### Description\n\nThe test is flaky. See: https://github.com/modelcontextprotocol/python-sdk/actions/runs/19020904095/job/54315849330?pr=1565\n\nOutput:\n\n```python\nbasic_server = None, basic_server_url = 'http://127.0.0.1:50695/'\n\n    def test_response(basic_server: None, basic_server_url: str):\n        \"\"\"Test response handling for a valid request.\"\"\"\n        mcp_url = f\"{basic_server_url}/mcp\"\n        response = requests.post(\n            mcp_url,\n            headers={\n                \"Accept\": \"application/json, text/event-stream\",\n                \"Content-Type\": \"application/json\",\n            },\n            json=INIT_REQUEST,\n        )\n>       assert response.status_code == 200\nE       assert 404 == 200\nE        +  where 404 = <Response [404]>.status_code\n\ntests/shared/test_streamable_http.py:624: AssertionError\n```\n\n### Example Code\n\n```Python\n\n```\n\n### Python & MCP Python SDK\n\n```Text\n1.19.0\n```",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1573/reactions",
        "total_count": 0,
        "+1": 0,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1569",
      "id": 3585752141,
      "node_id": "I_kwDOM2n80s7VujxN",
      "number": 1569,
      "title": "MCP Sampling",
      "user": {
        "login": "Gerr1ck",
        "id": 13253442,
        "node_id": "MDQ6VXNlcjEzMjUzNDQy",
        "avatar_url": "https://avatars.githubusercontent.com/u/13253442?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/Gerr1ck",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 7511840603,
          "node_id": "LA_kwDOM2n80s8AAAABv72XWw",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/question",
          "name": "question",
          "color": "d876e3",
          "default": true,
          "description": "Further information is requested"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 5,
      "created_at": "2025-11-04T09:58:36Z",
      "updated_at": "2025-11-05T16:24:54Z",
      "closed_at": null,
      "author_association": "NONE",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "### Question\n\nHello,\n\nAccording to the Model Context Protocol (MCP) specification ([Sampling](https://modelcontextprotocol.io/specification/2025-06-18/client/sampling)), the MCP Server can forward prompts to the client for execution at a large language model (LLM) through a sampling mechanism.\n\nI am trying to implement a use case where the MCP Server performs \"sampling\" and requests the MCP Client to execute a prompt and return the output without involving a User-In-The-Loop. \n\nEssentially, I want the MCP Server to trigger prompt execution independently and receive the result from the client, and that the MCP Server can trigger prompt execution whenever the server needs it.\n\nI have some questions to clarify this setup:\n\n1. Is it correct that the MCP Server can independently initiate a sampling message to the MCP Client, without the MCP Client first invoking a TOOL (or something else) on the MCP Server?\n\n2. If this is possible, could you please provide example code or guidance demonstrating how to implement this flow where the MCP Server triggers sampling and the client responds with the prompt output?\n\nThank you for your assistance.\n\n### Additional Context\n\n_No response_",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1569/reactions",
        "total_count": 0,
        "+1": 0,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1564",
      "id": 3580064953,
      "node_id": "I_kwDOM2n80s7VY3S5",
      "number": 1564,
      "title": "stdio_client fails with BrokenResourceError during initialization",
      "user": {
        "login": "ParthibanRajasekaran",
        "id": 36532774,
        "node_id": "MDQ6VXNlcjM2NTMyNzc0",
        "avatar_url": "https://avatars.githubusercontent.com/u/36532774?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/ParthibanRajasekaran",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 7511840554,
          "node_id": "LA_kwDOM2n80s8AAAABv72XKg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/bug",
          "name": "bug",
          "color": "d73a4a",
          "default": true,
          "description": "Something isn't working"
        },
        "1": {
          "id": 7511840581,
          "node_id": "LA_kwDOM2n80s8AAAABv72XRQ",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/good%20first%20issue",
          "name": "good first issue",
          "color": "7057ff",
          "default": true,
          "description": "Good for newcomers"
        },
        "2": {
          "id": 9354772110,
          "node_id": "LA_kwDOM2n80s8AAAACLZZ-jg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P3",
          "name": "P3",
          "color": "c7df49",
          "default": false,
          "description": "Nice to haves, rare edge cases"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 2,
      "created_at": "2025-11-02T22:49:56Z",
      "updated_at": "2025-11-14T20:25:04Z",
      "closed_at": null,
      "author_association": "NONE",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "### Initial Checks\n\n- [x] I confirm that I'm using the latest version of MCP Python SDK\n- [x] I confirm that I searched for my issue in https://github.com/modelcontextprotocol/python-sdk/issues before opening this issue\n\n### Description\n\nI'm trying to use stdio_client to spawn and communicate with a FastMCP server, but it consistently fails during the initialization handshake. The client times out after about 10 seconds with a BrokenResourceError.\n\nThe subprocess starts fine and I can see the server is running, but when the client tries to initialize the session, it hangs and eventually times out. Looking at the traceback, there's a BrokenResourceError happening in the stdout_reader coroutine at line 162 of mcp/client/stdio/__init__.py.\n\nExpected behavior:\nThe client should successfully spawn the server, complete the initialize handshake, and be ready to call tools.\n\nActual behavior:\nThe client hangs during initialization and then times out with:\n\nExceptionGroup: unhandled errors in a TaskGroup (2 sub-exceptions)\n  BrokenResourceError at mcp/client/stdio/__init__.py:162 in stdout_reader\n  TimeoutError after waiting for initialize response\n\nAdditional cpontext:\nInteresting finding: When I test the server directly by piping JSON to it, it works perfectly:\n\n$ echo '{\"jsonrpc\":\"2.0\",\"id\":1,\"method\":\"initialize\",\"params\":{\"protocolVersion\":\"2024-11-05\",\"capabilities\":{},\"clientInfo\":{\"name\":\"test\",\"version\":\"1.0\"}}}' | python test_server.py\n\nThe server immediately returns a valid response. So the server itself is working correctly - it can read from stdin and write to stdout just fine. The issue seems to be specifically with how stdio_client is handling the subprocess communication.\n\nI've tried various things to fix it but nothing works:\n- Running python with -u flag for unbuffered output\n- Setting sys.stdout.reconfigure(line_buffering=True) in the server\n- Using absolute paths\n- Increasing timeout values\n- Setting PYTHONUNBUFFERED=1\n\nNote: HTTP/SSE transport works fine as an alternative.\n\n### Example Code\n\n\n1. Create a simple FastMCP server (test_server.py):\n\n```python\nfrom mcp.server.fastmcp import FastMCP\n\nmcp = FastMCP(\"TestServer\")\n\n@mcp.tool()\ndef add(a: int, b: int) -> int:\n    \"\"\"Add two numbers\"\"\"\n    return a + b\n\nif __name__ == \"__main__\":\n    mcp.run()\n```\n\n2. Create a client that uses stdio_client (test_client.py):\n\n```python\nimport asyncio\nfrom mcp import ClientSession, StdioServerParameters\nfrom mcp.client.stdio import stdio_client\n\nasync def test():\n    params = StdioServerParameters(\n        command=\"python\",\n        args=[\"test_server.py\"]\n    )\n    \n    async with stdio_client(params) as (stdio, write):\n        session = ClientSession(stdio, write)\n        await session.initialize()  # Hangs here\n        \n        result = await session.list_tools()\n        print(f\"Tools: {result.tools}\")\n\nasyncio.run(test())\n```\n\n3. Run: python test_client.py\n4. Observe: hangs for about 10 seconds then fails with BrokenResourceError\n\n### Python & MCP Python SDK\n\n```Text\n- MCP SDK Version: 1.20.0\n- Python Version: 3.12.7\n- Operating System: macOS\n- Installation method: pip install mcp==1.20.01\n```",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1564/reactions",
        "total_count": 0,
        "+1": 0,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1561",
      "id": 3574098676,
      "node_id": "I_kwDOM2n80s7VCGr0",
      "number": 1561,
      "title": "Invalid method names return error code -32602 instead of -32601",
      "user": {
        "login": "corv89",
        "id": 7198687,
        "node_id": "MDQ6VXNlcjcxOTg2ODc=",
        "avatar_url": "https://avatars.githubusercontent.com/u/7198687?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/corv89",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 9082681979,
          "node_id": "LA_kwDOM2n80s8AAAACHV66ew",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/needs%20confirmation",
          "name": "needs confirmation",
          "color": "aaaaaa",
          "default": false,
          "description": "Needs confirmation that the PR is actually required or needed."
        },
        "1": {
          "id": 9331338299,
          "node_id": "LA_kwDOM2n80s8AAAACLDDsOw",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/improves%20spec%20compliance",
          "name": "improves spec compliance",
          "color": "9FD9BD",
          "default": false,
          "description": "When a change improves ability of SDK users to comply with spec definition"
        },
        "2": {
          "id": 9354772110,
          "node_id": "LA_kwDOM2n80s8AAAACLZZ-jg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P3",
          "name": "P3",
          "color": "c7df49",
          "default": false,
          "description": "Nice to haves, rare edge cases"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 0,
      "created_at": "2025-10-31T09:28:08Z",
      "updated_at": "2025-11-12T18:11:38Z",
      "closed_at": null,
      "author_association": "NONE",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "### Initial Checks\n\n- [x] I confirm that I'm using the latest version of MCP Python SDK\n- [x] I confirm that I searched for my issue in https://github.com/modelcontextprotocol/python-sdk/issues before opening this issue\n\n### Description\n\n**How to reproduce:**\n```bash\necho '{\"jsonrpc\":\"2.0\",\"method\":\"invalid/method\",\"id\":1,\"params\":{}}' | your-mcp-server\n```\n\n**Expected result:**\n```json\n{\"jsonrpc\":\"2.0\",\"id\":1,\"error\":{\"code\":-32601,\"message\":\"Method not found\"}}\n```\n\n**Actual result:**\n```json\n{\"jsonrpc\":\"2.0\",\"id\":1,\"error\":{\"code\":-32602,\"message\":\"Invalid request parameters\",\"data\":\"\"}}\n```\n\nThe issue appears to occur because request validation in `mcp/shared/session.py` (lines 360-375) catches the validation exception and returns `-32602` before the proper method-not-found handler in `mcp/server/lowlevel/server.py` (lines 716-718) can be reached.\n\n### Example Code\n\n```Python\n\n```\n\n### Python & MCP Python SDK\n\n```Text\n**Environment:**\n- Python SDK version: `1.2.0`\n- Python version: `3.12`\n- Platform: macOS\n```",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1561/reactions",
        "total_count": 0,
        "+1": 0,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1555",
      "id": 3572914629,
      "node_id": "I_kwDOM2n80s7U9lnF",
      "number": 1555,
      "title": "Implement SEP-1724: Extensions",
      "user": {
        "login": "felixweinberger",
        "id": 3823880,
        "node_id": "MDQ6VXNlcjM4MjM4ODA=",
        "avatar_url": "https://avatars.githubusercontent.com/u/3823880?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/felixweinberger",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 9231177417,
          "node_id": "LA_kwDOM2n80s8AAAACJjiWyQ",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/pending%20SEP%20approval",
          "name": "pending SEP approval",
          "color": "390ac3",
          "default": false,
          "description": "When a PR is attached as an implementation detail to a SEP, we mark it as such for triage."
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 0,
      "created_at": "2025-10-31T00:20:40Z",
      "updated_at": "2025-10-31T00:21:33Z",
      "closed_at": null,
      "author_association": "CONTRIBUTOR",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "This is a tracking issue for implementation of [SEP-1724](https://github.com/modelcontextprotocol/modelcontextprotocol/issues/1724).\n\n### Summary\n\nThis SEP establishes a comprehensive framework for extending the Model Context Protocol through optional, composable extensions. The Python SDK needs to implement support for extension identifiers in the format `{vendor-prefix}/{extension-name}`, capabilities advertisement for extensions, and mechanisms to enable/disable extensions (with opt-in by default). This includes updating protocol types to include extension-related fields, implementing extension discovery and negotiation during session initialization, and providing SDK APIs for developers to register and use extensions. The framework introduces three categories (Unofficial, Recommended, Official) and ensures extensions are purely additive and optional, maintaining core protocol stability.\n\n### Related Issues & PRs\n\n- **Implementation PRs**: n/a\n- **Related PRs**: n/a\n- **Related Issues**: n/a",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1555/reactions",
        "total_count": 0,
        "+1": 0,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1545",
      "id": 3570406700,
      "node_id": "I_kwDOM2n80s7U0BUs",
      "number": 1545,
      "title": "Implement SEP-1649: MCP Server Cards (.well-known Discovery)",
      "user": {
        "login": "felixweinberger",
        "id": 3823880,
        "node_id": "MDQ6VXNlcjM4MjM4ODA=",
        "avatar_url": "https://avatars.githubusercontent.com/u/3823880?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/felixweinberger",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 9231177417,
          "node_id": "LA_kwDOM2n80s8AAAACJjiWyQ",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/pending%20SEP%20approval",
          "name": "pending SEP approval",
          "color": "390ac3",
          "default": false,
          "description": "When a PR is attached as an implementation detail to a SEP, we mark it as such for triage."
        },
        "1": {
          "id": 9354757189,
          "node_id": "LA_kwDOM2n80s8AAAACLZZERQ",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/enhancement",
          "name": "enhancement",
          "color": "11b5cc",
          "default": true,
          "description": "Request for a new feature that's not currently supported"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 0,
      "created_at": "2025-10-30T11:48:52Z",
      "updated_at": "2025-11-12T18:30:54Z",
      "closed_at": null,
      "author_association": "CONTRIBUTOR",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "This is a tracking issue for implementation of [SEP-1649](https://github.com/modelcontextprotocol/modelcontextprotocol/issues/1649).\n\n### Summary\n\nThis SEP introduces a standardized mechanism for MCP servers to advertise their capabilities and identity through .well-known URLs following established internet standards for service discovery. The Python SDK needs to implement support for publishing capability documents at standardized .well-known paths describing available tools, resources, and prompts, enable clients to fetch these documents via HTTP without establishing a full MCP session, and provide utilities for both server-side capability document generation and client-side capability document fetching and parsing to enable better server discovery and selection UX.\n\n### Related Issues & PRs\n\n- **Implementation PRs**: n/a\n- **Related PRs**: n/a\n- **Related Issues**: n/a",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1545/reactions",
        "total_count": 0,
        "+1": 0,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1544",
      "id": 3570401521,
      "node_id": "I_kwDOM2n80s7U0ADx",
      "number": 1544,
      "title": "Implement SEP-1442: Make MCP Stateless",
      "user": {
        "login": "felixweinberger",
        "id": 3823880,
        "node_id": "MDQ6VXNlcjM4MjM4ODA=",
        "avatar_url": "https://avatars.githubusercontent.com/u/3823880?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/felixweinberger",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 9231177417,
          "node_id": "LA_kwDOM2n80s8AAAACJjiWyQ",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/pending%20SEP%20approval",
          "name": "pending SEP approval",
          "color": "390ac3",
          "default": false,
          "description": "When a PR is attached as an implementation detail to a SEP, we mark it as such for triage."
        },
        "1": {
          "id": 9354757189,
          "node_id": "LA_kwDOM2n80s8AAAACLZZERQ",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/enhancement",
          "name": "enhancement",
          "color": "11b5cc",
          "default": true,
          "description": "Request for a new feature that's not currently supported"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 0,
      "created_at": "2025-10-30T11:47:43Z",
      "updated_at": "2025-11-12T18:30:53Z",
      "closed_at": null,
      "author_association": "CONTRIBUTOR",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "This is a tracking issue for implementation of [SEP-1442](https://github.com/modelcontextprotocol/modelcontextprotocol/issues/1442).\n\n### Summary\n\nThis SEP focuses on enhancing MCP's ability to scale horizontally and operate in stateless or near-stateless modes. The Python SDK needs to introduce patterns and protocol enhancements that allow servers to operate with minimal or no session state, enable seamless request distribution across multiple server instances, improve session handling mechanisms, optimize server startup performance, and provide guidelines for implementing stateless server architectures to support production deployments requiring high availability and horizontal scaling.\n\n### Related Issues & PRs\n\n- **Implementation PRs**: n/a\n- **Related PRs**: [#1519](https://github.com/modelcontextprotocol/python-sdk/pull/1519), [#554](https://github.com/modelcontextprotocol/python-sdk/pull/554), [#1116](https://github.com/modelcontextprotocol/python-sdk/pull/1116)\n- **Related Issues**: [#880](https://github.com/modelcontextprotocol/python-sdk/issues/880), [#520](https://github.com/modelcontextprotocol/python-sdk/issues/520), [#692](https://github.com/modelcontextprotocol/python-sdk/issues/692)",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1544/reactions",
        "total_count": 0,
        "+1": 0,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1523",
      "id": 3561773126,
      "node_id": "I_kwDOM2n80s7UTFhG",
      "number": 1523,
      "title": "OAuthClientProvider._handle_token_response expect json",
      "user": {
        "login": "cfytrok",
        "id": 29511727,
        "node_id": "MDQ6VXNlcjI5NTExNzI3",
        "avatar_url": "https://avatars.githubusercontent.com/u/29511727?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/cfytrok",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 7511840554,
          "node_id": "LA_kwDOM2n80s8AAAABv72XKg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/bug",
          "name": "bug",
          "color": "d73a4a",
          "default": true,
          "description": "Something isn't working"
        },
        "1": {
          "id": 9354761244,
          "node_id": "LA_kwDOM2n80s8AAAACLZZUHA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/ready%20for%20work",
          "name": "ready for work",
          "color": "2b9402",
          "default": false,
          "description": "Enough information for someone to start working on"
        },
        "2": {
          "id": 9354770246,
          "node_id": "LA_kwDOM2n80s8AAAACLZZ3Rg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P2",
          "name": "P2",
          "color": "d2b457",
          "default": false,
          "description": "Moderate issues affecting some users, edge cases, potentially valuable feature"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 0,
      "created_at": "2025-10-28T14:11:29Z",
      "updated_at": "2025-12-02T14:09:44Z",
      "closed_at": null,
      "author_association": "NONE",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "### Initial Checks\n\n- [x] I confirm that I'm using the latest version of MCP Python SDK\n- [x] I confirm that I searched for my issue in https://github.com/modelcontextprotocol/python-sdk/issues before opening this issue\n\n### Description\n\nhttps://github.com/modelcontextprotocol/python-sdk/blob/673423da0d6511127608df3d75360e47e99cb1f1/src/mcp/client/auth.py#L437\nOAuthClientProvider._handle_token_response expects JSON, but doesn't specify this in the headers. If the server responds in a different format, an exception will be raised.\n\nFor example, https://docs.github.com/en/apps/oauth-apps/building-oauth-apps/authorizing-oauth-apps#2-users-are-redirected-back-to-your-site-by-github\naccess_token endpoint by default returns form-data and requires the Accept: application/json header to return json.\n\n\n### Example Code\n\n```Python\n\n```\n\n### Python & MCP Python SDK\n\n```Text\npython 3.11.9\nmcp=1.16.0\n```",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1523/reactions",
        "total_count": 0,
        "+1": 0,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1522",
      "id": 3560860923,
      "node_id": "I_kwDOM2n80s7UPmz7",
      "number": 1522,
      "title": "How can I invoke my streamable_http_app tool through code to obtain the return result of the stream?",
      "user": {
        "login": "haohuisss",
        "id": 71999497,
        "node_id": "MDQ6VXNlcjcxOTk5NDk3",
        "avatar_url": "https://avatars.githubusercontent.com/u/71999497?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/haohuisss",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 7511840603,
          "node_id": "LA_kwDOM2n80s8AAAABv72XWw",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/question",
          "name": "question",
          "color": "d876e3",
          "default": true,
          "description": "Further information is requested"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 2,
      "created_at": "2025-10-28T10:31:11Z",
      "updated_at": "2025-10-29T01:37:41Z",
      "closed_at": null,
      "author_association": "NONE",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "### Question\n\n```python\nfrom fastmcp import FastMCP\nfrom starlette.routing import Mount\nimport asyncio\nfrom contextlib import asynccontextmanager\n\nmcp = FastMCP(name=\"MyServer\",stateless_http=True)\nmcp_app = mcp.streamable_http_app(path='/mcp')\n\nfrom fastapi import FastAPI\n\n@asynccontextmanager\nasync def main_app_lifespan(app: FastAPI):\n    # do some main app's init work\n    pass\n\napp = FastAPI(lifespan=mcp_app.lifespan, routes=[Mount('/mcp_http_kn', app=mcp_app)])\n\n\n@mcp.tool()\ndef greet(name: str):\n    \"\"\"Greet a user by name in multiple steps.\"\"\"\n    yield \"Hello\"\n    asyncio.sleep(0.5)\n    yield \"111\"\n    asyncio.sleep(0.5)\n    yield name\n    asyncio.sleep(0.5)\n    yield \"!\"\n\n\nif __name__ == \"__main__\":\n    import uvicorn\n    uvicorn.run(app, host=\"0.0.0.0\", port=8803)\n```\n\nThe above is a streaming output service that I built through mcp.\n\nNow I want to call it using streamablehttp_client and get the streaming return result. But I used result = await session.call_tool(\"greet\",arguments={\"name\":\"world\"})\n\nWhat is obtained is always non-flowing. How can I modify my code to obtain the streaming return result?\n\nThe code is as follows:\n\n```python\nimport asyncio\n\nfrom mcp import ClientSession\nfrom mcp.client.streamable_http import streamablehttp_client\n\n\nasync def main():\n    # Connect to a streamable HTTP server\n    async with streamablehttp_client(\"http://x.x.x.x:8803/mcp_http_kn/mcp\") as (\n        read_stream,\n        write_stream,\n        _,\n    ):\n        # Create a session using the client streams\n        async with ClientSession(read_stream, write_stream) as session:\n            # Initialize the connection\n            await session.initialize()\n            # List available tools\n            tools = await session.list_tools()\n            print(f\"Available tools: {[tool.name for tool in tools.tools]}\")\n\n            result = await session.call_tool(\"greet\",arguments={\"name\":\"world\"})\n            if hasattr(result, \"content\"):\n                for content in result.content:\n                    if content.type == \"text\":\n                        print(content.text)\n                    else:\n                        print(content)\n\nif __name__ == \"__main__\":\n    asyncio.run(main())\n```\n\n### Additional Context\n\n_No response_",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1522/reactions",
        "total_count": 0,
        "+1": 0,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1521",
      "id": 3560589825,
      "node_id": "I_kwDOM2n80s7UOkoB",
      "number": 1521,
      "title": "How to manually set client_id client_secret?",
      "user": {
        "login": "cfytrok",
        "id": 29511727,
        "node_id": "MDQ6VXNlcjI5NTExNzI3",
        "avatar_url": "https://avatars.githubusercontent.com/u/29511727?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/cfytrok",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 7511840603,
          "node_id": "LA_kwDOM2n80s8AAAABv72XWw",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/question",
          "name": "question",
          "color": "d876e3",
          "default": true,
          "description": "Further information is requested"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 0,
      "created_at": "2025-10-28T09:27:38Z",
      "updated_at": "2025-10-28T09:27:38Z",
      "closed_at": null,
      "author_association": "NONE",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "### Question\n\nSome MCP servers don't support Dynamic Client Registration (DCR). For example, https://api.githubcopilot.com/mcp/. The [specification ](https://modelcontextprotocol.io/specification/draft/basic/authorization#dynamic-client-registration) doesn't require it. \n\n> MCP clients and authorization servers SHOULD support the OAuth 2.0 Dynamic Client Registration Protocol [RFC7591](https://datatracker.ietf.org/doc/html/rfc7591) to allow MCP clients to obtain OAuth client IDs without user interaction.\n\nI can register the client manually.\n\nI modified the OAuth authentication handler creation in this example. https://github.com/modelcontextprotocol/python-sdk/blob/main/examples/clients/simple-auth-client/mcp_simple_auth_client/main.py#L46\n```python\nstorage = InMemoryTokenStorage()\n\nclient_metadata_dict = {\n    \"client_id\": client_id,\n    \"client_secret\": client_secret,\n\n    \"client_name\": \"Simple Auth Client\",\n    \"redirect_uris\": [\"http://127.0.0.1:8000/auth/github\"],\n    \"grant_types\": [\"authorization_code\", \"refresh_token\"],\n    \"response_types\": [\"code\"],\n    \"token_endpoint_auth_method\": \"client_secret_post\",\n}\nclient_info = OAuthClientInformationFull.model_validate(client_metadata_dict)\n\nawait storage.set_client_info(client_info) # Saving client_info to storage to disable DCR.\n\noauth_auth = OAuthClientProvider(\n    server_url=server_base_url,\n    client_metadata=client_info,\n    storage=storage,\n    redirect_handler=_default_redirect_handler,\n    callback_handler=callback_handler,\n)\n```\nBut accessing the storage directly seems strange. How do I correctly pass the client_id and client_secret to OAuthClientProvider and disable DCR?\n\n### Additional Context\n\n_No response_",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1521/reactions",
        "total_count": 0,
        "+1": 0,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1520",
      "id": 3560190971,
      "node_id": "I_kwDOM2n80s7UNDP7",
      "number": 1520,
      "title": "How to access the current working directory when an MCP server is launched via `claude mcp add ... -- uvx my-mcp`",
      "user": {
        "login": "SepineTam",
        "id": 165980942,
        "node_id": "U_kgDOCeSrDg",
        "avatar_url": "https://avatars.githubusercontent.com/u/165980942?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/SepineTam",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 7511840603,
          "node_id": "LA_kwDOM2n80s8AAAABv72XWw",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/question",
          "name": "question",
          "color": "d876e3",
          "default": true,
          "description": "Further information is requested"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 0,
      "created_at": "2025-10-28T07:31:45Z",
      "updated_at": "2025-10-28T07:31:45Z",
      "closed_at": null,
      "author_association": "NONE",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "### Question\n\n### 📄 Description\n\nWhen developing a custom MCP server using the **MCP Python SDK**, I encountered an issue related to how **Claude Code** and `uvx` manage the working directory (`cwd`) context.\n\nWhen adding the server via:\n\n```\nclaude mcp add my-mcp -- uvx my-mcp\n```\n\nClaude Code launches the MCP server inside a `uvx` execution environment.  \nIn this setup, calling:\n\n```\nimport os\nprint(os.getcwd())\n```\n\ninside the MCP server returns a **temporary cache path under `~/.cache/uv/...`**,  \nrather than the **actual project directory** (i.e., the workspace directory where Claude Code was started).\n\n---\n\n### ⚙️ Actual Behavior\n- The MCP server runs inside the `uvx` sandbox, so its `cwd` is not inherited from Claude Code’s current workspace.\n- There appears to be no standardized way (via the SDK or protocol) to obtain the actual working directory of the Claude Code session.\n- As a result, any file or project-level operation inside the MCP server loses context of the user’s workspace.\n\n---\n\n### 💡 Expected Behavior\nIt would be helpful if the SDK (or Claude Code client) exposed the working directory through one of the following mechanisms:\n\n1. Pass the current workspace path (`cwd`) as part of the MCP connection handshake payload;  \n2. Make it available via an environment variable, e.g. `CLAUDE_CODE_CWD`;  \n3. Provide a higher-level helper function, such as:\n\n```\nfrom mcp import get_workspace_dir\nworkspace = get_workspace_dir()\n```\n\nThis would allow MCP developers to perform file operations relative to the same workspace Claude Code is operating in.\n\n---\n\n### 🧭 Environment\n- Claude Code version: 2.0.22  \n- MCP Python SDK version: latest (as of Oct 2025)  \n- Launch command: `claude mcp add my-mcp -- uvx my-mcp`  \n- OS: macOS  \n- Connection type: stdio  \n\n---\n\n### 🧠 Additional Context\nI’m developing a custom MCP server that needs to perform project-level operations such as reading configuration files, scanning directories, or generating code.  \nHowever, because Claude Code’s runtime context and the `uvx` environment differ, it’s currently not possible to determine the correct working directory from inside the MCP SDK.\n\nIf Claude Code already provides this information during connection setup, could the SDK expose it (e.g., in a connection context object or during the handshake)?  \nOtherwise, adding this capability would be highly valuable for developers building workspace-aware MCP servers.\n\n---\n\n### ✅ Suggested Enhancement\nIf feasible, please consider including the workspace path in the connection metadata that the MCP client (Claude Code) sends to the server, or provide SDK-level access to it for better integration with Claude Code’s environment.\n\n\n### Additional Context\n\n_No response_",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1520/reactions",
        "total_count": 1,
        "+1": 1,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1513",
      "id": 3550259734,
      "node_id": "I_kwDOM2n80s7TnKoW",
      "number": 1513,
      "title": "MCP SDK Pydantic v2 Compatibility Bug Report",
      "user": {
        "login": "rijovarghese9",
        "id": 240038210,
        "node_id": "U_kgDODk6xQg",
        "avatar_url": "https://avatars.githubusercontent.com/u/240038210?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/rijovarghese9",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 7511840554,
          "node_id": "LA_kwDOM2n80s8AAAABv72XKg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/bug",
          "name": "bug",
          "color": "d73a4a",
          "default": true,
          "description": "Something isn't working"
        },
        "1": {
          "id": 9287721887,
          "node_id": "LA_kwDOM2n80s8AAAACKZdjnw",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/needs%20repro",
          "name": "needs repro",
          "color": "e35211",
          "default": false,
          "description": "needs additional information to be able to reproduce bug"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 3,
      "created_at": "2025-10-24T16:51:53Z",
      "updated_at": "2025-11-13T11:02:51Z",
      "closed_at": null,
      "author_association": "NONE",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "### Initial Checks\n\n- [x] I confirm that I'm using the latest version of MCP Python SDK\n- [x] I confirm that I searched for my issue in https://github.com/modelcontextprotocol/python-sdk/issues before opening this issue\n\n### Description\n\n### **Problem Description**\n**Symptoms**\n\nMCP clients consistently fail to connect to MCP servers with the error:\n\n`Error executing MCP tool: Not connected`\n\nThis occurs despite MCP servers being properly configured and running.\n\n**Root Cause**\n\nThe MCP Python SDK uses **Pydantic v1-style serialization patterns** that are incompatible with Pydantic v2. When the SDK attempts to serialize` CallToolResult` objects in tool responses, it produces malformed data structures.\n\n\n### **Impact Assessment**\n**Functional Impact**\n\n- **Critical:** Complete loss of MCP server functionality through the standard MCP client interface\n- **Universal**: Affects all stdio-based MCP servers using the official Python SDK\n- **Workaround Required:** Manual JSON-RPC implementation needed to bypass MCP framework\n\n**Affected Components**\n\n- MCP client-server communication layer\n- Tool response serialization\n- All MCP Python SDK versions (confirmed across multiple versions)\n- Stdio transport protocol implementation\n\n\n**Suggested Implementation**\n```python\n# In MCP SDK - replace problematic serialization\ndef serialize_tool_result(result: CallToolResult) -> dict:\n    # Use Pydantic v2 compatible serialization\n    return result.model_dump()  # Direct dictionary conversion\n```\n\n### Example Code\n\nExpected Behavior:\n\n```python\n# MCP server returns properly structured response\nresult = CallToolResult(\n    content=[TextContent(type=\"text\", text=\"analysis result\")],\n    isError=False\n)\n# Should serialize to: {\"content\": [...], \"isError\": false}\n```\n\nActual Behavior:\n\n```python\n# MCP SDK with Pydantic v2 produces tuple corruption\nresult = CallToolResult(...)  \n# Incorrectly serializes to: [(\"content\", [...]), (\"isError\", false)]\n# Instead of: {\"content\": [...], \"isError\": false}\n```\n\nError Manifestation:\nInput should be a valid dictionary or instance of TextContent `[type=model_type, input_value=('meta', None), input_type=tuple]`\n\nThis indicates the MCP framework is receiving Python tuples where it expects dictionaries.\n\nReproduction Steps\n1. Environment Setup\n# Install MCP SDK (any current version)\npip install mcp\n\n# Create a basic MCP server\n\ntest_server.py:\n\n```python\nfrom mcp.server import Server\nfrom mcp.server.stdio import stdio_server\nfrom mcp.types import CallToolResult, TextContent\n\napp = Server(\"test-server\")\n\n@app.call_tool()\ndef test_tool():\n    return CallToolResult(\n        content=[TextContent(type=\"text\", text=\"Hello World\")],\n        isError=False\n    )\n\n@app.list_tools()\ndef list_tools():\n    return [{\"name\": \"test_tool\", \"description\": \"Test tool\"}]\n\nasync def main():\n    async with stdio_server() as (read_stream, write_stream):\n        await app.run(read_stream, write_stream, app.create_initialization_options())\n\nif __name__ == \"__main__\":\n    import asyncio\n    asyncio.run(main())\n```\n\n2. MCP Client Configuration\n```json\n{\n  \"mcpServers\": {\n    \"test-server\": {\n      \"command\": \"python\",\n      \"args\": [\"test_server.py\"]\n    }\n  }\n}\n```\n\n3. Attempt Tool Usage\n```python\n# This will fail with \"Not connected\" error\nuse_mcp_tool(\n    server_name=\"test-server\",\n    tool_name=\"test_tool\",\n    arguments={}\n)\n```\n\n### Python & MCP Python SDK\n\n```Text\n__Environment Versions for MCP Bug Report:__\n\n## Python & MCP Python SDK Versions\n\n__Python Version:__ `3.13.5`\n\n__MCP SDK Version:__ `1.18.0`\n\n__Pydantic Version:__ `2.12.3`\n\n## Additional Context\n\n__Installation Method:__ Virtual environment (`venv`)\n\n__Platform:__ Windows 11 Pro (x64)\n\n__MCP Server Implementation:__ Custom stdio-based MCP server for WinDbg crash analysis\n\n__Issue Confirmed On:__ MCP SDK version 1.18.0 with Pydantic 2.12.3\n\n## Version History Tested\n\nDuring troubleshooting, we tested multiple MCP SDK versions:\n\n- ✅ `1.18.0` (current) - __Bug confirmed__\n- ✅ `1.12.3` (downgraded) - __Bug still present__\n- ❌ `<1.12.4` (earlier versions) - Still had serialization issues\n\n__Note:__ The bug persists across MCP SDK versions and appears to be a fundamental Pydantic v1/v2 compatibility issue in the MCP framework's serialization logic.\n\nThis issue prevents the adoption and use of MCP servers through standard MCP clients and requires urgent attention to restore compatibility with modern Python environments.\n```",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1513/reactions",
        "total_count": 1,
        "+1": 1,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1512",
      "id": 3548871735,
      "node_id": "I_kwDOM2n80s7Th3w3",
      "number": 1512,
      "title": "Add client subscription and server event broadcasting",
      "user": {
        "login": "venetak",
        "id": 19714551,
        "node_id": "MDQ6VXNlcjE5NzE0NTUx",
        "avatar_url": "https://avatars.githubusercontent.com/u/19714551?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/venetak",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 7511840603,
          "node_id": "LA_kwDOM2n80s8AAAABv72XWw",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/question",
          "name": "question",
          "color": "d876e3",
          "default": true,
          "description": "Further information is requested"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 0,
      "created_at": "2025-10-24T11:01:20Z",
      "updated_at": "2025-10-24T11:01:20Z",
      "closed_at": null,
      "author_association": "NONE",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "### Question\n\nHello,\n\nI am trying to implement a pub/sub pattern for client event subscriptions. I need it to enable communication between AI agents via an MCP server. [This is the message flow](https://modelcontextprotocol.io/specification/2025-06-18/server/resources#message-flow) that I'm trying to achieve, but between two clients like this:\n\n1. **ClientA subscribe → MCP**\n    - ClientA registers itself as a subscriber with the MCP server\n    - It's expressing interest in receiving certain types of events/messages\n\n2. **ClientB trigger event → MCP**\n    - ClientB sends an event or message to the MCP server\n    - ClientB acts as a publisher/producer of events\n\n3. **MCP broadcast → subscribers(ClientA)**\n    - The MCP server receives the event from ClientB\n    - It then broadcasts/forwards that event to all registered subscribers\n    - In this case, ClientA receives the event\n\nI can send notifications [through the context](https://github.com/modelcontextprotocol/python-sdk?tab=readme-ov-file#logging-and-notifications)(this is pseudo code):\n\nMCP Server:\n```py\nasync def logging_enabled_tool(ctx: Context) -> None:\n    \"\"\"Send back notifications to current session.\"\"\"\n\n    log_notification = LoggingMessageNotification(\n        method=\"notifications/message\",\n        params={ \"level\": \"info\", \"data\": \"Some message...\"}\n    )\n\n    await ctx.session.send_notification(log_notification)\n```\n\nMCP Client:\n```py\nasync def handle_notifications(params: LoggingMessageNotificationParams) -> None:\n    \"\"\"Handle logging notifications.\"\"\"\n    print(f\"Received log message: {params}\")\n\n async with streamablehttp_client(\n            f\"{app_url}\", auth=DatabricksOAuthClientProvider(workspace_client)\n        ) as (read_stream, write_stream, _), ClientSession(\n            read_stream, write_stream, logging_callback=handle_notifications\n        ) as session:\n             await session.initialize()\n\n            result = await session.call_tool(\"logging_enabled_tool\")\n            print(f\"Result from tool: {result.content}\")\n```\n\nThis example works because the notification is sent back to the client during tool execution. However, I need an option to subscribe multiple sessions to events that will be asynchronously broadcast by the server at any point in time.\n\nClientA:\n```py\nclient_session.call_tool(\"subscribe\", { \"event\": \"event-name\" })\n# response: successfully subscribed to event...\n```\n\nServer:\n```py\ndef subscribe(server, ctx: Context) -> str:\n    # keep reference to all subscribed sessions\n    server.subscribers.append(ctx.session)\n    return \"Subscribed to notifications.\"\n\nasync def broadcast_message(arguments: Dict[str, Any]) -> None:\n    \"\"\"Broadcast a message to all connected sessions.\"\"\"\n    # include arguments.get(\"event\") in the LoggingMessageNotification\n    log_notification = LoggingMessageNotification(...)\n\n    for session in server.subscribers:\n        await session.send_notification(log_notification)\n```\n\nClientB:\n```py\nclient_session.call_tool(\"broadcast_message\", { \"event\": \"event-name\" })\n# response: broadcasted message to N clients...\n```\n\nFor this to work, ClientA should await indefinitely; otherwise, the handle_notifications callback is not called:\n\n```py\n async with streamablehttp_client(...) as (...), ClientSession(\n            read_stream, write_stream, logging_callback=handle_notifications\n        ) as session:\n           # initialize... \n           # subscribe...\n          \n           # and wait\n           await asyncio.Future()\n```\n\nThis approach doesn't work for my needs as I am initializing connection to the MCP from an AI agent and I need the agent to stay responsive, this blocks all execution.\n\nNot sure if the streamablehttp transport is the best approach, I'm trying to follow the documentation as much as possible. Other suggestions are more than welcome. The core functionality that I need is async communication between Agents. The MCP is also required as we need it for other important tools. We thought we can also use it for communication between agents.\n\nA little more context about the environment:\n- The Agents are MCP tool-calling LangGraph agents in Databricks - https://docs.databricks.com/aws/en/notebooks/source/generative-ai/langgraph-mcp-tool-calling-agent.html\n- The MCP is a custom MCP hosted on Databricks App - https://docs.databricks.com/aws/en/generative-ai/mcp/custom-m\n\n\n### Additional Context\n\n_No response_",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1512/reactions",
        "total_count": 0,
        "+1": 0,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1509",
      "id": 3544627843,
      "node_id": "I_kwDOM2n80s7TRrqD",
      "number": 1509,
      "title": "Support Per-Request HTTP Headers in call_tool()",
      "user": {
        "login": "damianoneill",
        "id": 15426674,
        "node_id": "MDQ6VXNlcjE1NDI2Njc0",
        "avatar_url": "https://avatars.githubusercontent.com/u/15426674?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/damianoneill",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 9354757189,
          "node_id": "LA_kwDOM2n80s8AAAACLZZERQ",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/enhancement",
          "name": "enhancement",
          "color": "11b5cc",
          "default": true,
          "description": "Request for a new feature that's not currently supported"
        },
        "1": {
          "id": 9354761244,
          "node_id": "LA_kwDOM2n80s8AAAACLZZUHA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/ready%20for%20work",
          "name": "ready for work",
          "color": "2b9402",
          "default": false,
          "description": "Enough information for someone to start working on"
        },
        "2": {
          "id": 9354767859,
          "node_id": "LA_kwDOM2n80s8AAAACLZZt8w",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P1",
          "name": "P1",
          "color": "895d17",
          "default": false,
          "description": "Significant bug affecting many users, highly requested feature"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 2,
      "created_at": "2025-10-23T13:07:34Z",
      "updated_at": "2025-10-29T11:08:57Z",
      "closed_at": null,
      "author_association": "NONE",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "### Description\n\n\n**Related Issues**: #638, #600, #1305\n\n\nSummary\n\nAdd support for passing custom HTTP headers on a per-request basis when calling MCP tools via `ClientSession.call_tool()`. This is needed for multi-tenant applications where different requests require different authentication tokens or request-specific metadata headers while maintaining a single persistent MCP connection.\n\nUse Case: Multi-Tenant SaaS Applications\n\nIn multi-tenant deployments, a single application instance serves multiple users/tenants concurrently. Each user request needs to include tenant-specific authentication headers when calling MCP tools, but creating a new MCP connection per request introduces unacceptable latency:\n\n- Connection establishment: ~500ms overhead per request\n- At 1000 concurrent users: 8.3 minutes of cumulative overhead per minute\n- Connection pooling doesn't help because each user needs different headers\n\nCurrent State: Headers can only be set at connection initialization in `streamablehttp_client()`, making them static for the connection lifetime.\n\nDesired State: Ability to pass custom headers per `call_tool()` invocation while maintaining a single persistent connection.\n\nRelated Use Cases\n\nThis pattern appears in several scenarios:\n\n1. Per-request authentication - Different auth tokens per user (Issue #638)\n2. Request tracing - Correlation IDs, trace IDs for distributed systems\n3. Rate limiting - User-specific rate limit tokens\n4. A/B testing - Feature flags or experiment IDs\n5. Tenant isolation - Tenant identifiers for data partitioning\n\nCurrent Behavior\n\n```python\nfrom mcp.client.streamable_http import streamablehttp_client\n\n# Headers set at connection time - static for connection lifetime\nasync with streamablehttp_client(\n    url=\"https://mcp.example.com\",\n    headers={\"Authorization\": \"Bearer static-token\"},  # Cannot change per-request\n) as (read_stream, write_stream, get_session_id):\n    async with ClientSession(read_stream, write_stream) as session:\n        # User A's request\n        result = await session.call_tool(\"list_sites\", {})  # Uses static token\n        \n        # User B's request (needs different token)\n        result = await session.call_tool(\"list_sites\", {})  # Still uses static token\n```\n\nProposed Solution\n\nOption 1: Add `extra_headers` Parameter to `call_tool()`\n\nSimilar to how `read_timeout_seconds` was added for per-request timeout configuration (Issue #600), add an optional parameter for per-request headers:\n\n```python\nasync def call_tool(\n    self,\n    name: str,\n    arguments: dict[str, Any] | None = None,\n    read_timeout_seconds: timedelta | None = None,\n    progress_callback: ProgressFnT | None = None,\n    *,\n    meta: dict[str, Any] | None = None,\n    extra_headers: dict[str, str] | None = None,  # NEW\n) -> types.CallToolResult:\n    \"\"\"\n    Send a tools/call request.\n    \n    Args:\n        extra_headers: Additional HTTP headers to include in this specific request.\n                      These are merged with connection-level headers, with extra_headers\n                      taking precedence for duplicate keys.\n    \"\"\"\n```\n\n**Usage Example**:\n\n```python\nasync with streamablehttp_client(\n    url=\"https://mcp.example.com\",\n    headers={\"Authorization\": \"Bearer org-token\"},  # Organization-level auth\n) as (read_stream, write_stream, get_session_id):\n    async with ClientSession(read_stream, write_stream) as session:\n        # User A's request\n        result = await session.call_tool(\n            \"list_sites\",\n            {},\n            extra_headers={\"X-Auth-Token\": \"user-a-token\", \"X-Trace-Id\": \"trace-123\"}\n        )\n        \n        # User B's request\n        result = await session.call_tool(\n            \"list_sites\",\n            {},\n            extra_headers={\"X-Auth-Token\": \"user-b-token\", \"X-Trace-Id\": \"trace-456\"}\n        )\n```\n\nImplementation Notes:\n\n1. Modify `ClientSession.call_tool()` signature to accept `extra_headers`\n2. Pass headers to transport layer via request context\n3. In `StreamableHTTPTransport._handle_post_request()`, merge extra_headers with base headers\n4. Extra headers take precedence over connection-level headers for duplicate keys\n\n\nOption 2: Extend Transport Context\n\nAdd headers to the existing `RequestContext` mechanism:\n\n```python\n# In StreamableHTTPTransport\nasync def _handle_post_request(\n    self, \n    ctx: RequestContext,\n    extra_headers: dict[str, str] | None = None  # NEW\n) -> None:\n    headers = self._prepare_request_headers(ctx.headers)\n    if extra_headers:\n        headers.update(extra_headers)  # Merge per-request headers\n    \n    async with ctx.client.stream(\"POST\", self.url, json=message, headers=headers):\n        ...\n```\n\nBackward Compatibility\n\nAll proposed solutions are backward compatible:\n\n- `extra_headers` parameter is optional (defaults to `None`)\n- Existing code continues to work unchanged\n- No breaking changes to MCP protocol or message format\n- Headers are HTTP transport-specific, not part of JSON-RPC messages\n\nPrecedent\n\nThe SDK already supports per-request configuration for timeouts:\n\n```python\nresult = await session.call_tool(\n    \"slow_operation\",\n    {},\n    read_timeout_seconds=timedelta(seconds=120)  # Per-request timeout\n)\n```\n\nThis establishes a pattern that certain aspects of tool invocation may need per-request customization beyond the JSON-RPC protocol itself.\n\n\nNon-Solution: Per-Request Connections\n\nCreating a new connection per request defeats the purpose of persistent connections and introduces significant latency overhead.\n\n\nImplementation Considerations\n\nHeader Merging Strategy\n\nConnection-level headers should be merged with per-request headers:\n\n```python\ndef _merge_headers(\n    base_headers: dict[str, str],\n    extra_headers: dict[str, str] | None\n) -> dict[str, str]:\n    \"\"\"Merge headers with extra_headers taking precedence.\"\"\"\n    merged = base_headers.copy()\n    if extra_headers:\n        merged.update(extra_headers)\n    return merged\n```\n\nTransport-Specific\n\nThis feature should only affect HTTP-based transports (Streamable HTTP, SSE). Stdio transport would ignore `extra_headers` as it has no HTTP layer.\n\nSecurity Considerations\n\nPer-request headers enable proper security patterns:\n\n- Least-privilege: Each request carries only the permissions it needs\n- Token rotation: Different tokens can be used without reconnecting\n- Audit trails: Request-specific correlation IDs for logging\n\n\nRelated Issues\n\n- #638 - FastMCP Auth Context in tools (same root problem)\n- #600 - Per-request timeout configuration (precedent for per-request parameters)\n- #1305 - Secure Tool/Resource/Prompt Decorators with Auth (related auth concern)\n\n\nI'm willing to contribute a pull request implementing this feature if the approach is acceptable to maintainers. Our production use case requires this functionality, and we believe it would benefit the broader MCP community.\n\nThanks,\nDamian.\n\n### References\n\n_No response_",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1509/reactions",
        "total_count": 0,
        "+1": 0,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1502",
      "id": 3534328337,
      "node_id": "I_kwDOM2n80s7SqZIR",
      "number": 1502,
      "title": "`_handle_token_response` should accept `201` responses",
      "user": {
        "login": "jnjpng",
        "id": 13899997,
        "node_id": "MDQ6VXNlcjEzODk5OTk3",
        "avatar_url": "https://avatars.githubusercontent.com/u/13899997?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/jnjpng",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 9301360597,
          "node_id": "LA_kwDOM2n80s8AAAACKmd_1Q",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/auth",
          "name": "auth",
          "color": "92ad2d",
          "default": false,
          "description": "Issues and PRs related to Authentication / OAuth"
        },
        "1": {
          "id": 9354770246,
          "node_id": "LA_kwDOM2n80s8AAAACLZZ3Rg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P2",
          "name": "P2",
          "color": "d2b457",
          "default": false,
          "description": "Moderate issues affecting some users, edge cases, potentially valuable feature"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 0,
      "created_at": "2025-10-20T23:53:05Z",
      "updated_at": "2025-12-02T14:08:18Z",
      "closed_at": null,
      "author_association": "NONE",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "https://github.com/modelcontextprotocol/python-sdk/blob/40acbc596c727e8ccc58c69df8e93e9cf6e56a4e/src/mcp/client/auth.py#L432\n\nMCP servers such as https://supabase.com/docs/guides/getting-started/mcp will return `201` on successful token exchange. The current logic breaks the flow even after the exchange has been successful on the resource side - something as simple as the following fixes throwing an unnecessary error here.\n\n```\n...\nif response.status_code != 200 and response.status_code != 201:\n    raise OAuthTokenError(f\"Token exchange failed: {response.status_code}\")\n....\n```\n",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1502/reactions",
        "total_count": 0,
        "+1": 0,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": [
        1503
      ]
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1480",
      "id": 3514937716,
      "node_id": "I_kwDOM2n80s7RgbF0",
      "number": 1480,
      "title": "Token endpoint returns incorrect error code for client authentication failures",
      "user": {
        "login": "AnkeshThakur",
        "id": 1591848,
        "node_id": "MDQ6VXNlcjE1OTE4NDg=",
        "avatar_url": "https://avatars.githubusercontent.com/u/1591848?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/AnkeshThakur",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 7511840554,
          "node_id": "LA_kwDOM2n80s8AAAABv72XKg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/bug",
          "name": "bug",
          "color": "d73a4a",
          "default": true,
          "description": "Something isn't working"
        },
        "1": {
          "id": 9301360597,
          "node_id": "LA_kwDOM2n80s8AAAACKmd_1Q",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/auth",
          "name": "auth",
          "color": "92ad2d",
          "default": false,
          "description": "Issues and PRs related to Authentication / OAuth"
        },
        "2": {
          "id": 9354761244,
          "node_id": "LA_kwDOM2n80s8AAAACLZZUHA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/ready%20for%20work",
          "name": "ready for work",
          "color": "2b9402",
          "default": false,
          "description": "Enough information for someone to start working on"
        },
        "3": {
          "id": 9354767859,
          "node_id": "LA_kwDOM2n80s8AAAACLZZt8w",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P1",
          "name": "P1",
          "color": "895d17",
          "default": false,
          "description": "Significant bug affecting many users, highly requested feature"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 0,
      "created_at": "2025-10-14T17:55:53Z",
      "updated_at": "2025-10-14T18:11:21Z",
      "closed_at": null,
      "author_association": "NONE",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "### Initial Checks\n\n- [x] I confirm that I'm using the latest version of MCP Python SDK\n- [x] I confirm that I searched for my issue in https://github.com/modelcontextprotocol/python-sdk/issues before opening this issue\n\n### Description\n\nThe OAuth token endpoint (`/token`) returns `unauthorized_client` error when client authentication fails, but RFC 6749 specifies this should be `invalid_client`.\n #### Current Behavior\n When a client fails authentication at the token endpoint (wrong credentials, unknown client_id, missing client_secret), the endpoint returns:\n ```json\n {\n   \"error\": \"unauthorized_client\",\n   \"error_description\": \"Invalid client_id\"\n }\n ```\n\n #### Expected Behavior\n According to [RFC 6749 Section 5.2](https://datatracker.ietf.org/doc/html/rfc6749#section-5.2), client authentication failures should return `invalid_client`:\n ```json\n {\n   \"error\": \"invalid_client\",\n   \"error_description\": \"Invalid client_id\"\n }\n ```\n \n RFC 6749 Section 5.2 defines two distinct error codes with specific meanings:\n | Error Code | When to Use |\n |------------|-------------|\n | **`invalid_client`** | Client **authentication failed** (e.g., unknown client, no client authentication included, or unsupported authentication method). |\n | **`unauthorized_client`** | The authenticated client is **not authorized** to use this authorization grant type. |\n\n The key distinction:\n - **`invalid_client`** = authentication failure (identity could not be verified)\n - **`unauthorized_client`** = authorization failure (identity verified, but not permitted to use the grant type)\n \n \n\n The code catches `AuthenticationError`, which indicates the client **failed to authenticate**:\n ```python\n try:\n     client_info = await self.client_authenticator.authenticate(\n         client_id=token_request.client_id,\n         client_secret=token_request.client_secret,\n     )\n except AuthenticationError as e:  # Authentication failed\n     # Should return \"invalid_client\", not \"unauthorized_client\"\n ```\n \nRFC 6749 provides `unsupported_grant_type` as the specific error for grant type authorization failures, which is even more precise than `unauthorized_client`. The authorization check (which should use `unauthorized_client`) is correctly implemented later:\n ```python\n if token_request.grant_type not in client_info.grant_types:\n     return self.response(\n         TokenErrorResponse(\n             error=\"unsupported_grant_type\",  # Correct for this case\n             error_description=f\"Unsupported grant type...\"\n         )\n     )\n ```\n\n#### Proposed Fix\n Change the error code from `\"unauthorized_client\"` to `\"invalid_client\"` in `src/mcp/server/auth/handlers/token.py`:\n ```python\n except AuthenticationError as e:\n     return self.response(\n         TokenErrorResponse(\n             error=\"invalid_client\",  # Correct per RFC 6749\n             error_description=e.message,\n         )\n     )\n ```\n\n### Example Code\n\n```Python\n\n```\n\n### Python & MCP Python SDK\n\n```Text\nPython 3.12.4\n\n\nmcp version: 1.17.0\n\n```",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1480/reactions",
        "total_count": 0,
        "+1": 0,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": [
        1481
      ]
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1477",
      "id": 3512608173,
      "node_id": "I_kwDOM2n80s7RXiWt",
      "number": 1477,
      "title": "Test fails in a Windows system with a proxy enabled",
      "user": {
        "login": "Chenzhen-Ye",
        "id": 77325309,
        "node_id": "MDQ6VXNlcjc3MzI1MzA5",
        "avatar_url": "https://avatars.githubusercontent.com/u/77325309?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/Chenzhen-Ye",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 7511840554,
          "node_id": "LA_kwDOM2n80s8AAAABv72XKg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/bug",
          "name": "bug",
          "color": "d73a4a",
          "default": true,
          "description": "Something isn't working"
        },
        "1": {
          "id": 7511840581,
          "node_id": "LA_kwDOM2n80s8AAAABv72XRQ",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/good%20first%20issue",
          "name": "good first issue",
          "color": "7057ff",
          "default": true,
          "description": "Good for newcomers"
        },
        "2": {
          "id": 9354772110,
          "node_id": "LA_kwDOM2n80s8AAAACLZZ-jg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P3",
          "name": "P3",
          "color": "c7df49",
          "default": false,
          "description": "Nice to haves, rare edge cases"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 0,
      "created_at": "2025-10-14T06:54:35Z",
      "updated_at": "2025-12-02T14:06:53Z",
      "closed_at": null,
      "author_association": "NONE",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "### Initial Checks\n\n- [x] I confirm that I'm using the latest version of MCP Python SDK\n- [x] I confirm that I searched for my issue in https://github.com/modelcontextprotocol/python-sdk/issues before opening this issue\n\n### Description\n\nIn a Windows system with a proxy enabled, some tests fail when accessing 127.0.0.1 through the proxy.\n\nThe test fails:\n<img width=\"735\" height=\"24\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/6f05f121-8740-49c2-901d-1c66cd09d720\" />\n\n### Suggestion\nWhen testing, set environment variables to avoid using localhost through a proxy. \n\nAdd to tests/conftest.py:\n```Python\nimport os \nos.environ[NO_PROXY] = '127.0.0.1`\n```\n\n### Example Code\n\n```Python\nuv run pytest\n```\n\n### Python & MCP Python SDK\n\n```Text\nPython version: 3.11\nMCP Python SDK：latest\n```",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1477/reactions",
        "total_count": 0,
        "+1": 0,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1475",
      "id": 3511060856,
      "node_id": "I_kwDOM2n80s7RRol4",
      "number": 1475,
      "title": "FastMCP: Support dynamic annotation updates",
      "user": {
        "login": "maxisbey",
        "id": 224885523,
        "node_id": "U_kgDODWd7Ew",
        "avatar_url": "https://avatars.githubusercontent.com/u/224885523?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/maxisbey",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 9331338299,
          "node_id": "LA_kwDOM2n80s8AAAACLDDsOw",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/improves%20spec%20compliance",
          "name": "improves spec compliance",
          "color": "9FD9BD",
          "default": false,
          "description": "When a change improves ability of SDK users to comply with spec definition"
        },
        "1": {
          "id": 9354757189,
          "node_id": "LA_kwDOM2n80s8AAAACLZZERQ",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/enhancement",
          "name": "enhancement",
          "color": "11b5cc",
          "default": true,
          "description": "Request for a new feature that's not currently supported"
        },
        "2": {
          "id": 9354770246,
          "node_id": "LA_kwDOM2n80s8AAAACLZZ3Rg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P2",
          "name": "P2",
          "color": "d2b457",
          "default": false,
          "description": "Moderate issues affecting some users, edge cases, potentially valuable feature"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/milestones/22",
        "id": 13811612,
        "node_id": "MI_kwDOM2n80s4A0r-c",
        "number": 22,
        "title": "FastMCP issues",
        "description": null,
        "creator": {
          "login": "felixweinberger",
          "id": 3823880,
          "node_id": "MDQ6VXNlcjM4MjM4ODA=",
          "avatar_url": "https://avatars.githubusercontent.com/u/3823880?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/felixweinberger",
          "type": "User",
          "user_view_type": "public",
          "site_admin": false
        },
        "open_issues": 10,
        "closed_issues": 1,
        "state": "open",
        "created_at": "2025-10-03T14:23:32Z",
        "updated_at": "2025-12-04T09:48:23Z",
        "due_on": null,
        "closed_at": null
      },
      "comments": 2,
      "created_at": "2025-10-13T18:28:38Z",
      "updated_at": "2025-10-15T13:18:13Z",
      "closed_at": null,
      "author_association": "CONTRIBUTOR",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "## Problem\n\nFastMCP will support resource annotations (audience, priority, lastModified) via the `@mcp.resource()` decorator (see #1468). However, annotations are set once at decoration time and cannot be updated as the server runs.\n\nThis is problematic for `lastModified` especially. If you annotate a file resource, there's no easy way to keep the timestamp current as the file changes:\n\n```python\n@mcp.resource(\"file://docs/readme.md\", annotations=Annotations(\n    audience=[\"user\"],\n    lastModified=\"2025-01-12T15:00:58Z\"\n))\ndef read_readme() -> str:\n    return open(\"readme.md\").read()\n```\n\nOnce deployed, this annotation is stale. If the file updates tomorrow, clients see outdated metadata.\n\n## Solution\n\nAllow annotations to be updated dynamically. Possible approaches:\n- Provide a method to update resource annotations at runtime\n- Allow annotation callables/lambdas that compute values on each `list_resources()` call\n- Return fresh annotations from resource handler functions\n\nThis would enable:\n- Accurate `lastModified` timestamps from file mtimes\n- Dynamic audience/priority based on server state\n- Better integration with external data sources\n\n---\n\n*Issue written by Claude, reviewed by @maxisbey*",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1475/reactions",
        "total_count": 1,
        "+1": 1,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1474",
      "id": 3510752049,
      "node_id": "I_kwDOM2n80s7RQdMx",
      "number": 1474,
      "title": "Pyright",
      "user": {
        "login": "OS-anasantos",
        "id": 103270586,
        "node_id": "U_kgDOBifIug",
        "avatar_url": "https://avatars.githubusercontent.com/u/103270586?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/OS-anasantos",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 7511840603,
          "node_id": "LA_kwDOM2n80s8AAAABv72XWw",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/question",
          "name": "question",
          "color": "d876e3",
          "default": true,
          "description": "Further information is requested"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 1,
      "created_at": "2025-10-13T16:51:35Z",
      "updated_at": "2025-12-03T23:20:45Z",
      "closed_at": null,
      "author_association": "NONE",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "### Question\n\nAccording to the Contributing.md, we need to run type checking \"uv run pyright\" but without any change in code, this command already returns errors like the following:\n\n<img width=\"1433\" height=\"256\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/1e835167-3dde-4ea0-8e0c-f8ffcd80300c\" />\n\nI'm running the command on PowerShell inside a virtual environment.\n\nAm I missing some configuration?\n\n### Additional Context\n\nMCP Python: 1.17.0\nPython: 3.12\nOS: Windows 11\npyright: 1.1.405",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1474/reactions",
        "total_count": 0,
        "+1": 0,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1470",
      "id": 3509711427,
      "node_id": "I_kwDOM2n80s7RMfJD",
      "number": 1470,
      "title": "SSLV3_ALERT_HANDSHAKE_FAILURE when using private gateway",
      "user": {
        "login": "OS-anasantos",
        "id": 103270586,
        "node_id": "U_kgDOBifIug",
        "avatar_url": "https://avatars.githubusercontent.com/u/103270586?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/OS-anasantos",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 7511840554,
          "node_id": "LA_kwDOM2n80s8AAAABv72XKg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/bug",
          "name": "bug",
          "color": "d73a4a",
          "default": true,
          "description": "Something isn't working"
        },
        "1": {
          "id": 9354770246,
          "node_id": "LA_kwDOM2n80s8AAAACLZZ3Rg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P2",
          "name": "P2",
          "color": "d2b457",
          "default": false,
          "description": "Moderate issues affecting some users, edge cases, potentially valuable feature"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 1,
      "created_at": "2025-10-13T11:41:45Z",
      "updated_at": "2025-12-02T14:05:19Z",
      "closed_at": null,
      "author_association": "NONE",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "### Initial Checks\n\n- [x] I confirm that I'm using the latest version of MCP Python SDK\n- [x] I confirm that I searched for my issue in https://github.com/modelcontextprotocol/python-sdk/issues before opening this issue\n\n### Description\n\nI'm calling an MCP \"https://mcp.deepwiki.com/mcp\" through a private gateway. Because of that, the URL I'm calling is \"https://secure-gateway:8081\", so far so good, but unfortunately, I get _\"ConnectError('[SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:1000)')_\". \n\nUnfortunately, in [_handle_post_request](https://github.com/modelcontextprotocol/python-sdk/blob/61399b386c19af9b9c9277727990a6b3c6a95d83/src/mcp/client/streamable_http.py#L254), even if I send the headers \"X-Forwarded-Host\", they are ignored. It seems that \"sni_hostname\" is only retrieved by using extensions which are not present here. \n\nIs this expected, or is this an issue?\n\n### Example Code\n\n```Python\n\n```\n\n### Python & MCP Python SDK\n\n```Text\nPython: 3.12\nMCP Python: 1.16.0\n```",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1470/reactions",
        "total_count": 0,
        "+1": 0,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": [
        1177
      ]
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1465",
      "id": 3504307739,
      "node_id": "I_kwDOM2n80s7Q334b",
      "number": 1465,
      "title": "Support for OpenAI Apps SDK",
      "user": {
        "login": "BrandonShar",
        "id": 6599653,
        "node_id": "MDQ6VXNlcjY1OTk2NTM=",
        "avatar_url": "https://avatars.githubusercontent.com/u/6599653?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/BrandonShar",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 9354757189,
          "node_id": "LA_kwDOM2n80s8AAAACLZZERQ",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/enhancement",
          "name": "enhancement",
          "color": "11b5cc",
          "default": true,
          "description": "Request for a new feature that's not currently supported"
        },
        "1": {
          "id": 9354761244,
          "node_id": "LA_kwDOM2n80s8AAAACLZZUHA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/ready%20for%20work",
          "name": "ready for work",
          "color": "2b9402",
          "default": false,
          "description": "Enough information for someone to start working on"
        },
        "2": {
          "id": 9354765360,
          "node_id": "LA_kwDOM2n80s8AAAACLZZkMA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P0",
          "name": "P0",
          "color": "a81d34",
          "default": false,
          "description": "Broken core functionality, security issues, critical missing feature"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 1,
      "created_at": "2025-10-10T19:44:07Z",
      "updated_at": "2025-10-21T18:55:43Z",
      "closed_at": null,
      "author_association": "CONTRIBUTOR",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "### Description\n\nOpenAI released their [Apps SDK](https://developers.openai.com/apps-sdk) this past Monday along with an [example repo for implementing this in FastMCP](https://github.com/openai/openai-apps-sdk-examples/blob/main/pizzaz_server_python/main.py). \n\nThe example repo required creating custom handlers in order to support the `_meta` field that the Apps SDK depends on in several places. This field is part of the protocol, but not handled via the SDK.\n\nThis issue is to consolidate the features and existing PRs that are necessary for full support.\n\n- [x] Add Meta to Tool Definitions #1463 \n- [x] Allow Meta to be returned in Tool Call payloads #1459 \n- [ ] Add Meta to Resource Definitions \n\n\n### References\n\nhttps://developers.openai.com/apps-sdk/build/mcp-server\n\nhttps://github.com/openai/openai-apps-sdk-examples/blob/main/pizzaz_server_python/main.py",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1465/reactions",
        "total_count": 0,
        "+1": 0,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1464",
      "id": 3503806898,
      "node_id": "I_kwDOM2n80s7Q19my",
      "number": 1464,
      "title": "Improve docs on how to use `instructions` on `InitializeResult`",
      "user": {
        "login": "felixweinberger",
        "id": 3823880,
        "node_id": "MDQ6VXNlcjM4MjM4ODA=",
        "avatar_url": "https://avatars.githubusercontent.com/u/3823880?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/felixweinberger",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 7511840560,
          "node_id": "LA_kwDOM2n80s8AAAABv72XMA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/documentation",
          "name": "documentation",
          "color": "0075ca",
          "default": true,
          "description": "Improvements or additions to documentation"
        },
        "1": {
          "id": 9354761244,
          "node_id": "LA_kwDOM2n80s8AAAACLZZUHA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/ready%20for%20work",
          "name": "ready for work",
          "color": "2b9402",
          "default": false,
          "description": "Enough information for someone to start working on"
        },
        "2": {
          "id": 9354767859,
          "node_id": "LA_kwDOM2n80s8AAAACLZZt8w",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P1",
          "name": "P1",
          "color": "895d17",
          "default": false,
          "description": "Significant bug affecting many users, highly requested feature"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 2,
      "created_at": "2025-10-10T17:13:26Z",
      "updated_at": "2025-10-10T22:42:30Z",
      "closed_at": null,
      "author_association": "CONTRIBUTOR",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "### Question\n\nLots of people want tool bundling / grouping / namespaces to guide servers how to use  tools together.\n\nWe should make `instructions` more obvious and have examples for how to use it - maybe this can address a lot of requests for bundling and namespaces if it's more obvious this is something you can do.\n\nhttps://modelcontextprotocol.io/specification/2025-06-18/schema#initializeresult-instructions\n\n### Additional Context\n\n_No response_",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1464/reactions",
        "total_count": 1,
        "+1": 1,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1452",
      "id": 3499289650,
      "node_id": "I_kwDOM2n80s7Qkuwy",
      "number": 1452,
      "title": "The `stdio_client` hangs indefinitely on session initialization",
      "user": {
        "login": "Shashikant86",
        "id": 683799,
        "node_id": "MDQ6VXNlcjY4Mzc5OQ==",
        "avatar_url": "https://avatars.githubusercontent.com/u/683799?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/Shashikant86",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 7511840554,
          "node_id": "LA_kwDOM2n80s8AAAABv72XKg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/bug",
          "name": "bug",
          "color": "d73a4a",
          "default": true,
          "description": "Something isn't working"
        },
        "1": {
          "id": 9354761244,
          "node_id": "LA_kwDOM2n80s8AAAACLZZUHA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/ready%20for%20work",
          "name": "ready for work",
          "color": "2b9402",
          "default": false,
          "description": "Enough information for someone to start working on"
        },
        "2": {
          "id": 9354765360,
          "node_id": "LA_kwDOM2n80s8AAAACLZZkMA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P0",
          "name": "P0",
          "color": "a81d34",
          "default": false,
          "description": "Broken core functionality, security issues, critical missing feature"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 2,
      "created_at": "2025-10-09T13:53:47Z",
      "updated_at": "2025-11-18T13:01:28Z",
      "closed_at": null,
      "author_association": "NONE",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "### Initial Checks\n\n- [x] I confirm that I'm using the latest version of MCP Python SDK\n- [x] I confirm that I searched for my issue in https://github.com/modelcontextprotocol/python-sdk/issues before opening this issue\n\n### Description\n\n# The `stdio_client` hangs indefinitely on session initialization\n\n## Environment\n- **OS**: macOS 15.2 \n- **Python**: Python 3.12.11\n- **MCP SDK Version**: 1.16.0\n- **Async Library**: anyio (via asyncio backend)\n\n## Description\nThe `stdio_client()` context manager hangs indefinitely when trying to initialize an MCP session over stdio. The process never completes, even when the MCP server is functioning correctly and responding to JSON-RPC requests.\n\n## Reproduction\n\n### MCP Server (works correctly)\nDirect test shows server responds properly:\n\n```bash\necho '{\"jsonrpc\":\"2.0\",\"method\":\"initialize\",\"params\":{\"protocolVersion\":\"2024-11-05\",\"capabilities\":{},\"clientInfo\":{\"name\":\"test\",\"version\":\"1.0\"}},\"id\":1}' | \\\n  npx -y @modelcontextprotocol/server-filesystem /tmp\n```\n\n**Output:**\n```json\n{\"jsonrpc\":\"2.0\",\"id\":1,\"result\":{\"protocolVersion\":\"2024-11-05\",\"capabilities\":{\"tools\":{}},\"serverInfo\":{\"name\":\"secure-filesystem-server\",\"version\":\"0.2.0\"}}}\n```\n\n### MCP Client (hangs)\n\n```python\nimport asyncio\nfrom mcp import StdioServerParameters, stdio_client\nfrom mcp.client.session import ClientSession\n\nasync def test():\n    server_params = StdioServerParameters(\n        command=\"npx\",\n        args=[\"-y\", \"@modelcontextprotocol/server-filesystem\", \"/tmp\"],\n    )\n\n    async with stdio_client(server_params) as (read, write):\n        session = ClientSession(read, write)\n        await session.initialize()  # Hangs here forever\n\nasyncio.run(test())\n```\n\n**Behavior:** Hangs indefinitely with no output or progress.\n\n## Error Details\n\nAfter timeout (30s), the following error is raised:\n\n```python\nExceptionGroup: unhandled errors in a TaskGroup (2 sub-exceptions)\n+-+---------------- 1 ----------------\n  | Traceback (most recent call last):\n  |   File \"/path/to/mcp/client/stdio/__init__.py\", line 162, in stdout_reader\n  |     await read_stream_writer.send(session_message)\n  |   File \"/path/to/anyio/streams/memory.py\", line 256, in send\n  |     raise BrokenResourceError from None\n  | anyio.BrokenResourceError\n  +---------------- 2 ----------------\n  | Traceback (most recent call last):\n  |   File \"/path/to/asyncio/tasks.py\", line 520, in wait_for\n  |     return await fut\n  |            ^^^^^^^^^\n  |   File \"/path/to/mcp/client/session.py\", line 151, in initialize\n  |     result = await self.send_request(\n  |              ^^^^^^^^^^^^^^^^^^^^^^^^\n  |   File \"/path/to/mcp/shared/session.py\", line 272, in send_request\n  |     response_or_error = await response_stream_reader.receive()\n  |                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  | asyncio.exceptions.CancelledError\n```\n\nThe `stdout_reader` task in `stdio_client` raises `BrokenResourceError` when trying to send parsed messages, suggesting the stdout stream from the subprocess is not being read properly.\n\n## Testing Details\n\n### What works ✅\n- MCP server responds correctly to stdio input when tested directly\n- Manual subprocess with `asyncio.create_subprocess_exec()` works\n- Simple JSON-RPC over subprocess.PIPE works\n\n### What fails ❌\n- `stdio_client()` with `asyncio.run()`\n- `stdio_client()` with `anyio.run()`\n- All MCP client examples using stdio transport\n- Both with npm-based servers and Python-based servers\n\n\n\n## Impact\n\nThis bug makes the Python MCP SDK **completely unusable for stdio transport on macOS**, which is the primary transport method for MCP servers. This affects:\n\n- All local development on macOS\n- Any MCP adapter implementations (like GEPA's MCP adapter)\n\n\n## Notes \n\n- The issue appears specific to anyio's subprocess implementation on macOS\n- Windows/Linux compatibility not tested \n- SSE/HTTP transports may work as alternatives but are not commonly documented or used\n- The issue persists with both `asyncio.run()` and `anyio.run()` as the event loop runner\n\nLet me know if you need more info to reproduce this issue Python 3.12.11\n\n### Example Code\n\n```Python\nimport asyncio\nfrom mcp import StdioServerParameters, stdio_client\nfrom mcp.client.session import ClientSession\n\nasync def test():\n    server_params = StdioServerParameters(\n        command=\"npx\",\n        args=[\"-y\", \"@modelcontextprotocol/server-filesystem\", \"/tmp\"],\n    )\n\n    async with stdio_client(server_params) as (read, write):\n        session = ClientSession(read, write)\n        await session.initialize()  # Hangs here forever\n\nasyncio.run(test())\n```\n\n### Python & MCP Python SDK\n\n```Text\nName: mcp\nVersion: 1.16.0\nSummary: Model Context Protocol SDK\nAuthor-email: \nLicense: MIT\nLocation: /Users/shashi/miniconda3/envs/mcp-adapter/lib/python3.12/site-packages\nRequires: anyio, httpx, httpx-sse, jsonschema, pydantic, pydantic-settings, python-multipart, sse-starlette, starlette, uvicorn\n```",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1452/reactions",
        "total_count": 0,
        "+1": 0,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1450",
      "id": 3497915272,
      "node_id": "I_kwDOM2n80s7QffOI",
      "number": 1450,
      "title": "Response leak in SSE handlers",
      "user": {
        "login": "certainly-param",
        "id": 206301545,
        "node_id": "U_kgDODEvpaQ",
        "avatar_url": "https://avatars.githubusercontent.com/u/206301545?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/certainly-param",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 9287721887,
          "node_id": "LA_kwDOM2n80s8AAAACKZdjnw",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/needs%20repro",
          "name": "needs repro",
          "color": "e35211",
          "default": false,
          "description": "needs additional information to be able to reproduce bug"
        },
        "1": {
          "id": 9354761244,
          "node_id": "LA_kwDOM2n80s8AAAACLZZUHA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/ready%20for%20work",
          "name": "ready for work",
          "color": "2b9402",
          "default": false,
          "description": "Enough information for someone to start working on"
        },
        "2": {
          "id": 9354765360,
          "node_id": "LA_kwDOM2n80s8AAAACLZZkMA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P0",
          "name": "P0",
          "color": "a81d34",
          "default": false,
          "description": "Broken core functionality, security issues, critical missing feature"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/milestones/26",
        "id": 13920691,
        "node_id": "MI_kwDOM2n80s4A1Gmz",
        "number": 26,
        "title": "Resource leaks",
        "description": null,
        "creator": {
          "login": "felixweinberger",
          "id": 3823880,
          "node_id": "MDQ6VXNlcjM4MjM4ODA=",
          "avatar_url": "https://avatars.githubusercontent.com/u/3823880?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/felixweinberger",
          "type": "User",
          "user_view_type": "public",
          "site_admin": false
        },
        "open_issues": 1,
        "closed_issues": 0,
        "state": "open",
        "created_at": "2025-10-17T16:17:19Z",
        "updated_at": "2025-10-17T16:17:21Z",
        "due_on": null,
        "closed_at": null
      },
      "comments": 3,
      "created_at": "2025-10-09T07:11:05Z",
      "updated_at": "2025-10-17T16:18:45Z",
      "closed_at": null,
      "author_association": "NONE",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "I found a resource leak in the streamable HTTP client. When SSE streaming fails with an exception, the HTTP response isn't closed.\n\nLocation:\n`src/mcp/client/streamable_http.py`:\n- `_handle_sse_response` (line 336)\n- `_handle_resumption_request` (line 251)\n\nThe Issue:\npython\nasync def _handle_sse_response(self, response: httpx.Response, ...):\n    try:\n        event_source = EventSource(response)\n        async for sse in event_source.aiter_sse():\n            if is_complete:\n                await response.aclose()  # Only closed here\n                break\n    except Exception as e:\n        await ctx.read_stream_writer.send(e)\n        # response leaked!\n\nIf the SSE iteration raises an exception (malformed JSON, network error, etc.), the response is never closed.\n\nImpact:\nConnection pool gets exhausted in long-running clients, eventually causing new requests to hang or fail.\n\nFix:\ntry:\n    ...\nexcept Exception as e:\n    ...\nfinally:\n    await response.aclose()\n\nBoth methods need this fix.\n\nEnv:\nPython SDK version: 1.1.2 (or main branch)\nPython: 3.12\nTransport: StreamableHTTP",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1450/reactions",
        "total_count": 0,
        "+1": 0,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": [
        1490
      ]
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1437",
      "id": 3488836677,
      "node_id": "I_kwDOM2n80s7P82xF",
      "number": 1437,
      "title": "SSE Hangs After Disconnect",
      "user": {
        "login": "cameronsjo",
        "id": 4084915,
        "node_id": "MDQ6VXNlcjQwODQ5MTU=",
        "avatar_url": "https://avatars.githubusercontent.com/u/4084915?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/cameronsjo",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 7511840554,
          "node_id": "LA_kwDOM2n80s8AAAABv72XKg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/bug",
          "name": "bug",
          "color": "d73a4a",
          "default": true,
          "description": "Something isn't working"
        },
        "1": {
          "id": 9287721887,
          "node_id": "LA_kwDOM2n80s8AAAACKZdjnw",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/needs%20repro",
          "name": "needs repro",
          "color": "e35211",
          "default": false,
          "description": "needs additional information to be able to reproduce bug"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 2,
      "created_at": "2025-10-06T19:51:53Z",
      "updated_at": "2025-11-02T18:25:03Z",
      "closed_at": null,
      "author_association": "NONE",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "When a client connects to an MCP server using SSE transport and disconnects before the server sends any events:\n\n1. Server sends `http.response.start` (HTTP 200 + headers)\n2. Client disconnects before any SSE events are generated\n3. Server never sends `http.response.body` message\n\n[Location](https://github.com/modelcontextprotocol/python-sdk/blob/61399b386c19af9b9c9277727990a6b3c6a95d83/src/mcp/server/streamable_http.py#L450)\n\n--- \n\nI'm limited with how much additional information I can provide. I'm working with my enterprise Open Source team to figure out the proper way to navigate this.",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1437/reactions",
        "total_count": 0,
        "+1": 0,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1429",
      "id": 3487232794,
      "node_id": "I_kwDOM2n80s7P2vMa",
      "number": 1429,
      "title": "feat: enhance dynamic tool management with notifications and enable/disable",
      "user": {
        "login": "maxisbey",
        "id": 224885523,
        "node_id": "U_kgDODWd7Ew",
        "avatar_url": "https://avatars.githubusercontent.com/u/224885523?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/maxisbey",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 9230424293,
          "node_id": "LA_kwDOM2n80s8AAAACJi0Y5Q",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/v2",
          "name": "v2",
          "color": "5d2a87",
          "default": false,
          "description": "Ideas, requests and plans for v2 of the SDK which will incorporate major changes and fixes"
        },
        "1": {
          "id": 9354757189,
          "node_id": "LA_kwDOM2n80s8AAAACLZZERQ",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/enhancement",
          "name": "enhancement",
          "color": "11b5cc",
          "default": true,
          "description": "Request for a new feature that's not currently supported"
        },
        "2": {
          "id": 9354761244,
          "node_id": "LA_kwDOM2n80s8AAAACLZZUHA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/ready%20for%20work",
          "name": "ready for work",
          "color": "2b9402",
          "default": false,
          "description": "Enough information for someone to start working on"
        },
        "3": {
          "id": 9354767859,
          "node_id": "LA_kwDOM2n80s8AAAACLZZt8w",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P1",
          "name": "P1",
          "color": "895d17",
          "default": false,
          "description": "Significant bug affecting many users, highly requested feature"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 2,
      "created_at": "2025-10-06T13:13:00Z",
      "updated_at": "2025-10-09T11:18:13Z",
      "closed_at": null,
      "author_association": "CONTRIBUTOR",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "## Summary\n\nEnhance the Python SDK's dynamic tool management capabilities to match the TypeScript SDK by adding:\n1. Automatic `tools/list_changed` notifications when tools are added/removed\n2. Tool enable/disable functionality (temporary hiding without removal)\n\n## Background\n\nThe Python SDK currently supports adding and removing tools dynamically (see #1322), but lacks two key features present in the TypeScript SDK:\n\n### 1. List Changed Notifications\n\nThe TypeScript SDK automatically sends `notifications/tools/list_changed` when tools are modified. This allows clients to know when they should refresh their tool list.\n\n**Python SDK gap:** Currently, when calling `add_tool()` or `remove_tool()`, clients are not notified of the change and may show stale tool lists.\n\n### 2. Enable/Disable Tools\n\nThe TypeScript SDK provides `enable()` and `disable()` methods on tools:\n```typescript\nconst tool = server.tool(\"myTool\", ..., async () => { ... });\ntool.disable()  // Hides from list_tools, blocks calls\ntool.enable()   // Re-enables the tool\ntool.remove()   // Permanently removes\n```\n\n**Benefits:**\n- Temporarily hide tools without losing registration\n- Re-enable tools without re-registering\n- Useful for permission-based or state-based tool visibility\n\n**Python SDK gap:** Only permanent removal via `remove_tool()` is supported. No way to temporarily disable/re-enable tools.\n\n## References\n\n- Related PR: #1322 (adds `remove_tool` method)\n- TypeScript SDK Dynamic Servers: https://github.com/modelcontextprotocol/typescript-sdk#dynamic-servers\n- MCP spec supports `notifications/tools/list_changed`",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1429/reactions",
        "total_count": 1,
        "+1": 1,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1428",
      "id": 3483088586,
      "node_id": "I_kwDOM2n80s7Pm7bK",
      "number": 1428,
      "title": "Eicitation Context request timeout via streamable-http transport \"MCP error -32001: Request timed out\"",
      "user": {
        "login": "longcld",
        "id": 38462352,
        "node_id": "MDQ6VXNlcjM4NDYyMzUy",
        "avatar_url": "https://avatars.githubusercontent.com/u/38462352?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/longcld",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 7511840554,
          "node_id": "LA_kwDOM2n80s8AAAABv72XKg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/bug",
          "name": "bug",
          "color": "d73a4a",
          "default": true,
          "description": "Something isn't working"
        },
        "1": {
          "id": 9354761244,
          "node_id": "LA_kwDOM2n80s8AAAACLZZUHA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/ready%20for%20work",
          "name": "ready for work",
          "color": "2b9402",
          "default": false,
          "description": "Enough information for someone to start working on"
        },
        "2": {
          "id": 9354765360,
          "node_id": "LA_kwDOM2n80s8AAAACLZZkMA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P0",
          "name": "P0",
          "color": "a81d34",
          "default": false,
          "description": "Broken core functionality, security issues, critical missing feature"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 3,
      "created_at": "2025-10-04T02:44:28Z",
      "updated_at": "2025-10-10T13:32:16Z",
      "closed_at": null,
      "author_association": "NONE",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "### Question\n\nI got \"MCP error -32001: Request timed out\" when using elicitation context method via \"streamable-http\" transport. But it's work successfully with sse or stdio transport.\n\nThe workflow are:\n1. Calling the elicitation tool from client\n2. Server already receive the request calling tool and return the elicitation format\n3. On client, fill information and send back to the server.\n--> The server not receive the input information then return \"MCP error -32001: Request timed out\"\n\n### Additional Context\n\nmcp==1.16.0\npython=3.13",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1428/reactions",
        "total_count": 0,
        "+1": 0,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1410",
      "id": 3463474605,
      "node_id": "I_kwDOM2n80s7OcG2t",
      "number": 1410,
      "title": "Cancelling a Call Tool Request from Client",
      "user": {
        "login": "asheshvidyut",
        "id": 134911583,
        "node_id": "U_kgDOCAqWXw",
        "avatar_url": "https://avatars.githubusercontent.com/u/134911583?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/asheshvidyut",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 7511840560,
          "node_id": "LA_kwDOM2n80s8AAAABv72XMA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/documentation",
          "name": "documentation",
          "color": "0075ca",
          "default": true,
          "description": "Improvements or additions to documentation"
        },
        "1": {
          "id": 7511840603,
          "node_id": "LA_kwDOM2n80s8AAAABv72XWw",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/question",
          "name": "question",
          "color": "d876e3",
          "default": true,
          "description": "Further information is requested"
        },
        "2": {
          "id": 9354761244,
          "node_id": "LA_kwDOM2n80s8AAAACLZZUHA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/ready%20for%20work",
          "name": "ready for work",
          "color": "2b9402",
          "default": false,
          "description": "Enough information for someone to start working on"
        },
        "3": {
          "id": 9354767859,
          "node_id": "LA_kwDOM2n80s8AAAACLZZt8w",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P1",
          "name": "P1",
          "color": "895d17",
          "default": false,
          "description": "Significant bug affecting many users, highly requested feature"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 0,
      "created_at": "2025-09-29T06:37:53Z",
      "updated_at": "2025-10-07T18:10:03Z",
      "closed_at": null,
      "author_association": "NONE",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "### Question\n\nHey Team,\nI have a question regarding cancelling the tool call from client when the MCP server is created from `FastMCP` class. \n\nI see the test - [test_cancel_handling](https://github.com/modelcontextprotocol/python-sdk/blob/main/tests/server/test_cancel_handling.py) but this one uses low level server.\n\nMy question is specifically on how we can get the `request_id` which the client needs for cancelling the call tool request on server. \n```\nawait client.send_notification(\n        ClientNotification(\n            CancelledNotification(\n                params=CancelledNotificationParams(\n                    requestId={request_id},\n                    reason=\"Reson\",\n              ),\n          )\n     )\n)\n```\n\nDo we have to get the request id from `call_tool` request? like below?\n\n```py\n  request_id = None\n  mcp = FastMCP(\n      name=\"Simple gRPC Server\",\n  )\n  @mcp.tool()\n  def get_temperature(city: str, ctx: Context[ServerSession, None]) -> float:\n      # fetching request id from context \n      request_id = ctx.request_context.request_id\n      return 22.5\n  \n```\n\nOr is there another way?\n\n### Additional Context\n\n_No response_",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1410/reactions",
        "total_count": 0,
        "+1": 0,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1409",
      "id": 3461049963,
      "node_id": "I_kwDOM2n80s7OS25r",
      "number": 1409,
      "title": "Remote file support for `mcp run`",
      "user": {
        "login": "uhinze",
        "id": 25585825,
        "node_id": "MDQ6VXNlcjI1NTg1ODI1",
        "avatar_url": "https://avatars.githubusercontent.com/u/25585825?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/uhinze",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 9082681979,
          "node_id": "LA_kwDOM2n80s8AAAACHV66ew",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/needs%20confirmation",
          "name": "needs confirmation",
          "color": "aaaaaa",
          "default": false,
          "description": "Needs confirmation that the PR is actually required or needed."
        },
        "1": {
          "id": 9354757189,
          "node_id": "LA_kwDOM2n80s8AAAACLZZERQ",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/enhancement",
          "name": "enhancement",
          "color": "11b5cc",
          "default": true,
          "description": "Request for a new feature that's not currently supported"
        },
        "2": {
          "id": 9354772110,
          "node_id": "LA_kwDOM2n80s8AAAACLZZ-jg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P3",
          "name": "P3",
          "color": "c7df49",
          "default": false,
          "description": "Nice to haves, rare edge cases"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 3,
      "created_at": "2025-09-28T04:14:07Z",
      "updated_at": "2025-11-12T17:47:08Z",
      "closed_at": null,
      "author_association": "NONE",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "### Description\n\nI have a tiny MCP server [published on Github](https://github.com/uhinze/domain-mcp/blob/main/main.py) (20 lines of Python). Instead of putting in 100x more plumbing work to get it published to PyPi, then have people clone/install, I'd rather just say: here is the `uvx` command to run it from the raw Github file.\n\n`uvx` itself supports this kind of feature using the `--from` syntax, so a possible interface would be:\n\n```\nuvx --with \"mcp[cli]\" mcp run --from https://raw.githubusercontent.com/uhinze/domain-mcp/refs/heads/main/main.py\n```\n\n### References\n\n_No response_",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1409/reactions",
        "total_count": 0,
        "+1": 0,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1405",
      "id": 3457605026,
      "node_id": "I_kwDOM2n80s7OFt2i",
      "number": 1405,
      "title": "It is not possible to define a Resource that takes only the Context parameter as an argument.",
      "user": {
        "login": "0Delta",
        "id": 12265602,
        "node_id": "MDQ6VXNlcjEyMjY1NjAy",
        "avatar_url": "https://avatars.githubusercontent.com/u/12265602?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/0Delta",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 9331338299,
          "node_id": "LA_kwDOM2n80s8AAAACLDDsOw",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/improves%20spec%20compliance",
          "name": "improves spec compliance",
          "color": "9FD9BD",
          "default": false,
          "description": "When a change improves ability of SDK users to comply with spec definition"
        },
        "1": {
          "id": 9354757189,
          "node_id": "LA_kwDOM2n80s8AAAACLZZERQ",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/enhancement",
          "name": "enhancement",
          "color": "11b5cc",
          "default": true,
          "description": "Request for a new feature that's not currently supported"
        },
        "2": {
          "id": 9354761244,
          "node_id": "LA_kwDOM2n80s8AAAACLZZUHA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/ready%20for%20work",
          "name": "ready for work",
          "color": "2b9402",
          "default": false,
          "description": "Enough information for someone to start working on"
        },
        "3": {
          "id": 9354770246,
          "node_id": "LA_kwDOM2n80s8AAAACLZZ3Rg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P2",
          "name": "P2",
          "color": "d2b457",
          "default": false,
          "description": "Moderate issues affecting some users, edge cases, potentially valuable feature"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 2,
      "created_at": "2025-09-26T13:11:58Z",
      "updated_at": "2025-11-12T18:30:47Z",
      "closed_at": null,
      "author_association": "NONE",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "### Initial Checks\n\n- [x] I confirm that I'm using the latest version of MCP Python SDK\n- [x] I confirm that I searched for my issue in https://github.com/modelcontextprotocol/python-sdk/issues before opening this issue\n\n### Description\n\n## Problem\n\nCurrently, it is not possible to define a Resource that takes only the Context parameter as an argument. When attempting to create such a resource, the registration logic incorrectly classifies it as a template resource instead of a regular resource.\n\n## Expected Behavior\n\nResources with only a Context parameter should be registered as regular resources, not template resources.\n\n## Current Behavior\n\nResources with only a Context parameter are incorrectly registered as template resources, causing them to not appear in the resource list and fail when accessed.\n\n## Root Cause\n\nThe parameter validation logic in the `FastMCP.resource()` decorator doesn't properly distinguish between effective function parameters and Context parameters. It treats any function with parameters as a potential template resource, even when the only parameter is a Context.\n\n## Solution\n\n1. Fix the parameter validation logic to exclude Context parameters when determining if a resource should be a template\n2. Update the `Resource.read()` method signature to accept an optional context parameter\n3. Update all resource implementations to support the new signature\n\nThis change maintains full backward compatibility while enabling context-only resources.\n\n### Example Code\n\n```Python\n@mcp.resource(\"resource://user_profile\")\ndef get_user_profile(ctx: Context) -> str:\n    # Something Code ...\n```\n\n### Python & MCP Python SDK\n\n```Text\nPython 3.13.5\nMCP Python SDK v1.15.0\n```",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1405/reactions",
        "total_count": 0,
        "+1": 0,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1401",
      "id": 3453847925,
      "node_id": "I_kwDOM2n80s7N3Yl1",
      "number": 1401,
      "title": "ClientSession Error Handling",
      "user": {
        "login": "Unshure",
        "id": 9397007,
        "node_id": "MDQ6VXNlcjkzOTcwMDc=",
        "avatar_url": "https://avatars.githubusercontent.com/u/9397007?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/Unshure",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 7511840554,
          "node_id": "LA_kwDOM2n80s8AAAABv72XKg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/bug",
          "name": "bug",
          "color": "d73a4a",
          "default": true,
          "description": "Something isn't working"
        },
        "1": {
          "id": 7511840581,
          "node_id": "LA_kwDOM2n80s8AAAABv72XRQ",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/good%20first%20issue",
          "name": "good first issue",
          "color": "7057ff",
          "default": true,
          "description": "Good for newcomers"
        },
        "2": {
          "id": 9354761244,
          "node_id": "LA_kwDOM2n80s8AAAACLZZUHA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/ready%20for%20work",
          "name": "ready for work",
          "color": "2b9402",
          "default": false,
          "description": "Enough information for someone to start working on"
        },
        "3": {
          "id": 9354767859,
          "node_id": "LA_kwDOM2n80s8AAAACLZZt8w",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P1",
          "name": "P1",
          "color": "895d17",
          "default": false,
          "description": "Significant bug affecting many users, highly requested feature"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 2,
      "created_at": "2025-09-25T14:14:46Z",
      "updated_at": "2025-11-28T14:54:38Z",
      "closed_at": null,
      "author_association": "NONE",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "### Question\n\nI work on the Strands SDK, and we have an integration with MCP where we invoke tools through an MCP client. \n\nOur design spins up a thread, creates an asyncio event loop, and schedules a task to create a session with an MCP server using the python-sdk mcp ClientSession: https://github.com/strands-agents/sdk-python/blob/main/src/strands/tools/mcp/mcp_client.py#L391\n\nThen, when an LLM decides to call a tool, or multiple tools, we schedule additional tasks on this thread's event loop to call the mcp server: https://github.com/strands-agents/sdk-python/blob/main/src/strands/tools/mcp/mcp_client.py#L324-L330\n\n\nWe ran into an issue where when the mcp `streamablehttp_client` sse_read_timeout was lower than the time it took for a tool to return, the tool invocation tasks would hang due to an exception that was not propagated out of the ClientSession. We see an exception message (included in the additional context section), but the stack trace never enters our code, it stops in the mcp code.\n\nAfter investigating further, I found that this exception is sent through the [MCP ClientSession `message_handler`](https://github.com/modelcontextprotocol/python-sdk/blob/71889d7387f070cd872cab7c9aa3d1ff1fa5a5d2/src/mcp/client/session.py#L119), and in the default implementation of this message handler, an exception is never raised: https://github.com/modelcontextprotocol/python-sdk/blob/71889d7387f070cd872cab7c9aa3d1ff1fa5a5d2/src/mcp/client/session.py#L57-L60\n\nTo work around this issue, I have introduced my own message_handler to raise an exception passed to it: https://github.com/strands-agents/sdk-python/pull/922\n\nI wanted to know why these exceptions are not raised in the MCP ClientSession? This silent failure took a long time to debug, and I want able to find any documentation on this behavior. As a user of the ClientSession, I would expect these exceptions to be raised so that my code can handle them.\n\n### Additional Context\n\nError stack trace:\n```\nError reading SSE stream:\nTraceback (most recent call last):\n  File \"/Users/ncclegg/Library/Application Support/hatch/env/virtual/strands-agents/X7vsTQrp/strands-agents/lib/python3.13/site-packages/httpx/_transports/default.py\", line 101, in map_httpcore_exceptions\n    yield\n  File \"/Users/ncclegg/Library/Application Support/hatch/env/virtual/strands-agents/X7vsTQrp/strands-agents/lib/python3.13/site-packages/httpx/_transports/default.py\", line 271, in __aiter__\n    async for part in self._httpcore_stream:\n        yield part\n  File \"/Users/ncclegg/Library/Application Support/hatch/env/virtual/strands-agents/X7vsTQrp/strands-agents/lib/python3.13/site-packages/httpcore/_async/connection_pool.py\", line 407, in __aiter__\n    raise exc from None\n  File \"/Users/ncclegg/Library/Application Support/hatch/env/virtual/strands-agents/X7vsTQrp/strands-agents/lib/python3.13/site-packages/httpcore/_async/connection_pool.py\", line 403, in __aiter__\n    async for part in self._stream:\n        yield part\n  File \"/Users/ncclegg/Library/Application Support/hatch/env/virtual/strands-agents/X7vsTQrp/strands-agents/lib/python3.13/site-packages/httpcore/_async/http11.py\", line 342, in __aiter__\n    raise exc\n  File \"/Users/ncclegg/Library/Application Support/hatch/env/virtual/strands-agents/X7vsTQrp/strands-agents/lib/python3.13/site-packages/httpcore/_async/http11.py\", line 334, in __aiter__\n    async for chunk in self._connection._receive_response_body(**kwargs):\n        yield chunk\n  File \"/Users/ncclegg/Library/Application Support/hatch/env/virtual/strands-agents/X7vsTQrp/strands-agents/lib/python3.13/site-packages/httpcore/_async/http11.py\", line 203, in _receive_response_body\n    event = await self._receive_event(timeout=timeout)\n            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/Users/ncclegg/Library/Application Support/hatch/env/virtual/strands-agents/X7vsTQrp/strands-agents/lib/python3.13/site-packages/httpcore/_async/http11.py\", line 217, in _receive_event\n    data = await self._network_stream.read(\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n        self.READ_NUM_BYTES, timeout=timeout\n        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n    )\n    ^\n  File \"/Users/ncclegg/Library/Application Support/hatch/env/virtual/strands-agents/X7vsTQrp/strands-agents/lib/python3.13/site-packages/httpcore/_backends/anyio.py\", line 32, in read\n    with map_exceptions(exc_map):\n         ~~~~~~~~~~~~~~^^^^^^^^^\n  File \"/opt/homebrew/Cellar/python@3.13/3.13.5/Frameworks/Python.framework/Versions/3.13/lib/python3.13/contextlib.py\", line 162, in __exit__\n    self.gen.throw(value)\n    ~~~~~~~~~~~~~~^^^^^^^\n  File \"/Users/ncclegg/Library/Application Support/hatch/env/virtual/strands-agents/X7vsTQrp/strands-agents/lib/python3.13/site-packages/httpcore/_exceptions.py\", line 14, in map_exceptions\n    raise to_exc(exc) from exc\nhttpcore.ReadTimeout\n\nThe above exception was the direct cause of the following exception:\n\nTraceback (most recent call last):\n  File \"/Users/ncclegg/Library/Application Support/hatch/env/virtual/strands-agents/X7vsTQrp/strands-agents/lib/python3.13/site-packages/mcp/client/streamable_http.py\", line 326, in _handle_sse_response\n    async for sse in event_source.aiter_sse():\n    ...<10 lines>...\n            break\n  File \"/Users/ncclegg/Library/Application Support/hatch/env/virtual/strands-agents/X7vsTQrp/strands-agents/lib/python3.13/site-packages/httpx_sse/_api.py\", line 42, in aiter_sse\n    async for line in lines:\n    ...<3 lines>...\n            yield sse\n  File \"/Users/ncclegg/Library/Application Support/hatch/env/virtual/strands-agents/X7vsTQrp/strands-agents/lib/python3.13/site-packages/httpx/_models.py\", line 1031, in aiter_lines\n    async for text in self.aiter_text():\n        for line in decoder.decode(text):\n            yield line\n  File \"/Users/ncclegg/Library/Application Support/hatch/env/virtual/strands-agents/X7vsTQrp/strands-agents/lib/python3.13/site-packages/httpx/_models.py\", line 1018, in aiter_text\n    async for byte_content in self.aiter_bytes():\n    ...<2 lines>...\n            yield chunk\n  File \"/Users/ncclegg/Library/Application Support/hatch/env/virtual/strands-agents/X7vsTQrp/strands-agents/lib/python3.13/site-packages/httpx/_models.py\", line 997, in aiter_bytes\n    async for raw_bytes in self.aiter_raw():\n    ...<2 lines>...\n            yield chunk\n  File \"/Users/ncclegg/Library/Application Support/hatch/env/virtual/strands-agents/X7vsTQrp/strands-agents/lib/python3.13/site-packages/httpx/_models.py\", line 1055, in aiter_raw\n    async for raw_stream_bytes in self.stream:\n    ...<2 lines>...\n            yield chunk\n  File \"/Users/ncclegg/Library/Application Support/hatch/env/virtual/strands-agents/X7vsTQrp/strands-agents/lib/python3.13/site-packages/httpx/_client.py\", line 176, in __aiter__\n    async for chunk in self._stream:\n        yield chunk\n  File \"/Users/ncclegg/Library/Application Support/hatch/env/virtual/strands-agents/X7vsTQrp/strands-agents/lib/python3.13/site-packages/httpx/_transports/default.py\", line 270, in __aiter__\n    with map_httpcore_exceptions():\n         ~~~~~~~~~~~~~~~~~~~~~~~^^\n  File \"/opt/homebrew/Cellar/python@3.13/3.13.5/Frameworks/Python.framework/Versions/3.13/lib/python3.13/contextlib.py\", line 162, in __exit__\n    self.gen.throw(value)\n    ~~~~~~~~~~~~~~^^^^^^^\n  File \"/Users/ncclegg/Library/Application Support/hatch/env/virtual/strands-agents/X7vsTQrp/strands-agents/lib/python3.13/site-packages/httpx/_transports/default.py\", line 118, in map_httpcore_exceptions\n    raise mapped_exc(message) from exc\nhttpx.ReadTimeout\n```",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1401/reactions",
        "total_count": 4,
        "+1": 2,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 2
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": [
        1595
      ]
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1399",
      "id": 3452421169,
      "node_id": "I_kwDOM2n80s7Nx8Qx",
      "number": 1399,
      "title": "Support more notification type",
      "user": {
        "login": "dayeguilaiye",
        "id": 9746948,
        "node_id": "MDQ6VXNlcjk3NDY5NDg=",
        "avatar_url": "https://avatars.githubusercontent.com/u/9746948?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/dayeguilaiye",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 9287721887,
          "node_id": "LA_kwDOM2n80s8AAAACKZdjnw",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/needs%20repro",
          "name": "needs repro",
          "color": "e35211",
          "default": false,
          "description": "needs additional information to be able to reproduce bug"
        },
        "1": {
          "id": 9354757189,
          "node_id": "LA_kwDOM2n80s8AAAACLZZERQ",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/enhancement",
          "name": "enhancement",
          "color": "11b5cc",
          "default": true,
          "description": "Request for a new feature that's not currently supported"
        },
        "2": {
          "id": 9354767859,
          "node_id": "LA_kwDOM2n80s8AAAACLZZt8w",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P1",
          "name": "P1",
          "color": "895d17",
          "default": false,
          "description": "Significant bug affecting many users, highly requested feature"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 1,
      "created_at": "2025-09-25T07:59:27Z",
      "updated_at": "2025-10-07T12:09:24Z",
      "closed_at": null,
      "author_association": "NONE",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "### Initial Checks\n\n- [x] I confirm that I'm using the latest version of MCP Python SDK\n- [x] I confirm that I searched for my issue in https://github.com/modelcontextprotocol/python-sdk/issues before opening this issue\n\n### Description\n\nI use `uv run codex mcp` to use codex as an mcp server.\n\nCodex mcp will return a notification with the method 'codex/event', then the mcp python-sdk will output a log message like this:\n```log\nWARNING:root:Failed to validate notification: 13 validation errors for ServerNotification\nCancelledNotification.method\n  Input should be 'notifications/cancelled' [type=literal_error, input_value='codex/event', input_type=str]\n    For further information visit https://errors.pydantic.dev/2.11/v/literal_error\nCancelledNotification.params.requestId\nField required [type=missing, input_value={'_meta': {'requestId': 2...62-03cfd8f1d202.jsonl'}}, input_type=dict]\n    For further information visit https://errors.pydantic.dev/2.11/v/missing\nProgressNotification.method\n  Input should be 'notifications/progress' [type=literal_error, input_value='codex/event', input_type=str]\nFor further information visit https://errors.pydantic.dev/2.11/v/literal_error\nProgressNotification.params.progressToken\n  Field required [type=missing, input_value={'_meta': {'requestId': 2...62-03cfd8f1d202.jsonl'}}, input_type=dict]\n    For further information visit https://errors.pydantic.dev/2.11/v/missing\nProgressNotification.params.progress\n  Field required [type=missing, input_value={'_meta': {'requestId': 2...62-03cfd8f1d202.jsonl'}}, input_type=dict]\n    For further information visit https://errors.pydantic.dev/2.11/v/missing\nLoggingMessageNotification.method\nInput should be 'notifications/message' [type=literal_error, input_value='codex/event', input_type=str]\n    For further information visit https://errors.pydantic.dev/2.11/v/literal_error\nLoggingMessageNotification.params.level\n  Field required [type=missing, input_value={'_meta': {'requestId': 2...62-03cfd8f1d202.jsonl'}}, input_type=dict]\nFor further information visit https://errors.pydantic.dev/2.11/v/missing\nLoggingMessageNotification.params.data\n  Field required [type=missing, input_value={'_meta': {'requestId': 2...62-03cfd8f1d202.jsonl'}}, input_type=dict]\n    For further information visit https://errors.pydantic.dev/2.11/v/missing\nResourceUpdatedNotification.method\n  Input should be 'notifications/resources/updated' [type=literal_error, input_value='codex/event', input_type=str]\n    For further information visit https://errors.pydantic.dev/2.11/v/literal_error\nResourceUpdatedNotification.params.uri\nField required [type=missing, input_value={'_meta': {'requestId': 2...62-03cfd8f1d202.jsonl'}}, input_type=dict]\n    For further information visit https://errors.pydantic.dev/2.11/v/missing\nResourceListChangedNotification.method\n  Input should be 'notifications/resources/list_changed' [type=literal_error, input_value='codex/event', input_type=str]\nFor further information visit https://errors.pydantic.dev/2.11/v/literal_error\nToolListChangedNotification.method\n  Input should be 'notifications/tools/list_changed' [type=literal_error, input_value='codex/event', input_type=str]\n    For further information visit https://errors.pydantic.dev/2.11/v/literal_error\nPromptListChangedNotification.method\n  Input should be 'notifications/prompts/list_changed' [type=literal_error, input_value='codex/event', input_type=str]\n    For further information visit https://errors.pydantic.dev/2.11/v/literal_error. Message was: method='codex/event' params={'_meta': {'requestId': 2}, 'id': '', 'msg': {'type': 'session_configured', 'session_id': '01997fce-28ef-7b01-bd62-03cfd8f1d202', 'model': 'qwen3-next-80b', 'history_log_id': 75073889, 'history_entry_count': 10, 'rollout_path': '/Users/xxx/.codex/sessions/2025/09/25/rollout-2025-09-25T15-37-21-01997fce-28ef-7b01-bd62-03cfd8f1d202.jsonl'}} jsonrpc='2.0'\n```\nFrom https://modelcontextprotocol.io/specification/2025-06-18/basic/index#notifications, it appears that the log in the previous text meets the requirements, but the python-sdk seems to only accept a fixed few types of notifications.\n\n### Example Code\n\n```Python\n\n```\n\n### Python & MCP Python SDK\n\n```Text\npython: 3.12\nmcp python-sdk: 1.14.1\n```",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1399/reactions",
        "total_count": 1,
        "+1": 1,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1393",
      "id": 3447524437,
      "node_id": "I_kwDOM2n80s7NfQxV",
      "number": 1393,
      "title": "Lazy HTTP connections seem to make error handling difficult.",
      "user": {
        "login": "caffeinism",
        "id": 39237502,
        "node_id": "MDQ6VXNlcjM5MjM3NTAy",
        "avatar_url": "https://avatars.githubusercontent.com/u/39237502?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/caffeinism",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 9354757189,
          "node_id": "LA_kwDOM2n80s8AAAACLZZERQ",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/enhancement",
          "name": "enhancement",
          "color": "11b5cc",
          "default": true,
          "description": "Request for a new feature that's not currently supported"
        },
        "1": {
          "id": 9354761244,
          "node_id": "LA_kwDOM2n80s8AAAACLZZUHA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/ready%20for%20work",
          "name": "ready for work",
          "color": "2b9402",
          "default": false,
          "description": "Enough information for someone to start working on"
        },
        "2": {
          "id": 9354770246,
          "node_id": "LA_kwDOM2n80s8AAAACLZZ3Rg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P2",
          "name": "P2",
          "color": "d2b457",
          "default": false,
          "description": "Moderate issues affecting some users, edge cases, potentially valuable feature"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/milestones/15",
        "id": 13770333,
        "node_id": "MI_kwDOM2n80s4A0h5d",
        "number": 15,
        "title": "Error catching improvements",
        "description": null,
        "creator": {
          "login": "felixweinberger",
          "id": 3823880,
          "node_id": "MDQ6VXNlcjM4MjM4ODA=",
          "avatar_url": "https://avatars.githubusercontent.com/u/3823880?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/felixweinberger",
          "type": "User",
          "user_view_type": "public",
          "site_admin": false
        },
        "open_issues": 6,
        "closed_issues": 0,
        "state": "open",
        "created_at": "2025-09-26T16:03:50Z",
        "updated_at": "2025-10-07T17:45:27Z",
        "due_on": null,
        "closed_at": null
      },
      "comments": 0,
      "created_at": "2025-09-24T03:58:14Z",
      "updated_at": "2025-11-12T18:30:46Z",
      "closed_at": null,
      "author_association": "NONE",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "### Question\n\nWhen using streamablehttp_client, since HTTP connections are initialized with anyio.create_task_group, if the server is unreachable, an error will occur unexpectedly at some point later. Is this the intended behavior? If the connection is impossible, I want to wait and handle the error. However, the current behavior executes the code after the initialization and then throws an error at some point. If the error had occurred earlier, the code below it wouldn't have needed to execute. I consider this excessive optimization. Is there a reason for this design?\n\n### Additional Context\n\n```python\nimport asyncio\nfrom langchain_mcp_adapters.tools import load_mcp_tools\nfrom mcp import ClientSession\nfrom mcp.client.streamable_http import streamablehttp_client\n\nasync def _init_and_load(session: ClientSession):\n    try:\n        async with asyncio.timeout(10): # << I cannot access the server and will time out.\n            await session.initialize()\n            return await load_mcp_tools(session)\n    except Exception as e:\n        return []\n\nasync def main():\n    async with streamablehttp_client(url=\"https://some.unreachable.domain\") as client:\n        async with ClientSession(client[0], client[1]) as session:\n            tools = await _init_and_load(session)\n            await asyncio.sleep(100) # << A httpx.ConnectTimeout exception occurred while performing the following operation!!\n```\n\n```python\nimport asyncio\nfrom langchain_mcp_adapters.tools import load_mcp_tools\nfrom mcp import ClientSession\nfrom mcp.client.streamable_http import streamablehttp_client\n\nasync def _init_and_load(session: ClientSession):\n    try:\n        await session.initialize()\n        return await load_mcp_tools(session)\n    except Exception as e: # << Since the error is caused by tg, this cannot handle the error too!!\n        return []\n\nasync def main():\n    async with streamablehttp_client(url=\"https://some.unreachable.domain\", timeout=10) as client:\n        async with ClientSession(client[0], client[1]) as session:\n            tools = await _init_and_load(session)\n            await asyncio.sleep(100)\n```",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1393/reactions",
        "total_count": 0,
        "+1": 0,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1391",
      "id": 3446994167,
      "node_id": "I_kwDOM2n80s7NdPT3",
      "number": 1391,
      "title": "wrapped tools using annotations fail",
      "user": {
        "login": "stevenh",
        "id": 104239,
        "node_id": "MDQ6VXNlcjEwNDIzOQ==",
        "avatar_url": "https://avatars.githubusercontent.com/u/104239?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/stevenh",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 7511840554,
          "node_id": "LA_kwDOM2n80s8AAAABv72XKg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/bug",
          "name": "bug",
          "color": "d73a4a",
          "default": true,
          "description": "Something isn't working"
        },
        "1": {
          "id": 9354761244,
          "node_id": "LA_kwDOM2n80s8AAAACLZZUHA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/ready%20for%20work",
          "name": "ready for work",
          "color": "2b9402",
          "default": false,
          "description": "Enough information for someone to start working on"
        },
        "2": {
          "id": 9354770246,
          "node_id": "LA_kwDOM2n80s8AAAACLZZ3Rg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P2",
          "name": "P2",
          "color": "d2b457",
          "default": false,
          "description": "Moderate issues affecting some users, edge cases, potentially valuable feature"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 5,
      "created_at": "2025-09-23T23:54:22Z",
      "updated_at": "2025-12-04T09:40:43Z",
      "closed_at": null,
      "author_association": "NONE",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "### Initial Checks\n\n- [x] I confirm that I'm using the latest version of MCP Python SDK\n- [x] I confirm that I searched for my issue in https://github.com/modelcontextprotocol/python-sdk/issues before opening this issue\n\n### Description\n\nIf you try to use a tool a which is wrapped and uses `from __future__ import annotations` setup fails with and `InvalidSignature` exception e.g.\n```\nmcp.server.fastmcp.exceptions.InvalidSignature: Unable to evaluate type annotation ForwardRef(\"Literal['literal'] | None\")\n```\n\nThe cause of this is that the global name space used for the lookup is the wrapper namespace and not the original function namespace.\n\n### Example Code\n\n```Python\nfrom __future__ import annotations\n\nimport logfire\nfrom mcp.server.fastmcp import FastMCP\n\n@logfire.instrument\ndef test_tool(location_type: Literal[\"literal\"] | None = None) -> str:\n    \"\"\"Test tool.\"\"\"\n    return f\"a is {location_type}\"\n\nmcp = FastMCP(\n    \"Wrap test\",\n    tools=[\n        Tool.from_function(test_tool),\n    ],\n)\n```\n\n### Python & MCP Python SDK\n\n```Text\nSDL: 1.14.1\nPython: 3.13.7\n```",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1391/reactions",
        "total_count": 0,
        "+1": 0,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": [
        1392
      ]
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1382",
      "id": 3436161778,
      "node_id": "I_kwDOM2n80s7Mz6ry",
      "number": 1382,
      "title": "Cannot handle `Unexpected content type` when initializing MCP session",
      "user": {
        "login": "bystepii",
        "id": 9701284,
        "node_id": "MDQ6VXNlcjk3MDEyODQ=",
        "avatar_url": "https://avatars.githubusercontent.com/u/9701284?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/bystepii",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 7511840554,
          "node_id": "LA_kwDOM2n80s8AAAABv72XKg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/bug",
          "name": "bug",
          "color": "d73a4a",
          "default": true,
          "description": "Something isn't working"
        },
        "1": {
          "id": 9354761244,
          "node_id": "LA_kwDOM2n80s8AAAACLZZUHA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/ready%20for%20work",
          "name": "ready for work",
          "color": "2b9402",
          "default": false,
          "description": "Enough information for someone to start working on"
        },
        "2": {
          "id": 9354770246,
          "node_id": "LA_kwDOM2n80s8AAAACLZZ3Rg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P2",
          "name": "P2",
          "color": "d2b457",
          "default": false,
          "description": "Moderate issues affecting some users, edge cases, potentially valuable feature"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 0,
      "created_at": "2025-09-19T23:08:00Z",
      "updated_at": "2025-10-07T11:55:31Z",
      "closed_at": null,
      "author_association": "NONE",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "### Initial Checks\n\n- [x] I confirm that I'm using the latest version of MCP Python SDK\n- [x] I confirm that I searched for my issue in https://github.com/modelcontextprotocol/python-sdk/issues before opening this issue\n\n### Description\n\nWhen trying to connect to an MCP server using `streamablehttp_client` and `ClientSession`, the client prints `Unexpected content type` error if the server responds with anything other than the expected MCP JSON stream (e.g. error page, misconfigured endpoint, etc.).\n\nThis makes it difficult to handle cases where the server is not reachable or not serving MCP correctly, since no exception is raised.\n\n### Example Code\n\n```Python\nimport asyncio\nfrom mcp.client.streamable_http import streamablehttp_client\nfrom mcp import ClientSession\n\nasync def main():\n    async with streamablehttp_client(\n        url=\"http://localhost:3001/mcp\",\n    ) as (read, write, _):\n        async with ClientSession(read, write) as session:\n            try:\n                await session.initialize()\n            except Exception as e:\n                print(f\"Failed to initialize MCP session: {e}\")\n                return\n            print(\"MCP session initialized\")\n\nif __name__ == \"__main__\":\n    asyncio.run(main())\n```\n\n### Output\n\n```\nUnexpected content type: text/html; charset=utf-8\n```\n\n### Python & MCP Python SDK\n\n```Text\npython 3.13.5\nmcp 1.14.1\n```",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1382/reactions",
        "total_count": 4,
        "+1": 2,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 2
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1374",
      "id": 3426813878,
      "node_id": "I_kwDOM2n80s7MQQe2",
      "number": 1374,
      "title": "No default timeout for requests (unlike TS SDK)",
      "user": {
        "login": "ochafik",
        "id": 273860,
        "node_id": "MDQ6VXNlcjI3Mzg2MA==",
        "avatar_url": "https://avatars.githubusercontent.com/u/273860?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/ochafik",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 9354757189,
          "node_id": "LA_kwDOM2n80s8AAAACLZZERQ",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/enhancement",
          "name": "enhancement",
          "color": "11b5cc",
          "default": true,
          "description": "Request for a new feature that's not currently supported"
        },
        "1": {
          "id": 9354761244,
          "node_id": "LA_kwDOM2n80s8AAAACLZZUHA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/ready%20for%20work",
          "name": "ready for work",
          "color": "2b9402",
          "default": false,
          "description": "Enough information for someone to start working on"
        },
        "2": {
          "id": 9354770246,
          "node_id": "LA_kwDOM2n80s8AAAACLZZ3Rg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P2",
          "name": "P2",
          "color": "d2b457",
          "default": false,
          "description": "Moderate issues affecting some users, edge cases, potentially valuable feature"
        },
        "3": {
          "id": 9412526112,
          "node_id": "LA_kwDOM2n80s8AAAACMQfAIA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/improves%20sdk%20consistency",
          "name": "improves sdk consistency",
          "color": "8f10ec",
          "default": false,
          "description": "Improves consistency with other SDKs such as Tyepscript"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 3,
      "created_at": "2025-09-17T15:33:04Z",
      "updated_at": "2025-12-03T18:04:03Z",
      "closed_at": null,
      "author_association": "CONTRIBUTOR",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "### Initial Checks\n\n- [x] I confirm that I'm using the latest version of MCP Python SDK\n- [x] I confirm that I searched for my issue in https://github.com/modelcontextprotocol/python-sdk/issues before opening this issue\n\n### Description\n\n[Spec states](https://modelcontextprotocol.io/specification/2025-06-18/basic/lifecycle#timeouts): `Implementations SHOULD establish timeouts for all sent requests, to prevent hung connections and resource exhaustion.`\n\nThe TypeScript SDK does have a default timeout of 60 seconds on requests, and the difference between Python & TypeScript is the crux of https://github.com/modelcontextprotocol/typescript-sdk/issues/245 (which also suggests 60 seconds might not be long enough). Also related, TypeScript has a `resetTimeoutOnProgress` option (defaulting to falst), which would probably be useful if we do introduce a default to the Python SDK.\n\n### Example Code\n\n```Python\n\n```\n\n### Python & MCP Python SDK\n\n```Text\nLatest\n```",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1374/reactions",
        "total_count": 0,
        "+1": 0,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": [
        1685
      ]
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1372",
      "id": 3426000376,
      "node_id": "I_kwDOM2n80s7MNJ34",
      "number": 1372,
      "title": "fastmcp.run() runtimeerror: task group is not initialized. make sure to use run().",
      "user": {
        "login": "SinDongHwan",
        "id": 30520896,
        "node_id": "MDQ6VXNlcjMwNTIwODk2",
        "avatar_url": "https://avatars.githubusercontent.com/u/30520896?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/SinDongHwan",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 7511840554,
          "node_id": "LA_kwDOM2n80s8AAAABv72XKg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/bug",
          "name": "bug",
          "color": "d73a4a",
          "default": true,
          "description": "Something isn't working"
        },
        "1": {
          "id": 9287721887,
          "node_id": "LA_kwDOM2n80s8AAAACKZdjnw",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/needs%20repro",
          "name": "needs repro",
          "color": "e35211",
          "default": false,
          "description": "needs additional information to be able to reproduce bug"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/milestones/22",
        "id": 13811612,
        "node_id": "MI_kwDOM2n80s4A0r-c",
        "number": 22,
        "title": "FastMCP issues",
        "description": null,
        "creator": {
          "login": "felixweinberger",
          "id": 3823880,
          "node_id": "MDQ6VXNlcjM4MjM4ODA=",
          "avatar_url": "https://avatars.githubusercontent.com/u/3823880?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/felixweinberger",
          "type": "User",
          "user_view_type": "public",
          "site_admin": false
        },
        "open_issues": 10,
        "closed_issues": 1,
        "state": "open",
        "created_at": "2025-10-03T14:23:32Z",
        "updated_at": "2025-12-04T09:48:23Z",
        "due_on": null,
        "closed_at": null
      },
      "comments": 3,
      "created_at": "2025-09-17T12:04:27Z",
      "updated_at": "2025-10-29T15:58:59Z",
      "closed_at": null,
      "author_association": "NONE",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "### Initial Checks\n\n- [x] I confirm that I'm using the latest version of MCP Python SDK\n- [x] I confirm that I searched for my issue in https://github.com/modelcontextprotocol/python-sdk/issues before opening this issue\n\n### Description\n\nfollowing error sometime occur.\n```\nfastmcp.run() runtimeerror: task group is not initialized. make sure to use run().\n```\n\n### Example Code\n\n```Python\nfrom mcp.server.fastmcp import FastMCP\n# FastMCP instance\nmcp = FastMCP(\n    name=setting.server[\"name\"],\n    host=setting.server[\"host\"],\n    port=setting.server[\"port\"],\n    streamable_http_path=setting.server[\"streamable_http_path\"],\n    api_route=\"/mcp/\",\n    debug=True,\n)\ntry:\n    mcp.run(transport=\"streamable-http\")\nexcept KeyboardInterrupt:\n    logger.info(\"Service shut down\")\n```\n\n### Python & MCP Python SDK\n\n```Text\nmcp version (1.13.1)\n```",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1372/reactions",
        "total_count": 0,
        "+1": 0,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1370",
      "id": 3424480114,
      "node_id": "I_kwDOM2n80s7MHWty",
      "number": 1370,
      "title": "httpx.ConnectError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:1002)",
      "user": {
        "login": "1e9-7",
        "id": 228845883,
        "node_id": "U_kgDODaPpOw",
        "avatar_url": "https://avatars.githubusercontent.com/u/228845883?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/1e9-7",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 7511840554,
          "node_id": "LA_kwDOM2n80s8AAAABv72XKg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/bug",
          "name": "bug",
          "color": "d73a4a",
          "default": true,
          "description": "Something isn't working"
        },
        "1": {
          "id": 9287728201,
          "node_id": "LA_kwDOM2n80s8AAAACKZd8SQ",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/needs%20maintainer%20action",
          "name": "needs maintainer action",
          "color": "d33428",
          "default": false,
          "description": "Potentially serious issue - needs proactive fix and maintainer attention"
        },
        "2": {
          "id": 9354765360,
          "node_id": "LA_kwDOM2n80s8AAAACLZZkMA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P0",
          "name": "P0",
          "color": "a81d34",
          "default": false,
          "description": "Broken core functionality, security issues, critical missing feature"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 2,
      "created_at": "2025-09-17T03:23:14Z",
      "updated_at": "2025-10-07T11:54:27Z",
      "closed_at": null,
      "author_association": "NONE",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "### Description\n\nI am currently using the mcp-python-sdk to set up an MCP client with Streamable HTTP as the transport layer protocol. However, since I'm working in an internal network environment, I encounter the following HTTPS error:\n\nhttpx.ConnectError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:1002)\nthe code of me is:\n```\nimport asyncio\nfrom mcp import ClientSession\nfrom mcp.client.streamable_http import streamablehttp_client\n\nasync def main():\n    # Connect to a streamable HTTP server\n#the url of my mcp server can't avail\n    async with streamablehttp_client(\"https://mcp.higress.ai/mcp-ip-query/cmfdmaly\") as (\n        read_stream,\n        write_stream,\n        _,\n    ):\n        # Create a session using the client streams\n        async with ClientSession(read_stream, write_stream) as session:\n            # Initialize the connection\n            await session.initialize()\n            # List available tools\n            tools = await session.list_tools()\n            print(f\"Available tools: {[tool.name for tool in tools.tools]}\")\n\n\nif __name__ == \"__main__\":\n    asyncio.run(main())\n```\n\nTo temporarily resolve this issue, I modified /.venv/Lib/site-packages/mcp/shared/_httpx_utils.py by adding \"verify\": False after line 66.\n\nMy request is to support passing a verify parameter when constructing the streamablehttp_client, allowing users to configure certificate verification flexibly without modifying the source code.\n\n### References\n\n_No response_",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1370/reactions",
        "total_count": 0,
        "+1": 0,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": [
        1177
      ]
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1368",
      "id": 3418117243,
      "node_id": "I_kwDOM2n80s7LvFR7",
      "number": 1368,
      "title": "OAuth client should support bi-phasic oauth flows",
      "user": {
        "login": "vitorbal",
        "id": 626038,
        "node_id": "MDQ6VXNlcjYyNjAzOA==",
        "avatar_url": "https://avatars.githubusercontent.com/u/626038?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/vitorbal",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 9301360597,
          "node_id": "LA_kwDOM2n80s8AAAACKmd_1Q",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/auth",
          "name": "auth",
          "color": "92ad2d",
          "default": false,
          "description": "Issues and PRs related to Authentication / OAuth"
        },
        "1": {
          "id": 9354757189,
          "node_id": "LA_kwDOM2n80s8AAAACLZZERQ",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/enhancement",
          "name": "enhancement",
          "color": "11b5cc",
          "default": true,
          "description": "Request for a new feature that's not currently supported"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 0,
      "created_at": "2025-09-15T14:02:42Z",
      "updated_at": "2025-11-12T18:30:45Z",
      "closed_at": null,
      "author_association": "NONE",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "### Description\n\nThe `OAuthClientProvider` interfaces should look more like the [Typescript SDK's provider instead](https://github.com/modelcontextprotocol/typescript-sdk/blob/main/src/client/auth.ts#L33), which is less opinionated about how the code verifier and redirect uri are consumed and subsequently exchanged into a token.\n\nCurrently, the Python SDK's version makes assumptions about the end-to-end flow that prevent usage in scenarios where e.g. I want to store the verifier/uri in the DB and run the callback \"out-of-band\".\n\n### References\n\n- https://github.com/modelcontextprotocol/typescript-sdk/blob/main/src/client/auth.ts\n- https://github.com/modelcontextprotocol/typescript-sdk/blob/main/src/examples/client/simpleOAuthClient.ts",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1368/reactions",
        "total_count": 0,
        "+1": 0,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1347",
      "id": 3387716573,
      "node_id": "I_kwDOM2n80s7J7HPd",
      "number": 1347,
      "title": "Address currently ignored ruff rules in Python SDK",
      "user": {
        "login": "felixweinberger",
        "id": 3823880,
        "node_id": "MDQ6VXNlcjM4MjM4ODA=",
        "avatar_url": "https://avatars.githubusercontent.com/u/3823880?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/felixweinberger",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 9230424293,
          "node_id": "LA_kwDOM2n80s8AAAACJi0Y5Q",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/v2",
          "name": "v2",
          "color": "5d2a87",
          "default": false,
          "description": "Ideas, requests and plans for v2 of the SDK which will incorporate major changes and fixes"
        },
        "1": {
          "id": 9354757189,
          "node_id": "LA_kwDOM2n80s8AAAACLZZERQ",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/enhancement",
          "name": "enhancement",
          "color": "11b5cc",
          "default": true,
          "description": "Request for a new feature that's not currently supported"
        },
        "2": {
          "id": 9354761244,
          "node_id": "LA_kwDOM2n80s8AAAACLZZUHA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/ready%20for%20work",
          "name": "ready for work",
          "color": "2b9402",
          "default": false,
          "description": "Enough information for someone to start working on"
        },
        "3": {
          "id": 9354772110,
          "node_id": "LA_kwDOM2n80s8AAAACLZZ-jg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P3",
          "name": "P3",
          "color": "c7df49",
          "default": false,
          "description": "Nice to haves, rare edge cases"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 0,
      "created_at": "2025-09-05T14:13:16Z",
      "updated_at": "2025-11-12T18:30:44Z",
      "closed_at": null,
      "author_association": "CONTRIBUTOR",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "### Initial Checks\n\n- [x] I confirm that I'm using the latest version of MCP Python SDK\n- [x] I confirm that I searched for my issue in https://github.com/modelcontextprotocol/python-sdk/issues before opening this issue\n\n### Description\n\nhttps://github.com/modelcontextprotocol/python-sdk/pull/525 introduced additional lint rules to help us manage growing complexity of the Python SDK.\n\nAs part of this we sharpened our ruff lint rules but as a pragmatic solution without a major refactor we had to add some lint ignores - we should address these for v2 ideally which will be a good time given multiple refactors happening then.\n\n### Example Code\n\n```Python\n\n```\n\n### Python & MCP Python SDK\n\n```Text\nLatest master\n```",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1347/reactions",
        "total_count": 0,
        "+1": 0,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1335",
      "id": 3377296795,
      "node_id": "I_kwDOM2n80s7JTXWb",
      "number": 1335,
      "title": "Using /.well-known/ OAuth endpoints behind custom path on GKE",
      "user": {
        "login": "whitewg77",
        "id": 229406578,
        "node_id": "U_kgDODax3cg",
        "avatar_url": "https://avatars.githubusercontent.com/u/229406578?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/whitewg77",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 7511840581,
          "node_id": "LA_kwDOM2n80s8AAAABv72XRQ",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/good%20first%20issue",
          "name": "good first issue",
          "color": "7057ff",
          "default": true,
          "description": "Good for newcomers"
        },
        "1": {
          "id": 7511840603,
          "node_id": "LA_kwDOM2n80s8AAAABv72XWw",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/question",
          "name": "question",
          "color": "d876e3",
          "default": true,
          "description": "Further information is requested"
        },
        "2": {
          "id": 9301360597,
          "node_id": "LA_kwDOM2n80s8AAAACKmd_1Q",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/auth",
          "name": "auth",
          "color": "92ad2d",
          "default": false,
          "description": "Issues and PRs related to Authentication / OAuth"
        },
        "3": {
          "id": 9354757189,
          "node_id": "LA_kwDOM2n80s8AAAACLZZERQ",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/enhancement",
          "name": "enhancement",
          "color": "11b5cc",
          "default": true,
          "description": "Request for a new feature that's not currently supported"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 3,
      "created_at": "2025-09-02T19:48:45Z",
      "updated_at": "2025-11-12T18:30:42Z",
      "closed_at": null,
      "author_association": "NONE",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "### Question\n\nI am running a simple MCP server (built with FastMCP) behind a gateway on GKE with an custom path defined by an HttpRoute. I am attempting to use the /.well-known/ endpoints for OAuth authentication and authorization. Unfortunately, it seems that the routes for the /.well-known/ endpoints; as well as the other OAuth endpoints /authorize, /token, /register, and /revoke, are all hardcoded in the MCP SDK within mcp/server/auth/routes.py within the create_auth_routes() function.\n\nSo, for example...\n\nIf my MCP server is deployed at https://{my-gateway}/custom/path/\nHowever, the well-known endpoints are pointing to https://{my-gateway}/.well-known/*, which are obviously returning 404 Not Found responses.\n\nWhen starting my server, I am passing the 'path' parameter in the mcp.run() command.  Using my example above, my run command would look like -- mcp.run(transport=\"http\", host=\"0.0.0.0\", port=8080, path=\"/custom/path/mcp\").  However, this path parameter seems to have zero effect on the OAuth well-known endpoints.\n\nSo, the question is... Is this expected behavior, and if so, how should we run MCP servers that use well-knonw OAuth endpoints behind API Proxies (Apigee, APIM, etc) or GKE Gateways that require a custom path?\n\n### Additional Context\n\nmcp version  -- 1.13.1\nfastmcp version -- 2.11.4.dev128+5b433f5",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1335/reactions",
        "total_count": 0,
        "+1": 0,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1333",
      "id": 3373618859,
      "node_id": "I_kwDOM2n80s7JFVar",
      "number": 1333,
      "title": "`stdio_server` uses unbuffered memory streams which can cause server to block and become unresponsive",
      "user": {
        "login": "peteski22",
        "id": 487783,
        "node_id": "MDQ6VXNlcjQ4Nzc4Mw==",
        "avatar_url": "https://avatars.githubusercontent.com/u/487783?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/peteski22",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 7511840554,
          "node_id": "LA_kwDOM2n80s8AAAABv72XKg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/bug",
          "name": "bug",
          "color": "d73a4a",
          "default": true,
          "description": "Something isn't working"
        },
        "1": {
          "id": 9354761244,
          "node_id": "LA_kwDOM2n80s8AAAACLZZUHA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/ready%20for%20work",
          "name": "ready for work",
          "color": "2b9402",
          "default": false,
          "description": "Enough information for someone to start working on"
        },
        "2": {
          "id": 9354770246,
          "node_id": "LA_kwDOM2n80s8AAAACLZZ3Rg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P2",
          "name": "P2",
          "color": "d2b457",
          "default": false,
          "description": "Moderate issues affecting some users, edge cases, potentially valuable feature"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 0,
      "created_at": "2025-09-01T19:35:49Z",
      "updated_at": "2025-10-06T15:53:59Z",
      "closed_at": null,
      "author_association": "NONE",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "### Initial Checks\n\n- [x] I confirm that I'm using the latest version of MCP Python SDK\n- [x] I confirm that I searched for my issue in https://github.com/modelcontextprotocol/python-sdk/issues before opening this issue\n\n### Description\n\nThe MCP Python SDK's `stdio_server` becomes unresponsive during slow message processing operations, causing ping and/or new requests to timeout.\n\n#### Observed Behaviour\n\n* Server appears to 'freeze' and becomes unresponsive after running for extended periods\n* Ping requests timeout during slow operations\n* New requests cannot be processed while the server is handling long-running operations\n* After 67 minutes of operation with requests every 10 seconds, the server became completely unresponsive\n\n#### Expected Behaviour\n\n* Server should remain responsive to new requests (like pings) even while processing slow operations\n* Ping requests should not timeout due to message processing delays\n* The server should handle concurrent requests without blocking\n\n### Suspected Root Cause\n\nThe `stdio_server` uses `max_buffer_size=0` (supplied to `anyio.create_memory_object_stream`) by default, which creates synchronous handoff between the stdin reader and message processor. \n\nSee: https://github.com/modelcontextprotocol/python-sdk/blob/543961968c0634e93d919d509cce23a1d6a56c21/src/mcp/server/stdio.py#L57-L58\n\nWhen the message processor is slow or blocked, the stdin reader cannot read new messages from stdin, making the server appear unresponsive.\n\n### Example Code\n\n```python\n  import anyio\n  import pytest\n\n\n  @pytest.mark.anyio\n  async def test_server_becomes_unresponsive_with_slow_processor():\n      \"\"\"Demonstrates how server becomes unresponsive during slow processing.\"\"\"\n\n      # Simulates stdio_server with default max_buffer_size=0 (synchronous handoff)\n      send_stream, receive_stream = anyio.create_memory_object_stream(0)\n\n      async def stdin_reader():\n          # First message gets through\n          await send_stream.send(\"request_1\")\n\n          # Second message (like a ping) blocks until first is fully processed\n          await send_stream.send(\"ping\")  # This will block for entire processing time!\n\n      async def message_processor():\n          # Process first message\n          msg = await receive_stream.receive()\n\n          # Simulate slow processing (database query, API call, etc.)\n          await anyio.sleep(0.1)  # 100ms processing time\n\n          # During this time, stdin_reader is completely blocked\n          # No new messages (including pings) can be read!\n\n          ping = await receive_stream.receive()  # Finally unblocks stdin_reader\n\n      async with anyio.create_task_group() as tg:\n          tg.start_soon(message_processor)\n          await anyio.sleep(0.01)  # Let processor start waiting\n          tg.start_soon(stdin_reader)\n\n      send_stream.close()\n      receive_stream.close()\n```\n\n### Proposed Solution\n\nAllow users to configure `max_buffer_size > 0` to enable buffering, with a default value (`0`) that preserves the current behaviour.\n\n```python\nasync def stdio_server(\n    stdin: anyio.AsyncFile[str] | None = None,\n    stdout: anyio.AsyncFile[str] | None = None,\n    max_buffer_size: int = 0, \n):\n    # ...\n    read_stream_writer, read_stream = anyio.create_memory_object_stream(max_buffer_size)\n    write_stream, write_stream_reader = anyio.create_memory_object_stream(max_buffer_size)\n```\n\n### Python & MCP Python SDK\n\n  - Python: 3.12\n  - MCP Python SDK: 1.12.4\n  - OS: macOS\n\n### Additional Context\n  \nThe issue manifests in long-running servers where message processing can occasionally be slow (database queries, file operations, API calls). \n\nThe fix should make `max_buffer_size` configurable so users can add buffering to prevent the stdin reader from blocking during slow operations.",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1333/reactions",
        "total_count": 1,
        "+1": 0,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 1
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1332",
      "id": 3373305339,
      "node_id": "I_kwDOM2n80s7JEI37",
      "number": 1332,
      "title": "Implement consistent structuredContent handling per specification clarification",
      "user": {
        "login": "dsp-ant",
        "id": 167242713,
        "node_id": "U_kgDOCffr2Q",
        "avatar_url": "https://avatars.githubusercontent.com/u/167242713?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/dsp-ant",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 7511840554,
          "node_id": "LA_kwDOM2n80s8AAAABv72XKg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/bug",
          "name": "bug",
          "color": "d73a4a",
          "default": true,
          "description": "Something isn't working"
        },
        "1": {
          "id": 9354761244,
          "node_id": "LA_kwDOM2n80s8AAAACLZZUHA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/ready%20for%20work",
          "name": "ready for work",
          "color": "2b9402",
          "default": false,
          "description": "Enough information for someone to start working on"
        },
        "2": {
          "id": 9354765360,
          "node_id": "LA_kwDOM2n80s8AAAACLZZkMA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P0",
          "name": "P0",
          "color": "a81d34",
          "default": false,
          "description": "Broken core functionality, security issues, critical missing feature"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 1,
      "created_at": "2025-09-01T16:48:29Z",
      "updated_at": "2025-10-13T12:25:51Z",
      "closed_at": null,
      "author_association": "MEMBER",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "## Summary\n\nFollowing the specification issue modelcontextprotocol/specification#1411, the Python SDK needs to ensure consistent handling of `structuredContent` vs `content` fields in tool responses.\n\n## Problem\n\nCurrently there's inconsistency across MCP implementations:\n- Some clients use `structuredContent` when available (e.g., Cursor)\n- Others ignore it entirely\n- This leads to different behavior with the same servers\n\n## Current SDK Behavior\n\nThe Python SDK needs to be reviewed to ensure it properly handles the relationship between `structuredContent` and `content` fields.\n\n## Required Changes\n\nOnce modelcontextprotocol/specification#1411 is resolved, update the SDK to:\n1. Implement the specified client behavior for `structuredContent`\n2. Ensure proper fallback to `content` when needed\n3. Validate that servers populate both fields consistently\n4. Add tests to verify the correct behavior\n5. Ensure consistency with the TypeScript SDK implementation\n\n## References\n\n- Specification issue: modelcontextprotocol/specification#1411\n- TypeScript SDK issue: modelcontextprotocol/typescript-sdk#911\n- Discord discussion: https://discord.com/channels/1358869848138059966/1411057080902746293\n\ncc: @dsp-ant",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1332/reactions",
        "total_count": 0,
        "+1": 0,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1326",
      "id": 3369550896,
      "node_id": "I_kwDOM2n80s7I10Qw",
      "number": 1326,
      "title": "Clients Using Storage Face Deadlock on Token Refresh for SSE",
      "user": {
        "login": "Norcim133",
        "id": 19489960,
        "node_id": "MDQ6VXNlcjE5NDg5OTYw",
        "avatar_url": "https://avatars.githubusercontent.com/u/19489960?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/Norcim133",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 7511840554,
          "node_id": "LA_kwDOM2n80s8AAAABv72XKg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/bug",
          "name": "bug",
          "color": "d73a4a",
          "default": true,
          "description": "Something isn't working"
        },
        "1": {
          "id": 9354761244,
          "node_id": "LA_kwDOM2n80s8AAAACLZZUHA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/ready%20for%20work",
          "name": "ready for work",
          "color": "2b9402",
          "default": false,
          "description": "Enough information for someone to start working on"
        },
        "2": {
          "id": 9354770246,
          "node_id": "LA_kwDOM2n80s8AAAACLZZ3Rg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P2",
          "name": "P2",
          "color": "d2b457",
          "default": false,
          "description": "Moderate issues affecting some users, edge cases, potentially valuable feature"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/milestones/20",
        "id": 13810645,
        "node_id": "MI_kwDOM2n80s4A0rvV",
        "number": 20,
        "title": "SSE Transport Issues",
        "description": null,
        "creator": {
          "login": "felixweinberger",
          "id": 3823880,
          "node_id": "MDQ6VXNlcjM4MjM4ODA=",
          "avatar_url": "https://avatars.githubusercontent.com/u/3823880?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/felixweinberger",
          "type": "User",
          "user_view_type": "public",
          "site_admin": false
        },
        "open_issues": 2,
        "closed_issues": 0,
        "state": "open",
        "created_at": "2025-10-03T10:49:04Z",
        "updated_at": "2025-10-03T10:57:50Z",
        "due_on": null,
        "closed_at": null
      },
      "comments": 2,
      "created_at": "2025-08-30T22:09:04Z",
      "updated_at": "2025-10-03T10:49:05Z",
      "closed_at": null,
      "author_association": "NONE",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "### Initial Checks\n\n- [x] I confirm that I'm using the latest version of MCP Python SDK\n- [x] I confirm that I searched for my issue in https://github.com/modelcontextprotocol/python-sdk/issues before opening this issue\n\n### Description\n\n#### tldr: in calls to an SSE server (like Atlassian) there is an infinite hang druing a request, caused by a deadlock; the deadlock occurs when token refresh yields a request in the middle of the client.stream method that is trying to monitor SSE events, not field requests\n\n### Resulting Behavior - After tokens expire or after a new instance is re-built from storage, the SSE server will not work until full token-clearing and re-auth\n\nAs long as a token refresh attempt is not made, the server will work. \n\nThere are two circumstances when a refresh attempt is made, causing the SSE call to hang:\n1. Tokens expire during a working SSE session\n2. When a Client uses a stale token from storage\n\n### Source of failure for each scenario\n\n**Failure Mode**\n1. `OAuthClientProvider` lazy loads and is passed into `aconnect_sse()` without having checked refresh\n2. The `OAuthClientProvider.async_auth_flow()` generator enters the refresh logic\n3. It yields a refresh request and waits for a response (line ~544 in auth.py)\n4. `aconnect_sse()` uses `client.stream()` which is trying to open an SSE connection\n5. There's no response mechanism - SSE expects to start streaming events, not handle a token refresh request\n6. DEADLOCK: Auth generator waiting for refresh response that will never come\n\n**Temporary Success**\n- First request in `aconnect_sse()` uses `client.stream()` yield 401 which sends everything back out of the SSE context\n- `OAuthClientProvider` is able to perform full re-auth\n- When next sent to `aconnect_sse()` fresh auth headers are availble  and SSE stream succeeds\n- SSE is long-lived so works for as long as tokens don't need refresh\n\n### Root cause\n\nIn /mcp/client/sse.py, this call with `aconnect_sse` hangs infinitely.\n\n```python\nasync with anyio.create_task_group() as tg:\n    try:\n        logger.debug(f\"Connecting to SSE endpoint: {remove_request_params(url)}\")\n        async with httpx_client_factory(\n            headers=headers, auth=auth, timeout=httpx.Timeout(timeout, read=sse_read_timeout)\n        ) as client:\n            async with aconnect_sse(  #<======================== This hangs indefinitely with a 200 response\n                client,\n                \"GET\",\n                url,\n            ) as event_source:\n                event_source.response.raise_for_status()\n\n```\n\nThis is because `OAuthClientProvider`, which is attached to the client, on token refresh, tries to yield when in the middle of `client.stream` here:\n```python\n            if not self.context.is_token_valid() and self.context.can_refresh_token():\n                # Try to refresh token\n                refresh_request = await self._refresh_token()\n                refresh_response = yield refresh_request. #<======================== Causes client.stream() to hang\n\n                if not await self._handle_refresh_response(refresh_response):\n                    # Refresh failed, need full re-authentication\n                    self._initialized = False\n```\nOther yields in the broader method occur after the stream got a 401 and so are not in the same context.\n\n### The Fix - Force token refresh check outside of the stream context\n\nAny fix needs to remove the `OAuthClientProvider` from `client` before calling `aconnect_sse`. That way it won't yield the refresh request.\n\nThere is probably a more elgant/direct approach but the below worked. I had to create a separate client to avoid some lock conflict.\n\n```python\nasync with anyio.create_task_group() as tg:\n    try:\n        logger.debug(f\"Connecting to SSE endpoint: {remove_request_params(url)}\")\n        async with httpx_client_factory(\n            headers=headers, auth=auth, timeout=httpx.Timeout(timeout, read=sse_read_timeout)\n        ) as client:\n            \n            #----- Start of fix -------\n            auth_headers = {}\n            if auth:\n                # Initialize auth to load stored tokens\n                if hasattr(auth, '_initialize') and not getattr(auth, '_initialized', False):\n                    await auth._initialize()\n\n                # Check if tokens need refresh\n                if hasattr(auth, 'context') and auth.context:\n                    # Check if token is expired or needs refresh\n                    if not auth.context.is_token_valid() and auth.context.can_refresh_token():\n                        logger.debug(\"Token needs refresh before SSE connection\")\n\n                        # Use a separate client for refresh to avoid lock issues\n                        async with httpx.AsyncClient() as refresh_client:\n                            # Create a dummy request to trigger the refresh flow\n                            dummy_request = httpx.Request(\"GET\", url)\n\n                            # Run the auth flow to refresh tokens\n                            auth_gen = auth.async_auth_flow(dummy_request)\n                            try:\n                                # Start the generator\n                                refresh_request = await auth_gen.asend(None)\n\n                                # Execute the refresh request\n                                refresh_response = await refresh_client.request(\n                                    refresh_request.method,\n                                    refresh_request.url,\n                                    data=refresh_request.content,\n                                    headers=refresh_request.headers,\n                                )\n\n                                # Send response back to generator\n                                await auth_gen.asend(refresh_response)\n                                logger.debug(\"Token refreshed successfully before SSE connection\")\n                            except StopAsyncIteration:\n                                # Normal completion of auth flow\n                                pass\n                            except Exception as e:\n                                logger.error(f\"Failed to refresh token before SSE: {e}\")\n\n                    # Extract the token after potential refresh\n                    if auth.context.current_tokens and auth.context.current_tokens.access_token:\n                        token = auth.context.current_tokens.access_token\n                        auth_headers['Authorization'] = f\"Bearer {token}\"\n\n            # CRITICAL: Remove auth from client to prevent generator interference\n            client.auth = None\n            #----- Resume existing code -------\n            async with aconnect_sse(\n                client,\n                \"GET\",\n                url,\n                headers=auth_headers,    #<============================== Must add this too\n            ) as event_source:\n                event_source.response.raise_for_status()\n```\n\nSince you removed auth from the client, you have to insert the headers later for the POST call as well:\n\n```python\n                    async def post_writer(endpoint_url: str):\n                        try:\n                            async with write_stream_reader:\n                                async for session_message in write_stream_reader:\n                                    logger.debug(f\"Sending client message: {session_message}\")\n                                    response = await client.post(\n                                        endpoint_url,\n                                        json=session_message.message.model_dump(\n                                            by_alias=True,\n                                            mode=\"json\",\n                                            exclude_none=True,\n                                        ),\n                                        headers=auth_headers,  #<======================== Cause client.stream() to hang\n```\n\n\n### Example Code\n\n```Python\n\n```\n\n### Python & MCP Python SDK\n\n```Text\n1.12.4 (but same code as current version)\n```",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1326/reactions",
        "total_count": 0,
        "+1": 0,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1319",
      "id": 3361727412,
      "node_id": "I_kwDOM2n80s7IX-O0",
      "number": 1319,
      "title": "Support selection of authorization servers from PRM document",
      "user": {
        "login": "localden",
        "id": 53200638,
        "node_id": "MDQ6VXNlcjUzMjAwNjM4",
        "avatar_url": "https://avatars.githubusercontent.com/u/53200638?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/localden",
        "type": "User",
        "user_view_type": "public",
        "site_admin": true
      },
      "labels": {
        "0": {
          "id": 9301360597,
          "node_id": "LA_kwDOM2n80s8AAAACKmd_1Q",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/auth",
          "name": "auth",
          "color": "92ad2d",
          "default": false,
          "description": "Issues and PRs related to Authentication / OAuth"
        },
        "1": {
          "id": 9354757189,
          "node_id": "LA_kwDOM2n80s8AAAACLZZERQ",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/enhancement",
          "name": "enhancement",
          "color": "11b5cc",
          "default": true,
          "description": "Request for a new feature that's not currently supported"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 0,
      "created_at": "2025-08-28T04:19:30Z",
      "updated_at": "2025-10-06T18:46:38Z",
      "closed_at": null,
      "author_association": "NONE",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "### Initial Checks\n\n- [x] I confirm that I'm using the latest version of MCP Python SDK\n- [x] I confirm that I searched for my issue in https://github.com/modelcontextprotocol/python-sdk/issues before opening this issue\n\n### Description\n\nSDK should offer a way for developers to specify which of the authorization servers to use from the PRM document.\n\nhttps://github.com/modelcontextprotocol/python-sdk/blob/07ae8c0d4e58bc0527a6898709288686ef6506dd/src/mcp/client/auth.py#L250\n\nRight now, the first server is selected.\n\n### Example Code\n\n```Python\n\n```\n\n### Python & MCP Python SDK\n\n```Text\nLatest\n```",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1319/reactions",
        "total_count": 0,
        "+1": 0,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1318",
      "id": 3361273652,
      "node_id": "I_kwDOM2n80s7IWPc0",
      "number": 1318,
      "title": "Critical Token Refresh Bugs - Prevents Proactive Refresh",
      "user": {
        "login": "Norcim133",
        "id": 19489960,
        "node_id": "MDQ6VXNlcjE5NDg5OTYw",
        "avatar_url": "https://avatars.githubusercontent.com/u/19489960?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/Norcim133",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 9082681979,
          "node_id": "LA_kwDOM2n80s8AAAACHV66ew",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/needs%20confirmation",
          "name": "needs confirmation",
          "color": "aaaaaa",
          "default": false,
          "description": "Needs confirmation that the PR is actually required or needed."
        },
        "1": {
          "id": 9301360597,
          "node_id": "LA_kwDOM2n80s8AAAACKmd_1Q",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/auth",
          "name": "auth",
          "color": "92ad2d",
          "default": false,
          "description": "Issues and PRs related to Authentication / OAuth"
        },
        "2": {
          "id": 9354761244,
          "node_id": "LA_kwDOM2n80s8AAAACLZZUHA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/ready%20for%20work",
          "name": "ready for work",
          "color": "2b9402",
          "default": false,
          "description": "Enough information for someone to start working on"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 5,
      "created_at": "2025-08-28T00:16:24Z",
      "updated_at": "2025-11-23T08:12:33Z",
      "closed_at": null,
      "author_association": "NONE",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "### Initial Checks\n\n- [x] I confirm that I'm using the latest version of MCP Python SDK\n- [x] I confirm that I searched for my issue in https://github.com/modelcontextprotocol/python-sdk/issues before opening this issue\n\n### Description\n\ntldr: Circular logic in `mcp/client/auth.py` creates two critical issues that prevent proactive token refresh; this would cause frequent re-auth for all users but it creates a third, worse issue for Clients that use TokenStorage (especially noticeable in a multi-user setup)\n\n## Background \nIn `mcp/client/auth.py` there are only 3 places where `OAuthContext.token_expiry_time` is set:\n1. During init it is set to None\n2. During full re-auth after receiving a 401 (in call to `_handle_token_response`)\n3. When a token is deemed invalid in `is_token_valid` (at start of `async_auth_flow`) \n\n## Issue 1 - Token validity check treats None as Valid\nThe ultimate problem is that when `token_expiry_time` is None, a token will pass validity checks, per the below. \n\n```python\ndef is_token_valid(self) -> bool:\n    \"\"\"Check if current token is valid.\"\"\"\n    return bool(\n        self.current_tokens\n        and self.current_tokens.access_token\n        and (not self.token_expiry_time or time.time() <= self.token_expiry_time)\n#                  ^^^^^^^^^^^^^^^^^^ None makes it perpetually valid so never needs pro-active refresh\n    )\n```\nThis is probably intended behavior to enable None to represent 'perpetual tokens'.\n\nIt sets up 2 fatal problems.\n\n## Issue 2 - Expired tokens get converted to 'perpetual tokens'\nIn `update_token_expiry` an expired token with a `token.expires` time of `0` is 'Falsey' which sets `token_expiry_time` to None.\n```python\ndef update_token_expiry(self, token: OAuthToken) -> None:\n    \"\"\"Update token expiry time.\"\"\"\n    if token.expires_in:     # <============================ 0 evaluates to False\n        self.token_expiry_time = time.time() + token.expires_in\n    else:\n        self.token_expiry_time = None  # <============================ Makes it perpetually valid\n```\n\nPer **Issue 1**, when `token_expiry_time` is None the token is always valid (i.e. perpetual).\n\n## Undesirable Result - Only full re-auth can refresh a 'perpetual token' that goes stale\nBecause the token is now perpetual, it never gets proactively refreshed so it always requires a 401 and full re-auth to refresh.\n\n## Issue 3 - Clients with storage always start with `token_expiry_time` set to None\nThe OAuth init does not check token expiry:\n```python\nasync def _initialize(self) -> None:\n    \"\"\"Load stored tokens and client info.\"\"\"\n    self.context.current_tokens = await self.context.storage.get_tokens()\n    self.context.client_info = await self.context.storage.get_client_info()\n    self._initialized = True\n```\nThis is often fine for Clients that persist.\n\nFor newly or frequently instantiated Clients that use Token Storage, `token_expiry_time` is None by default.\n\nDue to **Issue 1** that None value cause the token to become perpetual.\n\nDue to **Issue 2** the perpetual token is never checked for refresh.\n\nAs a result, tokens from storage (which are probably stale) are never checked prior to their first call. So they always trigger a 401 and revert to full re-auth.\n\n## Proposed Fixes\nToken update should check if token has an expires_in attribute and for an explicit None. This preserves perpetual tokens while treating expired tokens appropriately.\n\n```python\n  def update_token_expiry(self, token: OAuthToken) -> None:\n      \"\"\"Update token expiry time.\"\"\"\n      if hasattr(token, 'expires_in') and token.expires_in is not None: # <================ Fix\n          self.token_expiry_time = time.time() + token.expires_in\n      else:\n          self.token_expiry_time = None\n```\n\nAlso, the validity check should only work when `self.token_expiry_time=None` explicitly instead of when 'Falsey':\n\n```python\ndef is_token_valid(self) -> bool:\n    \"\"\"Check if current token is valid.\"\"\"\n    return bool(\n        self.current_tokens\n        and self.current_tokens.access_token\n        and (self.token_expiry_time is None or time.time() <= self.token_expiry_time) # <============== Fix\n               #^^^^^^^^^^^^^^^^^^^^^^^ None can remain signal for perpetual token\n    )\n```\n\nFinally, OAuthContext._initialize should call update_token_expiry so stored tokens aren't treated as perpetual by default:\n\n```python\nasync _initialize(self):\n    \"\"\"Initialize and properly set token expiry from stored tokens.\"\"\"\n    self.context.current_tokens = await self.context.storage.get_tokens()\n    self.context.client_info = await self.context.storage.get_client_info()\n    \n    # Fix: Update token expiry if tokens loaded from storage\n    if self.context.current_tokens:\n        self.context.update_token_expiry(self.context.current_tokens)\n    self._initialized = True\n```\n\n### Example Code\n\n```Python\n\n```\n\n### Python & MCP Python SDK\n\n```Text\nI'm on 1.12.4 but the code is still the same for 1.13.1\n```",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1318/reactions",
        "total_count": 4,
        "+1": 4,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1315",
      "id": 3360004669,
      "node_id": "I_kwDOM2n80s7IRZo9",
      "number": 1315,
      "title": "OAuth TokenHandler should check Authorization header for client credentials",
      "user": {
        "login": "Mars9934",
        "id": 46768796,
        "node_id": "MDQ6VXNlcjQ2NzY4Nzk2",
        "avatar_url": "https://avatars.githubusercontent.com/u/46768796?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/Mars9934",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 9301360597,
          "node_id": "LA_kwDOM2n80s8AAAACKmd_1Q",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/auth",
          "name": "auth",
          "color": "92ad2d",
          "default": false,
          "description": "Issues and PRs related to Authentication / OAuth"
        },
        "1": {
          "id": 9354757189,
          "node_id": "LA_kwDOM2n80s8AAAACLZZERQ",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/enhancement",
          "name": "enhancement",
          "color": "11b5cc",
          "default": true,
          "description": "Request for a new feature that's not currently supported"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 0,
      "created_at": "2025-08-27T16:18:31Z",
      "updated_at": "2025-10-06T18:46:28Z",
      "closed_at": null,
      "author_association": "NONE",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "### Description\n\nCurrently, `TokenHandler` [assumes](https://github.com/modelcontextprotocol/python-sdk/blob/main/src/mcp/server/auth/handlers/token.py#L96) that the Token request's body contains client credentials. However, some OAuth requests would contain client credentials in `Authorization` header:\n<img width=\"1616\" height=\"242\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/4fb1fef9-f89b-4908-9d3c-e52b5e8b370b\" />\n\nIn this case, it would throw `ValidationError` even though client credentials are provided in request header.\n\nCan we add a fallback such that if `client_id` is not found in `formData`, we try to get it from header? e.g.\n\n```\nasync def handle(self, request: Request):\n    try:\n        form_data = dict(await request.form())\n\n        # Try to get client credentials from header if missing in body\n        if \"client_id\" not in form_data:\n            auth_header = request.headers.get(\"Authorization\")\n            if auth_header and auth_header.startswith(\"Basic \"):\n                encoded = auth_header.split(\" \")[1]\n                decoded = base64.b64decode(encoded).decode(\"utf-8\")\n                client_id, _, client_secret = decoded.partition(\":\")\n                client_secret = urllib.parse.unquote(client_secret)\n                form_data.setdefault(\"client_id\", client_id)\n                form_data.setdefault(\"client_secret\", client_secret)\n\n        token_request = TokenRequest.model_validate(form_data).root\n    except ValidationError as validation_error:\n        return self.response(\n            TokenErrorResponse(\n                error=\"invalid_request\",\n                error_description=stringify_pydantic_error(validation_error),\n            )\n        )\n    ...\n```\n\nThanks.\n\n### References\n\n_No response_",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1315/reactions",
        "total_count": 0,
        "+1": 0,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1307",
      "id": 3353881731,
      "node_id": "I_kwDOM2n80s7H6CyD",
      "number": 1307,
      "title": "Error & Mismatch in OAuth scope resolution between Claude.ai/MCP Python SDK and Inspector",
      "user": {
        "login": "jennsun",
        "id": 26675662,
        "node_id": "MDQ6VXNlcjI2Njc1NjYy",
        "avatar_url": "https://avatars.githubusercontent.com/u/26675662?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/jennsun",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 7511840554,
          "node_id": "LA_kwDOM2n80s8AAAABv72XKg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/bug",
          "name": "bug",
          "color": "d73a4a",
          "default": true,
          "description": "Something isn't working"
        },
        "1": {
          "id": 9301360597,
          "node_id": "LA_kwDOM2n80s8AAAACKmd_1Q",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/auth",
          "name": "auth",
          "color": "92ad2d",
          "default": false,
          "description": "Issues and PRs related to Authentication / OAuth"
        },
        "2": {
          "id": 9354761244,
          "node_id": "LA_kwDOM2n80s8AAAACLZZUHA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/ready%20for%20work",
          "name": "ready for work",
          "color": "2b9402",
          "default": false,
          "description": "Enough information for someone to start working on"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 1,
      "created_at": "2025-08-26T03:00:35Z",
      "updated_at": "2025-10-03T13:58:50Z",
      "closed_at": null,
      "author_association": "NONE",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "### Initial Checks\n\n- [x] I confirm that I'm using the latest version of MCP Python SDK\n- [x] I confirm that I searched for my issue in https://github.com/modelcontextprotocol/python-sdk/issues before opening this issue\n\n### Description\n\n**TLDR:** The MCP Python SDK's OAuth flow and Claude.ai fetches scopes from the `.well-known/oauth-authorization-server` endpoint instead of the `.well-known/oauth-protected-resource` endpoint ([RFC-9728](https://datatracker.ietf.org/doc/html/rfc9728/)) causing Claude.ai connector authorization failures with MCP servers that have downscoped scoping permissions. \n\n_Working MCP Inspector Authorization Flow with correct scopes VS Failing Claude.ai connector with incorrect scopes_\n\n<img width=\"1046\" height=\"827\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/006ebdfa-9973-4dc7-8561-fe98beda8bdc\" />\n\n<img width=\"1005\" height=\"166\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/d3ee81af-62ba-419b-a9d4-093adc3c40d4\" />\n\nPer the [MCP Authorization spec](https://modelcontextprotocol.io/specification/draft/basic/authorization), the Claude client should start by fetching the (1) `.well-known/oauth-protected-resource endpoint` (per RFC-9728), which contains information about the authorization server and recommended scopes corresponding to that path. Currently, the MCP Python SDK only uses this endpoint to fetch the authorization server URL, but not the scopes. Instead, it fetches the scopes from the (2) `.well-known/oauth-authorization-server` metadata. In downscoped cases, this causes Claude to request incorrect scopes rather than the resource-specific scopes, resulting in `access_denied` during the auth callback stage.\n\nI noticed there is a discrepancy in this logic between the Python SDK implementation and the MCP Inspector Authorization flow walkthrough. The MCP Inspector correctly prioritizes scopes from the oauth-protected-resource metadata, falling back to the authorization server metadata only if no scopes are defined:\n```\n/**\n * Discovers OAuth scopes from server metadata, with preference for resource metadata scopes\n * @param serverUrl - The MCP server URL\n * @param resourceMetadata - Optional resource metadata containing preferred scopes\n * @returns Promise resolving to space-separated scope string or undefined\n */\nexport const discoverScopes = async (\n  serverUrl: string,\n  resourceMetadata?: OAuthProtectedResourceMetadata,\n): Promise<string | undefined> => {\n  try {\n    const metadata = await discoverAuthorizationServerMetadata(\n      new URL(\"/\", serverUrl),\n    );\n\n    // Prefer resource metadata scopes, but fall back to OAuth metadata if empty\n    const resourceScopes = resourceMetadata?.scopes_supported;\n    const oauthScopes = metadata?.scopes_supported;\n\n    const scopesSupported =\n      resourceScopes && resourceScopes.length > 0\n        ? resourceScopes\n        : oauthScopes;\n\n    return scopesSupported && scopesSupported.length > 0\n      ? scopesSupported.join(\" \")\n      : undefined;\n  } catch (error) {\n    console.debug(\"OAuth scope discovery failed:\", error);\n    return undefined;\n  }\n};\n```\n\n**HOW TO REPRODUCE**\nI’ve validated this by updating the scopes being requested to the `/authorize` endpoint from Claude. \nI have set up an OAuth application that has a limited set of scopes, example:\n```\n\"scopes\": [\n        \"mcp.functions\",\n        \"offline_access\"\n    ],\n```\n\n_Failing flow_ (where scopes are retrieved from `.well-known/oauth-authorization-server` endpoint:\n```\nGET /oidc/v1/authorize?response_type=code&client_id=910a86cd-07e2...\n**&scope=all-apis+email+offline_access+openid+profile+sql**\n```\nCallback response looks something like:\n```\nhttps://claude.ai/api/mcp/auth_callback?error=access_denied&error_description=Scopes+%27email+openid+profile%27+are+not+assigned+to+the+client\n```\n\nI then resubmitted the authorize request, but this time overrided the `scope` values to match that needed by our OAuth application (this follows the behavior in MCP Inspecotr):\n```\nGET /oidc/v1/authorize?response_type=code&client_id=910a86cd-07e2...\n**&scope=mcp.functions**\n```\nCallback response successfully returns an authorization code ✅ \n```\nhttps://claude.ai/api/mcp/auth_callback?code=dcod...\n```\n\nIn my setup, the first url (1) `.well-known/oauth-protected-resource endpoint` contains the proper set of scopes we need (in the `scopes_supported` field) while the second (2) `.well-known/oauth-authorization-server` endpoint advertises the list of all available scopes, but not for our particular resource. \n\n**THE ASK:**\nUpdate the scope requesting logic to be consistent with that in the MCP Inspector so the proper scopes are obtained during the authorization process. Otherwise, downscoping will not work properly with Claude connectors for MCP servers who rely on OAuth App connections for authentication/authorization.  This may look like: \n\t1.\tStore and apply scopes_supported from `.well-known/oauth-protected-resource` to the `authorize` endpoint.\n\t2.\tOnly fall back to `.well-known/oauth-authorization-server` if no scopes are present in the resource metadata.\n\n### Example Code\n\n```Python\n# From Python SDK in src/mcp/client/auth.py - we currently store authorization server information from the oauth protected resource endpoint but that's it:\n\nasync def _handle_protected_resource_response(self, response: httpx.Response) -> None:\n    if response.status_code == 200:\n        content = await response.aread()\n        metadata = ProtectedResourceMetadata.model_validate_json(content)\n        self.context.protected_resource_metadata = metadata\n        if metadata.authorization_servers:\n            self.context.auth_server_url = str(metadata.authorization_servers[0])\n\n# Notice how there is no `scopes_supported` retrieved here.\n# Later, scopes are instead pulled from the authorization server metadata:\n\nasync def _handle_oauth_metadata_response(self, response: httpx.Response) -> None:\n    content = await response.aread()\n    metadata = OAuthMetadata.model_validate_json(content)\n    self.context.oauth_metadata = metadata\n    if self.context.client_metadata.scope is None and metadata.scopes_supported is not None:\n        self.context.client_metadata.scope = \" \".join(metadata.scopes_supported)\n\n\n# Example Tentative Fix where we fetch scopes from the protected resource response:\n\n async def _handle_protected_resource_response(self, response: httpx.Response) -> None:\n        \"\"\"Handle discovery response.\"\"\"\n        if response.status_code == 200:\n            try:\n                content = await response.aread()\n                metadata = ProtectedResourceMetadata.model_validate_json(content)\n                self.context.protected_resource_metadata = metadata\n                if metadata.authorization_servers:\n                    self.context.auth_server_url = str(metadata.authorization_servers[0])\n                \n                # Apply scopes from protected resource metadata if available\n                if (metadata.scopes_supported is not None):\n                    self.context.client_metadata.scope = \" \".join(metadata.scopes_supported)\n\n\n\n# Current logic from MCP Inspector in which authorization flow works:\n\n/**\n * Discovers OAuth scopes from server metadata, with preference for resource metadata scopes\n * @param serverUrl - The MCP server URL\n * @param resourceMetadata - Optional resource metadata containing preferred scopes\n * @returns Promise resolving to space-separated scope string or undefined\n */\nexport const discoverScopes = async (\n  serverUrl: string,\n  resourceMetadata?: OAuthProtectedResourceMetadata,\n): Promise<string | undefined> => {\n  try {\n    const metadata = await discoverAuthorizationServerMetadata(\n      new URL(\"/\", serverUrl),\n    );\n\n    // Prefer resource metadata scopes, but fall back to OAuth metadata if empty\n    const resourceScopes = resourceMetadata?.scopes_supported;\n    const oauthScopes = metadata?.scopes_supported;\n\n    const scopesSupported =\n      resourceScopes && resourceScopes.length > 0\n        ? resourceScopes\n        : oauthScopes;\n\n    return scopesSupported && scopesSupported.length > 0\n      ? scopesSupported.join(\" \")\n      : undefined;\n  } catch (error) {\n    console.debug(\"OAuth scope discovery failed:\", error);\n    return undefined;\n  }\n};\n```\n\n### Python & MCP Python SDK\n\n```Text\nUsing Claude.ai site on 08/25/25\nMCP Python SDK: v1.13.1\n```",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1307/reactions",
        "total_count": 0,
        "+1": 0,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1305",
      "id": 3350320551,
      "node_id": "I_kwDOM2n80s7HsdWn",
      "number": 1305,
      "title": "Feature Proposal: Secure Tool/Resource/Prompt Decorators with Auth + Encrypted I/O",
      "user": {
        "login": "wenhuizhang",
        "id": 2313277,
        "node_id": "MDQ6VXNlcjIzMTMyNzc=",
        "avatar_url": "https://avatars.githubusercontent.com/u/2313277?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/wenhuizhang",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 9301360597,
          "node_id": "LA_kwDOM2n80s8AAAACKmd_1Q",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/auth",
          "name": "auth",
          "color": "92ad2d",
          "default": false,
          "description": "Issues and PRs related to Authentication / OAuth"
        },
        "1": {
          "id": 9354757189,
          "node_id": "LA_kwDOM2n80s8AAAACLZZERQ",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/enhancement",
          "name": "enhancement",
          "color": "11b5cc",
          "default": true,
          "description": "Request for a new feature that's not currently supported"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 0,
      "created_at": "2025-08-25T03:58:23Z",
      "updated_at": "2025-10-07T13:44:42Z",
      "closed_at": null,
      "author_association": "NONE",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "### Description\n\n🚀 Feature Request\n\nI would like to propose adding a secure wrapper layer to @mcp.tool, @mcp.resource, and @mcp.prompt that supports:\n\n1. Authentication (Auth)\n\nAbility to pass an auth function (e.g. verify_identity()) that can validate JWT, Certs, or TEE Attestation before executing the function.\n\nAuthentication should be bidirectional - we need to verify both:\n  1. Client authentication - Is the client authorized to use the tool?\n  2. Tool/Server authentication - Is the tool legitimate and trustworthy?\n\n\nIf authentication fails, return a proper MCP Error (e.g. 403 Forbidden).\n\n2. Key Negotiation Mechanism\n\nClient provides a public key (PK) or session token.\n\nServer performs Diffie-Hellman (ECDH) or TLS/mTLS handshake to derive a session key.\n\nSession key is stored in context and used for symmetric encryption/decryption of I/O.\n\n3. Unified Secure Interface\n\nDevelopers could write secure MCP functions like this:\n\n```\n@mcp.secure_tool(auth=verify_identity, encrypt=True)\nasync def trade(symbol: str, amount: float) -> str:\n    return f\"Trade {amount} {symbol} executed\"\n\n```\nAnd the same approach could apply to resource and prompt.\n\n🔹 Example Implementation\n\n```\nimport functools\nfrom mcp.server.fastmcp import FastMCP, tool, resource, prompt\nfrom mcp.server.models import Error\nfrom cryptography.hazmat.primitives.ciphers.aead import AESGCM\nimport os, base64\n\nmcp = FastMCP(\"SecureApp\")\n\n# ========== Simple Key Management ==========\nSESSION_KEY = AESGCM.generate_key(bit_length=128)\naesgcm = AESGCM(SESSION_KEY)\nNONCE_SIZE = 12\n\ndef encrypt(data: str) -> str:\n    nonce = os.urandom(NONCE_SIZE)\n    ct = aesgcm.encrypt(nonce, data.encode(), None)\n    return base64.b64encode(nonce + ct).decode()\n\ndef decrypt(token: str) -> str:\n    raw = base64.b64decode(token)\n    nonce, ct = raw[:NONCE_SIZE], raw[NONCE_SIZE:]\n    pt = aesgcm.decrypt(nonce, ct, None)\n    return pt.decode()\n\n# ========== Auth Function ==========\ndef verify_identity() -> bool:\n    # TODO: implement JWT / CERT / Attestation validation\n    return True\n\n# ========== Decorator Factory ==========\ndef secure_wrapper(deco, auth=None, encrypt_io=False, *args, **kwargs):\n    def decorator(func):\n        @deco(*args, **kwargs)   # wrap original MCP decorator\n        @functools.wraps(func)\n        async def wrapper(*f_args, **f_kwargs):\n            # Auth check\n            if auth and not auth():\n                raise Error(code=403, message=\"Authentication failed\")\n\n            # Decrypt inputs\n            if encrypt_io:\n                f_kwargs = {k: decrypt(v) if isinstance(v, str) else v \n                            for k, v in f_kwargs.items()}\n\n            # Execute\n            result = await func(*f_args, **f_kwargs) if callable(func) else func\n\n            # Encrypt outputs\n            if encrypt_io and isinstance(result, str):\n                result = encrypt(result)\n\n            return result\n        return wrapper\n    return decorator\n\n# Three secure variants\ndef secure_tool(auth=None, encrypt_io=False, *args, **kwargs):\n    return secure_wrapper(tool, auth, encrypt_io, *args, **kwargs)\n\ndef secure_resource(auth=None, encrypt_io=False, *args, **kwargs):\n    return secure_wrapper(resource, auth, encrypt_io, *args, **kwargs)\n\ndef secure_prompt(auth=None, encrypt_io=False, *args, **kwargs):\n    return secure_wrapper(prompt, auth, encrypt_io, *args, **kwargs)\n\n# ========== Usage Example ==========\n@secure_tool(auth=verify_identity, encrypt_io=True)\nasync def add(a: int, b: int) -> str:\n    return f\"sum={a+b}\"\n\n@secure_resource(\"secure://greet/{name}\", auth=verify_identity, encrypt_io=True)\ndef greeting(name: str) -> str:\n    return f\"Hello, {name}!\"\n\n@secure_prompt(auth=verify_identity, encrypt_io=True)\ndef greet_user(name: str) -> str:\n    return f\"Write a secure greeting for {name}\"\n\n```\n\n🔹 Encrypted I/O Flow\n\nInput: client encrypts arguments with session key → sends\n\nServer: decrypts args → executes function\n\nOutput: result encrypted → returned to client\n\nClient: decrypts result with the same session key\n\n\n✅ Summary\n\ntool, resource, and prompt can all uniformly support auth + encrypted I/O.\n\nImplemented via decorator factory pattern, keeping code clean.\n\nSupports pluggable JWT, Cert, TEE Attestation validation.\n\nSession key negotiation can use TLS/mTLS or ECDH.\n\nThis would make MCP safer to use in environments where sensitive data and secure tool execution are required.\n\n\n\n### References\n\n[_MR_](https://github.com/modelcontextprotocol/python-sdk/pull/1309) https://github.com/modelcontextprotocol/python-sdk/pull/1309",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1305/reactions",
        "total_count": 0,
        "+1": 0,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1304",
      "id": 3349687342,
      "node_id": "I_kwDOM2n80s7HqCwu",
      "number": 1304,
      "title": "Lifespan enters and exits for each request when stateless_http=True",
      "user": {
        "login": "savvaki",
        "id": 86887075,
        "node_id": "MDQ6VXNlcjg2ODg3MDc1",
        "avatar_url": "https://avatars.githubusercontent.com/u/86887075?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/savvaki",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 9230424293,
          "node_id": "LA_kwDOM2n80s8AAAACJi0Y5Q",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/v2",
          "name": "v2",
          "color": "5d2a87",
          "default": false,
          "description": "Ideas, requests and plans for v2 of the SDK which will incorporate major changes and fixes"
        },
        "1": {
          "id": 9354757189,
          "node_id": "LA_kwDOM2n80s8AAAACLZZERQ",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/enhancement",
          "name": "enhancement",
          "color": "11b5cc",
          "default": true,
          "description": "Request for a new feature that's not currently supported"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/milestones/3",
        "id": 12112132,
        "node_id": "MI_kwDOM2n80s4AuNEE",
        "number": 3,
        "title": "Python SDK v2.0",
        "description": "",
        "creator": {
          "login": "dsp-ant",
          "id": 167242713,
          "node_id": "U_kgDOCffr2Q",
          "avatar_url": "https://avatars.githubusercontent.com/u/167242713?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/dsp-ant",
          "type": "User",
          "user_view_type": "public",
          "site_admin": false
        },
        "open_issues": 12,
        "closed_issues": 2,
        "state": "open",
        "created_at": "2025-01-02T09:08:45Z",
        "updated_at": "2025-10-07T17:22:59Z",
        "due_on": null,
        "closed_at": null
      },
      "comments": 3,
      "created_at": "2025-08-24T16:37:53Z",
      "updated_at": "2025-12-05T04:19:14Z",
      "closed_at": null,
      "author_association": "NONE",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "### Initial Checks\n\n- [x] I confirm that I'm using the latest version of MCP Python SDK\n- [x] I confirm that I searched for my issue in https://github.com/modelcontextprotocol/python-sdk/issues before opening this issue\n\n### Description\n\nWhen `stateless_http=True`, the lifespan of the MCP server enters and exits with each request. Surely this is unintended behavior? \n\n<img width=\"882\" height=\"751\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/c769e374-b990-4293-b47a-d3675d6266be\" />\n\n### Example Code\n\n```Python\nfrom mcp.server.fastmcp import Context, FastMCP\nfrom contextlib import asynccontextmanager\n\n@asynccontextmanager\nasync def tmp_lifespan(server: FastMCP):\n    print(f\"Starting lifespan...\")\n    yield\n    print(f\"Ending lifespan...\")\n\nmcp = FastMCP(\"localmcp\", host=\"127.0.0.1\", lifespan=tmp_lifespan, port=8000, stateless_http=True)\n\n\n# Add an addition tool\n@mcp.tool()\nasync def add(a: int, b: int) -> int:\n    \"\"\"Add two numbers\"\"\"\n    return a + b\n\nif __name__ == \"__main__\":\n    print(f\"Starting MCP server...\")\n    mcp.run(transport=\"streamable-http\")\n```\n\n### Python & MCP Python SDK\n\n```Text\n1.13.0\n```",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1304/reactions",
        "total_count": 2,
        "+1": 2,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1302",
      "id": 3349672900,
      "node_id": "I_kwDOM2n80s7Hp_PE",
      "number": 1302,
      "title": "[Feature Request]: Support For \"Proxy\" in SSE and Streamable HTTP Client",
      "user": {
        "login": "DebajitKumarPhukan",
        "id": 71944582,
        "node_id": "MDQ6VXNlcjcxOTQ0NTgy",
        "avatar_url": "https://avatars.githubusercontent.com/u/71944582?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/DebajitKumarPhukan",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 9287728201,
          "node_id": "LA_kwDOM2n80s8AAAACKZd8SQ",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/needs%20maintainer%20action",
          "name": "needs maintainer action",
          "color": "d33428",
          "default": false,
          "description": "Potentially serious issue - needs proactive fix and maintainer attention"
        },
        "1": {
          "id": 9354757189,
          "node_id": "LA_kwDOM2n80s8AAAACLZZERQ",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/enhancement",
          "name": "enhancement",
          "color": "11b5cc",
          "default": true,
          "description": "Request for a new feature that's not currently supported"
        },
        "2": {
          "id": 9354761244,
          "node_id": "LA_kwDOM2n80s8AAAACLZZUHA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/ready%20for%20work",
          "name": "ready for work",
          "color": "2b9402",
          "default": false,
          "description": "Enough information for someone to start working on"
        },
        "3": {
          "id": 9354772110,
          "node_id": "LA_kwDOM2n80s8AAAACLZZ-jg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P3",
          "name": "P3",
          "color": "c7df49",
          "default": false,
          "description": "Nice to haves, rare edge cases"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 2,
      "created_at": "2025-08-24T16:18:49Z",
      "updated_at": "2025-10-07T13:16:49Z",
      "closed_at": null,
      "author_association": "NONE",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "### Description\n\n**Request**\nNeed support for http/https proxy in SSE and Streamable HTTP Client for scenarios where direct reachability to MCP servers is not possible.\n\n### References\n\n_No response_",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1302/reactions",
        "total_count": 0,
        "+1": 0,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1300",
      "id": 3348619817,
      "node_id": "I_kwDOM2n80s7Hl-Ip",
      "number": 1300,
      "title": "Lifespan does not execute on startup streamable-http",
      "user": {
        "login": "savvaki",
        "id": 86887075,
        "node_id": "MDQ6VXNlcjg2ODg3MDc1",
        "avatar_url": "https://avatars.githubusercontent.com/u/86887075?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/savvaki",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 7511840554,
          "node_id": "LA_kwDOM2n80s8AAAABv72XKg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/bug",
          "name": "bug",
          "color": "d73a4a",
          "default": true,
          "description": "Something isn't working"
        },
        "1": {
          "id": 9354761244,
          "node_id": "LA_kwDOM2n80s8AAAACLZZUHA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/ready%20for%20work",
          "name": "ready for work",
          "color": "2b9402",
          "default": false,
          "description": "Enough information for someone to start working on"
        },
        "2": {
          "id": 9354765360,
          "node_id": "LA_kwDOM2n80s8AAAACLZZkMA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P0",
          "name": "P0",
          "color": "a81d34",
          "default": false,
          "description": "Broken core functionality, security issues, critical missing feature"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 5,
      "created_at": "2025-08-23T18:38:13Z",
      "updated_at": "2025-10-22T06:00:01Z",
      "closed_at": null,
      "author_association": "NONE",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "### Initial Checks\n\n- [x] I confirm that I'm using the latest version of MCP Python SDK\n- [x] I confirm that I searched for my issue in https://github.com/modelcontextprotocol/python-sdk/issues before opening this issue\n\n### Description\n\nWith `stdio` protocol, the lifespan runs on server start up as expected. However, with `streamable-http`  the lifespan does not execute on server start up.\n\n\n### Example Code\n\n```Python\nfrom collections.abc import AsyncIterator\nfrom contextlib import asynccontextmanager\nfrom dataclasses import dataclass\n\nfrom mcp.server.fastmcp import Context, FastMCP\nfrom mcp.server.session import ServerSession\n\n\n# Mock database class for example\nclass Database:\n    \"\"\"Mock database class for example.\"\"\"\n\n    @classmethod\n    async def connect(cls) -> \"Database\":\n        \"\"\"Connect to database.\"\"\"\n        return cls()\n\n    async def disconnect(self) -> None:\n        \"\"\"Disconnect from database.\"\"\"\n        pass\n\n    def query(self) -> str:\n        \"\"\"Execute a query.\"\"\"\n        return \"Query result\"\n\n\n@dataclass\nclass AppContext:\n    \"\"\"Application context with typed dependencies.\"\"\"\n\n    db: Database\n\n\n@asynccontextmanager\nasync def app_lifespan(server: FastMCP) -> AsyncIterator[AppContext]:\n    \"\"\"Manage application lifecycle with type-safe context.\"\"\"\n    # Initialize on startup\n    print(\"Enter lifespan\")\n    db = await Database.connect()\n    try:\n        yield AppContext(db=db)\n    finally:\n        # Cleanup on shutdown\n        await db.disconnect()\n\n\n# Pass lifespan to server\nmcp = FastMCP(\"My App\", lifespan=app_lifespan)\n\n\n# Access type-safe lifespan context in tools\n@mcp.tool()\ndef query_db(ctx: Context[ServerSession, AppContext]) -> str:\n    \"\"\"Tool that uses initialized resources.\"\"\"\n    db = ctx.request_context.lifespan_context.db\n    return db.query()\n\nmcp.run(transport=\"streamable-http\") # on server startup, the lifespan does not run\n```\n\n### Python & MCP Python SDK\n\n```Text\n1.13.1\n```",
      "closed_by": {
        "login": "savvaki",
        "id": 86887075,
        "node_id": "MDQ6VXNlcjg2ODg3MDc1",
        "avatar_url": "https://avatars.githubusercontent.com/u/86887075?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/savvaki",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1300/reactions",
        "total_count": 0,
        "+1": 0,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": "reopened",
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1295",
      "id": 3346829678,
      "node_id": "I_kwDOM2n80s7HfJFu",
      "number": 1295,
      "title": "401 in Streamable HTTP should be handled gracefully",
      "user": {
        "login": "somaraani",
        "id": 30779165,
        "node_id": "MDQ6VXNlcjMwNzc5MTY1",
        "avatar_url": "https://avatars.githubusercontent.com/u/30779165?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/somaraani",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 7511840554,
          "node_id": "LA_kwDOM2n80s8AAAABv72XKg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/bug",
          "name": "bug",
          "color": "d73a4a",
          "default": true,
          "description": "Something isn't working"
        },
        "1": {
          "id": 9354761244,
          "node_id": "LA_kwDOM2n80s8AAAACLZZUHA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/ready%20for%20work",
          "name": "ready for work",
          "color": "2b9402",
          "default": false,
          "description": "Enough information for someone to start working on"
        },
        "2": {
          "id": 9354770246,
          "node_id": "LA_kwDOM2n80s8AAAACLZZ3Rg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P2",
          "name": "P2",
          "color": "d2b457",
          "default": false,
          "description": "Moderate issues affecting some users, edge cases, potentially valuable feature"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 0,
      "created_at": "2025-08-22T21:31:45Z",
      "updated_at": "2025-10-07T13:56:39Z",
      "closed_at": null,
      "author_association": "NONE",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "### Initial Checks\n\n- [x] I confirm that I'm using the latest version of MCP Python SDK\n- [x] I confirm that I searched for my issue in https://github.com/modelcontextprotocol/python-sdk/issues before opening this issue\n\n### Description\n\nCurrently, `streamable_http` will call `response.raise_for_status()` when handling POST requests. [(ref)](https://github.com/modelcontextprotocol/python-sdk/blob/9a8592e7d4d69b785df8b5d9d7b694cb6cbb149f/src/mcp/client/streamable_http.py#L278).\n\nThis means that a 401 will bubble up and cause the entire program to crash. \n\nWhile a 401 on server initialize could warrant an exception, we have a use case where a MCP server will return 401 for specific unauthorized operations, and allow others.\n\nThis should be handled gracefully, similar to how [`_handle_unexpected_content_type`](https://github.com/modelcontextprotocol/python-sdk/blob/9a8592e7d4d69b785df8b5d9d7b694cb6cbb149f/src/mcp/client/streamable_http.py#L340C15-L340C46) works, returning a JSONRPC message outlining an unauthorized exception was thrown.\n\nThis would let an agent or other client handle it instead of crashing the program.\n\n\n### Python & MCP Python SDK\n\n```Text\nPython 3.12 and MCP SDK v1.13.1\n```",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1295/reactions",
        "total_count": 0,
        "+1": 0,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1294",
      "id": 3345385004,
      "node_id": "I_kwDOM2n80s7HZoYs",
      "number": 1294,
      "title": "Streamable_ ttp. py shows warning",
      "user": {
        "login": "LidiYuan",
        "id": 32826615,
        "node_id": "MDQ6VXNlcjMyODI2NjE1",
        "avatar_url": "https://avatars.githubusercontent.com/u/32826615?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/LidiYuan",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 7511840554,
          "node_id": "LA_kwDOM2n80s8AAAABv72XKg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/bug",
          "name": "bug",
          "color": "d73a4a",
          "default": true,
          "description": "Something isn't working"
        },
        "1": {
          "id": 9354761244,
          "node_id": "LA_kwDOM2n80s8AAAACLZZUHA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/ready%20for%20work",
          "name": "ready for work",
          "color": "2b9402",
          "default": false,
          "description": "Enough information for someone to start working on"
        },
        "2": {
          "id": 9354770246,
          "node_id": "LA_kwDOM2n80s8AAAACLZZ3Rg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P2",
          "name": "P2",
          "color": "d2b457",
          "default": false,
          "description": "Moderate issues affecting some users, edge cases, potentially valuable feature"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 3,
      "created_at": "2025-08-22T12:49:49Z",
      "updated_at": "2025-10-03T17:45:06Z",
      "closed_at": null,
      "author_association": "NONE",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "### Initial Checks\n\n- [x] I confirm that I'm using the latest version of MCP Python SDK\n- [x] I confirm that I searched for my issue in https://github.com/modelcontextprotocol/python-sdk/issues before opening this issue\n\n### Description\n\nI used the following URL code, but a warning message appeared in MCP 1.13.1 version\n```\nhttps://github.com/modelcontextprotocol/python-sdk/blob/main/examples/servers/simple-streamablehttp-stateless/mcp_simple_streamablehttp_stateless/server.py  \n```\n\n\n\nThe warning message is as follows:\n```\n2025-08-22 20:39:59,254 - mcp.server.streamable_http - ERROR - Error in message router\nTraceback (most recent call last):\nFile \"xx\\.venv\\Lib\\site-packages\\mcp\\server\\streamable_http.py\", line 831, in message_router\nasync for session_message in write_stream_reader:\nFile xx\\.venv\\Lib\\site-packages\\anyio\\abc\\_streams.py\", line 41, in __anext__\nreturn await self.receive()\n^^^^^^^^^^^^^^^^^^^^\nFile \"xx\\.venv\\Lib\\site-packages\\anyio\\streams\\memory.py\", line 111, in receive\nreturn self.receive_nowait()\n^^^^^^^^^^^^^^^^^^^^^\nFile \"xx\\.venv\\Lib\\site-packages\\anyio\\streams\\memory.py\", line 93, in receive_nowait\nraise ClosedResourceError\nanyio.ClosedResourceError\n```\n\n### Example Code\n\n```Python\nimport contextlib\nimport logging\nfrom collections.abc import AsyncIterator\nfrom typing import Any\n\nimport anyio\nimport click\nimport mcp.types as types\nfrom mcp.server.lowlevel import Server\nfrom mcp.server.streamable_http_manager import StreamableHTTPSessionManager\nfrom starlette.applications import Starlette\nfrom starlette.middleware.cors import CORSMiddleware\nfrom starlette.routing import Mount\nfrom starlette.types import Receive, Scope, Send\n\nlogger = logging.getLogger(__name__)\n\n\ndef main(\n    port: int,\n    log_level: str,\n    json_response: bool,\n) -> int:\n    # Configure logging\n    logging.basicConfig(\n        level=getattr(logging, log_level.upper()),\n        format=\"%(asctime)s - %(name)s - %(levelname)s - %(message)s\",\n    )\n\n    app = Server(\"mcp-streamable-http-stateless-demo\")\n\n    @app.call_tool()\n    async def call_tool(name: str, arguments: dict[str, Any]) -> list[types.ContentBlock]:\n        ctx = app.request_context\n        interval = arguments.get(\"interval\", 1.0)\n        count = arguments.get(\"count\", 5)\n        caller = arguments.get(\"caller\", \"unknown\")\n\n        # Send the specified number of notifications with the given interval\n        for i in range(count):\n            await ctx.session.send_log_message(\n                level=\"info\",\n                data=f\"Notification {i + 1}/{count} from caller: {caller}\",\n                logger=\"notification_stream\",\n                related_request_id=ctx.request_id,\n            )\n            if i < count - 1:  # Don't wait after the last notification\n                await anyio.sleep(interval)\n\n        return [\n            types.TextContent(\n                type=\"text\",\n                text=(f\"Sent {count} notifications with {interval}s interval for caller: {caller}\"),\n            )\n        ]\n\n    @app.list_tools()\n    async def list_tools() -> list[types.Tool]:\n        return [\n            types.Tool(\n                name=\"start-notification-stream\",\n                description=(\"Sends a stream of notifications with configurable count and interval\"),\n                inputSchema={\n                    \"type\": \"object\",\n                    \"required\": [\"interval\", \"count\", \"caller\"],\n                    \"properties\": {\n                        \"interval\": {\n                            \"type\": \"number\",\n                            \"description\": \"Interval between notifications in seconds\",\n                        },\n                        \"count\": {\n                            \"type\": \"number\",\n                            \"description\": \"Number of notifications to send\",\n                        },\n                        \"caller\": {\n                            \"type\": \"string\",\n                            \"description\": (\"Identifier of the caller to include in notifications\"),\n                        },\n                    },\n                },\n            )\n        ]\n\n    # Create the session manager with true stateless mode\n    session_manager = StreamableHTTPSessionManager(\n        app=app,\n        event_store=None,\n        json_response=json_response,\n        stateless=True,\n    )\n\n    async def handle_streamable_http(scope: Scope, receive: Receive, send: Send) -> None:\n        await session_manager.handle_request(scope, receive, send)\n\n    @contextlib.asynccontextmanager\n    async def lifespan(app: Starlette) -> AsyncIterator[None]:\n        \"\"\"Context manager for session manager.\"\"\"\n        async with session_manager.run():\n            logger.info(\"Application started with StreamableHTTP session manager!\")\n            try:\n                yield\n            finally:\n                logger.info(\"Application shutting down...\")\n\n    # Create an ASGI application using the transport\n    starlette_app = Starlette(\n        debug=True,\n        routes=[\n            Mount(\"/mcp\", app=handle_streamable_http),\n        ],\n        lifespan=lifespan,\n    )\n\n    # Wrap ASGI application with CORS middleware to expose Mcp-Session-Id header\n    # for browser-based clients (ensures 500 errors get proper CORS headers)\n    starlette_app = CORSMiddleware(\n        starlette_app,\n        allow_origins=[\"*\"],  # Allow all origins - adjust as needed for production\n        allow_methods=[\"GET\", \"POST\", \"DELETE\"],  # MCP streamable HTTP methods\n        expose_headers=[\"Mcp-Session-Id\"],\n    )\n\n    import uvicorn\n\n    uvicorn.run(starlette_app, host=\"0.0.0.0\", port=port)\n\n    return 0\n\nif __name__ == \"__main__\":\n    main(8001,\"debug\",True)  # Run the main function when this script is executed\n```\n\n### Python & MCP Python SDK\n\n```Text\nMy Python version number:\n\nPython 3.12.4\n\n\nCode running mode\n\npython main.py\n\n\nos version:\n\nwin11\n```",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1294/reactions",
        "total_count": 0,
        "+1": 0,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1291",
      "id": 3340066364,
      "node_id": "I_kwDOM2n80s7HFV48",
      "number": 1291,
      "title": "How to allow ClientSessionGroup to pass additional parameters to ClientSession (_establish_session method)？",
      "user": {
        "login": "raychen911",
        "id": 15060148,
        "node_id": "MDQ6VXNlcjE1MDYwMTQ4",
        "avatar_url": "https://avatars.githubusercontent.com/u/15060148?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/raychen911",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 7511840554,
          "node_id": "LA_kwDOM2n80s8AAAABv72XKg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/bug",
          "name": "bug",
          "color": "d73a4a",
          "default": true,
          "description": "Something isn't working"
        },
        "1": {
          "id": 9354761244,
          "node_id": "LA_kwDOM2n80s8AAAACLZZUHA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/ready%20for%20work",
          "name": "ready for work",
          "color": "2b9402",
          "default": false,
          "description": "Enough information for someone to start working on"
        },
        "2": {
          "id": 9354765360,
          "node_id": "LA_kwDOM2n80s8AAAACLZZkMA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P0",
          "name": "P0",
          "color": "a81d34",
          "default": false,
          "description": "Broken core functionality, security issues, critical missing feature"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 1,
      "created_at": "2025-08-21T02:29:24Z",
      "updated_at": "2025-10-07T14:00:14Z",
      "closed_at": null,
      "author_association": "NONE",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "### Initial Checks\n\n- [x] I confirm that I'm using the latest version of MCP Python SDK\n- [x] I confirm that I searched for my issue in https://github.com/modelcontextprotocol/python-sdk/issues before opening this issue\n\n### Description\n\n[session_group](https://github.com/modelcontextprotocol/python-sdk/blob/main/src/mcp/client/session_group.py )\n\nWhen I use ClientSessionGroup, I expect `mcp.ClientSession` to support the `elicitation_callback` parameter. However, I found that there is no way to pass this parameter through the initialization of `ClientSessionGroup`.\n\n### Example Code\n\n```Python\nasync def _establish_session(\n        self, server_params: ServerParameters\n    ) -> tuple[types.Implementation, mcp.ClientSession]:\n        \"\"\"Establish a client session to an MCP server.\"\"\"\n\n        \n            # This does not allow passing other arguments supported by ClientSession, such as: elicitation_callback\n            await self._exit_stack.enter_async_context(session_stack)\n            # ...\n```\n\n### Python & MCP Python SDK\n\n```Text\n1.13.0\n```",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1291/reactions",
        "total_count": 0,
        "+1": 0,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1281",
      "id": 3331661423,
      "node_id": "I_kwDOM2n80s7GlR5v",
      "number": 1281,
      "title": "Modular system to define MCP Primitives",
      "user": {
        "login": "FallenDeity",
        "id": 61227305,
        "node_id": "MDQ6VXNlcjYxMjI3MzA1",
        "avatar_url": "https://avatars.githubusercontent.com/u/61227305?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/FallenDeity",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 9354757189,
          "node_id": "LA_kwDOM2n80s8AAAACLZZERQ",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/enhancement",
          "name": "enhancement",
          "color": "11b5cc",
          "default": true,
          "description": "Request for a new feature that's not currently supported"
        },
        "1": {
          "id": 9354761244,
          "node_id": "LA_kwDOM2n80s8AAAACLZZUHA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/ready%20for%20work",
          "name": "ready for work",
          "color": "2b9402",
          "default": false,
          "description": "Enough information for someone to start working on"
        },
        "2": {
          "id": 9354770246,
          "node_id": "LA_kwDOM2n80s8AAAACLZZ3Rg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P2",
          "name": "P2",
          "color": "d2b457",
          "default": false,
          "description": "Moderate issues affecting some users, edge cases, potentially valuable feature"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 1,
      "created_at": "2025-08-18T18:16:43Z",
      "updated_at": "2025-11-12T18:30:40Z",
      "closed_at": null,
      "author_association": "NONE",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "### Description\n\nCurrent fastmcp server implementations, both high-level and low-level, present fundamental challenges for writing scalable and modular, multi-file applications.\n\nThe high-level fastmcp server relies on decorators like `@mcp.tool()`, `@mcp.resource()` etc. A prerequisite for these decorators is access to the main server instance (`mcp`). This design often forces developers to define all their primitives within a single monolithic file (e.g., `server.py`), which hinders modularity and makes it difficult to organize larger projects.\n\nWhile the low-level server implementation allows for defining primitives in separate files, this approach introduces its own complexities. It requires manually importing the primitives for the `list_<primitive>` handlers and routing callbacks through a large `if/else` ladder or a `match/case` block (e.g `call_tool` handler). This is cumbersome and less elegant compared to the clean, decorator-based interface the high-level server provides.\n\nThere is no out of the box method or exposed interface to build large scale modularized mcp servers, and to add primitives from other files or sources where the mcp instance is not present involves patching the internals or utilizing some internal methods/managers manually.\n\nThis is why it's unergonomic \n\nUsually mcp servers are often wrappers around existing systems to provide the system resources to a llm, hence for systems with extensive apis, could benefit from organization, ex: (`users/` -> `tools.py`, `resources.py` etc, `items/`)\n\nMaintainability, if there are a large number of developers working on a particular mcp server, smaller atomic and role specific files are easier to read, debug and maintain.\n\nConsistency & Reusability, some primitives can have shared configs for a particular set of tools/resources like metadata, tags etc. These primitive groups can also be modularly reused based on versioning or application set features.\n\nHere is how I envision how this might look like:\n\n```py\nuser_tools_manager = MCPPluginManager(name=\"user-tools\")\n\ndef has_bot_user(ctx: MiddlewareContext[CallToolRequest]) -> bool:\n    return ctx.context.bot.user is not None\n\n@user_tools_manager.register_tool\n@user_tools_manager.check(has_bot_user)  # predicate checks, can be control logic or access control\nasync def get_current_user(ctx: DiscordMCPContext) -> DiscordUser:\n    \"\"\"Get the current bot user.\"\"\"\n    return DiscordUser.from_discord_user(ctx.bot.user)\n\n@user_tools_manager.register_resource(\"resource://discord/user/{user_id}\")\nasync def get_user_resource(ctx: DiscordMCPContext, user_id: str) -> DiscordUser:\n    \"\"\"Get a user resource by their ID.\"\"\"\n    user = ctx.bot.get_user(int(user_id)) or await ctx.bot.fetch_user(int(user_id))\n    return DiscordUser.from_discord_user(user)\n\n# Current completion/complete request handler requires a global handler, this could help with argument and callback specific handlers\n@get_user_resource.autocomplete(\"user_id\")\nasync def autocomplete_user_id(\n    ctx: DiscordMCPContext, ref: DiscordMCPResourceTemplate, query: str, context_args: dict[str, t.Any] | None = None\n) -> list[str]:\n    \"\"\"Autocomplete user IDs.\"\"\"\n    if not query:\n        return []\n    users = ctx.bot.users\n    return [str(user.id) for user in users if query.lower() in user.name.lower() or query in str(user.id)][:10]\n\n\n@user_tools_manager.register_tool\n@user_tools_manager.limit(RateLimitType.FIXED_WINDOW, rate=1, per=180) # possible ratelimit, or cooldown logic\nasync def get_latency(ctx: DiscordMCPContext) -> float:\n    \"\"\"Get the latency of the bot.\"\"\"\n    latency = ctx.bot.latency * 1000\n    return latency\n```\nThese plugin managers or groups can be loaded and added to the respective primitive managers in the server when setting up the handlers.\n\nThis is working system we built when working on our own mcp server for discord, and the source code for the above can be found here, but the ability to do something similar natively out of the package would be a pretty nice option to have.\n\nPlugin Manager- https://github.com/FallenDeity/discord-mcp/blob/master/src/discord_mcp/core/plugins/manager.py\nUsage - https://github.com/FallenDeity/discord-mcp/blob/master/src/discord_mcp/core/discord_ext/user/tools.py\nServer - https://github.com/FallenDeity/discord-mcp/blob/07dcc418aaa57cf22089c5db411e1c9c20063b77/src/discord_mcp/core/server/base.py#L819-L869\n\n\n### References\n\nThis already a common concept in quite a few popular frameworks like fastapi, django etc. which have the concept of routers which is largely used to create applications at scale\n\n- https://fastapi.tiangolo.com/tutorial/bigger-applications\n- https://www.django-rest-framework.org/api-guide/routers/\n- https://flask.palletsprojects.com/en/stable/blueprints/",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1281/reactions",
        "total_count": 0,
        "+1": 0,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1277",
      "id": 3326360748,
      "node_id": "I_kwDOM2n80s7GRDys",
      "number": 1277,
      "title": "How to get environment variables on the server?",
      "user": {
        "login": "ilvalerione",
        "id": 13559278,
        "node_id": "MDQ6VXNlcjEzNTU5Mjc4",
        "avatar_url": "https://avatars.githubusercontent.com/u/13559278?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/ilvalerione",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 7511840560,
          "node_id": "LA_kwDOM2n80s8AAAABv72XMA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/documentation",
          "name": "documentation",
          "color": "0075ca",
          "default": true,
          "description": "Improvements or additions to documentation"
        },
        "1": {
          "id": 7511840603,
          "node_id": "LA_kwDOM2n80s8AAAABv72XWw",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/question",
          "name": "question",
          "color": "d876e3",
          "default": true,
          "description": "Further information is requested"
        },
        "2": {
          "id": 9354761244,
          "node_id": "LA_kwDOM2n80s8AAAACLZZUHA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/ready%20for%20work",
          "name": "ready for work",
          "color": "2b9402",
          "default": false,
          "description": "Enough information for someone to start working on"
        },
        "3": {
          "id": 9354770246,
          "node_id": "LA_kwDOM2n80s8AAAACLZZ3Rg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P2",
          "name": "P2",
          "color": "d2b457",
          "default": false,
          "description": "Moderate issues affecting some users, edge cases, potentially valuable feature"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 1,
      "created_at": "2025-08-15T21:01:53Z",
      "updated_at": "2025-10-07T15:43:21Z",
      "closed_at": null,
      "author_association": "NONE",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "### Question\n\nI haven't been able to figure out how to get environment variables in tool functions on an MCP server, or if they're actually supported.\n\nThis should be a valid client configuration:\n\n```json\n{\n    \"mcpServers\": {\n        \"php-calculator\": {\n            \"command\": \"python\",\n            \"args\": [\"/absolute/path/to/your/mcp-server.py\"], \n            \"env\": {\"API_KEY\": \"xxxx\"}\n        }\n    }\n}\n```\n\nHow can I get the `API_KEY` environment variable on the server? \n\n### Additional Context\n\n_No response_",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1277/reactions",
        "total_count": 0,
        "+1": 0,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1274",
      "id": 3323527716,
      "node_id": "I_kwDOM2n80s7GGQIk",
      "number": 1274,
      "title": "Streamable HTTP client performance regression starting with v1.12.0",
      "user": {
        "login": "rcxwhiz",
        "id": 48007451,
        "node_id": "MDQ6VXNlcjQ4MDA3NDUx",
        "avatar_url": "https://avatars.githubusercontent.com/u/48007451?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/rcxwhiz",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 7511840554,
          "node_id": "LA_kwDOM2n80s8AAAABv72XKg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/bug",
          "name": "bug",
          "color": "d73a4a",
          "default": true,
          "description": "Something isn't working"
        },
        "1": {
          "id": 9354761244,
          "node_id": "LA_kwDOM2n80s8AAAACLZZUHA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/ready%20for%20work",
          "name": "ready for work",
          "color": "2b9402",
          "default": false,
          "description": "Enough information for someone to start working on"
        },
        "2": {
          "id": 9354770246,
          "node_id": "LA_kwDOM2n80s8AAAACLZZ3Rg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P2",
          "name": "P2",
          "color": "d2b457",
          "default": false,
          "description": "Moderate issues affecting some users, edge cases, potentially valuable feature"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/milestones/18",
        "id": 13810637,
        "node_id": "MI_kwDOM2n80s4A0rvN",
        "number": 18,
        "title": "HTTP Transport Edge Cases",
        "description": null,
        "creator": {
          "login": "felixweinberger",
          "id": 3823880,
          "node_id": "MDQ6VXNlcjM4MjM4ODA=",
          "avatar_url": "https://avatars.githubusercontent.com/u/3823880?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/felixweinberger",
          "type": "User",
          "user_view_type": "public",
          "site_admin": false
        },
        "open_issues": 6,
        "closed_issues": 4,
        "state": "open",
        "created_at": "2025-10-03T10:46:49Z",
        "updated_at": "2025-12-04T10:36:28Z",
        "due_on": null,
        "closed_at": null
      },
      "comments": 1,
      "created_at": "2025-08-14T20:32:40Z",
      "updated_at": "2025-12-04T10:38:36Z",
      "closed_at": null,
      "author_association": "NONE",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "### Initial Checks\n\n- [x] I confirm that I'm using the latest version of MCP Python SDK\n- [x] I confirm that I searched for my issue in https://github.com/modelcontextprotocol/python-sdk/issues before opening this issue\n\n### Description\n\n# Summary\n\nI have experienced a major performance degradation with streamable HTTP clients on certain servers starting in version 1.12.0 which is still present in the current version (1.13.0). I see this issue with the Notion remote MCP server on streamable HTTP transport (`https://mcp.notion.com/mcp`). While other servers work fine, there is a ~10 second delay with any operation on an established client session to this server after v1.11.0. The performance is fine at v1.11.0, and is fine with the current version of inspector. \n\n# Steps to Reproduce\n\nI have a repo containing my code to reproduce the issue and more details: [repo](https://github.com/pallassecurity/mcp-client-performance-testing)\n\n# Test Results\n\nTesting results, copied from the above repo:\n\n## SDK Version 1.11.0 (latest without bug)\n\n```\nStarting tests with official Python MCP SDK version 1.11.0\n\nRunning simple client connection tests...\nTest results: 0.0614 0.0136 0.0120 0.0116 0.0106 (avg 0.0219s)\n\nRunning simple tool list tests...\nTest results: 0.0042 0.0041 0.0041 0.0041 0.0047 (avg 0.0042s)\n\nRunning simple tool call tests...\nTest results: 0.0080 0.0067 0.0068 0.0072 0.0246 (avg 0.0107s)\n\nStarting callback server... done\nRunning in memory OAuth provider construction tests...\nTest results: 0.0016 0.0001 0.0000 0.0000 0.0000 (avg 0.0004s)\n\nRunning Notion client connection tests (OAuth)...\nTest results: 6.0797 0.9399 0.9005 0.8184 1.0262 (avg 1.9529s)\n\nRunning Notion list tools tests...\nTest results: 0.3850 0.1293 0.1308 0.1496 0.1233 (avg 0.1836s)\n\nRunning Notion call tool tests...\nTest results: 0.4083 0.6162 0.8519 0.1946 0.6942 (avg 0.5530s)\n\nStopping callback server... done\nRunning GitHub client connection tests (PAT)...\nTest results: 0.5784 0.2820 0.2962 0.2857 0.3079 (avg 0.3500s)\n\nRunning GitHub list tools tests...\nTest results: 0.5216 0.1121 0.1129 0.1286 0.1175 (avg 0.1986s)\n\nRunning GitHub call tool tests...\nTest results: 0.2627 0.3505 0.2029 0.2623 0.3536 (avg 0.2864s)\n\nFinished!\n```\n\n## SDK Version 1.12.1 (earliest with bug)\n\n```\nStarting tests with official Python MCP SDK version 1.12.1\n\nRunning simple client connection tests...\nTest results: 0.0593 0.0138 0.0120 0.0111 0.0105 (avg 0.0213s)\n\nRunning simple tool list tests...\nTest results: 0.0039 0.0036 0.0034 0.0050 0.0033 (avg 0.0039s)\n\nRunning simple tool call tests...\nTest results: 0.0072 0.0058 0.0063 0.0063 0.0062 (avg 0.0064s)\n\nStarting callback server... done\nRunning in memory OAuth provider construction tests...\nTest results: 0.0009 0.0001 0.0000 0.0000 0.0001 (avg 0.0002s)\n\nRunning Notion client connection tests (OAuth)...\nTest results: 6.3121 11.7071 11.6994 11.6963 11.7797 (avg 10.6389s)\n\nRunning Notion list tools tests...\nTest results: 10.6288 10.4737 10.3595 10.3114 10.5529 (avg 10.4652s)\n\nRunning Notion call tool tests...\nTest results: 10.6931 11.1187 13.4962 11.9530 10.8899 (avg 11.6302s)\n\nStopping callback server... done\nRunning GitHub client connection tests (PAT)...\nTest results: 0.4818 0.2940 0.2908 0.2831 0.2908 (avg 0.3281s)\n\nRunning GitHub list tools tests...\nTest results: 0.5536 0.1563 0.1076 0.1102 0.1399 (avg 0.2135s)\n\nRunning GitHub call tool tests...\nTest results: 0.2749 0.2801 0.2645 0.3661 0.3368 (avg 0.3045s)\n\nFinished!\n```\n\n## SDK Version 1.13.0 (latest)\n\n```\nStarting tests with official Python MCP SDK version 1.13.0\n\nRunning simple client connection tests...\nTest results: 0.0596 0.0133 0.0116 0.0108 0.0104 (avg 0.0212s)\n\nRunning simple tool list tests...\nTest results: 0.0040 0.0035 0.0035 0.0053 0.0036 (avg 0.0040s)\n\nRunning simple tool call tests...\nTest results: 0.0072 0.0060 0.0064 0.0058 0.0064 (avg 0.0064s)\n\nStarting callback server... done\nRunning in memory OAuth provider construction tests...\nTest results: 0.0021 0.0001 0.0000 0.0000 0.0000 (avg 0.0005s)\n\nRunning Notion client connection tests (OAuth)...\nTest results: 5.4729 11.4962 11.8369 11.6574 11.5804 (avg 10.4088s)\n\nRunning Notion list tools tests...\nTest results: 10.5502 10.4495 10.4619 10.3530 10.4236 (avg 10.4476s)\n\nRunning Notion call tool tests...\nTest results: 10.5274 10.8830 10.5276 11.6691 10.5476 (avg 10.8309s)\n\nStopping callback server... done\nRunning GitHub client connection tests (PAT)...\nTest results: 0.4458 0.2909 0.2915 0.2900 0.2837 (avg 0.3204s)\n\nRunning GitHub list tools tests...\nTest results: 0.5327 0.1121 0.1792 0.1069 0.1083 (avg 0.2079s)\n\nRunning GitHub call tool tests...\nTest results: 0.2469 0.2270 0.2424 0.3186 0.2323 (avg 0.2534s)\n\nFinished!\n```\n\n# Comments\n\nAs written in my testing repo, I have profiled the `OAuthClientProvider` and don't believe there is an issue with that. This issue is present when establishing client sessions and calling established client sessions. I believe there must be an underlying issue with the streamable HTTP transport that is only manifest with some servers, but that is beyond my expertise. \n\n### Example Code\n\n```Python\n\n```\n\n### Python & MCP Python SDK\n\n```Text\nPython 3.12.11 used for all testing.\n\nIssue present in version 1.12.1 to 1.13.0.\n\nIssue NOT present in version 1.11.0.\n\nNo results for version 1.12.0 due to unrelated (as far as I can tell) bug.\n```",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1274/reactions",
        "total_count": 0,
        "+1": 0,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1272",
      "id": 3322609936,
      "node_id": "I_kwDOM2n80s7GCwEQ",
      "number": 1272,
      "title": "Server hangs when shutting down if a connection is still open",
      "user": {
        "login": "lindycoder",
        "id": 12926519,
        "node_id": "MDQ6VXNlcjEyOTI2NTE5",
        "avatar_url": "https://avatars.githubusercontent.com/u/12926519?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/lindycoder",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 7511840554,
          "node_id": "LA_kwDOM2n80s8AAAABv72XKg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/bug",
          "name": "bug",
          "color": "d73a4a",
          "default": true,
          "description": "Something isn't working"
        },
        "1": {
          "id": 9354761244,
          "node_id": "LA_kwDOM2n80s8AAAACLZZUHA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/ready%20for%20work",
          "name": "ready for work",
          "color": "2b9402",
          "default": false,
          "description": "Enough information for someone to start working on"
        },
        "2": {
          "id": 9354767859,
          "node_id": "LA_kwDOM2n80s8AAAACLZZt8w",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P1",
          "name": "P1",
          "color": "895d17",
          "default": false,
          "description": "Significant bug affecting many users, highly requested feature"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 1,
      "created_at": "2025-08-14T15:18:25Z",
      "updated_at": "2025-10-03T17:50:48Z",
      "closed_at": null,
      "author_association": "NONE",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "### Initial Checks\n\n- [x] I confirm that I'm using the latest version of MCP Python SDK\n- [x] I confirm that I searched for my issue in https://github.com/modelcontextprotocol/python-sdk/issues before opening this issue\n\n### Description\n\nHello!\n\nI was testing my MCP server with the inspector `npx @modelcontextprotocol/inspector` using streamable-http and I noticed that if the inspector is connected, the MCP Server will not shutdown.\n\nWe can't keep the server running if a client forgot to disconnect right?  This is tested with the official inspector tools, so there might be other clients working the same way.\n\nShouldn't the server close its active connections/tasks on shutdown?\n\n### Reproduction\n\n1. Run the server (see code snippet)\n2. In the MCP Inspector click \"connect\"\n3. In the server's terminal hit CTRL+C\n\nAt this point\n- The server shows `Waiting for connections to close (CTRL+C to force quit)` and CTRL+C doesn't work, in fact nothing works except killing the process\n- Clicking \"Disconned\" in the Inspector cannot disconnect, because `Error in /mcp route: TypeError: fetch failed`\n\n### Evidences\n\nShell execution\n\n```shell\n$ python demo-mcp.py                 \nINFO:     Started server process [10749]\nINFO:     Waiting for application startup.\n[08/14/25 11:03:16] INFO     StreamableHTTP session manager started                                                                                                                                                                                 streamable_http_manager.py:110\nINFO:     Application startup complete.\nINFO:     Uvicorn running on http://127.0.0.1:8000 (Press CTRL+C to quit)\n[08/14/25 11:03:21] INFO     Created new transport with session ID: 4134f60ccda44baf8a01733ed94bc0d8                                                                                                                                                streamable_http_manager.py:233\nINFO:     127.0.0.1:54629 - \"POST /mcp HTTP/1.1\" 200 OK\nINFO:     127.0.0.1:54629 - \"POST /mcp HTTP/1.1\" 202 Accepted\nINFO:     127.0.0.1:54630 - \"GET /mcp HTTP/1.1\" 200 OK\n^CINFO:     Shutting down\nINFO:     Waiting for connections to close. (CTRL+C to force quit)\n```\n\nInspector proxy Disconnect error\n```\nReceived DELETE message for sessionId dd8a78d2-d5a8-4ff2-b679-6a8571f7cd0c\nConnection refused. Is the MCP server running?\nError in /mcp route: TypeError: fetch failed\n    at node:internal/deps/undici/undici:13502:13\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n    at async StreamableHTTPClientTransport.terminateSession (file://.../.npm/_npx/5a9d879542beca3a/node_modules/@modelcontextprotocol/sdk/dist/esm/client/streamableHttp.js:355:30)\n    at async file://.../.npm/_npx/5a9d879542beca3a/node_modules/@modelcontextprotocol/inspector/server/build/index.js:264:17 {\n  [cause]: Error: connect ECONNREFUSED 127.0.0.1:8000\n      at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1636:16) {\n    errno: -61,\n    code: 'ECONNREFUSED',\n    syscall: 'connect',\n    address: '127.0.0.1',\n    port: 8000\n  }\n}\n```\n\n### Mitigation\n\nSetting the `timeout_graceful_shutdown` uvicorn config to a few seconds will eventually quit the process, **BUT** this is exiting with a non 0 exit code, which is an issue trying to run this in production.   (This setting has been request [here](https://github.com/modelcontextprotocol/python-sdk/issues/253) and currently available in FastMCP 2.0)\n\n\n### Example Code\n\n```Python\nfrom mcp.server.fastmcp import FastMCP\n\nmcp = FastMCP(\"demo\")\n\n@mcp.tool()\nasync def hello() -> str:\n    return \"world\"\n\nmcp.run(transport=\"streamable-http\")\n```\n\n### Python & MCP Python SDK\n\n```Text\nPython 3.12.8\nmcp 1.12.4\n```\n\n**Edit**: reproduced with mcp 1.13.0",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1272/reactions",
        "total_count": 5,
        "+1": 5,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1269",
      "id": 3319135681,
      "node_id": "I_kwDOM2n80s7F1f3B",
      "number": 1269,
      "title": "FastMCP server death on client HEAD calls",
      "user": {
        "login": "chipkent",
        "id": 5250374,
        "node_id": "MDQ6VXNlcjUyNTAzNzQ=",
        "avatar_url": "https://avatars.githubusercontent.com/u/5250374?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/chipkent",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 7511840554,
          "node_id": "LA_kwDOM2n80s8AAAABv72XKg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/bug",
          "name": "bug",
          "color": "d73a4a",
          "default": true,
          "description": "Something isn't working"
        },
        "1": {
          "id": 9354761244,
          "node_id": "LA_kwDOM2n80s8AAAACLZZUHA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/ready%20for%20work",
          "name": "ready for work",
          "color": "2b9402",
          "default": false,
          "description": "Enough information for someone to start working on"
        },
        "2": {
          "id": 9354770246,
          "node_id": "LA_kwDOM2n80s8AAAACLZZ3Rg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P2",
          "name": "P2",
          "color": "d2b457",
          "default": false,
          "description": "Moderate issues affecting some users, edge cases, potentially valuable feature"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 4,
      "created_at": "2025-08-13T16:41:58Z",
      "updated_at": "2025-10-21T17:06:25Z",
      "closed_at": null,
      "author_association": "NONE",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "### Initial Checks\n\n- [x] I confirm that I'm using the latest version of MCP Python SDK\n- [x] I confirm that I searched for my issue in https://github.com/modelcontextprotocol/python-sdk/issues before opening this issue\n\n### Description\n\nI am using streamable HTTP for MCP.  I see HTTP HEAD calls in the log which killing the server.  I expect the server to be resilient to poor user behavior.\n\nMy code:\nhttps://github.com/deephaven/deephaven-mcp/tree/main/src/deephaven_mcp/mcp_docs_server\n\nExample logs:\n```\n2025-08-13 09:29:26.178 PDT\n[2025-08-13 16:29:26,179] INFO: [mcp_docs_server:app_lifespan] MCP docs server ready and yielding context\n2025-08-13 09:29:26.179 PDT\nINFO: 169.254.169.126:65146 - \"HEAD /mcp HTTP/1.1\" 405 Method Not Allowed\n2025-08-13 09:29:26.179 PDT\n[2025-08-13 16:29:26,180] INFO: Terminating session: None\n2025-08-13 09:29:26.183 PDT\n[2025-08-13 16:29:26,180] ERROR: Error in message router\n2025-08-13 09:29:26.183 PDT\nTraceback (most recent call last):\n  File \"/app/.venv/lib/python3.12/site-packages/mcp/server/streamable_http.py\", line 831, in message_router\n    async for session_message in write_stream_reader:\n  File \"/app/.venv/lib/python3.12/site-packages/anyio/abc/_streams.py\", line 41, in __anext__\n    return await self.receive()\n\n2025-08-13 09:29:26.183 PDT\n^^^^^^^^^^^^^^^^^^^^\n2025-08-13 09:29:26.183 PDT\nFile \"/app/.venv/lib/python3.12/site-packages/anyio/streams/memory.py\", line 111, in receive\n2025-08-13 09:29:26.183 PDT\nreturn self.receive_nowait()\n2025-08-13 09:29:26.183 PDT\n^^^^^^^^^^^^^^^^^^^^^\n2025-08-13 09:29:26.183 PDT\nFile \"/app/.venv/lib/python3.12/site-packages/anyio/streams/memory.py\", line 93, in receive_nowait\n2025-08-13 09:29:26.183 PDT\nraise ClosedResourceError\n2025-08-13 09:29:26.183 PDT\nanyio.ClosedResourceError\n2025-08-13 09:29:26.183 PDT\n[2025-08-13 16:29:26,184] INFO: [mcp_docs_server:app_lifespan] Context manager exiting normally\n2025-08-13 09:29:26.184 PDT\n[2025-08-13 16:29:26,184] INFO: [mcp_docs_server:app_lifespan] Final memory usage: 109.02 MB\n2025-08-13 09:29:26.184 PDT\n[2025-08-13 16:29:26,184] INFO: [mcp_docs_server:app_lifespan] Final CPU percent: 0.0%\n2025-08-13 09:29:26.184 PDT\n[2025-08-13 16:29:26,184] INFO: [mcp_docs_server:app_lifespan] Final open file descriptors: 11\n2025-08-13 09:29:26.184 PDT\n[2025-08-13 16:29:26,185] INFO: [mcp_docs_server:app_lifespan] shutdown active asyncio tasks: 3\n2025-08-13 09:29:26.184 PDT\n[2025-08-13 16:29:26,185] WARNING: [mcp_docs_server:app_lifespan] Running tasks during shutdown: 3\n2025-08-13 09:29:26.184 PDT\n[2025-08-13 16:29:26,185] WARNING: [mcp_docs_server:app_lifespan] Running task 1: mcp.server.streamable_http_manager.StreamableHTTPSessionManager._handle_stateless_request.<locals>.run_stateless_server\n2025-08-13 09:29:26.184 PDT\n[2025-08-13 16:29:26,185] WARNING: [mcp_docs_server:app_lifespan] Running task 2: Task-2\n2025-08-13 09:29:26.184 PDT\n[2025-08-13 16:29:26,185] WARNING: [mcp_docs_server:app_lifespan] Running task 3: mcp.server.fastmcp.server.FastMCP.run_streamable_http_async\n2025-08-13 09:29:26.184 PDT\n[2025-08-13 16:29:26,185] INFO: [mcp_docs_server:app_lifespan] shutdown active threads: 1\n2025-08-13 09:29:26.185 PDT\n[2025-08-13 16:29:26,185] INFO: [mcp_docs_server:app_lifespan] MCP docs server shutting down\n```\n\nMy attempts to work around this problem are in this PR.  You would need to look at the whole history of what I tried.  I included different middleware changes, increasing versions, etc.\nhttps://github.com/deephaven/deephaven-mcp/pull/89\n\n\n### Example Code\n\n```Python\nMy code:\nhttps://github.com/deephaven/deephaven-mcp/tree/main/src/deephaven_mcp/mcp_docs_server\n```\n\n### Python & MCP Python SDK\n\n```Text\nThe build can be found at https://github.com/deephaven/deephaven-mcp/blob/main/ops/docker/mcp-docs/Dockerfile.  It is python 3.12 with the latest mcp (version >= 1.12.4).\n```",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1269/reactions",
        "total_count": 0,
        "+1": 0,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1265",
      "id": 3314930982,
      "node_id": "I_kwDOM2n80s7FldUm",
      "number": 1265,
      "title": "Trailing slash in `.well-known/oauth-protected-resource` response may violate “Canonical Server URI” requirement",
      "user": {
        "login": "FakeDocument",
        "id": 127398201,
        "node_id": "U_kgDOB5fxOQ",
        "avatar_url": "https://avatars.githubusercontent.com/u/127398201?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/FakeDocument",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 7511840603,
          "node_id": "LA_kwDOM2n80s8AAAABv72XWw",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/question",
          "name": "question",
          "color": "d876e3",
          "default": true,
          "description": "Further information is requested"
        },
        "1": {
          "id": 9301360597,
          "node_id": "LA_kwDOM2n80s8AAAACKmd_1Q",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/auth",
          "name": "auth",
          "color": "92ad2d",
          "default": false,
          "description": "Issues and PRs related to Authentication / OAuth"
        },
        "2": {
          "id": 9354761244,
          "node_id": "LA_kwDOM2n80s8AAAACLZZUHA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/ready%20for%20work",
          "name": "ready for work",
          "color": "2b9402",
          "default": false,
          "description": "Enough information for someone to start working on"
        },
        "3": {
          "id": 9354772110,
          "node_id": "LA_kwDOM2n80s8AAAACLZZ-jg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P3",
          "name": "P3",
          "color": "c7df49",
          "default": false,
          "description": "Nice to haves, rare edge cases"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 0,
      "created_at": "2025-08-12T15:59:37Z",
      "updated_at": "2025-10-03T19:43:01Z",
      "closed_at": null,
      "author_association": "NONE",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "### Question\n\nAs I understand it, `https://your-mcp.com/.well-known/oauth-protected-resource` should return:\n\n```json\n{\n    \"resource\": \"https://your-mcp.com\",\n    \"authorization_servers\": [\n        \"https://your-auth.com\"\n    ],\n    \"scopes_supported\": [],\n    \"bearer_methods_supported\": [\n        \"header\"\n    ]\n}\n```\n\nHowever, it actually returns:\n\n```json\n{\n    \"resource\": \"https://your-mcp.com/\",\n    \"authorization_servers\": [\n        \"https://your-auth.com/\"\n    ],\n    \"scopes_supported\": [],\n    \"bearer_methods_supported\": [\n        \"header\"\n    ]\n}\n```\n\nNote the trailing `/` in both the `resource` and `authorization_servers` values.\n\nAccording to the MCP spec’s “resource-parameter-implementation” section, I believe this violates the requirement for canonicalization:\n[https://modelcontextprotocol.io/specification/2025-06-18/basic/authorization#resource-parameter-implementation](https://modelcontextprotocol.io/specification/2025-06-18/basic/authorization#resource-parameter-implementation)\n\nIs this a bug, or am I misunderstanding the requirement?",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1265/reactions",
        "total_count": 0,
        "+1": 0,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1264",
      "id": 3314008539,
      "node_id": "I_kwDOM2n80s7Fh8Hb",
      "number": 1264,
      "title": "Protected Resource Metadata resource erroneous when setting up authentication on server",
      "user": {
        "login": "carlosemart",
        "id": 1837442,
        "node_id": "MDQ6VXNlcjE4Mzc0NDI=",
        "avatar_url": "https://avatars.githubusercontent.com/u/1837442?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/carlosemart",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 7511840554,
          "node_id": "LA_kwDOM2n80s8AAAABv72XKg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/bug",
          "name": "bug",
          "color": "d73a4a",
          "default": true,
          "description": "Something isn't working"
        },
        "1": {
          "id": 9301360597,
          "node_id": "LA_kwDOM2n80s8AAAACKmd_1Q",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/auth",
          "name": "auth",
          "color": "92ad2d",
          "default": false,
          "description": "Issues and PRs related to Authentication / OAuth"
        },
        "2": {
          "id": 9354761244,
          "node_id": "LA_kwDOM2n80s8AAAACLZZUHA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/ready%20for%20work",
          "name": "ready for work",
          "color": "2b9402",
          "default": false,
          "description": "Enough information for someone to start working on"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 3,
      "created_at": "2025-08-12T12:27:20Z",
      "updated_at": "2025-10-28T22:50:10Z",
      "closed_at": null,
      "author_association": "NONE",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "### Initial Checks\n\n- [x] I confirm that I'm using the latest version of MCP Python SDK\n- [x] I confirm that I searched for my issue in https://github.com/modelcontextprotocol/python-sdk/issues before opening this issue\n\n### Description\n\nI am getting the following error when I try to enable MCP server authentication and configure it in VSCODE copilot:\n\n`Error Error sending message to http://localhost:8000/mcp: Error: Protected Resource Metadata resource \"http://localhost:8000/\" does not match MCP server resolved resource \"http://localhost:8000/mcp\". The MCP server must follow OAuth spec https://datatracker.ietf.org/doc/html/rfc9728#PRConfigurationValidation`\n\nFrom what I have seen, the error is caused because the metada that is returned in the endpoint \"/.well-known/oauth-protected-resource\" in the resource field does not match the url of the MCP server to be configured to use copilot and what is specified in the definition if they should match. You can see here https://datatracker.ietf.org/doc/html/rfc9728#PRConfigurationValidation\n\nI have made a small snippet of code available here https://github.com/carlosemart/python-mcp-oauth-example in which you can see that the well-know answer is:\n```json\n{\n    \"resource\": \"http://localhost:8000/\",\n    \"authorization_servers\": [\n        \"https://auth.example.com/\"\n    ],\n    \"scopes_supported\": [\n        \"user\"\n    ],\n    \"bearer_methods_supported\": [\n        \"header\"\n    ]\n}\n```\nand in the resource field you should see \"http://localhost:8000/mcp\" which is the url that is configured in VSCODE.\n\n### Example Code\n\n```Python\nfrom mcp.server.auth.provider import AccessToken, TokenVerifier\nfrom mcp.server.auth.settings import AuthSettings\nfrom mcp.server.fastmcp import FastMCP\nfrom pydantic import AnyHttpUrl\n\n\nclass SimpleTokenVerifier(TokenVerifier):\n    \"\"\"Simple token verifier for demonstration.\"\"\"\n\n    async def verify_token(self, token: str) -> AccessToken | None:\n        return AccessToken(\n            token=token,\n            scopes=[\"user\"],\n        )\n\n\n# Create an MCP server\nmcp = FastMCP(\n    \"Demo\",\n    stateless_http=True,\n    # Token verifier for authentication\n    token_verifier=SimpleTokenVerifier(),\n    # Auth settings for RFC 9728 Protected Resource Metadata\n    auth=AuthSettings(\n        issuer_url=AnyHttpUrl(\"https://auth.example.com\"),  # Authorization Server URL\n        resource_server_url=AnyHttpUrl(\"http://localhost:8000\"),  # This server's URL\n        required_scopes=[\"user\"],\n    ),\n)\n\n\n# Add an addition tool\n@mcp.tool()\ndef add(a: int, b: int) -> int:\n    \"\"\"Add two numbers\"\"\"\n    return a + b\n\n\n# Add a dynamic greeting resource\n@mcp.resource(\"greeting://{name}\")\ndef get_greeting(name: str) -> str:\n    \"\"\"Get a personalized greeting\"\"\"\n    return f\"Hello, {name}!\"\n\n\n# Add a prompt\n@mcp.prompt()\ndef greet_user(name: str, style: str = \"friendly\") -> str:\n    \"\"\"Generate a greeting prompt\"\"\"\n    styles = {\n        \"friendly\": \"Please write a warm, friendly greeting\",\n        \"formal\": \"Please write a formal, professional greeting\",\n        \"casual\": \"Please write a casual, relaxed greeting\",\n    }\n\n    return f\"{styles.get(style, styles['friendly'])} for someone named {name}.\"\n\n\ndef main():\n    \"\"\"Entry point for the direct execution server.\"\"\"\n    mcp.run(transport=\"streamable-http\")\n\n\nif __name__ == \"__main__\":\n    main()\n\n\n```\n\n### Python & MCP Python SDK\n\n```Text\nTested with python version 3.11.9 and 3.12.5, and MCP Python SDK 1.12.4 version\n```",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1264/reactions",
        "total_count": 2,
        "+1": 2,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1257",
      "id": 3307236164,
      "node_id": "I_kwDOM2n80s7FIGtE",
      "number": 1257,
      "title": "Don’t use shell=True in mcp dev subprocess on Windows (command injection risk)",
      "user": {
        "login": "0x-Professor",
        "id": 160357695,
        "node_id": "U_kgDOCY7dPw",
        "avatar_url": "https://avatars.githubusercontent.com/u/160357695?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/0x-Professor",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 7511840554,
          "node_id": "LA_kwDOM2n80s8AAAABv72XKg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/bug",
          "name": "bug",
          "color": "d73a4a",
          "default": true,
          "description": "Something isn't working"
        },
        "1": {
          "id": 9354761244,
          "node_id": "LA_kwDOM2n80s8AAAACLZZUHA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/ready%20for%20work",
          "name": "ready for work",
          "color": "2b9402",
          "default": false,
          "description": "Enough information for someone to start working on"
        },
        "2": {
          "id": 9354765360,
          "node_id": "LA_kwDOM2n80s8AAAACLZZkMA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P0",
          "name": "P0",
          "color": "a81d34",
          "default": false,
          "description": "Broken core functionality, security issues, critical missing feature"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 0,
      "created_at": "2025-08-10T06:33:53Z",
      "updated_at": "2025-10-06T17:44:57Z",
      "closed_at": null,
      "author_association": "NONE",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "### Initial Checks\n\n- [x] I confirm that I'm using the latest version of MCP Python SDK\n- [x] I confirm that I searched for my issue in https://github.com/modelcontextprotocol/python-sdk/issues before opening this issue\n\n### Description\n\n**What’s happening:**\n\nWhen you run the `mcp dev` command on Windows, it starts another program using a method (`subprocess.run` with `shell=True`) that lets the Windows command prompt (cmd.exe) handle the command. This is risky because if any part of the command includes special characters (like &, |, %, etc.), Windows might run something you didn’t expect — even another program, if the file path or arguments are weirdly named or crafted.\n\n**Why this is a real problem:**\n\n- This isn’t just a theory — it’s a well-known risk with `shell=True` in Python. If anyone (or any script) can control part of the file path or arguments, they might be able to run extra commands on your computer.\n- The Python documentation says to avoid `shell=True` when possible for exactly this reason.\n- The fix is easy: use `shell=False` and make sure the right Windows executable is picked (like `npx.cmd`).\n- This keeps things safe and works the same on all systems.\n\n**What should happen instead:**\n\n- The command should be run without `shell=True` on Windows, just like it is on Linux/Mac.\n- File paths and arguments should always be passed as a list, not a single string.\n\n**How this could be abused:**\n\n- If someone manages to sneak a file or argument with a shell special character into your project, running `mcp dev` could run extra commands (for example, opening Calculator if the file had `&calc` in its name).\n\n**Please fix:**\n- Remove `shell=True` from the `subprocess.run` call in `src/mcp/cli/cli.py` (Windows part).\n- Make sure the command and its arguments are always passed as a list.\n- Make sure it works on Windows by using the right executable (like `npx.cmd`).\n\nThanks!\n\n### Example Code\n\n```Python\n# Example of risky situation on Windows:\n# If a file is named \"server&calc.py\" and you run:\n#   mcp dev path\\to\\server&calc.py\n# Windows might run Calculator because of the &\n\n# Please see src/mcp/cli/cli.py (mcp dev command) for the subprocess.run([npx_cmd, ...], shell=True, ...)\n```\n\n### Python & MCP Python SDK\n\n```Text\nPython 3.11, Windows 11, latest MCP Python SDK (main branch, August 2025)\n```",
      "closed_by": {
        "login": "0x-Professor",
        "id": 160357695,
        "node_id": "U_kgDOCY7dPw",
        "avatar_url": "https://avatars.githubusercontent.com/u/160357695?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/0x-Professor",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1257/reactions",
        "total_count": 0,
        "+1": 0,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": "reopened",
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1253",
      "id": 3306105673,
      "node_id": "I_kwDOM2n80s7FDytJ",
      "number": 1253,
      "title": "Python SDK v2",
      "user": {
        "login": "Kludex",
        "id": 7353520,
        "node_id": "MDQ6VXNlcjczNTM1MjA=",
        "avatar_url": "https://avatars.githubusercontent.com/u/7353520?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/Kludex",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 9230424293,
          "node_id": "LA_kwDOM2n80s8AAAACJi0Y5Q",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/v2",
          "name": "v2",
          "color": "5d2a87",
          "default": false,
          "description": "Ideas, requests and plans for v2 of the SDK which will incorporate major changes and fixes"
        },
        "1": {
          "id": 9354757189,
          "node_id": "LA_kwDOM2n80s8AAAACLZZERQ",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/enhancement",
          "name": "enhancement",
          "color": "11b5cc",
          "default": true,
          "description": "Request for a new feature that's not currently supported"
        },
        "2": {
          "id": 9354761244,
          "node_id": "LA_kwDOM2n80s8AAAACLZZUHA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/ready%20for%20work",
          "name": "ready for work",
          "color": "2b9402",
          "default": false,
          "description": "Enough information for someone to start working on"
        },
        "3": {
          "id": 9354765360,
          "node_id": "LA_kwDOM2n80s8AAAACLZZkMA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P0",
          "name": "P0",
          "color": "a81d34",
          "default": false,
          "description": "Broken core functionality, security issues, critical missing feature"
        }
      },
      "state": "open",
      "locked": true,
      "assignee": {
        "login": "Kludex",
        "id": 7353520,
        "node_id": "MDQ6VXNlcjczNTM1MjA=",
        "avatar_url": "https://avatars.githubusercontent.com/u/7353520?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/Kludex",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "assignees": {
        "0": {
          "login": "Kludex",
          "id": 7353520,
          "node_id": "MDQ6VXNlcjczNTM1MjA=",
          "avatar_url": "https://avatars.githubusercontent.com/u/7353520?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/Kludex",
          "type": "User",
          "user_view_type": "public",
          "site_admin": false
        }
      },
      "milestone": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/milestones/3",
        "id": 12112132,
        "node_id": "MI_kwDOM2n80s4AuNEE",
        "number": 3,
        "title": "Python SDK v2.0",
        "description": "",
        "creator": {
          "login": "dsp-ant",
          "id": 167242713,
          "node_id": "U_kgDOCffr2Q",
          "avatar_url": "https://avatars.githubusercontent.com/u/167242713?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/dsp-ant",
          "type": "User",
          "user_view_type": "public",
          "site_admin": false
        },
        "open_issues": 12,
        "closed_issues": 2,
        "state": "open",
        "created_at": "2025-01-02T09:08:45Z",
        "updated_at": "2025-10-07T17:22:59Z",
        "due_on": null,
        "closed_at": null
      },
      "comments": 1,
      "created_at": "2025-08-09T08:33:28Z",
      "updated_at": "2025-12-04T10:44:47Z",
      "closed_at": null,
      "author_association": "MEMBER",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 3,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "I'll use this issue to add notes about what I think should happen for V2. \n\n- [ ] Use snake case instead of camel case on `types.py` (#97)\n- [ ] Don't use `RootModel` on `types.py` - It makes hard to reason about types.\n- [ ] Revisit generic classes, and add more default values for them #1207\n- [ ] Rethink `ClientSessionGroup`. It doesn't have a user-friendly API.\n- [ ] Rename `FastMCP` to `MCPServer`.\n- [ ] https://github.com/modelcontextprotocol/python-sdk/issues/12\n\nI'll lock the issue, so only maintainers can comment, and I can focus on the things that I really think should be here.",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1253/reactions",
        "total_count": 0,
        "+1": 0,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1251",
      "id": 3303828412,
      "node_id": "I_kwDOM2n80s7E7Gu8",
      "number": 1251,
      "title": "Incorrect typing hint for FastMCP.call_tool",
      "user": {
        "login": "de-code",
        "id": 1016473,
        "node_id": "MDQ6VXNlcjEwMTY0NzM=",
        "avatar_url": "https://avatars.githubusercontent.com/u/1016473?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/de-code",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 7511840554,
          "node_id": "LA_kwDOM2n80s8AAAABv72XKg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/bug",
          "name": "bug",
          "color": "d73a4a",
          "default": true,
          "description": "Something isn't working"
        },
        "1": {
          "id": 9354761244,
          "node_id": "LA_kwDOM2n80s8AAAACLZZUHA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/ready%20for%20work",
          "name": "ready for work",
          "color": "2b9402",
          "default": false,
          "description": "Enough information for someone to start working on"
        },
        "2": {
          "id": 9354772110,
          "node_id": "LA_kwDOM2n80s8AAAACLZZ-jg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P3",
          "name": "P3",
          "color": "c7df49",
          "default": false,
          "description": "Nice to haves, rare edge cases"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 0,
      "created_at": "2025-08-08T12:12:58Z",
      "updated_at": "2025-10-06T15:37:14Z",
      "closed_at": null,
      "author_association": "NONE",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "### Initial Checks\n\n- [x] I confirm that I'm using the latest version of MCP Python SDK\n- [x] I confirm that I searched for my issue in https://github.com/modelcontextprotocol/python-sdk/issues before opening this issue\n\n### Description\n\nThe signature for FastMCP.call_tool:\n\n```python\n    async def call_tool(self, name: str, arguments: dict[str, Any]) -> Sequence[ContentBlock] | dict[str, Any]:\n```\n\ni.e. it says the return type is either a sequence of ContentBlock or a dict.\n\nHowever, it seems to be more like either just a sequence of ContentBlock or a tuple of: sequence of ContentBlock and a dict:\n\n```python\nSequence[ContentBlock] | tuple[Sequence[ContentBlock], dict[str, Any]]\n```\n\nThat is because it always passes `convert_result=True` to `self._tool_manager.call_tool` (it would be nice if that was exposed as a parameter). And the `convert_result` result function (in `mcp.server.fastmcp.utilities.func_metadata`) is implemented like that but doesn't have any useful type hints.\n\nThis has changed after version `1.9.4` (i.e. in `1.9.4` it was still just a sequence of ContentBlock).\n\n### Example Code\n\n```Python\nfrom mcp.server.fastmcp import FastMCP\n\n\nmcp = FastMCP(name='Example MCP Server')\n\n\n@mcp.tool()\nasync def add_numbers(a: int, b: int) -> int:\n    \"\"\"Add two numbers.\"\"\"\n    return a + b\n\n...\n\n# Within an async context call:\n\nresult = await mcp.call_tool(\n    \"add_numbers\",\n    arguments={\"a\": 1, \"b\": 2}\n)\nprint('result:', result)\n\n# Output:\nresult: ([TextContent(type='text', text='3', annotations=None, meta=None)], {'result': 3})\n```\n\n### Python & MCP Python SDK\n\n```Text\n1.12.4\n```",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1251/reactions",
        "total_count": 0,
        "+1": 0,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1250",
      "id": 3303682583,
      "node_id": "I_kwDOM2n80s7E6jIX",
      "number": 1250,
      "title": "Framework does not handle refreshed tokens correctly",
      "user": {
        "login": "pematth",
        "id": 1656159,
        "node_id": "MDQ6VXNlcjE2NTYxNTk=",
        "avatar_url": "https://avatars.githubusercontent.com/u/1656159?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/pematth",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 7511840554,
          "node_id": "LA_kwDOM2n80s8AAAABv72XKg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/bug",
          "name": "bug",
          "color": "d73a4a",
          "default": true,
          "description": "Something isn't working"
        },
        "1": {
          "id": 9301360597,
          "node_id": "LA_kwDOM2n80s8AAAACKmd_1Q",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/auth",
          "name": "auth",
          "color": "92ad2d",
          "default": false,
          "description": "Issues and PRs related to Authentication / OAuth"
        },
        "2": {
          "id": 9354761244,
          "node_id": "LA_kwDOM2n80s8AAAACLZZUHA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/ready%20for%20work",
          "name": "ready for work",
          "color": "2b9402",
          "default": false,
          "description": "Enough information for someone to start working on"
        },
        "3": {
          "id": 9354765360,
          "node_id": "LA_kwDOM2n80s8AAAACLZZkMA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P0",
          "name": "P0",
          "color": "a81d34",
          "default": false,
          "description": "Broken core functionality, security issues, critical missing feature"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 9,
      "created_at": "2025-08-08T11:25:52Z",
      "updated_at": "2025-12-03T13:43:26Z",
      "closed_at": null,
      "author_association": "NONE",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "### Initial Checks\n\n- [x] I confirm that I'm using the latest version of MCP Python SDK\n- [x] I confirm that I searched for my issue in https://github.com/modelcontextprotocol/python-sdk/issues before opening this issue\n\n### Description\n\nI use python sdk with Keycloak as external authz provider. I allowed my mcp client (in my test scenario it is latest VSC) to get AT and RT (using offline_access scope). I have implemented a  TokenVerifier that is doing validation of the MCP keycloak JWT. And then in some MCP tool, i use get_access_token() from the framework to use the JWT. I log both values and i can clearly see that it works fine initially, but after the token was refreshed on client-side, i still get the old accesst token from get_access_token() function. Not sure if you intended to support token refresh in a clean way. But IMHO that is a bug that should be fixed soon.\n\n### Example Code\n\n```Python\n\n```\n\n### Python & MCP Python SDK\n\n```Text\n1.12.4\n```",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1250/reactions",
        "total_count": 0,
        "+1": 0,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1240",
      "id": 3293908162,
      "node_id": "I_kwDOM2n80s7EVQzC",
      "number": 1240,
      "title": "Implement OAuth relying on Authlib",
      "user": {
        "login": "yannj-fr",
        "id": 4557670,
        "node_id": "MDQ6VXNlcjQ1NTc2NzA=",
        "avatar_url": "https://avatars.githubusercontent.com/u/4557670?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/yannj-fr",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 7511840581,
          "node_id": "LA_kwDOM2n80s8AAAABv72XRQ",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/good%20first%20issue",
          "name": "good first issue",
          "color": "7057ff",
          "default": true,
          "description": "Good for newcomers"
        },
        "1": {
          "id": 9301360597,
          "node_id": "LA_kwDOM2n80s8AAAACKmd_1Q",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/auth",
          "name": "auth",
          "color": "92ad2d",
          "default": false,
          "description": "Issues and PRs related to Authentication / OAuth"
        },
        "2": {
          "id": 9354757189,
          "node_id": "LA_kwDOM2n80s8AAAACLZZERQ",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/enhancement",
          "name": "enhancement",
          "color": "11b5cc",
          "default": true,
          "description": "Request for a new feature that's not currently supported"
        },
        "3": {
          "id": 9354761244,
          "node_id": "LA_kwDOM2n80s8AAAACLZZUHA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/ready%20for%20work",
          "name": "ready for work",
          "color": "2b9402",
          "default": false,
          "description": "Enough information for someone to start working on"
        },
        "4": {
          "id": 9354767859,
          "node_id": "LA_kwDOM2n80s8AAAACLZZt8w",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P1",
          "name": "P1",
          "color": "895d17",
          "default": false,
          "description": "Significant bug affecting many users, highly requested feature"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 6,
      "created_at": "2025-08-05T17:34:20Z",
      "updated_at": "2025-11-12T17:44:17Z",
      "closed_at": null,
      "author_association": "CONTRIBUTOR",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "### Description\n\nHello, \nI would like to validate here before I start the implementation that we want to use Authlib as a Oauth implementation to support more use case in the future and reduce the cost of maintenance of the Oauth stack.\nPlease can maintainers comment so I don't initiate a long work for nothing.\n\nThanks a lot !\n\ncc @Kludex @ochafik\n\n### References\n\n_No response_",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1240/reactions",
        "total_count": 0,
        "+1": 0,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1233",
      "id": 3288946937,
      "node_id": "I_kwDOM2n80s7ECVj5",
      "number": 1233,
      "title": "Middleware Support in MCP",
      "user": {
        "login": "dsp-ant",
        "id": 167242713,
        "node_id": "U_kgDOCffr2Q",
        "avatar_url": "https://avatars.githubusercontent.com/u/167242713?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/dsp-ant",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 9354757189,
          "node_id": "LA_kwDOM2n80s8AAAACLZZERQ",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/enhancement",
          "name": "enhancement",
          "color": "11b5cc",
          "default": true,
          "description": "Request for a new feature that's not currently supported"
        },
        "1": {
          "id": 9354761244,
          "node_id": "LA_kwDOM2n80s8AAAACLZZUHA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/ready%20for%20work",
          "name": "ready for work",
          "color": "2b9402",
          "default": false,
          "description": "Enough information for someone to start working on"
        },
        "2": {
          "id": 9354767859,
          "node_id": "LA_kwDOM2n80s8AAAACLZZt8w",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P1",
          "name": "P1",
          "color": "895d17",
          "default": false,
          "description": "Significant bug affecting many users, highly requested feature"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/milestones/13",
        "id": 13746145,
        "node_id": "MI_kwDOM2n80s4A0b_h",
        "number": 13,
        "title": "Middleware Support",
        "description": "",
        "creator": {
          "login": "felixweinberger",
          "id": 3823880,
          "node_id": "MDQ6VXNlcjM4MjM4ODA=",
          "avatar_url": "https://avatars.githubusercontent.com/u/3823880?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/felixweinberger",
          "type": "User",
          "user_view_type": "public",
          "site_admin": false
        },
        "open_issues": 3,
        "closed_issues": 3,
        "state": "open",
        "created_at": "2025-09-23T10:48:37Z",
        "updated_at": "2025-12-03T22:03:37Z",
        "due_on": null,
        "closed_at": null
      },
      "comments": 1,
      "created_at": "2025-08-04T10:52:16Z",
      "updated_at": "2025-10-06T18:43:58Z",
      "closed_at": null,
      "author_association": "MEMBER",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "### Description\n\nWe need a proper middleware mechanic in the server code. This must support adding custom Starlette middlware and have a pre-defined order of middleware when auth is enabled. See FastMCP 2.0 for inspiration.\n\n### References\n\n_No response_",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1233/reactions",
        "total_count": 2,
        "+1": 2,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1218",
      "id": 3278322258,
      "node_id": "I_kwDOM2n80s7DZzpS",
      "number": 1218,
      "title": "`simple-streamablehttp-stateless` example will not return data if `id=0`",
      "user": {
        "login": "howardjohn",
        "id": 623453,
        "node_id": "MDQ6VXNlcjYyMzQ1Mw==",
        "avatar_url": "https://avatars.githubusercontent.com/u/623453?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/howardjohn",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 7511840554,
          "node_id": "LA_kwDOM2n80s8AAAABv72XKg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/bug",
          "name": "bug",
          "color": "d73a4a",
          "default": true,
          "description": "Something isn't working"
        },
        "1": {
          "id": 9354761244,
          "node_id": "LA_kwDOM2n80s8AAAACLZZUHA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/ready%20for%20work",
          "name": "ready for work",
          "color": "2b9402",
          "default": false,
          "description": "Enough information for someone to start working on"
        },
        "2": {
          "id": 9354770246,
          "node_id": "LA_kwDOM2n80s8AAAACLZZ3Rg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P2",
          "name": "P2",
          "color": "d2b457",
          "default": false,
          "description": "Moderate issues affecting some users, edge cases, potentially valuable feature"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 0,
      "created_at": "2025-07-30T20:14:19Z",
      "updated_at": "2025-10-06T15:29:09Z",
      "closed_at": null,
      "author_association": "NONE",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "### Initial Checks\n\n- [x] I confirm that I'm using the latest version of MCP Python SDK\n- [x] I confirm that I searched for my issue in https://github.com/modelcontextprotocol/python-sdk/issues before opening this issue\n\n### Description\n\nI ran the `simple-streamablehttp-stateless` example, then connected via curl.\n\nIf I send:\n\n```\ncurl localhost:3000/mcp/ --json '{\"jsonrpc\":\"2.0\",\"id\":0,\"method\":\"tools/call\",\"params\":{\"_meta\":{\"progressToken\":0},\"name\":\"start-notification-stream\",\"arguments\":{\"interval\":0.1,\"count\":5,\"caller\":\"\"}}}' -H \"Accept: application/json, text/event-stream\"\n```\n\nit does NOT work; there are no notifications sent.\n\nIf I send (changing only the id):\n```\ncurl localhost:3000/mcp/ --json '{\"jsonrpc\":\"2.0\",\"id\":1,\"method\":\"tools/call\",\"params\":{\"_meta\":{\"progressToken\":0},\"name\":\"start-notification-stream\",\"arguments\":{\"interval\":0.1,\"count\":5,\"caller\":\"\"}}}' -H \"Accept: application/json, text/event-stream\"\n```\n\nI do get notifications.\n\nIf I run the same example in the typescript SDK, it works with both id.\n\nLog:\n```\nSending notification 1/5 from caller:\n2025-07-30 13:14:04,335 - root - DEBUG - Request stream _GET_stream not found\n                                for message. Still processing message as the client\n                                might reconnect and replay.\nSending notification 2/5 from caller:\n2025-07-30 13:14:04,435 - root - DEBUG - Request stream _GET_stream not found\n                                for message. Still processing message as the client\n                                might reconnect and replay.\nSending notification 3/5 from caller:\n2025-07-30 13:14:04,536 - root - DEBUG - Request stream _GET_stream not found\n                                for message. Still processing message as the client\n                                might reconnect and replay.\nSending notification 4/5 from caller:\n2025-07-30 13:14:04,637 - root - DEBUG - Request stream _GET_stream not found\n                                for message. Still processing message as the client\n                                might reconnect and replay.\nSending notification 5/5 from caller:\n2025-07-30 13:14:04,737 - root - DEBUG - Request stream _GET_stream not found\n                                for message. Still processing message as the client\n                                might reconnect and replay.\n```\n\n### Example Code\n\n```Python\n\n```\n\n### Python & MCP Python SDK\n\n```Text\nlatest\n```",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1218/reactions",
        "total_count": 0,
        "+1": 0,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1213",
      "id": 3273526626,
      "node_id": "I_kwDOM2n80s7DHg1i",
      "number": 1213,
      "title": "AsyncExitStack fails to close at the first attempt",
      "user": {
        "login": "Muhammad-Mouta",
        "id": 35398036,
        "node_id": "MDQ6VXNlcjM1Mzk4MDM2",
        "avatar_url": "https://avatars.githubusercontent.com/u/35398036?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/Muhammad-Mouta",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 7511840554,
          "node_id": "LA_kwDOM2n80s8AAAABv72XKg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/bug",
          "name": "bug",
          "color": "d73a4a",
          "default": true,
          "description": "Something isn't working"
        },
        "1": {
          "id": 9287721887,
          "node_id": "LA_kwDOM2n80s8AAAACKZdjnw",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/needs%20repro",
          "name": "needs repro",
          "color": "e35211",
          "default": false,
          "description": "needs additional information to be able to reproduce bug"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 2,
      "created_at": "2025-07-29T12:49:47Z",
      "updated_at": "2025-09-26T10:41:23Z",
      "closed_at": null,
      "author_association": "NONE",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "### Initial Checks\n\n- [x] I confirm that I'm using the latest version of MCP Python SDK\n- [x] I confirm that I searched for my issue in https://github.com/modelcontextprotocol/python-sdk/issues before opening this issue\n\n### Description\n\nWe use the Python MCP SDK to integrate MCP into our codebase. \n\nWe connect to the remote Tavily MCP server using Streamable HTTP transport.\n\nWe follow the exit_stack pattern to initialize the read/write streams and the ClientSession, which works fine. However, when trying to close the exit_stack, the first attempt almost always fails, so we made a workaround to try to close it twice, as shown in the following code (this is a portion of our MCP client wrapper):\n\n```python\nasync def _connect(self):\n    read_stream, write_stream = await self._get_read_and_write_streams()\n    await self._create_and_initialize_session(read_stream, write_stream)\n\nasync def _get_read_and_write_streams(self):\n    read_stream, write_stream, _ = await self._exit_stack.enter_async_context(\n        streamablehttp_client(\n            self._config.url,\n            self._config.headers,\n        )\n    )\n    return read_stream, write_stream\n\nasync def _create_and_initialize_session(\n    self,\n    read_stream: MemoryObjectReceiveStream[SessionMessage | Exception],\n    write_stream: MemoryObjectSendStream[SessionMessage],\n) -> None:\n    self._session = await self._exit_stack.enter_async_context(\n        ClientSession(\n            read_stream,\n            write_stream,\n            timedelta(seconds=self._config.connection_attempt_timeout),\n        )\n    )\n    await self._session.initialize()\n\nasync def _cleanup_exit_stack(self):\n    try:\n        await self._exit_stack.aclose()\n    except (Exception, asyncio.CancelledError):\n        logger.exception(\n            self._make_error_message(\n                \"The first attempt to close the exit stack failed. Trying to close it again ...\"\n            )\n        )\n        try:\n            await self._exit_stack.aclose()\n        except (Exception, asyncio.CancelledError):\n            logger.exception(\n                self._make_error_message(\n                    f\"Failed to clean up the exit stack. Replacing with a new exit stack ...\"\n                )\n            )\n            self._exit_stack = AsyncExitStack()\n```\n\nOur MCP client wrapper tries to connect to the server, and if it fails, it cleans up the exit stack to allow subsequent connection trials. So, I disabled my internet connection and tried to connect to the remote Tavily MCP server, which fails and triggers the _cleanup_exit_stack method.\n\nHere is a full log trace for what happened, which should help understand why the first attempt fails.\n\n```bash\n[07/29/25 14:51:28] DEBUG    Connecting to StreamableHTTP endpoint: https://mcp.tavily.com/mcp/?tavilyApiKey=******************************************                             streamable_http.py:476\n                    DEBUG    Sending client message: root=JSONRPCRequest(method='initialize', params={'protocolVersion': '2025-06-18', 'capabilities': {}, 'clientInfo': {'name':   streamable_http.py:385\n                             'mcp', 'version': '0.1.0'}}, jsonrpc='2.0', id=0)                                                                                                                 main.py:265\n                    DEBUG    connect_tcp.started host='mcp.tavily.com' port=443 local_address=None timeout=30 socket_options=None                                                             _trace.py:87\n                    DEBUG    connect_tcp.failed exception=ConnectError(gaierror(11001, 'getaddrinfo failed'))                                                                                 _trace.py:87\n                    ERROR    Error in MCP client (tavily_mcp): The first attempt to close the exit stack failed. Trying to close it again ...                                           base_client.py:242\n                             ╭────────────────────────────────────────────────────────── Traceback (most recent call last) ───────────────────────────────────────────────────────────╮\n                             │ C:************************************************************************************************\\base_client.py:240 in _cleanup_exit_stack           │\n                             │                                                                                                                                                        │\n                             │   237 │                                                                                                                                                │\n                             │   238 │   async def _cleanup_exit_stack(self):                                                                                                         │\n                             │   239 │   │   try:                                                                                                                                     │\n                             │ ❱ 240 │   │   │   await self._exit_stack.aclose()                                                                                                      │\n                             │   241 │   │   except (Exception, asyncio.CancelledError):                                                                                              │\n                             │   242 │   │   │   logger.exception(                                                                                                                    │\n                             │   243 │   │   │   │   self._make_error_message(                                                                                                        │\n                             │                                                                                                                                                        │\n                             │ C:\\*********************************************************************************************\\Lib\\contextlib.py:696 in aclose                       │\n                             │                                                                                                                                                        │\n                             │   693 │                                                                                                                                                │\n                             │   694 │   async def aclose(self):                                                                                                                      │\n                             │   695 │   │   \"\"\"Immediately unwind the context stack.\"\"\"                                                                                              │\n                             │ ❱ 696 │   │   await self.__aexit__(None, None, None)                                                                                                   │\n                             │   697 │                                                                                                                                                │\n                             │   698 │   def _push_async_cm_exit(self, cm, cm_exit):                                                                                                  │\n                             │   699 │   │   \"\"\"Helper to correctly register coroutine function to __aexit__                                                                          │\n                             │                                                                                                                                                        │\n                             │ C:\\*********************************************************************************************\\Lib\\contextlib.py:754 in __aexit__                    │\n                             │                                                                                                                                                        │\n                             │   751 │   │   │   │   # bare \"raise exc_details[1]\" replaces our carefully                                                                             │\n                             │   752 │   │   │   │   # set-up context                                                                                                                 │\n                             │   753 │   │   │   │   fixed_ctx = exc_details[1].__context__                                                                                           │\n                             │ ❱ 754 │   │   │   │   raise exc_details[1]                                                                                                             │\n                             │   755 │   │   │   except BaseException:                                                                                                                │\n                             │   756 │   │   │   │   exc_details[1].__context__ = fixed_ctx                                                                                           │\n                             │   757 │   │   │   │   raise                                                                                                                            │\n                             │                                                                                                                                                        │\n                             │ C:\\*********************************************************************************************\\Lib\\contextlib.py:737 in __aexit__                    │\n                             │                                                                                                                                                        │\n                             │   734 │   │   │   │   if is_sync:                                                                                                                      │\n                             │   735 │   │   │   │   │   cb_suppress = cb(*exc_details)                                                                                               │\n                             │   736 │   │   │   │   else:                                                                                                                            │\n                             │ ❱ 737 │   │   │   │   │   cb_suppress = await cb(*exc_details)                                                                                         │\n                             │   738 │   │   │   │                                                                                                                                    │\n                             │   739 │   │   │   │   if cb_suppress:                                                                                                                  │\n                             │   740 │   │   │   │   │   suppressed_exc = True                                                                                                        │\n                             │                                                                                                                                                        │\n                             │ C:\\*********************************************************************************************\\Lib\\contextlib.py:231 in __aexit__                    │\n                             │                                                                                                                                                        │\n                             │   228 │   │   │   │   # tell if we get the same exception back                                                                                         │\n                             │   229 │   │   │   │   value = typ()                                                                                                                    │\n                             │   230 │   │   │   try:                                                                                                                                 │\n                             │ ❱ 231 │   │   │   │   await self.gen.athrow(value)                                                                                                     │\n                             │   232 │   │   │   except StopAsyncIteration as exc:                                                                                                    │\n                             │   233 │   │   │   │   # Suppress StopIteration *unless* it's the same exception that                                                                   │\n                             │   234 │   │   │   │   # was passed to throw().  This prevents a StopIteration                                                                          │\n                             │                                                                                                                                                        │\n                             │ C:\\********************************\\.venv\\Lib\\site-packages\\mcp\\client\\streamable_http.py:474 in streamablehttp_client                                 │\n                             │                                                                                                                                                        │\n                             │   471 │   read_stream_writer, read_stream = anyio.create_memory_object_stream[SessionMessage |                                                         │\n                             │       Exception](0)                                                                                                                                    │\n                             │   472 │   write_stream, write_stream_reader =                                                                                                          │\n                             │       anyio.create_memory_object_stream[SessionMessage](0)                                                                                             │\n                             │   473 │                                                                                                                                                │\n                             │ ❱ 474 │   async with anyio.create_task_group() as tg:                                                                                                  │\n                             │   475 │   │   try:                                                                                                                                     │\n                             │   476 │   │   │   logger.debug(f\"Connecting to StreamableHTTP endpoint: {url}\")                                                                        │\n                             │   477                                                                                                                                                  │\n                             │                                                                                                                                                        │\n                             │ C:\\********************************\\.venv\\Lib\\site-packages\\anyio\\_backends\\_asyncio.py:772 in __aexit__                                               │\n                             │                                                                                                                                                        │\n                             │    769 │   │   │   │   │   # added to self._exceptions so it's ok to break exception                                                                   │\n                             │    770 │   │   │   │   │   # chaining and avoid adding a \"During handling of above...\"                                                                 │\n                             │    771 │   │   │   │   │   # for each nesting level.                                                                                                   │\n                             │ ❱  772 │   │   │   │   │   raise BaseExceptionGroup(                                                                                                   │\n                             │    773 │   │   │   │   │   │   \"unhandled errors in a TaskGroup\", self._exceptions                                                                     │\n                             │    774 │   │   │   │   │   ) from None                                                                                                                 │\n                             │    775 │   │   │   │   elif exc_val:                                                                                                                   │\n                             ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯\n                             ExceptionGroup: unhandled errors in a TaskGroup (1 sub-exception)\n\n                             ╭─────────────────────────────────────────────────────────────────── Sub-exception #1 ───────────────────────────────────────────────────────────────────╮\n                             │ ╭──────────────────────────────────────────────────────── Traceback (most recent call last) ─────────────────────────────────────────────────────────╮ │\n                             │ │ C:\\*********************************************************************************************\\Lib\\asyncio\\tasks.py:316 in                       │ │\n                             │ │ __step_run_and_handle_result                                                                                                                       │ │\n                             │ │                                                                                                                                                    │ │\n                             │ │    313 │   │   │   │   # don't have `__iter__` and `__next__` methods.                                                                             │ │\n                             │ │    314 │   │   │   │   result = coro.send(None)                                                                                                    │ │\n                             │ │    315 │   │   │   else:                                                                                                                           │ │\n                             │ │ ❱  316 │   │   │   │   result = coro.throw(exc)                                                                                                    │ │\n                             │ │    317 │   │   except StopIteration as exc:                                                                                                        │ │\n                             │ │    318 │   │   │   if self._must_cancel:                                                                                                           │ │\n                             │ │    319 │   │   │   │   # Task is cancelled right before coro stops.                                                                                │ │\n                             │ │                                                                                                                                                    │ │\n                             │ │ C:\\********************************\\.venv\\Lib\\site-packages\\mcp\\client\\streamable_http.py:405 in handle_request_async                              │ │\n                             │ │                                                                                                                                                    │ │\n                             │ │   402 │   │   │   │   │   │   if is_resumption:                                                                                                    │ │\n                             │ │   403 │   │   │   │   │   │   │   await self._handle_resumption_request(ctx)                                                                       │ │\n                             │ │   404 │   │   │   │   │   │   else:                                                                                                                │ │\n                             │ │ ❱ 405 │   │   │   │   │   │   │   await self._handle_post_request(ctx)                                                                             │ │\n                             │ │   406 │   │   │   │   │                                                                                                                            │ │\n                             │ │   407 │   │   │   │   │   # If this is a request, start a new task to handle it                                                                    │ │\n                             │ │   408 │   │   │   │   │   if isinstance(message.root, JSONRPCRequest):                                                                             │ │\n                             │ │                                                                                                                                                    │ │\n                             │ │ C:\\********************************\\.venv\\Lib\\site-packages\\mcp\\client\\streamable_http.py:259 in _handle_post_request                              │ │\n                             │ │                                                                                                                                                    │ │\n                             │ │   256 │   │   message = ctx.session_message.message                                                                                                │ │\n                             │ │   257 │   │   is_initialization = self._is_initialization_request(message)                                                                         │ │\n                             │ │   258 │   │                                                                                                                                        │ │\n                             │ │ ❱ 259 │   │   async with ctx.client.stream(                                                                                                        │ │\n                             │ │   260 │   │   │   \"POST\",                                                                                                                          │ │\n                             │ │   261 │   │   │   self.url,                                                                                                                        │ │\n                             │ │   262 │   │   │   json=message.model_dump(by_alias=True, mode=\"json\", exclude_none=True),                                                          │ │\n                             │ │                                                                                                                                                    │ │\n                             │ │ C:\\*********************************************************************************************\\Lib\\contextlib.py:210 in __aenter__               │ │\n                             │ │                                                                                                                                                    │ │\n                             │ │   207 │   │   # they are only needed for recreation, which is not possible anymore                                                                 │ │\n                             │ │   208 │   │   del self.args, self.kwds, self.func                                                                                                  │ │\n                             │ │   209 │   │   try:                                                                                                                                 │ │\n                             │ │ ❱ 210 │   │   │   return await anext(self.gen)                                                                                                     │ │\n                             │ │   211 │   │   except StopAsyncIteration:                                                                                                           │ │\n                             │ │   212 │   │   │   raise RuntimeError(\"generator didn't yield\") from None                                                                           │ │\n                             │ │   213                                                                                                                                              │ │\n                             │ │                                                                                                                                                    │ │\n                             │ │ C:\\********************************\\.venv\\Lib\\site-packages\\httpx\\_client.py:1583 in stream                                                        │ │\n                             │ │                                                                                                                                                    │ │\n                             │ │   1580 │   │   │   timeout=timeout,                                                                                                                │ │\n                             │ │   1581 │   │   │   extensions=extensions,                                                                                                          │ │\n                             │ │   1582 │   │   )                                                                                                                                   │ │\n                             │ │ ❱ 1583 │   │   response = await self.send(                                                                                                         │ │\n                             │ │   1584 │   │   │   request=request,                                                                                                                │ │\n                             │ │   1585 │   │   │   auth=auth,                                                                                                                      │ │\n                             │ │   1586 │   │   │   follow_redirects=follow_redirects,                                                                                              │ │\n                             │ │                                                                                                                                                    │ │\n                             │ │ C:\\********************************\\.venv\\Lib\\site-packages\\httpx\\_client.py:1629 in send                                                          │ │\n                             │ │                                                                                                                                                    │ │\n                             │ │   1626 │   │                                                                                                                                       │ │\n                             │ │   1627 │   │   auth = self._build_request_auth(request, auth)                                                                                      │ │\n                             │ │   1628 │   │                                                                                                                                       │ │\n                             │ │ ❱ 1629 │   │   response = await self._send_handling_auth(                                                                                          │ │\n                             │ │   1630 │   │   │   request,                                                                                                                        │ │\n                             │ │   1631 │   │   │   auth=auth,                                                                                                                      │ │\n                             │ │   1632 │   │   │   follow_redirects=follow_redirects,                                                                                              │ │\n                             │ │                                                                                                                                                    │ │\n                             │ │ C:\\********************************\\.venv\\Lib\\site-packages\\httpx\\_client.py:1657 in _send_handling_auth                                           │ │\n                             │ │                                                                                                                                                    │ │\n                             │ │   1654 │   │   │   request = await auth_flow.__anext__()                                                                                           │ │\n                             │ │   1655 │   │   │                                                                                                                                   │ │\n                             │ │   1656 │   │   │   while True:                                                                                                                     │ │\n                             │ │ ❱ 1657 │   │   │   │   response = await self._send_handling_redirects(                                                                             │ │\n                             │ │   1658 │   │   │   │   │   request,                                                                                                                │ │\n                             │ │   1659 │   │   │   │   │   follow_redirects=follow_redirects,                                                                                      │ │\n                             │ │   1660 │   │   │   │   │   history=history,                                                                                                        │ │\n                             │ │                                                                                                                                                    │ │\n                             │ │ C:\\********************************\\.venv\\Lib\\site-packages\\httpx\\_client.py:1694 in _send_handling_redirects                                      │ │\n                             │ │                                                                                                                                                    │ │\n                             │ │   1691 │   │   │   for hook in self._event_hooks[\"request\"]:                                                                                       │ │\n                             │ │   1692 │   │   │   │   await hook(request)                                                                                                         │ │\n                             │ │   1693 │   │   │                                                                                                                                   │ │\n                             │ │ ❱ 1694 │   │   │   response = await self._send_single_request(request)                                                                             │ │\n                             │ │   1695 │   │   │   try:                                                                                                                            │ │\n                             │ │   1696 │   │   │   │   for hook in self._event_hooks[\"response\"]:                                                                                  │ │\n                             │ │   1697 │   │   │   │   │   await hook(response)                                                                                                    │ │\n                             │ │                                                                                                                                                    │ │\n                             │ │ C:\\********************************\\.venv\\Lib\\site-packages\\httpx\\_client.py:1730 in _send_single_request                                          │ │\n                             │ │                                                                                                                                                    │ │\n                             │ │   1727 │   │   │   )                                                                                                                               │ │\n                             │ │   1728 │   │                                                                                                                                       │ │\n                             │ │   1729 │   │   with request_context(request=request):                                                                                              │ │\n                             │ │ ❱ 1730 │   │   │   response = await transport.handle_async_request(request)                                                                        │ │\n                             │ │   1731 │   │                                                                                                                                       │ │\n                             │ │   1732 │   │   assert isinstance(response.stream, AsyncByteStream)                                                                                 │ │\n                             │ │   1733 │   │   response.request = request                                                                                                          │ │\n                             │ │                                                                                                                                                    │ │\n                             │ │ C:\\********************************\\.venv\\Lib\\site-packages\\httpx\\_transports\\default.py:393 in handle_async_request                               │ │\n                             │ │                                                                                                                                                    │ │\n                             │ │   390 │   │   │   content=request.stream,                                                                                                          │ │\n                             │ │   391 │   │   │   extensions=request.extensions,                                                                                                   │ │\n                             │ │   392 │   │   )                                                                                                                                    │ │\n                             │ │ ❱ 393 │   │   with map_httpcore_exceptions():                                                                                                      │ │\n                             │ │   394 │   │   │   resp = await self._pool.handle_async_request(req)                                                                                │ │\n                             │ │   395 │   │                                                                                                                                        │ │\n                             │ │   396 │   │   assert isinstance(resp.stream, typing.AsyncIterable)                                                                                 │ │\n                             │ │                                                                                                                                                    │ │\n                             │ │ C:\\*********************************************************************************************\\Lib\\contextlib.py:158 in __exit__                 │ │\n                             │ │                                                                                                                                                    │ │\n                             │ │   155 │   │   │   │   # tell if we get the same exception back                                                                                     │ │\n                             │ │   156 │   │   │   │   value = typ()                                                                                                                │ │\n                             │ │   157 │   │   │   try:                                                                                                                             │ │\n                             │ │ ❱ 158 │   │   │   │   self.gen.throw(value)                                                                                                        │ │\n                             │ │   159 │   │   │   except StopIteration as exc:                                                                                                     │ │\n                             │ │   160 │   │   │   │   # Suppress StopIteration *unless* it's the same exception that                                                               │ │\n                             │ │   161 │   │   │   │   # was passed to throw().  This prevents a StopIteration                                                                      │ │\n                             │ │                                                                                                                                                    │ │\n                             │ │ C:\\********************************\\.venv\\Lib\\site-packages\\httpx\\_transports\\default.py:118 in map_httpcore_exceptions                            │ │\n                             │ │                                                                                                                                                    │ │\n                             │ │   115 │   │   │   raise                                                                                                                            │ │\n                             │ │   116 │   │                                                                                                                                        │ │\n                             │ │   117 │   │   message = str(exc)                                                                                                                   │ │\n                             │ │ ❱ 118 │   │   raise mapped_exc(message) from exc                                                                                                   │ │\n                             │ │   119                                                                                                                                              │ │\n                             │ │   120                                                                                                                                              │ │\n                             │ │   121 class ResponseStream(SyncByteStream):                                                                                                        │ │\n                             │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ │\n                             │ ConnectError: [Errno 11001] getaddrinfo failed                                                                                                         │\n                             ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯\n```\n\nFrom my understanding, I think the error happens because the httpx client is waiting for stream chunks from the server, and then we try to close it. \n\nI think this should be handled on the MCP SDK level so that trying the exit_stack twice is not necessary.\n\n### Example Code\n\n```Python\n\n```\n\n### Python & MCP Python SDK\n\n```Text\nPython: 3.12.10\nMCP: 1.12.2\n```",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1213/reactions",
        "total_count": 0,
        "+1": 0,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1207",
      "id": 3269233611,
      "node_id": "I_kwDOM2n80s7C3IvL",
      "number": 1207,
      "title": "Excessive use of generics",
      "user": {
        "login": "samuelcolvin",
        "id": 4039449,
        "node_id": "MDQ6VXNlcjQwMzk0NDk=",
        "avatar_url": "https://avatars.githubusercontent.com/u/4039449?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/samuelcolvin",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 9230423596,
          "node_id": "LA_kwDOM2n80s8AAAACJi0WLA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/breaking%20change",
          "name": "breaking change",
          "color": "000000",
          "default": false,
          "description": "Will break existing deployments when updated without changes"
        },
        "1": {
          "id": 9230424293,
          "node_id": "LA_kwDOM2n80s8AAAACJi0Y5Q",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/v2",
          "name": "v2",
          "color": "5d2a87",
          "default": false,
          "description": "Ideas, requests and plans for v2 of the SDK which will incorporate major changes and fixes"
        },
        "2": {
          "id": 9354757189,
          "node_id": "LA_kwDOM2n80s8AAAACLZZERQ",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/enhancement",
          "name": "enhancement",
          "color": "11b5cc",
          "default": true,
          "description": "Request for a new feature that's not currently supported"
        },
        "3": {
          "id": 9354761244,
          "node_id": "LA_kwDOM2n80s8AAAACLZZUHA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/ready%20for%20work",
          "name": "ready for work",
          "color": "2b9402",
          "default": false,
          "description": "Enough information for someone to start working on"
        },
        "4": {
          "id": 9354767859,
          "node_id": "LA_kwDOM2n80s8AAAACLZZt8w",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P1",
          "name": "P1",
          "color": "895d17",
          "default": false,
          "description": "Significant bug affecting many users, highly requested feature"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/milestones/3",
        "id": 12112132,
        "node_id": "MI_kwDOM2n80s4AuNEE",
        "number": 3,
        "title": "Python SDK v2.0",
        "description": "",
        "creator": {
          "login": "dsp-ant",
          "id": 167242713,
          "node_id": "U_kgDOCffr2Q",
          "avatar_url": "https://avatars.githubusercontent.com/u/167242713?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/dsp-ant",
          "type": "User",
          "user_view_type": "public",
          "site_admin": false
        },
        "open_issues": 12,
        "closed_issues": 2,
        "state": "open",
        "created_at": "2025-01-02T09:08:45Z",
        "updated_at": "2025-10-07T17:22:59Z",
        "due_on": null,
        "closed_at": null
      },
      "comments": 3,
      "created_at": "2025-07-28T10:21:45Z",
      "updated_at": "2025-12-05T17:40:44Z",
      "closed_at": null,
      "author_association": "MEMBER",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "I brought this up in slack with @dsp-ant, but I should create an issue to express my concerns.\n\nGenerics in Python come with a significant cognitive overhead and harm DX:\n\nPython language servers and type checkers (such as those derived from pyright) mark generic types without generics set as \"partially unknown\" - so to write type safe python you need to set each generic parameter wherever you use that type. \n\nThis problem is exacerbated by:\n* IDEs having poor support for auto-completing generics\n* this packages documentation (the readme) not bothering to set the generics where types are used\n\nWhen I was trying to use `Context` I spent some time trying to work out what to put in its three generics. The only place I found code that filled those generics was in pydantic-ai's unit tests.\n\nYou might well say \"not everyone cares about type safety, not everyone use types\". Good point. ... except, if you don't care about type safety, don't bother with types, or generics at all. The venn diagrams of \"uses types\" and \"cares about generics\" surely overlap completely?\n\nIn many cases a better alternative to generics is unions (provided you can know all the types which the base type might be generic in). The big advantage of unions over generics is you only have to pay the cognitive price for working out what the value is, and/or enforcing that type in type-checking if/when you're actually accessing the relevant attribute - unlike generics where you generally have to worry about the generic type even if you're not accessing the attribute.\n\nIntroducing a third generic type to `Context` in #816 seems like a mistake, but I guess it's too late now.\n\nI suggest:\n* updating the documentation to set the generic types\n* type checking documentation so issues like this don't happen again\n* avoiding excessive/unnecessary use of generics in future - our rule of thumb at Pydantic: no more than two generics in public types",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1207/reactions",
        "total_count": 0,
        "+1": 0,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1205",
      "id": 3267184702,
      "node_id": "I_kwDOM2n80s7CvUg-",
      "number": 1205,
      "title": "Controlling Context in Client for Sampling Requests",
      "user": {
        "login": "yarnabrina",
        "id": 39331844,
        "node_id": "MDQ6VXNlcjM5MzMxODQ0",
        "avatar_url": "https://avatars.githubusercontent.com/u/39331844?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/yarnabrina",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 7511840560,
          "node_id": "LA_kwDOM2n80s8AAAABv72XMA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/documentation",
          "name": "documentation",
          "color": "0075ca",
          "default": true,
          "description": "Improvements or additions to documentation"
        },
        "1": {
          "id": 7511840581,
          "node_id": "LA_kwDOM2n80s8AAAABv72XRQ",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/good%20first%20issue",
          "name": "good first issue",
          "color": "7057ff",
          "default": true,
          "description": "Good for newcomers"
        },
        "2": {
          "id": 9354761244,
          "node_id": "LA_kwDOM2n80s8AAAACLZZUHA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/ready%20for%20work",
          "name": "ready for work",
          "color": "2b9402",
          "default": false,
          "description": "Enough information for someone to start working on"
        },
        "3": {
          "id": 9354767859,
          "node_id": "LA_kwDOM2n80s8AAAACLZZt8w",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P1",
          "name": "P1",
          "color": "895d17",
          "default": false,
          "description": "Significant bug affecting many users, highly requested feature"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 6,
      "created_at": "2025-07-27T15:05:54Z",
      "updated_at": "2025-10-06T09:55:02Z",
      "closed_at": null,
      "author_association": "NONE",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "### Question\n\nI am exploring the `sampling` components in MCP. Based on my understanding of the protocol, this should allow the server to utilise the LLM(s) available on the client side. Unfortunately, none of the examples provide a working demonstration of this.\n\nI have managed to get something working [here](https://github.com/yarnabrina/learn-model-context-protocol/blob/770728148a8aa423a1467785bdb695927cf3428d/src/mcp_learning/mcp_client/orchestrator.py#L253-L334), but I had to invoke the LLM directly using only part of the information from the `CreateMessageRequestParams` object. I have not been able to determine the purpose of `RequestContext` or how it can be leveraged.\n\nIn summary, these are my questions:\n\n1. How can I access the LLM(s) available to the client directly, rather than making an explicit call?\n2. How can I use `modelPreferences` to suggest that the client changes the choice of LLM based on priorities or name hints?\n3. How can I use the `RequestContext` to pass available context to the LLM for improved generation?\n4. How can I use the `includeContext` attribute of `CreateMessageRequestParams` to filter what information is included in the context?\n\nAny guidance or examples would be greatly appreciated.\n\n### Additional Context\n\n- MCP Python SDK version: `1.12.2`\n- Python version: `3.13.5`\n- Operating System: Ubuntu 22.04.5 LTS on Windows 11 Home via WSL 2",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1205/reactions",
        "total_count": 0,
        "+1": 0,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1202",
      "id": 3265839358,
      "node_id": "I_kwDOM2n80s7CqMD-",
      "number": 1202,
      "title": "Simple Auth Client Example refers to a non existing server project script",
      "user": {
        "login": "DavidBord",
        "id": 3276118,
        "node_id": "MDQ6VXNlcjMyNzYxMTg=",
        "avatar_url": "https://avatars.githubusercontent.com/u/3276118?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/DavidBord",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 7511840560,
          "node_id": "LA_kwDOM2n80s8AAAABv72XMA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/documentation",
          "name": "documentation",
          "color": "0075ca",
          "default": true,
          "description": "Improvements or additions to documentation"
        },
        "1": {
          "id": 9301360597,
          "node_id": "LA_kwDOM2n80s8AAAACKmd_1Q",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/auth",
          "name": "auth",
          "color": "92ad2d",
          "default": false,
          "description": "Issues and PRs related to Authentication / OAuth"
        },
        "2": {
          "id": 9354761244,
          "node_id": "LA_kwDOM2n80s8AAAACLZZUHA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/ready%20for%20work",
          "name": "ready for work",
          "color": "2b9402",
          "default": false,
          "description": "Enough information for someone to start working on"
        },
        "3": {
          "id": 9354765360,
          "node_id": "LA_kwDOM2n80s8AAAACLZZkMA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P0",
          "name": "P0",
          "color": "a81d34",
          "default": false,
          "description": "Broken core functionality, security issues, critical missing feature"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": {
        "login": "maxisbey",
        "id": 224885523,
        "node_id": "U_kgDODWd7Ew",
        "avatar_url": "https://avatars.githubusercontent.com/u/224885523?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/maxisbey",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "assignees": {
        "0": {
          "login": "maxisbey",
          "id": 224885523,
          "node_id": "U_kgDODWd7Ew",
          "avatar_url": "https://avatars.githubusercontent.com/u/224885523?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/maxisbey",
          "type": "User",
          "user_view_type": "public",
          "site_admin": false
        }
      },
      "milestone": null,
      "comments": 1,
      "created_at": "2025-07-26T16:03:10Z",
      "updated_at": "2025-10-08T13:57:22Z",
      "closed_at": null,
      "author_association": "NONE",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "### Initial Checks\n\n- [x] I confirm that I'm using the latest version of MCP Python SDK\n- [x] I confirm that I searched for my issue in https://github.com/modelcontextprotocol/python-sdk/issues before opening this issue\n\n### Description\n\nUnder \n```\n1. Start an MCP server with OAuth support\n```\n\nIt is specified that:\n```\ncd path/to/mcp-simple-auth\nuv run mcp-simple-auth --transport streamable-http --port 3001\n```\n\nWhere mcp-simple-auth does not exist anymore.\nIt should be changed to:\n ```\ncd path/to/mcp-simple-auth\nuv run mcp-simple-auth-as --transport streamable-http --port 9000\n```\nAnd:\n```\ncd path/to/mcp-simple-auth\nuv run mcp-simple-auth-rs --port=3001 --auth-server=http://localhost:9000  --transport=streamable-http\n```\n\n### Example Code\n\n```Python\n\n```\n\n### Python & MCP Python SDK\n\n```Text\nmain\n```",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1202/reactions",
        "total_count": 0,
        "+1": 0,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1187",
      "id": 3253163224,
      "node_id": "I_kwDOM2n80s7B51TY",
      "number": 1187,
      "title": "Should add a guiding TransportProtocol for custom transports? (similar to TypeScript interface)",
      "user": {
        "login": "bh-rat",
        "id": 3863850,
        "node_id": "MDQ6VXNlcjM4NjM4NTA=",
        "avatar_url": "https://avatars.githubusercontent.com/u/3863850?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/bh-rat",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 9354757189,
          "node_id": "LA_kwDOM2n80s8AAAACLZZERQ",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/enhancement",
          "name": "enhancement",
          "color": "11b5cc",
          "default": true,
          "description": "Request for a new feature that's not currently supported"
        },
        "1": {
          "id": 9354761244,
          "node_id": "LA_kwDOM2n80s8AAAACLZZUHA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/ready%20for%20work",
          "name": "ready for work",
          "color": "2b9402",
          "default": false,
          "description": "Enough information for someone to start working on"
        },
        "2": {
          "id": 9354772110,
          "node_id": "LA_kwDOM2n80s8AAAACLZZ-jg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P3",
          "name": "P3",
          "color": "c7df49",
          "default": false,
          "description": "Nice to haves, rare edge cases"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 0,
      "created_at": "2025-07-22T15:32:45Z",
      "updated_at": "2025-10-07T14:04:06Z",
      "closed_at": null,
      "author_association": "NONE",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "### Question\n\nHi team, the TypeScript version of the transport layers has an interface ( Referring to https://modelcontextprotocol.io/docs/concepts/transports#custom-transports ). \n\nWhy is there no similar Protocol or abstract class on the python-sdk? This would make the developer experience for building custom transport tad bit smoother. Something like : \n\n```\n\"\"\"\nMCP Transport Protocol — clarifies the expected lifecycle for custom transports.\n\"\"\"\n\nimport logging\n\nfrom typing import Protocol, Optional, AsyncContextManager\n\nfrom anyio.streams.memory import MemoryObjectReceiveStream, MemoryObjectSendStream\nfrom mcp.shared.message import SessionMessage\n\nlogger = logging.getLogger(__name__)\n\n\nclass TransportProtocol(Protocol):\n\n    async def connect(self) -> AsyncContextManager[\n        Tuple[\n            MemoryObjectReceiveStream[SessionMessage | Exception],\n            MemoryObjectSendStream[SessionMessage],\n        ]\n    ]:\n        \"\"\"\n        Establish the transport and return bidirectional streams.\n        \"\"\"\n        ...\n\n    async def terminate(self) -> None:\n        \"\"\"Terminate this transport session.\"\"\"\n        ...\n\n    async def cleanup(self) -> None:\n        \"\"\"Release streams and other resources.\"\"\"\n        ...\n```\n\n### Additional Context\n\n_No response_",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1187/reactions",
        "total_count": 0,
        "+1": 0,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1160",
      "id": 3237980578,
      "node_id": "I_kwDOM2n80s7A_6mi",
      "number": 1160,
      "title": "MCP cannot process fastapi JSONResponse",
      "user": {
        "login": "Chenxan",
        "id": 73822461,
        "node_id": "MDQ6VXNlcjczODIyNDYx",
        "avatar_url": "https://avatars.githubusercontent.com/u/73822461?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/Chenxan",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 7511840554,
          "node_id": "LA_kwDOM2n80s8AAAABv72XKg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/bug",
          "name": "bug",
          "color": "d73a4a",
          "default": true,
          "description": "Something isn't working"
        },
        "1": {
          "id": 9354761244,
          "node_id": "LA_kwDOM2n80s8AAAACLZZUHA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/ready%20for%20work",
          "name": "ready for work",
          "color": "2b9402",
          "default": false,
          "description": "Enough information for someone to start working on"
        },
        "2": {
          "id": 9354770246,
          "node_id": "LA_kwDOM2n80s8AAAACLZZ3Rg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P2",
          "name": "P2",
          "color": "d2b457",
          "default": false,
          "description": "Moderate issues affecting some users, edge cases, potentially valuable feature"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 2,
      "created_at": "2025-07-17T03:41:20Z",
      "updated_at": "2025-10-03T14:28:05Z",
      "closed_at": null,
      "author_association": "NONE",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "### Description\n\nI found that when the tool returns fastapi JSONResponse, it cannot be parsed.\n",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1160/reactions",
        "total_count": 0,
        "+1": 0,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1148",
      "id": 3234137851,
      "node_id": "I_kwDOM2n80s7AxQb7",
      "number": 1148,
      "title": "Enhancement in list_tools for both client and servce side",
      "user": {
        "login": "xlb0479",
        "id": 11763303,
        "node_id": "MDQ6VXNlcjExNzYzMzAz",
        "avatar_url": "https://avatars.githubusercontent.com/u/11763303?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/xlb0479",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 7511840603,
          "node_id": "LA_kwDOM2n80s8AAAABv72XWw",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/question",
          "name": "question",
          "color": "d876e3",
          "default": true,
          "description": "Further information is requested"
        },
        "1": {
          "id": 9082681979,
          "node_id": "LA_kwDOM2n80s8AAAACHV66ew",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/needs%20confirmation",
          "name": "needs confirmation",
          "color": "aaaaaa",
          "default": false,
          "description": "Needs confirmation that the PR is actually required or needed."
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 2,
      "created_at": "2025-07-16T01:21:40Z",
      "updated_at": "2025-11-27T17:09:39Z",
      "closed_at": null,
      "author_association": "NONE",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "### Description\n\nhttps://github.com/modelcontextprotocol/python-sdk/blob/6566c08446ad37b66f1457532c7f5a14f243ae10/src/mcp/client/session.py#L384-L394\n\nWhy can't we expose the `params` parameter of `tools/list` to the client, so that the server can use this `params` to enhance the `tools/list` functionality — for example, enabling context-aware tool filtering?\n",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1148/reactions",
        "total_count": 0,
        "+1": 0,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1144",
      "id": 3230553155,
      "node_id": "I_kwDOM2n80s7AjlRD",
      "number": 1144,
      "title": "streamable_http client call_tool hangs when receiving invalid JSONRPCMessage",
      "user": {
        "login": "Nuclear2",
        "id": 46946045,
        "node_id": "MDQ6VXNlcjQ2OTQ2MDQ1",
        "avatar_url": "https://avatars.githubusercontent.com/u/46946045?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/Nuclear2",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 7511840554,
          "node_id": "LA_kwDOM2n80s8AAAABv72XKg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/bug",
          "name": "bug",
          "color": "d73a4a",
          "default": true,
          "description": "Something isn't working"
        },
        "1": {
          "id": 9354761244,
          "node_id": "LA_kwDOM2n80s8AAAACLZZUHA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/ready%20for%20work",
          "name": "ready for work",
          "color": "2b9402",
          "default": false,
          "description": "Enough information for someone to start working on"
        },
        "2": {
          "id": 9354767859,
          "node_id": "LA_kwDOM2n80s8AAAACLZZt8w",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P1",
          "name": "P1",
          "color": "895d17",
          "default": false,
          "description": "Significant bug affecting many users, highly requested feature"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/milestones/18",
        "id": 13810637,
        "node_id": "MI_kwDOM2n80s4A0rvN",
        "number": 18,
        "title": "HTTP Transport Edge Cases",
        "description": null,
        "creator": {
          "login": "felixweinberger",
          "id": 3823880,
          "node_id": "MDQ6VXNlcjM4MjM4ODA=",
          "avatar_url": "https://avatars.githubusercontent.com/u/3823880?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/felixweinberger",
          "type": "User",
          "user_view_type": "public",
          "site_admin": false
        },
        "open_issues": 6,
        "closed_issues": 4,
        "state": "open",
        "created_at": "2025-10-03T10:46:49Z",
        "updated_at": "2025-12-04T10:36:28Z",
        "due_on": null,
        "closed_at": null
      },
      "comments": 10,
      "created_at": "2025-07-15T02:32:44Z",
      "updated_at": "2025-10-03T10:47:02Z",
      "closed_at": null,
      "author_association": "NONE",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "### Initial Checks\n\n- [x] I confirm that I'm using the latest version of MCP Python SDK\n- [x] I confirm that I searched for my issue in https://github.com/modelcontextprotocol/python-sdk/issues before opening this issue\n\n### Description\n\nIssue Description:\nDuring testing, we encountered a critical issue in the Server-Sent Events (SSE) handling mechanism:\n\n1. Problem Trigger:\nTo some reason, the `_handle_sse_event` method received a truncated `sse.data` payload, causing:\nA JSON parsing exception `message = JSONRPCMessage.model_validate_json(sse.data)`\nThen the exception handle sent the exc and returned false\n2. Current Behavior Gap:\nDespite the failed processing:\n·No error propagation to the client occurs\n·No cleanup/retry mechanism is triggered\n·The client remains stuck in a perpetual wait state for a tool_call result until timeout\n3. Critical Impact: The server has already completed the tool_call workflow and moved to the final /done state, creating a state desynchronization between client and server\n4. Root Cause Hypothesis:\nIt appears that the client failed to detect the reception of invalid responses. The `await read_stream_writer.send(exc)` did not work during exception handling\n\nOr maybe I missed some configs such as the retry mechanism or other error handling methods?\n\n### Example Code\n\n```Python\nasync def _handle_sse_event(\n    self,\n    sse: ServerSentEvent,\n    read_stream_writer: StreamWriter,\n    original_request_id: RequestId | None = None,\n    resumption_callback: Callable[[str], Awaitable[None]] | None = None,\n    is_initialization: bool = False,\n) -> bool:\n    \"\"\"Handle an SSE event, returning True if the response is complete.\"\"\"\n    if sse.event == \"message\":\n        try:\n            message = JSONRPCMessage.model_validate_json(sse.data) ##### threw the exception\n            logger.debug(f\"SSE message: {message}\")\n\n            # Extract protocol version from initialization response\n            if is_initialization:\n                self._maybe_extract_protocol_version_from_message(message)\n\n            # If this is a response and we have original_request_id, replace it\n            if original_request_id is not None and isinstance(message.root, JSONRPCResponse | JSONRPCError):\n                message.root.id = original_request_id\n\n            session_message = SessionMessage(message)\n            await read_stream_writer.send(session_message)\n\n            # Call resumption token callback if we have an ID\n            if sse.id and resumption_callback:\n                await resumption_callback(sse.id)\n\n            # If this is a response or error return True indicating completion\n            # Otherwise, return False to continue listening\n            return isinstance(message.root, JSONRPCResponse | JSONRPCError)\n\n        except Exception as exc:\n            ##### handled exception but client did not receive ######\n            logger.exception(\"Error parsing SSE message\")\n            await read_stream_writer.send(exc)\n            return False\n    else:\n        logger.warning(f\"Unknown SSE event: {sse.event}\")\n        return False\n```\n\n### Python & MCP Python SDK\n\n```Text\npython == 3.12\nSDK == 1.11.0\n```",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1144/reactions",
        "total_count": 7,
        "+1": 7,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1141",
      "id": 3229869279,
      "node_id": "I_kwDOM2n80s7Ag-Tf",
      "number": 1141,
      "title": "Progress notifications cause server to hang on stdio transport",
      "user": {
        "login": "abhishekgahlot2",
        "id": 115806700,
        "node_id": "U_kgDOBucR7A",
        "avatar_url": "https://avatars.githubusercontent.com/u/115806700?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/abhishekgahlot2",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 7511840554,
          "node_id": "LA_kwDOM2n80s8AAAABv72XKg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/bug",
          "name": "bug",
          "color": "d73a4a",
          "default": true,
          "description": "Something isn't working"
        },
        "1": {
          "id": 9354761244,
          "node_id": "LA_kwDOM2n80s8AAAACLZZUHA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/ready%20for%20work",
          "name": "ready for work",
          "color": "2b9402",
          "default": false,
          "description": "Enough information for someone to start working on"
        },
        "2": {
          "id": 9354772110,
          "node_id": "LA_kwDOM2n80s8AAAACLZZ-jg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P3",
          "name": "P3",
          "color": "c7df49",
          "default": false,
          "description": "Nice to haves, rare edge cases"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 3,
      "created_at": "2025-07-14T19:58:11Z",
      "updated_at": "2025-10-06T15:57:03Z",
      "closed_at": null,
      "author_association": "NONE",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "### Initial Checks\n\n- [x] I confirm that I'm using the latest version of MCP Python SDK\n- [x] I confirm that I searched for my issue in https://github.com/modelcontextprotocol/python-sdk/issues before opening this issue\n\n### Description\n\nWhen using the low-level Server API (`mcp.server.lowlevel.Server`) with stdio transport, sending progress notifications during request handling causes the server to hang indefinitely and never send the final response.\n\n**What I am seeing:**\n- Server successfully sends progress notification via `write_stream.send()`\n- Server handler returns `CallToolResult` \n- The final response is never sent to the client\n- Client times out waiting for response\n- Server remains blocked and time out eventually\n\n### Example Code\n\n```Python\nimport asyncio\nfrom mcp.server.lowlevel import Server\nfrom mcp.server.stdio import stdio_server\nfrom mcp.types import *\n\nserver = Server(\"progress-bug-demo\")\n\n@server.list_tools()\nasync def handle_list_tools() -> list[Tool]:\n    return [Tool(\n        name=\"test_tool\",\n        description=\"Demonstrates the bug\",\n        inputSchema={\"type\": \"object\", \"properties\": {}}\n    )]\n\n@server.call_tool()\nasync def handle_call_tool(name: str, arguments: dict) -> list[TextContent]:\n    ctx = server.request_context\n    progress_token = ctx.meta.progressToken if ctx.meta else None\n    \n    if progress_token:\n        # This causes the server to hang\n        await ctx.session.send_progress_notification(\n            progress_token=progress_token,\n            progress=0.5,\n            total=1.0,\n            message=\"Working...\"\n        )\n    \n    # This response is never sent due to the hang\n    return [TextContent(type=\"text\", text=\"Task completed!\")]\n\nasync def main():\n    async with stdio_server() as (read_stream, write_stream):\n        await server.run(\n            read_stream,\n            write_stream,\n            server.create_initialization_options()\n        )\n\nif __name__ == \"__main__\":\n    asyncio.run(main())\n```\n\n### Python & MCP Python SDK\n\n```Text\nMCP: 1.10.1\nPython: 3.12.6\n```\n\nFrom deeper debugging looks like buffer size is the problem : https://github.com/modelcontextprotocol/python-sdk/blob/main/src/mcp/server/stdio.py#L57\n\nHave to test locally if increasing it will most likely fix the issue and if its causing more problems than just fixing this.",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1141/reactions",
        "total_count": 0,
        "+1": 0,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1135",
      "id": 3227289716,
      "node_id": "I_kwDOM2n80s7AXIh0",
      "number": 1135,
      "title": "MCP Python SDK sessionId not maintained in browser with TypeScript SDK client",
      "user": {
        "login": "waugmeiigaxaa",
        "id": 208645937,
        "node_id": "U_kgDODG-vMQ",
        "avatar_url": "https://avatars.githubusercontent.com/u/208645937?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/waugmeiigaxaa",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 7511840554,
          "node_id": "LA_kwDOM2n80s8AAAABv72XKg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/bug",
          "name": "bug",
          "color": "d73a4a",
          "default": true,
          "description": "Something isn't working"
        },
        "1": {
          "id": 9082681979,
          "node_id": "LA_kwDOM2n80s8AAAACHV66ew",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/needs%20confirmation",
          "name": "needs confirmation",
          "color": "aaaaaa",
          "default": false,
          "description": "Needs confirmation that the PR is actually required or needed."
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 2,
      "created_at": "2025-07-14T04:07:20Z",
      "updated_at": "2025-10-29T05:07:23Z",
      "closed_at": null,
      "author_association": "NONE",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "### Initial Checks\n\n- [x] I confirm that I'm using the latest version of MCP Python SDK\n- [x] I confirm that I searched for my issue in https://github.com/modelcontextprotocol/python-sdk/issues before opening this issue\n\n### Description\n\n# [BUG] MCP Python SDK sessionId not maintained in browser with TypeScript SDK client\n\n# Issue: MCP Python SDK as Server, TypeScript SDK as Client – Node.js works, browser session management fails\n\n## Description\n\nWhen using the official MCP Python SDK (`fastmcp`) as the server and the TypeScript SDK as the client, session management (`mcp-session-id`) works correctly in Node.js, but fails in browser environments. This results in repeated \"Missing session ID\" errors or lost sessions for every request.\n\n## Environment\n\n- **Server:** MCP Python SDK (`fastmcp`), `streamable_http_app`, Starlette/uvicorn\n- **Client:** TypeScript SDK (`@modelcontextprotocol/sdk`), `StreamableHTTPClientTransport`\n- **Node.js:** Session management works out of the box\n- **Browser (React/Vitest):** Session cannot be maintained\n- **All code is reverted to official logic, no monkey patching or custom fetch**\n\n## Key Code Snippets\n\n**Server (`http-server-streamable.py`):**\n```python\napp = mcp.streamable_http_app()\napp.add_middleware(\n    CORSMiddleware,\n    allow_origins=[\"http://localhost:3000\"],\n    allow_credentials=True,\n    allow_methods=[\"*\"],\n    allow_headers=[\"*\"]\n)\nuvicorn.run(app, host=\"127.0.0.1\", port=8000)\n```\n\n**Client (`mcpService.ts`):**\n```typescript\n// MCPService (browser and Node.js):\nconst transport = new StreamableHTTPClientTransport(new URL(this.url));\nawait mcp.connect(transport);\n// In browser, MCPService does not automatically manage sessionId between requests.\n// The first response from the server includes Mcp-Session-Id, but MCPService does not persist or inject it for subsequent requests.\n// In Node.js, sessionId is managed via cookies and works as expected.\n```\n\n**Test Case (`mcp-streamable-browser.test.ts`):**\n```typescript\nimport { describe, it, expect } from 'vitest';\nimport { MCPService } from '../../../engine/service/mcpService';\n\ndescribe('MCPService streamable http tool list', () => {\n  it('should fetch tool list from MCP Python server', async () => {\n    const mcp = new MCPService('http://127.0.0.1:8000/mcp', 'STREAMABLE_HTTP');\n    const result = await Promise.race([\n      mcp.listTools(),\n      new Promise<{ data: null; error: string }>(resolve => setTimeout(() => resolve({ data: null, error: 'timeout' }), 5000))\n    ]);\n    const { data, error } = result as { data: any; error: any };\n    console.log('Tool list:', data, error);\n    console.log('SessionId:', mcp['transport']?.sessionId);\n  });\n});\n```\n\n## Steps to Reproduce\n\n1. Start MCP Python server with the CORS config above (expose_headers tried, but does not help).\n2. The SDK makes two requests: the first response from the server includes a valid `Mcp-Session-Id` header, but the client does not send the sessionId in the header for the second request, causing session management to fail.\n3. Same code in Node.js maintains sessionId correctly.\n\n## Expected Behavior\n\n- Browser environment should maintain session just like Node.js, with `mcp-session-id` correctly read and reused, so all requests are in the same session.\n\n## Request\n\n- Please confirm if there is a bug in the TypeScript SDK sessionId handling for browsers, or a compatibility issue in the Python SDK server.\n- Please provide best practices or a fix for browser session management.\n\n## Log Output\n\nPlease see the following log output for reference:\n\n```text\n1st fetch 200ok\n{\"method\":\"initialize\",\"params\":{\"protocolVersion\":\"2025-06-18\",\"capabilities\":{},\"clientInfo\":{\"name\":\"mcp-client\",\"version\":\"1.0.0\"}},\"jsonrpc\":\"2.0\",\"id\":0}\nresponse header\n...\nmcp-session-id:68709f581d3740ae82a3dcb523f0ac8c\n...\nrequest header (dont have mcp-session-id)\n2st fetch 400 Bad Request\n{\"method\":\"notifications/initialized\",\"jsonrpc\":\"2.0\"}\n{\n    \"jsonrpc\": \"2.0\",\n    \"id\": \"server-error\",\n    \"error\": {\n        \"code\": -32600,\n        \"message\": \"Bad Request: Missing session ID\"\n    }\n}\nresponse header\n...\nmcp-session-id:44295e965b524e97b45ccf6351201c13\n...\nrequest header (dont have mcp-session-id)\n\n\nnodejs test log out \nTool list: [ ... ] undefined ([explain,not test log] sucess get toollist,no error)\nSessionId: a9911fbfa8fa4eb78dad791b2dddfc33\n\n```\n\n\n### Python & MCP Python SDK\n\n```Text\npython \npython version 3.12\nmcp 1.9.2\n\ntypescript\n@modelcontextprotocol/sdk\": \"^1.13.0\nnode version v22.17.0\n```\n\n### Other information\n\nWhen both the MCP server and client use the official TypeScript SDK, session management works as expected.",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1135/reactions",
        "total_count": 2,
        "+1": 2,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1134",
      "id": 3226668514,
      "node_id": "I_kwDOM2n80s7AUw3i",
      "number": 1134,
      "title": "Use inspect.getdoc(fn) instead of fn.__doc__ in tool automatic description retrieval in FastMCP",
      "user": {
        "login": "HectorBst",
        "id": 9097817,
        "node_id": "MDQ6VXNlcjkwOTc4MTc=",
        "avatar_url": "https://avatars.githubusercontent.com/u/9097817?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/HectorBst",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 9354757189,
          "node_id": "LA_kwDOM2n80s8AAAACLZZERQ",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/enhancement",
          "name": "enhancement",
          "color": "11b5cc",
          "default": true,
          "description": "Request for a new feature that's not currently supported"
        },
        "1": {
          "id": 9354761244,
          "node_id": "LA_kwDOM2n80s8AAAACLZZUHA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/ready%20for%20work",
          "name": "ready for work",
          "color": "2b9402",
          "default": false,
          "description": "Enough information for someone to start working on"
        },
        "2": {
          "id": 9354772110,
          "node_id": "LA_kwDOM2n80s8AAAACLZZ-jg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P3",
          "name": "P3",
          "color": "c7df49",
          "default": false,
          "description": "Nice to haves, rare edge cases"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 1,
      "created_at": "2025-07-13T17:15:23Z",
      "updated_at": "2025-12-04T00:13:13Z",
      "closed_at": null,
      "author_association": "NONE",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "### Description\n\nActually, when adding a Tool using FastMCP.add_tool() without providing the description, if the function is a method overriding an inherited one, only the docstring of the concrete method is used, without serching in the hierarchy.\n\nIf all the documentation is in the abstract class/method, providing no tool description with the concrete method will result in an empty description. Expected or ideal behavior would be to consider docstring in the parent methods too.\n\nUsing inspect.getdoc(fn) instead of fn.\\_\\_doc\\_\\_ in Tool.from_function would have 2 benefits : \n- also consider eventual parent methods to retrieve a docstring\n- clean the docstring (basically cleaning docstring indentation used to align with bloc codes)\n\nFor example :\n```python\nclass MyUseCase(ABC):\n    @abstractmethod\n    def do_something(self) -> str:\n        \"\"\"\n        Do something usefull.\n\n        Returns:\n            The result of the action.\n        \"\"\"\n        pass\n\nclass MyApp(MyUseCase):\n    def do_something(self) -> str:\n        ...\n\n\napp = MyApp()\nmcp_server = FastMCP()\nmcp_server.add_tool(fn=app.do_something)\n```\nActually, do_something tool will have an empty description.\nAfter this fix, do_something tool description would be :\n```\nDo something usefull.\n\nReturns:\n    The result of the action.\n```\n\n### References\n\n_No response_",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1134/reactions",
        "total_count": 0,
        "+1": 0,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1129",
      "id": 3224859148,
      "node_id": "I_kwDOM2n80s7AN3IM",
      "number": 1129,
      "title": "Tool context kwarg detection not compatible with string-valued/__future__ annotations",
      "user": {
        "login": "dmontagu",
        "id": 35119617,
        "node_id": "MDQ6VXNlcjM1MTE5NjE3",
        "avatar_url": "https://avatars.githubusercontent.com/u/35119617?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/dmontagu",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 7511840554,
          "node_id": "LA_kwDOM2n80s8AAAABv72XKg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/bug",
          "name": "bug",
          "color": "d73a4a",
          "default": true,
          "description": "Something isn't working"
        },
        "1": {
          "id": 9354761244,
          "node_id": "LA_kwDOM2n80s8AAAACLZZUHA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/ready%20for%20work",
          "name": "ready for work",
          "color": "2b9402",
          "default": false,
          "description": "Enough information for someone to start working on"
        },
        "2": {
          "id": 9354767859,
          "node_id": "LA_kwDOM2n80s8AAAACLZZt8w",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P1",
          "name": "P1",
          "color": "895d17",
          "default": false,
          "description": "Significant bug affecting many users, highly requested feature"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 2,
      "created_at": "2025-07-12T05:32:35Z",
      "updated_at": "2025-10-13T12:25:31Z",
      "closed_at": null,
      "author_association": "NONE",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "### Initial Checks\n\n- [x] I confirm that I'm using the latest version of MCP Python SDK\n- [x] I confirm that I searched for my issue in https://github.com/modelcontextprotocol/python-sdk/issues before opening this issue\n\n### Description\n\nWhen inferring the context kwarg for tools, the relevant code — https://github.com/modelcontextprotocol/python-sdk/blob/d28a1a69eefceab2b9c71c113f0cb172c4f494c4/src/mcp/server/fastmcp/tools/base.py#L62-L69 — has the check `if issubclass(param.annotation, Context):`.\n\nHowever, `param.annotation` is the _raw_ value of the annotation. In particular, if using `from __future__ import annotations`, this will be a string, and so the check will incorrectly result in the context argument not being detected.\n\nNot only is it unfortunate that this currently misbehaves at all, but it is unfortunate that you don't get an error until the model actually tries to _call_ the tool with \"mis-annotated\" context, and even worse, when the model does try to call the tool with context you get a cryptic (and as far as I can tell inaccurate) error message saying that you can't access context outside of a request, even though the tool _really is_ being called in a request. (This was a painful one to debug.)\n\nIn Pydantic AI we work around stuff like this by relying on a _combination_ of `inpect.Signature.parameters` and `typing.get_type_hints` — see https://github.com/pydantic/pydantic-ai/blob/a08a20ea1f87a4d093fdb08cb5dd8691e3589656/pydantic_ai_slim/pydantic_ai/_function_schema.py#L102-L133 for more details. (Actually we use `pydantic._internal._typing_extra.get_function_type_hints`, which is very similar to `get_type_hints` but has tweaks to better handle some edge cases, but `typing.get_type_hints` might be enough here.)\n\n### Example Code\n\n```Python\n# https://github.com/modelcontextprotocol/python-sdk/blob/main/examples/snippets/servers/tool_progress.py\n# with the future import added\nfrom __future__ import annotations\n\nfrom mcp.server.fastmcp import Context, FastMCP\n\nmcp = FastMCP(name=\"Progress Example\")\n\n\n@mcp.tool()\nasync def long_running_task(task_name: str, ctx: Context, steps: int = 5) -> str:\n    \"\"\"Execute a task with progress updates.\"\"\"\n    await ctx.info(f\"Starting: {task_name}\")\n\n    for i in range(steps):\n        progress = (i + 1) / steps\n        await ctx.report_progress(\n            progress=progress,\n            total=1.0,\n            message=f\"Step {i + 1}/{steps}\",\n        )\n        await ctx.debug(f\"Completed step {i + 1}\")\n\n    return f\"Task '{task_name}' completed\"\n```\n\n### Python & MCP Python SDK\n\n```Text\nConfirmed explicitly with python 3.13 and 3.11, and MCP SDK 1.7.1 and 1.11.0.\n```",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1129/reactions",
        "total_count": 2,
        "+1": 2,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1128",
      "id": 3224275175,
      "node_id": "I_kwDOM2n80s7ALojn",
      "number": 1128,
      "title": "Native sampling method on Context",
      "user": {
        "login": "simba-git",
        "id": 64661186,
        "node_id": "MDQ6VXNlcjY0NjYxMTg2",
        "avatar_url": "https://avatars.githubusercontent.com/u/64661186?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/simba-git",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 9354757189,
          "node_id": "LA_kwDOM2n80s8AAAACLZZERQ",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/enhancement",
          "name": "enhancement",
          "color": "11b5cc",
          "default": true,
          "description": "Request for a new feature that's not currently supported"
        },
        "1": {
          "id": 9354761244,
          "node_id": "LA_kwDOM2n80s8AAAACLZZUHA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/ready%20for%20work",
          "name": "ready for work",
          "color": "2b9402",
          "default": false,
          "description": "Enough information for someone to start working on"
        },
        "2": {
          "id": 9354772110,
          "node_id": "LA_kwDOM2n80s8AAAACLZZ-jg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P3",
          "name": "P3",
          "color": "c7df49",
          "default": false,
          "description": "Nice to haves, rare edge cases"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 0,
      "created_at": "2025-07-11T21:32:42Z",
      "updated_at": "2025-11-12T18:30:37Z",
      "closed_at": null,
      "author_association": "NONE",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "### Description\n\nSampling is done by manually sending a SamplingMessage directly, the user has to do things like manage checking that the client supports sampling.\n\nCompared to eliciation which has its own method directly on Context\nresult = await ctx.elicit(\n\nI'd imagine that having a similar ctx.sampling method would be a bit more consistent. Even if just as a thin wrapper over sending a sampling message with a clear error if sampling isn't supported. Happy to take that on.\n\nA related issue, which I can separate into its own issue if you'd like: With FastMCP, if I have a tool that requires sampling, I want it to now show up in ListTools for clients like Claude Desktop that don't support it.\n\n### References\n\n_No response_",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1128/reactions",
        "total_count": 0,
        "+1": 0,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1126",
      "id": 3223560834,
      "node_id": "I_kwDOM2n80s7AI6KC",
      "number": 1126,
      "title": "Specifying capabilities w/ FastMCP Server",
      "user": {
        "login": "chrisagrams",
        "id": 37988265,
        "node_id": "MDQ6VXNlcjM3OTg4MjY1",
        "avatar_url": "https://avatars.githubusercontent.com/u/37988265?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/chrisagrams",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 7511840581,
          "node_id": "LA_kwDOM2n80s8AAAABv72XRQ",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/good%20first%20issue",
          "name": "good first issue",
          "color": "7057ff",
          "default": true,
          "description": "Good for newcomers"
        },
        "1": {
          "id": 9230424293,
          "node_id": "LA_kwDOM2n80s8AAAACJi0Y5Q",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/v2",
          "name": "v2",
          "color": "5d2a87",
          "default": false,
          "description": "Ideas, requests and plans for v2 of the SDK which will incorporate major changes and fixes"
        },
        "2": {
          "id": 9354757189,
          "node_id": "LA_kwDOM2n80s8AAAACLZZERQ",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/enhancement",
          "name": "enhancement",
          "color": "11b5cc",
          "default": true,
          "description": "Request for a new feature that's not currently supported"
        },
        "3": {
          "id": 9354761244,
          "node_id": "LA_kwDOM2n80s8AAAACLZZUHA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/ready%20for%20work",
          "name": "ready for work",
          "color": "2b9402",
          "default": false,
          "description": "Enough information for someone to start working on"
        },
        "4": {
          "id": 9354770246,
          "node_id": "LA_kwDOM2n80s8AAAACLZZ3Rg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P2",
          "name": "P2",
          "color": "d2b457",
          "default": false,
          "description": "Moderate issues affecting some users, edge cases, potentially valuable feature"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/milestones/22",
        "id": 13811612,
        "node_id": "MI_kwDOM2n80s4A0r-c",
        "number": 22,
        "title": "FastMCP issues",
        "description": null,
        "creator": {
          "login": "felixweinberger",
          "id": 3823880,
          "node_id": "MDQ6VXNlcjM4MjM4ODA=",
          "avatar_url": "https://avatars.githubusercontent.com/u/3823880?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/felixweinberger",
          "type": "User",
          "user_view_type": "public",
          "site_admin": false
        },
        "open_issues": 10,
        "closed_issues": 1,
        "state": "open",
        "created_at": "2025-10-03T14:23:32Z",
        "updated_at": "2025-12-04T09:48:23Z",
        "due_on": null,
        "closed_at": null
      },
      "comments": 1,
      "created_at": "2025-07-11T16:42:19Z",
      "updated_at": "2025-11-12T17:44:17Z",
      "closed_at": null,
      "author_association": "NONE",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "### Question\n\nI noticed that the FastMCP server does not have the options to manually specify the capabilities of the server, however it is possible to do so with the low-level server. \n\nMy current workaround to advertise the capabilities is like so:\n\n```py\nmcp = FastMCP(\"test-server\")\n\n# Manually set notification options\nlowlevel_server: Server = mcp._mcp_server\nlowlevel_server.notification_options.resources_changed = True\nlowlevel_server.notification_options.tools_changed = True\n\n# Now, we override the mcp.run()\nasync def main():\n    async with stdio_server() as (r, w):\n        init_opts = lowlevel_server.create_initialization_options(\n            lowlevel_server.notification_options,\n            {}\n        )\n        await lowlevel_server.run(r, w, init_opts)\n\nif __name__ == \"__main__\":\n    anyio.run(main)\n```\n\nIs there any other way to specify the capabilities of the FastMCP server? Is there a reason not to?\n\nThanks!\n\n### Additional Context\n\n_No response_",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1126/reactions",
        "total_count": 0,
        "+1": 0,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1121",
      "id": 3220395808,
      "node_id": "I_kwDOM2n80s6_81cg",
      "number": 1121,
      "title": "MCP tool proxy, planned pull request.  Allowing for Seamless Human or determinism (private keys, etc)  in the middle.",
      "user": {
        "login": "wiltshirek",
        "id": 5108463,
        "node_id": "MDQ6VXNlcjUxMDg0NjM=",
        "avatar_url": "https://avatars.githubusercontent.com/u/5108463?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/wiltshirek",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 9354757189,
          "node_id": "LA_kwDOM2n80s8AAAACLZZERQ",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/enhancement",
          "name": "enhancement",
          "color": "11b5cc",
          "default": true,
          "description": "Request for a new feature that's not currently supported"
        },
        "1": {
          "id": 9354761244,
          "node_id": "LA_kwDOM2n80s8AAAACLZZUHA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/ready%20for%20work",
          "name": "ready for work",
          "color": "2b9402",
          "default": false,
          "description": "Enough information for someone to start working on"
        },
        "2": {
          "id": 9354772110,
          "node_id": "LA_kwDOM2n80s8AAAACLZZ-jg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P3",
          "name": "P3",
          "color": "c7df49",
          "default": false,
          "description": "Nice to haves, rare edge cases"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 1,
      "created_at": "2025-07-10T19:11:11Z",
      "updated_at": "2025-12-03T21:46:56Z",
      "closed_at": null,
      "author_association": "NONE",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "### Description\n\nWe have a pull ready to go for this on the TS side.  Would love to hear feedback.  Been a bit of a game changer for us internally when building real mcp clients beyond basic ide integrations.    Appreciate your feedback, good and bad.  Dont want to waste time pulling this if we've overlooked a major concern.  Currently on an unmerged fork for TS version.  \n\n\n\n### References\n\nhttps://wiltshirek.medium.com/beyond-the-ide-a-production-ready-pattern-for-secure-agent-tool-integration-a23fa5a65d5f",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1121/reactions",
        "total_count": 0,
        "+1": 0,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1103",
      "id": 3211559721,
      "node_id": "I_kwDOM2n80s6_bIMp",
      "number": 1103,
      "title": "MCP client not able to initiate StdioServerParameters while running in Jupyter Notebook",
      "user": {
        "login": "kdheeraz",
        "id": 58469207,
        "node_id": "MDQ6VXNlcjU4NDY5MjA3",
        "avatar_url": "https://avatars.githubusercontent.com/u/58469207?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/kdheeraz",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 7511840554,
          "node_id": "LA_kwDOM2n80s8AAAABv72XKg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/bug",
          "name": "bug",
          "color": "d73a4a",
          "default": true,
          "description": "Something isn't working"
        },
        "1": {
          "id": 9287721887,
          "node_id": "LA_kwDOM2n80s8AAAACKZdjnw",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/needs%20repro",
          "name": "needs repro",
          "color": "e35211",
          "default": false,
          "description": "needs additional information to be able to reproduce bug"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 5,
      "created_at": "2025-07-08T08:28:27Z",
      "updated_at": "2025-10-30T21:57:02Z",
      "closed_at": null,
      "author_association": "NONE",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "while initiating StdioServerParameters  in jupyter notebook there is an Exception from subprocess.Popen.\nException is : UnsupportedOperation fileno\n\nSame code works in idle and with quart server.\n\nOS : windows 11\nPython version: 3.11",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1103/reactions",
        "total_count": 2,
        "+1": 2,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1097",
      "id": 3207018978,
      "node_id": "I_kwDOM2n80s6_Jzni",
      "number": 1097,
      "title": "Roots/List Request Hangs in Client-Server Communication",
      "user": {
        "login": "mjunaidca",
        "id": 28400845,
        "node_id": "MDQ6VXNlcjI4NDAwODQ1",
        "avatar_url": "https://avatars.githubusercontent.com/u/28400845?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/mjunaidca",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 7511840554,
          "node_id": "LA_kwDOM2n80s8AAAABv72XKg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/bug",
          "name": "bug",
          "color": "d73a4a",
          "default": true,
          "description": "Something isn't working"
        },
        "1": {
          "id": 9354761244,
          "node_id": "LA_kwDOM2n80s8AAAACLZZUHA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/ready%20for%20work",
          "name": "ready for work",
          "color": "2b9402",
          "default": false,
          "description": "Enough information for someone to start working on"
        },
        "2": {
          "id": 9354765360,
          "node_id": "LA_kwDOM2n80s8AAAACLZZkMA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P0",
          "name": "P0",
          "color": "a81d34",
          "default": false,
          "description": "Broken core functionality, security issues, critical missing feature"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 1,
      "created_at": "2025-07-06T21:13:21Z",
      "updated_at": "2025-10-03T14:59:55Z",
      "closed_at": null,
      "author_association": "NONE",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "### Initial Checks\n\n- [x] I confirm that I'm using the latest version of MCP Python SDK\n- [x] I confirm that I searched for my issue in https://github.com/modelcontextprotocol/python-sdk/issues before opening this issue\n\n### Description\n\nWhen implementing the roots capability in a client-server setup, the communication hangs indefinitely after the server makes a `list_roots()` request. The client successfully initializes with roots capability, but the server's request for roots never completes.\n\nObserved behavior:\n1. Client initializes successfully with roots capability\n2. Server receives tool call and requests roots via `ctx.session.list_roots()`\n3. Communication hangs at this point - no error, no timeout, just stuck\n4. Both client and server remain running but no further progress\n\nExpected behavior:\n1. Client should receive the roots/list request\n2. Client should respond with the configured roots\n3. Server should receive the response and continue processing\n\nLet me know if you need any additional information or would like me to try specific debugging steps.\n\n### Example Code\n\n```Python\nExample Code:\n\n\n# server.py\nfrom mcp.server.fastmcp import FastMCP, Context\nfrom mcp.types import TextContent\n\nmcp = FastMCP(\n    name=\"mcp-roots-server\",\n    stateless_http=True\n)\n\n@mcp.tool()\nasync def analyze_project(ctx: Context) -> TextContent:\n    print(\"-> Server: Requesting project roots from client...\")\n    roots = await ctx.session.list_roots()  # Hangs here\n    \n    if not roots or not roots.roots:\n        return TextContent(text=\"No project roots found\", type=\"text\")\n    \n    # Never reaches this point\n    return TextContent(text=\"Analysis complete\", type=\"text\")\n\nmcp_app = mcp.streamable_http_app()\n\n# client.py\nimport asyncio\nfrom pathlib import Path\nfrom typing import Any\nimport mcp.types as types\nfrom mcp.shared.context import RequestContext\nfrom mcp import ClientSession\nfrom mcp.client.streamable_http import streamablehttp_client\n\nasync def mock_roots_list(context: RequestContext[\"ClientSession\", Any]) -> types.ListRootsResult | types.ErrorData:\n    print(f\"<- Client: Received roots/list request\")\n    root_uri = f\"file://{Path.cwd().absolute()}\"\n    return types.ListRootsResult(roots=[types.Root(\n        uri=types.FileUrl(root_uri),\n        name=\"Current Project\"\n    )])\n\nasync def main():\n    server_url = \"http://localhost:8000/mcp/\"\n    async with streamablehttp_client(server_url) as (read_stream, write_stream, get_session_id):\n        async with ClientSession(read_stream, write_stream, list_roots_callback=mock_roots_list) as session:\n            await session.initialize()\n            result = await session.call_tool(\"analyze_project\")\n\nif __name__ == \"__main__\":\n    asyncio.run(main())\n\n\nServer logs:\n\nINFO:     Started server process [36096]\nINFO:     Application startup complete.\nINFO:     127.0.0.1:51609 - \"POST /mcp/ HTTP/1.1\" 200 OK\nINFO:     127.0.0.1:51611 - \"POST /mcp/ HTTP/1.1\" 202 Accepted\nINFO:     127.0.0.1:51613 - \"POST /mcp/ HTTP/1.1\" 200 OK\nProcessing request of type CallToolRequest\n-> Server: Requesting project roots from client...\n# Hangs here\n\n\nClient logs:\n\n🚀 Connecting to MCP server at http://localhost:8000/mcp/\n✅ Connected. Initializing session...\n🛠️ Session initialized with roots capability.\n-> Client: Calling analyze_project tool...\n# Hangs here\n```\n\n### Python & MCP Python SDK\n\n```Text\nPython & MCP Python SDK:\n- Python version: 3.11.7\n- MCP Python SDK version: 1.10.1\n- OS: macOS 24.5.0\n- Environment: Development setup using uvicorn for server\n\nAdditional Notes:\n- The issue occurs consistently across multiple runs\n- No error messages or exceptions are thrown\n- Both client and server processes remain running\n- Network requests complete successfully (200 OK responses)\n- The hang occurs specifically during the roots/list request\n```",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1097/reactions",
        "total_count": 0,
        "+1": 0,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1068",
      "id": 3193556651,
      "node_id": "I_kwDOM2n80s6-Wc6r",
      "number": 1068,
      "title": "FastMCP 2.0 vs MCP Python SDK Server",
      "user": {
        "login": "AaronLeon",
        "id": 12243628,
        "node_id": "MDQ6VXNlcjEyMjQzNjI4",
        "avatar_url": "https://avatars.githubusercontent.com/u/12243628?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/AaronLeon",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 9230423596,
          "node_id": "LA_kwDOM2n80s8AAAACJi0WLA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/breaking%20change",
          "name": "breaking change",
          "color": "000000",
          "default": false,
          "description": "Will break existing deployments when updated without changes"
        },
        "1": {
          "id": 9230424293,
          "node_id": "LA_kwDOM2n80s8AAAACJi0Y5Q",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/v2",
          "name": "v2",
          "color": "5d2a87",
          "default": false,
          "description": "Ideas, requests and plans for v2 of the SDK which will incorporate major changes and fixes"
        },
        "2": {
          "id": 9354757189,
          "node_id": "LA_kwDOM2n80s8AAAACLZZERQ",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/enhancement",
          "name": "enhancement",
          "color": "11b5cc",
          "default": true,
          "description": "Request for a new feature that's not currently supported"
        },
        "3": {
          "id": 9354761244,
          "node_id": "LA_kwDOM2n80s8AAAACLZZUHA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/ready%20for%20work",
          "name": "ready for work",
          "color": "2b9402",
          "default": false,
          "description": "Enough information for someone to start working on"
        },
        "4": {
          "id": 9354765360,
          "node_id": "LA_kwDOM2n80s8AAAACLZZkMA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P0",
          "name": "P0",
          "color": "a81d34",
          "default": false,
          "description": "Broken core functionality, security issues, critical missing feature"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/milestones/3",
        "id": 12112132,
        "node_id": "MI_kwDOM2n80s4AuNEE",
        "number": 3,
        "title": "Python SDK v2.0",
        "description": "",
        "creator": {
          "login": "dsp-ant",
          "id": 167242713,
          "node_id": "U_kgDOCffr2Q",
          "avatar_url": "https://avatars.githubusercontent.com/u/167242713?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/dsp-ant",
          "type": "User",
          "user_view_type": "public",
          "site_admin": false
        },
        "open_issues": 12,
        "closed_issues": 2,
        "state": "open",
        "created_at": "2025-01-02T09:08:45Z",
        "updated_at": "2025-10-07T17:22:59Z",
        "due_on": null,
        "closed_at": null
      },
      "comments": 7,
      "created_at": "2025-07-01T19:17:36Z",
      "updated_at": "2025-10-07T17:22:59Z",
      "closed_at": null,
      "author_association": "NONE",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "### Question\n\nHI all, I wanted to get clarity on the future of the Python SDK's server module. My current understanding is that MCP previously adopted FastMCP into official Python SDK. Now that FastMCP 2.0 is out, what is the future of the Python SDK? Will they stay in sync or are they effectively forked? If they are forked, what is the level of maintainence and support for the Python SDK server?\n\n### Additional Context\n\n_No response_",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1068/reactions",
        "total_count": 15,
        "+1": 15,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1065",
      "id": 3191709504,
      "node_id": "I_kwDOM2n80s6-PZ9A",
      "number": 1065,
      "title": "MCP Completion Issue",
      "user": {
        "login": "nileshmalode11",
        "id": 117918495,
        "node_id": "U_kgDOBwdLHw",
        "avatar_url": "https://avatars.githubusercontent.com/u/117918495?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/nileshmalode11",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 7511840554,
          "node_id": "LA_kwDOM2n80s8AAAABv72XKg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/bug",
          "name": "bug",
          "color": "d73a4a",
          "default": true,
          "description": "Something isn't working"
        },
        "1": {
          "id": 9354761244,
          "node_id": "LA_kwDOM2n80s8AAAACLZZUHA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/ready%20for%20work",
          "name": "ready for work",
          "color": "2b9402",
          "default": false,
          "description": "Enough information for someone to start working on"
        },
        "2": {
          "id": 9354767859,
          "node_id": "LA_kwDOM2n80s8AAAACLZZt8w",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P1",
          "name": "P1",
          "color": "895d17",
          "default": false,
          "description": "Significant bug affecting many users, highly requested feature"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 2,
      "created_at": "2025-07-01T09:54:58Z",
      "updated_at": "2025-10-07T14:47:56Z",
      "closed_at": null,
      "author_association": "NONE",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "**Question**\n\n```\nmcp = FastMCP(\"completion1\",\n              instructions=\"A server that generates code from user prompts and JSON context. For all validation code generation requests from developers\")\n\n# Global store for extracted values\nrepo_cache = []\n\n@mcp.tool()\nasync def long_task(files: list[str], ctx: Context) -> str:\n    \"\"\"Process a list of files asynchronously.\n\n    Args:\n        files (list[str]): _description_\n        ctx (Context): _description_\n\n    Returns:\n        str: _description_\n    \"\"\"\n    global repo_cache\n    repo_cache.clear()  # reset\n\n    for i, file in enumerate(files):\n        ctx.info(f\"Processing {file}\")\n        with open(file, \"r\", encoding=\"utf-8\") as f:\n            data = f.read()\n\n        # Just for illustration: suppose lines in file are repo names\n        lines = data.splitlines()\n        repo_cache.extend(lines)\n\n        await ctx.report_progress(i + 1, len(files))\n\n    ctx.info(f\"Cached repos: {repo_cache}\")\n    return \"Processing complete\"\n\n\n@mcp.completion()\nasync def free_text_completion(argument: CompletionArgument) -> Completion:\n    \"\"\"Handle free text completion requests.\n    Args:\n        argument (CompletionArgument): The argument containing the user's input.\n    Returns:\n        Completion: A completion object containing suggestions based on the user's input.\n    \"\"\"    \n    # Use the global repo_cache to provide suggestions\n    global repo_cache\n    suggestions = repo_cache or [\"code_genrator\", \"some_other_repo\"]\n    matches = [r for r in suggestions if r.startswith(argument.value)]\n    return Completion(values=matches)\n\n\nif __name__ == \"__main__\":\n    mcp.run(transport=\"stdio\")\n\n```\n\nwe have three queries as follows-\nI have implemented a context loader & a completion endpoint as above I'm using mcp tools & it's completion endpoint with GitHub copilot in VS code.\n\nHear are my queries-\n1. How can I get my recommendation using completion endpoint in completion1.\n2. Where I will be getting the recommendation in VS code file editor or in GitHub copilot while MCP is connected & is running.\n3. What are the additional implementations I can add here to make the MCP'c workflow better.\nMy mcp for now is loading the context & further generation are happening through it one I have sent a query from GitHub copilot.\n\nPlease help with the queries I have written above.",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1065/reactions",
        "total_count": 4,
        "+1": 3,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 1,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1063",
      "id": 3189950423,
      "node_id": "I_kwDOM2n80s6-IsfX",
      "number": 1063,
      "title": "Issue: Custom HTTP Headers (e.g., mcp-session-id) Not Received by FastMCP Server",
      "user": {
        "login": "hileamlakB",
        "id": 68893442,
        "node_id": "MDQ6VXNlcjY4ODkzNDQy",
        "avatar_url": "https://avatars.githubusercontent.com/u/68893442?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/hileamlakB",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 7511840554,
          "node_id": "LA_kwDOM2n80s8AAAABv72XKg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/bug",
          "name": "bug",
          "color": "d73a4a",
          "default": true,
          "description": "Something isn't working"
        },
        "1": {
          "id": 9354761244,
          "node_id": "LA_kwDOM2n80s8AAAACLZZUHA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/ready%20for%20work",
          "name": "ready for work",
          "color": "2b9402",
          "default": false,
          "description": "Enough information for someone to start working on"
        },
        "2": {
          "id": 9354770246,
          "node_id": "LA_kwDOM2n80s8AAAACLZZ3Rg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P2",
          "name": "P2",
          "color": "d2b457",
          "default": false,
          "description": "Moderate issues affecting some users, edge cases, potentially valuable feature"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/milestones/18",
        "id": 13810637,
        "node_id": "MI_kwDOM2n80s4A0rvN",
        "number": 18,
        "title": "HTTP Transport Edge Cases",
        "description": null,
        "creator": {
          "login": "felixweinberger",
          "id": 3823880,
          "node_id": "MDQ6VXNlcjM4MjM4ODA=",
          "avatar_url": "https://avatars.githubusercontent.com/u/3823880?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/felixweinberger",
          "type": "User",
          "user_view_type": "public",
          "site_admin": false
        },
        "open_issues": 6,
        "closed_issues": 4,
        "state": "open",
        "created_at": "2025-10-03T10:46:49Z",
        "updated_at": "2025-12-04T10:36:28Z",
        "due_on": null,
        "closed_at": null
      },
      "comments": 3,
      "created_at": "2025-06-30T21:46:45Z",
      "updated_at": "2025-11-13T10:59:02Z",
      "closed_at": null,
      "author_association": "NONE",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "### Initial Checks\n\n- [x] I confirm that I'm using the latest version of MCP Python SDK\n- [x] I confirm that I searched for my issue in https://github.com/modelcontextprotocol/python-sdk/issues before opening this issue\n\n### Description\n\nWhen using FastMCP with the streamable-http transport, the client sends a custom header (mcp-session-id) as confirmed by debug output. However, the FastMCP server does not receive this header—it's missing from the request headers seen by the tool handler.\nThis breaks session persistence and any feature relying on custom headers.\n\nI have attached a demo code below, to run server\n`python demo.py server`\nand to run client\n`python demo.py server`\n\nAs can be seen in the small demo code\nClient debug:\nShows mcp-session-id is present in outgoing headers.\nServer debug:\nmcp-session-id is missing from all received headers.\n\n### Example Code\n\n```Python\nimport sys, asyncio\nfrom fastmcp import FastMCP, Client\nfrom fastmcp.server.dependencies import get_http_headers\n\nPORT = 10000\n\nasync def print_headers_tool(ctx):\n    headers = get_http_headers(include_all=True)\n    print(\"SERVER RECEIVED HEADERS:\", headers)\n    return headers\n\ndef run_server():\n    mcp = FastMCP(name=\"header-demo\")\n    mcp.tool(name=\"print_headers\")(print_headers_tool)\n    mcp.run(transport=\"streamable-http\", host=\"0.0.0.0\", port=PORT)\n\ndef run_client():\n    async def main():\n        async with Client(f\"http://localhost:{PORT}/mcp\") as client:\n            \n            transport = getattr(client, 'transport', None)\n            if transport and hasattr(transport, 'headers'):\n                print(\"CLIENT OUTGOING HEADERS:\", transport.headers)\n\n            result = await client.call_tool(\"print_headers\", {})\n        \n    asyncio.run(main())\n\nif __name__ == \"__main__\":\n    if len(sys.argv) < 2:\n        print(\"Usage: python demo.py [server|client]\")\n    elif sys.argv[1] == \"server\":\n        run_server()\n    elif sys.argv[1] == \"client\":\n        run_client()\n    else:\n        print(\"Unknown mode\", sys.argv[1])\n```\n\n### Python & MCP Python SDK\n\n```Text\nmacOS 15.0.1, BuildVersion:   24A348\nPython 3.13.5\nfastmcp 2.9.0\n```",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1063/reactions",
        "total_count": 1,
        "+1": 1,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1060",
      "id": 3189494707,
      "node_id": "I_kwDOM2n80s6-G9Oz",
      "number": 1060,
      "title": "PydanticSchemaGenerationError: Unable to generate pydantic-core schema for Image type",
      "user": {
        "login": "paxan",
        "id": 20566,
        "node_id": "MDQ6VXNlcjIwNTY2",
        "avatar_url": "https://avatars.githubusercontent.com/u/20566?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/paxan",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 7511840554,
          "node_id": "LA_kwDOM2n80s8AAAABv72XKg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/bug",
          "name": "bug",
          "color": "d73a4a",
          "default": true,
          "description": "Something isn't working"
        },
        "1": {
          "id": 9354761244,
          "node_id": "LA_kwDOM2n80s8AAAACLZZUHA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/ready%20for%20work",
          "name": "ready for work",
          "color": "2b9402",
          "default": false,
          "description": "Enough information for someone to start working on"
        },
        "2": {
          "id": 9354770246,
          "node_id": "LA_kwDOM2n80s8AAAACLZZ3Rg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P2",
          "name": "P2",
          "color": "d2b457",
          "default": false,
          "description": "Moderate issues affecting some users, edge cases, potentially valuable feature"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 3,
      "created_at": "2025-06-30T18:40:50Z",
      "updated_at": "2025-10-06T15:34:40Z",
      "closed_at": null,
      "author_association": "NONE",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "### Initial Checks\n\n- [x] I confirm that I'm using the latest version of MCP Python SDK\n- [x] I confirm that I searched for my issue in https://github.com/modelcontextprotocol/python-sdk/issues before opening this issue\n\n### Description\n\nThe `Image` type in question is imported like this: `from mcp.server.fastmcp.utilities.types import Image`\n\nWe are upgrading our dependency on `mcp` from 1.9.4 to 1.10.1.\n\nOnce on 1.10.1 our application and tests began to fail with error like this:\n```\npydantic.errors.PydanticSchemaGenerationError: Unable to generate pydantic-core schema\nfor <class 'mcp.server.fastmcp.utilities.types.Image'>. Set `arbitrary_types_allowed=True` in\nthe model_config to ignore this error or implement `__get_pydantic_core_schema__` on your\ntype to fully support it.\n```\n\nI found a test tool function among this repo's unit tests, that is pretty close to the mixed content\nuse case in our server. So I tweaked it to create a repro case for you:\n\n```diff\ndiff --git a/tests/server/fastmcp/test_server.py b/tests/server/fastmcp/test_server.py\nindex c30930f..20c25af 100644\n--- a/tests/server/fastmcp/test_server.py\n+++ b/tests/server/fastmcp/test_server.py\n@@ -194,12 +194,12 @@ def image_tool_fn(path: str) -> Image:\n     return Image(path)\n \n \n-def mixed_content_tool_fn() -> list[ContentBlock]:\n-    return [\n-        TextContent(type=\"text\", text=\"Hello\"),\n-        ImageContent(type=\"image\", data=\"abc\", mimeType=\"image/png\"),\n+def mixed_content_tool_fn() -> tuple[str, Image, AudioContent]:\n+    return (\n+        \"Hello\",\n+        Image(data=b\"abc\", format=\"png\"),\n         AudioContent(type=\"audio\", data=\"def\", mimeType=\"audio/wav\"),\n-    ]\n+    )\n \n \n class TestServerTools:\n@@ -311,7 +311,7 @@ class TestServerTools:\n             assert content1.text == \"Hello\"\n             assert isinstance(content2, ImageContent)\n             assert content2.mimeType == \"image/png\"\n-            assert content2.data == \"abc\"\n+            assert content2.data == \"YWJj\"\n             assert isinstance(content3, AudioContent)\n             assert content3.mimeType == \"audio/wav\"\n             assert content3.data == \"def\"\n```\n\n`test_tool_mixed_content` fails with `PydanticSchemaGenerationError` on 1.10.1 but succeeds on 1.9.4.\n\n### Python & MCP Python SDK\n\n```Text\nPython 3.12, mcp 1.10.1\n```",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1060/reactions",
        "total_count": 1,
        "+1": 1,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1053",
      "id": 3185110750,
      "node_id": "I_kwDOM2n80s692O7e",
      "number": 1053,
      "title": "Streamable HTTP transport fails when accessing MCP server on Cloud Run using sdk",
      "user": {
        "login": "sidgangs99",
        "id": 32275795,
        "node_id": "MDQ6VXNlcjMyMjc1Nzk1",
        "avatar_url": "https://avatars.githubusercontent.com/u/32275795?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/sidgangs99",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 7511840554,
          "node_id": "LA_kwDOM2n80s8AAAABv72XKg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/bug",
          "name": "bug",
          "color": "d73a4a",
          "default": true,
          "description": "Something isn't working"
        },
        "1": {
          "id": 9082681979,
          "node_id": "LA_kwDOM2n80s8AAAACHV66ew",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/needs%20confirmation",
          "name": "needs confirmation",
          "color": "aaaaaa",
          "default": false,
          "description": "Needs confirmation that the PR is actually required or needed."
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 3,
      "created_at": "2025-06-28T15:29:19Z",
      "updated_at": "2025-09-26T13:58:59Z",
      "closed_at": null,
      "author_association": "NONE",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "### Initial Checks\n\n- [x] I confirm that I'm using the latest version of MCP Python SDK\n- [x] I confirm that I searched for my issue in https://github.com/modelcontextprotocol/python-sdk/issues before opening this issue\n\n### Description\n\n### Description\n\nWhen using the `python-sdk` with transport set to `streamable-http`, the connection to a remote MCP server deployed on **Google Cloud Run** does not establish. The API stays in a **pending** state, and no updates are received.\n\nHowever, the same MCP server works fine under the following conditions:\n\n* When accessed via **Google Cloud Proxy**\n* When transport is changed to **SSE**\n* When using the **JS SDK**, streamable-http transport works without issues\n\nThis suggests a compatibility or configuration issue specifically between `python-sdk`'s streamable-http transport and direct access to Cloud Run URLs.\n\n---\n\n### Reproduction Steps\n\n1. Deploy an MCP server to Cloud Run using this official guide:\n   [https://cloud.google.com/blog/topics/developers-practitioners/build-and-deploy-a-remote-mcp-server-to-google-cloud-run-in-under-10-minutes](https://cloud.google.com/blog/topics/developers-practitioners/build-and-deploy-a-remote-mcp-server-to-google-cloud-run-in-under-10-minutes)\n2. Use:\n   * Transport: `streamable-http`\n   * Endpoint: Public URL of Cloud Run MCP server\n3. Attempt to connect using <cloud_run_url>/mcp\n4. Observe: API status remains in `pending` and no data is received\n\n---\n\n### Observations\n\n* Switching transport to **SSE** resolves the issue.\n* Using a **Cloud Proxy** to access the MCP server also works with streamable-http.\n* **JS SDK** does not face this issue under the same deployment conditions.\n* The Cloud Run URL is publicly accessible and works with other tools.\n\n---\n\n### Environment\n\n* SDK: `python-sdk` (v1.9.4)\n* MCP Server: Deployed on Cloud Run\n* Python version: \\[3.12.11]\n* OS - Docker image: \\[linux/amd64]\n\n---\n\n### Expected Behavior\n\nThe SDK should establish a connection to the Cloud Run-hosted MCP server and transition the API status from pending to active.\n\n---\n\n### Additional Notes\n\nThis might point to either:\n\n* SDK's HTTP streaming implementation not being fully compatible with Cloud Run’s networking behavior\n* Some internal headers or keep-alive expectations that differ between SSE and streamable-http\n\nAny guidance, workaround, or fix would be appreciated.\n\n\n### Example Code\n\n```Python\nfrom mcp.server.fastmcp import FastMCP\n\n# Create server\nmcp = FastMCP(\"Echo Server\")\n\n\n@mcp.tool()\ndef echo(text: str) -> str:\n    \"\"\"Echo the input text\"\"\"\n    return text\n\n\ndef main():\n    mcp.run(transport=\"streamable-http\", host=\"0.0.0.0\", port=8080)\n\n\nif __name__ == \"__main__\":\n    main()\n```\n\n### Python & MCP Python SDK\n\n```Text\nSDK Version: 1.9.4\nPython Version: 3.12.11\n```",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1053/reactions",
        "total_count": 0,
        "+1": 0,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1052",
      "id": 3185068813,
      "node_id": "I_kwDOM2n80s692EsN",
      "number": 1052,
      "title": "The resource URL path is ignored when building the protected resource metadata URL",
      "user": {
        "login": "yurikunash",
        "id": 143175350,
        "node_id": "U_kgDOCIiutg",
        "avatar_url": "https://avatars.githubusercontent.com/u/143175350?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/yurikunash",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 7511840603,
          "node_id": "LA_kwDOM2n80s8AAAABv72XWw",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/question",
          "name": "question",
          "color": "d876e3",
          "default": true,
          "description": "Further information is requested"
        },
        "1": {
          "id": 9301360597,
          "node_id": "LA_kwDOM2n80s8AAAACKmd_1Q",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/auth",
          "name": "auth",
          "color": "92ad2d",
          "default": false,
          "description": "Issues and PRs related to Authentication / OAuth"
        },
        "2": {
          "id": 9354761244,
          "node_id": "LA_kwDOM2n80s8AAAACLZZUHA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/ready%20for%20work",
          "name": "ready for work",
          "color": "2b9402",
          "default": false,
          "description": "Enough information for someone to start working on"
        },
        "3": {
          "id": 9354772110,
          "node_id": "LA_kwDOM2n80s8AAAACLZZ-jg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P3",
          "name": "P3",
          "color": "c7df49",
          "default": false,
          "description": "Nice to haves, rare edge cases"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 2,
      "created_at": "2025-06-28T15:03:06Z",
      "updated_at": "2025-10-03T14:02:20Z",
      "closed_at": null,
      "author_association": "CONTRIBUTOR",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "### Initial Checks\n\n- [x] I confirm that I'm using the latest version of MCP Python SDK\n- [x] I confirm that I searched for my issue in https://github.com/modelcontextprotocol/python-sdk/issues before opening this issue\n\n### Description\n\nThe current MCP Server implementation appears to use a fixed URL pattern `[domain]/.well-known/oauth-protected-resource` for the protected resource URL. After reviewing RFC9728, I believe this doesn't fully align with the specification's requirements.\n\n**Expected behavior:**\nIf the resource URL is `https://resource.example.com/resource1`, the protected resource metadata URL to be `https://resource.example.com/.well-known/oauth-protected-resource/resource1`\n\n**Current behavior:**\nIf the resource URL is `https://resource.example.com/resource1`, the protected resource metadata URL to be `https://resource.example.com/.well-known/oauth-protected-resource`\n\nLink to the source code:\nhttps://github.com/modelcontextprotocol/python-sdk/blob/794218433656554deff37477c0bef8cb7deb40f6/src/mcp/server/auth/routes.py#L219\n\n```\nreturn [\n        Route(\n            \"/.well-known/oauth-protected-resource\",\n            endpoint=cors_middleware(handler.handle, [\"GET\", \"OPTIONS\"]),\n            methods=[\"GET\", \"OPTIONS\"],\n        )\n    ]\n```\n\n**RFC 9728**\n> Protected resources supporting metadata MUST make a JSON document containing metadata as specified in [Section 2](https://datatracker.ietf.org/doc/html/rfc9728#PRMetadata) available at a **URL formed by inserting a well-known URI string into the protected resource's resource identifier between the host component and the path and/or query components, if any.**\n> ...\n>  The consumer of the metadata would make the following request when the resource identifier is https://resource.example.com/resource1 and the well-known URI path suffix is oauth-protected-resource to obtain the metadata, since the resource identifier contains a path component:\n> \n>   GET /.well-known/oauth-protected-resource/resource1 HTTP/1.1\n>   Host: resource.example.com\n\nAs the RFC correctly states: \n> Using path components enables supporting multiple resources per host. This is required in some multi-tenant hosting configurations.\n\nwhich is difficult to achieve with the current implementation.\n\n### Example Code\n\n```Python\n\n```\n\n### Python & MCP Python SDK\n\n```Text\nLatest version\n```",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1052/reactions",
        "total_count": 0,
        "+1": 0,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1038",
      "id": 3178744615,
      "node_id": "I_kwDOM2n80s69d8sn",
      "number": 1038,
      "title": "MCP server: AccessToken class should have field for subject claim (\"sub\")",
      "user": {
        "login": "thomasst",
        "id": 68381,
        "node_id": "MDQ6VXNlcjY4Mzgx",
        "avatar_url": "https://avatars.githubusercontent.com/u/68381?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/thomasst",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 7511840581,
          "node_id": "LA_kwDOM2n80s8AAAABv72XRQ",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/good%20first%20issue",
          "name": "good first issue",
          "color": "7057ff",
          "default": true,
          "description": "Good for newcomers"
        },
        "1": {
          "id": 9354757189,
          "node_id": "LA_kwDOM2n80s8AAAACLZZERQ",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/enhancement",
          "name": "enhancement",
          "color": "11b5cc",
          "default": true,
          "description": "Request for a new feature that's not currently supported"
        },
        "2": {
          "id": 9354761244,
          "node_id": "LA_kwDOM2n80s8AAAACLZZUHA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/ready%20for%20work",
          "name": "ready for work",
          "color": "2b9402",
          "default": false,
          "description": "Enough information for someone to start working on"
        },
        "3": {
          "id": 9354772110,
          "node_id": "LA_kwDOM2n80s8AAAACLZZ-jg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P3",
          "name": "P3",
          "color": "c7df49",
          "default": false,
          "description": "Nice to haves, rare edge cases"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 3,
      "created_at": "2025-06-26T11:08:56Z",
      "updated_at": "2025-11-12T17:44:16Z",
      "closed_at": null,
      "author_association": "NONE",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "### Description\n\nI'm proposing to add `subject` to `AccessToken` in `mcp/server/auth/provider.py`, which can be used to store the `sub` JWT claim that usually corresponds to the user ID:\n```\nclass AccessToken(BaseModel):\n    token: str\n    client_id: str\n    scopes: list[str]\n    expires_at: int | None = None\n    resource: str | None = None  # RFC 8707 resource indicator\n\n    # Proposed:\n    subject: str | None = None  # Subject (user ID)\n```\n\nThen we can implement a token verifier as follows:\n\n```\nclass MyTokenVerifier:\n    async def verify_token(self, token: str) -> AccessToken | None:\n        try:\n            token_claims = decode_and_validate_jwt(token)\n        except ...:\n            return None\n\n        return AccessToken(\n            token=token,\n            ...\n            subject=token_claims[\"sub\"],\n        )\n```\n\nand directly retrieve the user ID from the auth token in the context:\n\n```\nfrom mcp.server.auth.middleware.auth_context import get_access_token\n\nuser_id = get_access_token().subject\n```\n\n### References\n\n_No response_",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1038/reactions",
        "total_count": 3,
        "+1": 3,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1033",
      "id": 3177274415,
      "node_id": "I_kwDOM2n80s69YVwv",
      "number": 1033,
      "title": "Different models for the same entity for FastMCP vs low-level.Server.",
      "user": {
        "login": "aravadani",
        "id": 59617600,
        "node_id": "MDQ6VXNlcjU5NjE3NjAw",
        "avatar_url": "https://avatars.githubusercontent.com/u/59617600?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/aravadani",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 9354757189,
          "node_id": "LA_kwDOM2n80s8AAAACLZZERQ",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/enhancement",
          "name": "enhancement",
          "color": "11b5cc",
          "default": true,
          "description": "Request for a new feature that's not currently supported"
        },
        "1": {
          "id": 9354761244,
          "node_id": "LA_kwDOM2n80s8AAAACLZZUHA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/ready%20for%20work",
          "name": "ready for work",
          "color": "2b9402",
          "default": false,
          "description": "Enough information for someone to start working on"
        },
        "2": {
          "id": 9354767859,
          "node_id": "LA_kwDOM2n80s8AAAACLZZt8w",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P1",
          "name": "P1",
          "color": "895d17",
          "default": false,
          "description": "Significant bug affecting many users, highly requested feature"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/milestones/22",
        "id": 13811612,
        "node_id": "MI_kwDOM2n80s4A0r-c",
        "number": 22,
        "title": "FastMCP issues",
        "description": null,
        "creator": {
          "login": "felixweinberger",
          "id": 3823880,
          "node_id": "MDQ6VXNlcjM4MjM4ODA=",
          "avatar_url": "https://avatars.githubusercontent.com/u/3823880?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/felixweinberger",
          "type": "User",
          "user_view_type": "public",
          "site_admin": false
        },
        "open_issues": 10,
        "closed_issues": 1,
        "state": "open",
        "created_at": "2025-10-03T14:23:32Z",
        "updated_at": "2025-12-04T09:48:23Z",
        "due_on": null,
        "closed_at": null
      },
      "comments": 1,
      "created_at": "2025-06-26T00:02:00Z",
      "updated_at": "2025-11-12T18:30:36Z",
      "closed_at": null,
      "author_association": "NONE",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "### Description\n\nContext:\n\nCurrently, the FastMCP decorator path does not allow for any detailed parameter descriptions. It generates a basic schema of the input params based on the function signature. This means param description is missing.\n\nHowever, with low-level.Server implementation, there's an inputSchema that clearly lets you define a description field for each param in a tool. Not to be confused with tool description itself.\n\nIssue:\n\nThis led me down a wild goose chase and I learned that the Tool model itself is different between the two types of servers. The fastMCP Tool is defined in `mcp.server.fastmcp.tools.base` VS The low-level.Server Tool is defined in `mcp.types`.\n\n**I believe the FastMCP code was supposed to just abstract some of the server boilerplate, much like FastAPI. However, it seems like there's starting to be some significant divergence and feature disparity between the two types of servers.**\n\n\ntl;dr: Can we add descriptions for tool parameters, please?\n\n### References\n\nBuilding off of - https://github.com/modelcontextprotocol/python-sdk/issues/323",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1033/reactions",
        "total_count": 1,
        "+1": 1,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1031",
      "id": 3176649132,
      "node_id": "I_kwDOM2n80s69V9Gs",
      "number": 1031,
      "title": "Enable FastMCP to filter tools, prompts, resources using a fine grained policy",
      "user": {
        "login": "davemssavage",
        "id": 349016,
        "node_id": "MDQ6VXNlcjM0OTAxNg==",
        "avatar_url": "https://avatars.githubusercontent.com/u/349016?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/davemssavage",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 9301360597,
          "node_id": "LA_kwDOM2n80s8AAAACKmd_1Q",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/auth",
          "name": "auth",
          "color": "92ad2d",
          "default": false,
          "description": "Issues and PRs related to Authentication / OAuth"
        },
        "1": {
          "id": 9354757189,
          "node_id": "LA_kwDOM2n80s8AAAACLZZERQ",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/enhancement",
          "name": "enhancement",
          "color": "11b5cc",
          "default": true,
          "description": "Request for a new feature that's not currently supported"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 1,
      "created_at": "2025-06-25T18:56:24Z",
      "updated_at": "2025-10-07T12:47:04Z",
      "closed_at": null,
      "author_association": "NONE",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "### Description\n\nThe authorization protocol allows MCP to implement course grained authorization checks e.g. a principal can/cannot access the server.\n\nFor advanced use cases though it is useful to be able to limit access on a per tool/resource/prompt basis.\n\nThere are a range of authorization tools that can be used however rather than being specific I suggest it is better to provide a plugin API that allows providers to pick their underlying authorization approach.\n\nI have a patch that shows this idea, I'll open a draft pull request to illustrate the idea and allow for further testing & refinement.\n\n### References\n\n_No response_",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1031/reactions",
        "total_count": 2,
        "+1": 2,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1023",
      "id": 3174453637,
      "node_id": "I_kwDOM2n80s69NlGF",
      "number": 1023,
      "title": "Support for Parameter Passing in MCP Configuration and Runtime Context",
      "user": {
        "login": "magicbrighter",
        "id": 881637,
        "node_id": "MDQ6VXNlcjg4MTYzNw==",
        "avatar_url": "https://avatars.githubusercontent.com/u/881637?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/magicbrighter",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 9354757189,
          "node_id": "LA_kwDOM2n80s8AAAACLZZERQ",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/enhancement",
          "name": "enhancement",
          "color": "11b5cc",
          "default": true,
          "description": "Request for a new feature that's not currently supported"
        },
        "1": {
          "id": 9354761244,
          "node_id": "LA_kwDOM2n80s8AAAACLZZUHA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/ready%20for%20work",
          "name": "ready for work",
          "color": "2b9402",
          "default": false,
          "description": "Enough information for someone to start working on"
        },
        "2": {
          "id": 9354770246,
          "node_id": "LA_kwDOM2n80s8AAAACLZZ3Rg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P2",
          "name": "P2",
          "color": "d2b457",
          "default": false,
          "description": "Moderate issues affecting some users, edge cases, potentially valuable feature"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 1,
      "created_at": "2025-06-25T06:57:28Z",
      "updated_at": "2025-10-06T18:30:14Z",
      "closed_at": null,
      "author_association": "NONE",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "### Description\n\n\n**Title:** Support for Parameter Passing in MCP Configuration and Runtime Context\n\n**Issue Description:**\n\nI would like to request support for parameter passing in MCP (Model Context Protocol) in two key scenarios:\n\n## 1. Configuration-time Parameter Passing\n\n**Use Case:** When configuring streamable HTTP connections, there's a need to pass business-specific parameters to the MCP server during initialization.\n\n**Request:** \n- How can we configure additional business parameters in the MCP configuration?\n- What's the proper way for MCP servers to receive and process these configuration parameters?\n- Is there a dedicated entry point or configuration section for custom parameters?\n\n**Example Scenario:**\n```json\n{\"mcpServers\": {\n     \"weather\": {\n              \"url\": \"http://localhost:8000/mcp\",\n              \"transport\": \"streamable_http\",\n              \"customParams\": {\n                    \"apiKey\": \"xxx\",\n                    \"environment\": \"production\",\n                    \"businessConfig\": {...}\n               }\n          }\n  }\n}\n```\n\n## 2. Runtime Context Parameter Passing\n\n**Use Case:** During MCP tool invocation, there's a need to pass sensitive or context-specific parameters that should:\n- Be accessible to the MCP server tools\n- Remain hidden from the AI model for security reasons\n- Be transmitted transparently through the MCP protocol\n\n**Request:**\n- Support for header-like parameter passing mechanism in MCP SDK\n- Secure context parameter transmission that bypasses model visibility\n- Runtime parameter injection for tool execution\n\n**Previous Implementation Reference:**\nIn previous business implementations, we used HTTP headers to pass such parameters. We're looking for similar functionality in the MCP SDK.\n\n**Expected Behavior:**\n```javascript\n// Client side - passing context parameters\nawait mcpClient.callTool('my-tool', {arguments: {...},\n  context: {userId: \"user123\",\n    sessionId: \"session456\",\n    securityToken: \"token789\"// Hidden from model}\n});\n\n// Server side - accessing context parameters\nfunction myTool(args, context) {\n  const userId = context.userId;const securityToken = context.securityToken;\n  // Tool implementation\n}\n```\n\nWould appreciate guidance on current capabilities and potential roadmap for these features.\n\n\n### References\n\n_No response_",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1023/reactions",
        "total_count": 3,
        "+1": 2,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 1,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1018",
      "id": 3172776165,
      "node_id": "I_kwDOM2n80s69HLjl",
      "number": 1018,
      "title": "Update _client_info on the ClientSession upon initialization with serverInfo",
      "user": {
        "login": "mconflitti-pbc",
        "id": 189644927,
        "node_id": "U_kgDOC03Afw",
        "avatar_url": "https://avatars.githubusercontent.com/u/189644927?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/mconflitti-pbc",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 7511840581,
          "node_id": "LA_kwDOM2n80s8AAAABv72XRQ",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/good%20first%20issue",
          "name": "good first issue",
          "color": "7057ff",
          "default": true,
          "description": "Good for newcomers"
        },
        "1": {
          "id": 9354757189,
          "node_id": "LA_kwDOM2n80s8AAAACLZZERQ",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/enhancement",
          "name": "enhancement",
          "color": "11b5cc",
          "default": true,
          "description": "Request for a new feature that's not currently supported"
        },
        "2": {
          "id": 9354761244,
          "node_id": "LA_kwDOM2n80s8AAAACLZZUHA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/ready%20for%20work",
          "name": "ready for work",
          "color": "2b9402",
          "default": false,
          "description": "Enough information for someone to start working on"
        },
        "3": {
          "id": 9354772110,
          "node_id": "LA_kwDOM2n80s8AAAACLZZ-jg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P3",
          "name": "P3",
          "color": "c7df49",
          "default": false,
          "description": "Nice to haves, rare edge cases"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 0,
      "created_at": "2025-06-24T17:37:08Z",
      "updated_at": "2025-11-12T18:30:35Z",
      "closed_at": null,
      "author_association": "NONE",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "### Description\n\nCurrently, when a ClientSession is created and no client_info arg is passed, it uses the default client info object. My expectation would be that upon session initialization, the clientinfo data is updated with the value returned from the MCP server it connected to. This information is available within the InitializationResult but not used by the SDK so the only way to get that info is to grab it during initialization manually.\n\nExample of grabbing info like the name defined by the MCP server when the client connects:\n```python\n            transport = await self.exit_stack.enter_async_context(\n                streamablehttp_client(server_url, headers=headers)\n            )\n            self.read, self.write, _ = transport\n            self.session = await self.exit_stack.enter_async_context(\n                ClientSession(self.read, self.write)\n            )\n\n            server = await self.session.initialize()\n            self.name = server.serverInfo.name  # <====\n```\n\nClientSession does the following:\n```python\nclass ClientSession(\n    BaseSession[\n        types.ClientRequest,\n        types.ClientNotification,\n        types.ClientResult,\n        types.ServerRequest,\n        types.ServerNotification,\n    ]\n):\n    def __init__(\n        self,\n        read_stream: MemoryObjectReceiveStream[SessionMessage | Exception],\n        write_stream: MemoryObjectSendStream[SessionMessage],\n        # ...\n        client_info: types.Implementation | None = None,\n    ) -> None:\n        super().__init__(...)\n        self._client_info = client_info or DEFAULT_CLIENT_INFO # <<<<<<\n       # ...\n\n    async def initialize(self) -> types.InitializeResult:\n        # ...\n        result = await self.send_request(\n            types.ClientRequest(\n                types.InitializeRequest(\n                    method=\"initialize\",\n                    params=types.InitializeRequestParams(\n                        protocolVersion=types.LATEST_PROTOCOL_VERSION,\n                        capabilities=types.ClientCapabilities(\n                            sampling=sampling,\n                            experimental=None,\n                            roots=roots,\n                        ),\n                        clientInfo=self._client_info,\n                    ),\n                )\n            ),\n            types.InitializeResult,\n        )\n        # ...\n        return result\n```\n\nThe result is returned but ClientSession._client_info is not updated with the values coming from the result. The simplest thing would just be to set _client_info to serverInfo.\n\n### References\n\n_No response_",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1018/reactions",
        "total_count": 0,
        "+1": 0,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": [
        1565
      ]
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1010",
      "id": 3169282802,
      "node_id": "I_kwDOM2n80s6852ry",
      "number": 1010,
      "title": "BUG REPORT: HTTP errors are being silently swallowed in the StreamableHTTP client",
      "user": {
        "login": "Kulaxyz",
        "id": 47082676,
        "node_id": "MDQ6VXNlcjQ3MDgyNjc2",
        "avatar_url": "https://avatars.githubusercontent.com/u/47082676?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/Kulaxyz",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 7511840554,
          "node_id": "LA_kwDOM2n80s8AAAABv72XKg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/bug",
          "name": "bug",
          "color": "d73a4a",
          "default": true,
          "description": "Something isn't working"
        },
        "1": {
          "id": 9354761244,
          "node_id": "LA_kwDOM2n80s8AAAACLZZUHA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/ready%20for%20work",
          "name": "ready for work",
          "color": "2b9402",
          "default": false,
          "description": "Enough information for someone to start working on"
        },
        "2": {
          "id": 9354770246,
          "node_id": "LA_kwDOM2n80s8AAAACLZZ3Rg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P2",
          "name": "P2",
          "color": "d2b457",
          "default": false,
          "description": "Moderate issues affecting some users, edge cases, potentially valuable feature"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 1,
      "created_at": "2025-06-23T19:49:05Z",
      "updated_at": "2025-10-03T13:25:31Z",
      "closed_at": null,
      "author_association": "NONE",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "### Initial Checks\n\n- [x] I confirm that I'm using the latest version of MCP Python SDK\n- [x] I confirm that I searched for my issue in https://github.com/modelcontextprotocol/python-sdk/issues before opening this issue\n\n### Description\n\nWhen an MCP server returns HTTP 5xx errors (e.g., when the server is down) after initial connection, these errors are not being propagated to the caller. This makes it impossible for client applications to detect and handle server failures appropriately. More than that, clients which are waiting for response stream, like [Strands SDK](https://github.com/strands-agents/sdk-python), are hanging forever since no response is returned\n\n\n### Example Code\n\n```Python\n\n```\n\n### Python & MCP Python SDK\n\n```Text\nAny\n```",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1010/reactions",
        "total_count": 0,
        "+1": 0,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1004",
      "id": 3167882528,
      "node_id": "I_kwDOM2n80s680g0g",
      "number": 1004,
      "title": "Session ID not present in memory store should return 404, not 400",
      "user": {
        "login": "sthomson-wyn",
        "id": 108886656,
        "node_id": "U_kgDOBn16gA",
        "avatar_url": "https://avatars.githubusercontent.com/u/108886656?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/sthomson-wyn",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 7511840554,
          "node_id": "LA_kwDOM2n80s8AAAABv72XKg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/bug",
          "name": "bug",
          "color": "d73a4a",
          "default": true,
          "description": "Something isn't working"
        },
        "1": {
          "id": 9354761244,
          "node_id": "LA_kwDOM2n80s8AAAACLZZUHA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/ready%20for%20work",
          "name": "ready for work",
          "color": "2b9402",
          "default": false,
          "description": "Enough information for someone to start working on"
        },
        "2": {
          "id": 9354770246,
          "node_id": "LA_kwDOM2n80s8AAAACLZZ3Rg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P2",
          "name": "P2",
          "color": "d2b457",
          "default": false,
          "description": "Moderate issues affecting some users, edge cases, potentially valuable feature"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 2,
      "created_at": "2025-06-23T11:44:13Z",
      "updated_at": "2025-11-04T20:36:26Z",
      "closed_at": null,
      "author_association": "NONE",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "### Initial Checks\n\n- [x] I confirm that I'm using the latest version of MCP Python SDK\n- [x] I confirm that I searched for my issue in https://github.com/modelcontextprotocol/python-sdk/issues before opening this issue\n\n### Description\n\nWhen a session ID is provided by a client, but it is not present in the in-memory session store for the server, the server returns a 400 https://github.com/modelcontextprotocol/python-sdk/blob/d0443a18328a2fc9e87da6feee9130f95c0b37a7/src/mcp/server/streamable_http_manager.py#L250-L256\n\nThis is a problem, because as noted in https://github.com/modelcontextprotocol/python-sdk/issues/880 sessions are not persisted between restarts\n\nThis library should return a 404, as in https://github.com/modelcontextprotocol/python-sdk/blob/d0443a18328a2fc9e87da6feee9130f95c0b37a7/src/mcp/server/streamable_http.py#L371 So that the client can re-initialize and get a new session ID as needed (as in https://github.com/mark3labs/mcp-go/blob/8f5b048218f6d044c3322f16b8cb0b08e10bf5d0/client/transport/streamable_http.go#L257). \n\n400 isn't applicable because the request isn't _bad_, but the server simply doesn't persist sessions between restarts.\n\n### Example Code\n\n```Python\n\n```\n\n### Python & MCP Python SDK\n\n```Text\n3.10.12 and 2.3.4\n```",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1004/reactions",
        "total_count": 5,
        "+1": 4,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 1
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": [
        1417
      ]
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/992",
      "id": 3163568221,
      "node_id": "I_kwDOM2n80s68kDhd",
      "number": 992,
      "title": "Support granular OAuth2 flow with state and verifier persistence",
      "user": {
        "login": "andrey-star",
        "id": 35143083,
        "node_id": "MDQ6VXNlcjM1MTQzMDgz",
        "avatar_url": "https://avatars.githubusercontent.com/u/35143083?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/andrey-star",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 9301360597,
          "node_id": "LA_kwDOM2n80s8AAAACKmd_1Q",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/auth",
          "name": "auth",
          "color": "92ad2d",
          "default": false,
          "description": "Issues and PRs related to Authentication / OAuth"
        },
        "1": {
          "id": 9354757189,
          "node_id": "LA_kwDOM2n80s8AAAACLZZERQ",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/enhancement",
          "name": "enhancement",
          "color": "11b5cc",
          "default": true,
          "description": "Request for a new feature that's not currently supported"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 0,
      "created_at": "2025-06-20T14:41:43Z",
      "updated_at": "2025-11-12T18:31:25Z",
      "closed_at": null,
      "author_association": "NONE",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "Currently, the OAuth2 PKCE implementation in [src/mcp/client/auth.py](https://github.com/modelcontextprotocol/python-sdk/blob/d0443a18328a2fc9e87da6feee9130f95c0b37a7/src/mcp/client/auth.py#L312-L313) stores the `state` and `code_verifier` in memory only, which prevents splitting the OAuth authorization flow across multiple processes.\n\nThis is common for apps with servers split between frontend and backend where BE cannot be blocked on a UI action. The UI first requests the server to generate the link, and the server processes the callback separately once the user follows it. The `state` and `code_verifier` are persisted between the calls with a short expiration time.\n\nProposal:\n* Add support for persisting the state and code_verifier values, e.g. through the `redirectHandler`, and looking them up in the `callbackHandler` for the final token exchange.\n* Allowing more granular execution of the flow - `generateUrl`, and `exchangeToken` should be callable individually.\n",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/992/reactions",
        "total_count": 1,
        "+1": 1,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/973",
      "id": 3153881698,
      "node_id": "I_kwDOM2n80s67_Gpi",
      "number": 973,
      "title": "URL Parameters Not Decoded in Dynamic Resources",
      "user": {
        "login": "codeonym",
        "id": 73207213,
        "node_id": "MDQ6VXNlcjczMjA3MjEz",
        "avatar_url": "https://avatars.githubusercontent.com/u/73207213?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/codeonym",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 7511840554,
          "node_id": "LA_kwDOM2n80s8AAAABv72XKg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/bug",
          "name": "bug",
          "color": "d73a4a",
          "default": true,
          "description": "Something isn't working"
        },
        "1": {
          "id": 9354761244,
          "node_id": "LA_kwDOM2n80s8AAAACLZZUHA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/ready%20for%20work",
          "name": "ready for work",
          "color": "2b9402",
          "default": false,
          "description": "Enough information for someone to start working on"
        },
        "2": {
          "id": 9354770246,
          "node_id": "LA_kwDOM2n80s8AAAACLZZ3Rg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P2",
          "name": "P2",
          "color": "d2b457",
          "default": false,
          "description": "Moderate issues affecting some users, edge cases, potentially valuable feature"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 0,
      "created_at": "2025-06-17T15:15:32Z",
      "updated_at": "2025-10-03T14:38:43Z",
      "closed_at": null,
      "author_association": "NONE",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "### Initial Checks\n\n- [ ] I confirm that I'm using the latest version of MCP Python SDK\n- [x] I confirm that I searched for my issue in https://github.com/modelcontextprotocol/python-sdk/issues before opening this issue\n\n### Description\n\nDynamic URL resource parameters in MCP protocol are not automatically URL-decoded, causing encoded characters (like %20 for spaces and %C3%A9 for accented characters) to be passed as-is to resource handlers instead of their decoded equivalents.\n\n\nHere is a simple log for the bug: \n- **before**\n```\n2025-06-17 14:43:44,385 [INFO] kn-graph: Found 0 products matching 'stick%20correcteur%20teint%C3%A9%20anti-imperfections%20rechargeable%20au%20zinc' - (logger.py:226)\n```\n\n- **after explicit decode**\n```\n2025-06-17 14:55:10,173 [INFO] kn-graph: Found 10 products matching 'stick correcteur teinté anti-imperfections rechargeable au zinc' - (logger.py:226)\n```\n\n### Example Code\n\n```Python\n@mcp.resource(\"products://search/{product_identifier}\")\n    def find_similar_products(product_identifier: str):\n        \"\"\"\n        Find similar products based on a given product identifier.\n        :param product_identifier: The identifier of the product (product name or code).\n        :return: Similar products or an error message if none are found.\n        \"\"\"\n        print(product_identifier)\n        \"\"\"\n         -- walkaround: explicit decoding\n        from urllib.parse import unquote\n        print(unquote(product_identifier))\n        \"\"\"\n```\n\n### Python & MCP Python SDK\n\n```Text\n# uv pip list | grep \"mcp\"\nmcp                          1.9.2\n# python --version\nPython 3.13.4\n```",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/973/reactions",
        "total_count": 0,
        "+1": 0,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/965",
      "id": 3150865956,
      "node_id": "I_kwDOM2n80s67zmYk",
      "number": 965,
      "title": "How is it possible to avoid the \"Endpoint origin does not match\" exception?",
      "user": {
        "login": "palandlom",
        "id": 20206126,
        "node_id": "MDQ6VXNlcjIwMjA2MTI2",
        "avatar_url": "https://avatars.githubusercontent.com/u/20206126?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/palandlom",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 7511840603,
          "node_id": "LA_kwDOM2n80s8AAAABv72XWw",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/question",
          "name": "question",
          "color": "d876e3",
          "default": true,
          "description": "Further information is requested"
        },
        "1": {
          "id": 9082681979,
          "node_id": "LA_kwDOM2n80s8AAAACHV66ew",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/needs%20confirmation",
          "name": "needs confirmation",
          "color": "aaaaaa",
          "default": false,
          "description": "Needs confirmation that the PR is actually required or needed."
        },
        "2": {
          "id": 9287721887,
          "node_id": "LA_kwDOM2n80s8AAAACKZdjnw",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/needs%20repro",
          "name": "needs repro",
          "color": "e35211",
          "default": false,
          "description": "needs additional information to be able to reproduce bug"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 3,
      "created_at": "2025-06-16T18:14:59Z",
      "updated_at": "2025-10-09T11:30:12Z",
      "closed_at": null,
      "author_association": "NONE",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "### Question\n\nOn kuber-cluster we have MCP server and pydanticAI agent  app\n\nMCP server is running on 0.0.0.0:3001 with CORS restrictions disabled.\nAgent tries to connect with it by URL http://mcp-server:3001 and fails by [Exception](https://github.com/modelcontextprotocol/python-sdk/blob/main/src/mcp/client/sse.py#L89) from `sse-client`\n\n```sh\n17:24:28.317 process message 2025-06-12 17:24:28,406 - httpx - INFO - HTTP Request: GET http://mcp-server:3001/sse .HTTP/1.1 24545 OK. \n2025-06-12 17:24:28,407 - mcp.client.sse - ERROR - Endpoint origin does not match connection origin: http://0.0.0.0:3001/messag e?sessionId6.58h7del6-6480-4052-aBh-40c1h4d34d90 \n2025-06-12 17:24:28,467 - mcp.client.sse - ERROR - Error in sse_reader: Endpoint origin does not match connection origin: http: //0.0.0.0:3001/messageIsessionId6.58h7del6-6480-4052-aBh-40c1b4d34d90 \n```\nIs there any way to influence this and avoid exception?\nIs this exception really necessary? (i.e., maybe an warning would be enough.)\n\n\n\n### Additional Context\n\n_No response_",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/965/reactions",
        "total_count": 0,
        "+1": 0,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/953",
      "id": 3143541535,
      "node_id": "I_kwDOM2n80s67XqMf",
      "number": 953,
      "title": "context.report_progress not sending notifications on streamable-http",
      "user": {
        "login": "abdhx",
        "id": 26657858,
        "node_id": "MDQ6VXNlcjI2NjU3ODU4",
        "avatar_url": "https://avatars.githubusercontent.com/u/26657858?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/abdhx",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 7511840554,
          "node_id": "LA_kwDOM2n80s8AAAABv72XKg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/bug",
          "name": "bug",
          "color": "d73a4a",
          "default": true,
          "description": "Something isn't working"
        },
        "1": {
          "id": 9354761244,
          "node_id": "LA_kwDOM2n80s8AAAACLZZUHA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/ready%20for%20work",
          "name": "ready for work",
          "color": "2b9402",
          "default": false,
          "description": "Enough information for someone to start working on"
        },
        "2": {
          "id": 9354772110,
          "node_id": "LA_kwDOM2n80s8AAAACLZZ-jg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P3",
          "name": "P3",
          "color": "c7df49",
          "default": false,
          "description": "Nice to haves, rare edge cases"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/milestones/18",
        "id": 13810637,
        "node_id": "MI_kwDOM2n80s4A0rvN",
        "number": 18,
        "title": "HTTP Transport Edge Cases",
        "description": null,
        "creator": {
          "login": "felixweinberger",
          "id": 3823880,
          "node_id": "MDQ6VXNlcjM4MjM4ODA=",
          "avatar_url": "https://avatars.githubusercontent.com/u/3823880?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/felixweinberger",
          "type": "User",
          "user_view_type": "public",
          "site_admin": false
        },
        "open_issues": 6,
        "closed_issues": 4,
        "state": "open",
        "created_at": "2025-10-03T10:46:49Z",
        "updated_at": "2025-12-04T10:36:28Z",
        "due_on": null,
        "closed_at": null
      },
      "comments": 3,
      "created_at": "2025-06-13T13:12:14Z",
      "updated_at": "2025-10-03T13:23:09Z",
      "closed_at": null,
      "author_association": "NONE",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "### Initial Checks\n\n- [x] I confirm that I'm using the latest version of MCP Python SDK\n- [x] I confirm that I searched for my issue in https://github.com/modelcontextprotocol/python-sdk/issues before opening this issue\n\n### Description\n\nHello 👋 \n\nIt seems like `context.report_progress` is not sending any notifications on streamable-http.\nI checked and the reason is that `related_request_id` is not specified in the underlying function.\n\nA fix that work on my side in the file `src/mcp/server/fastmcp/server.py`:\n\n```Python\nasync def report_progress(self, progress: float, total: float | None = None, message: str | None = None) -> None:\n\n# <---- non important code is skipped here --->\n\nawait self.request_context.session.send_progress_notification(\n    progress_token=progress_token,\n    progress=progress,\n    total=total,\n    message=message,\n\n    # ADD this line to fix the issue\n    related_request_id=self.request_id,\n)\n```\n\nI created a PR to add that line.\n\n### Example Code\n\n```Python\nfrom mcp.server.fastmcp import Context, FastMCP\n\nmcp = FastMCP(\"StatelessServer\", stateless_http=True)\n\n@mcp.tool()\nasync def example(ctx: Context) -> str:\n    await ctx.report_progress(0, None, \"This does not work\")\n    await ctx.session.send_progress_notification(\n        ctx.request_context.meta.progressToken, 0, None, \"But this works perfectly\", ctx.request_id\n    )\n    return \"Done\"\n\nmcp.run(transport=\"streamable-http\")\n```\n\n### Python & MCP Python SDK\n\n```Text\nmcp 1.9.4\nPython 3.13.3\nuv 0.7.13\n```",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/953/reactions",
        "total_count": 3,
        "+1": 3,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/942",
      "id": 3139122119,
      "node_id": "I_kwDOM2n80s67GzPH",
      "number": 942,
      "title": "How to expose mcp_session_id to user ?",
      "user": {
        "login": "sequoiar",
        "id": 225268,
        "node_id": "MDQ6VXNlcjIyNTI2OA==",
        "avatar_url": "https://avatars.githubusercontent.com/u/225268?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/sequoiar",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 9354757189,
          "node_id": "LA_kwDOM2n80s8AAAACLZZERQ",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/enhancement",
          "name": "enhancement",
          "color": "11b5cc",
          "default": true,
          "description": "Request for a new feature that's not currently supported"
        },
        "1": {
          "id": 9354761244,
          "node_id": "LA_kwDOM2n80s8AAAACLZZUHA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/ready%20for%20work",
          "name": "ready for work",
          "color": "2b9402",
          "default": false,
          "description": "Enough information for someone to start working on"
        },
        "2": {
          "id": 9354767859,
          "node_id": "LA_kwDOM2n80s8AAAACLZZt8w",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P1",
          "name": "P1",
          "color": "895d17",
          "default": false,
          "description": "Significant bug affecting many users, highly requested feature"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 3,
      "created_at": "2025-06-12T07:15:03Z",
      "updated_at": "2025-10-06T18:38:15Z",
      "closed_at": null,
      "author_association": "NONE",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "### Question\n\nfor streamable http transport, we need mcp_session_id to identify different mcp client. but, seems there is No existing api to get mcp_session_id.\n\n### Additional Context\n\n_No response_",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/942/reactions",
        "total_count": 0,
        "+1": 0,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/915",
      "id": 3132897135,
      "node_id": "I_kwDOM2n80s66vDdv",
      "number": 915,
      "title": "Exception in `ClientSessionGroup` if `streamable_http` MCP server is not available",
      "user": {
        "login": "hzeus",
        "id": 121394,
        "node_id": "MDQ6VXNlcjEyMTM5NA==",
        "avatar_url": "https://avatars.githubusercontent.com/u/121394?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/hzeus",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 7511840554,
          "node_id": "LA_kwDOM2n80s8AAAABv72XKg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/bug",
          "name": "bug",
          "color": "d73a4a",
          "default": true,
          "description": "Something isn't working"
        },
        "1": {
          "id": 9354761244,
          "node_id": "LA_kwDOM2n80s8AAAACLZZUHA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/ready%20for%20work",
          "name": "ready for work",
          "color": "2b9402",
          "default": false,
          "description": "Enough information for someone to start working on"
        },
        "2": {
          "id": 9354767859,
          "node_id": "LA_kwDOM2n80s8AAAACLZZt8w",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P1",
          "name": "P1",
          "color": "895d17",
          "default": false,
          "description": "Significant bug affecting many users, highly requested feature"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 5,
      "created_at": "2025-06-10T09:49:49Z",
      "updated_at": "2025-11-07T17:14:05Z",
      "closed_at": null,
      "author_association": "NONE",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "**Describe the bug**\nWhen I use the `ClientSessionGroup` for a remote MCP server via `remote_http` for a remote server that is not running, I get exception `RuntimeError: Attempted to exit cancel scope in a different task than it was entered in`\n\n<details>\n<summary>\n(complete output collapsed)\n</summary>\n\n```\nan error occurred during closing of asynchronous generator <async_generator object streamablehttp_client at 0xffffa53755d0>\nasyncgen: <async_generator object streamablehttp_client at 0xffffa53755d0>\n  + Exception Group Traceback (most recent call last):\n  |   File \"/workspaces/test/.venv/lib/python3.13/site-packages/anyio/_backends/_asyncio.py\", line 772, in __aexit__\n  |     raise BaseExceptionGroup(\n  |         \"unhandled errors in a TaskGroup\", self._exceptions\n  |     ) from None\n  | BaseExceptionGroup: unhandled errors in a TaskGroup (2 sub-exceptions)\n  +-+---------------- 1 ----------------\n    | Traceback (most recent call last):\n    |   File \"/workspaces/test/.venv/lib/python3.13/site-packages/httpx/_transports/default.py\", line 101, in map_httpcore_exceptions\n    |     yield\n    |   File \"/workspaces/test/.venv/lib/python3.13/site-packages/httpx/_transports/default.py\", line 394, in handle_async_request\n    |     resp = await self._pool.handle_async_request(req)\n    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n    |   File \"/workspaces/test/.venv/lib/python3.13/site-packages/httpcore/_async/connection_pool.py\", line 256, in handle_async_request\n    |     raise exc from None\n    |   File \"/workspaces/test/.venv/lib/python3.13/site-packages/httpcore/_async/connection_pool.py\", line 236, in handle_async_request\n    |     response = await connection.handle_async_request(\n    |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n    |         pool_request.request\n    |         ^^^^^^^^^^^^^^^^^^^^\n    |     )\n    |     ^\n    |   File \"/workspaces/test/.venv/lib/python3.13/site-packages/httpcore/_async/connection.py\", line 101, in handle_async_request\n    |     raise exc\n    |   File \"/workspaces/test/.venv/lib/python3.13/site-packages/httpcore/_async/connection.py\", line 78, in handle_async_request\n    |     stream = await self._connect(request)\n    |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n    |   File \"/workspaces/test/.venv/lib/python3.13/site-packages/httpcore/_async/connection.py\", line 124, in _connect\n    |     stream = await self._network_backend.connect_tcp(**kwargs)\n    |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n    |   File \"/workspaces/test/.venv/lib/python3.13/site-packages/httpcore/_backends/auto.py\", line 31, in connect_tcp\n    |     return await self._backend.connect_tcp(\n    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n    |     ...<5 lines>...\n    |     )\n    |     ^\n    |   File \"/workspaces/test/.venv/lib/python3.13/site-packages/httpcore/_backends/anyio.py\", line 113, in connect_tcp\n    |     with map_exceptions(exc_map):\n    |          ~~~~~~~~~~~~~~^^^^^^^^^\n    |   File \"/usr/local/lib/python3.13/contextlib.py\", line 162, in __exit__\n    |     self.gen.throw(value)\n    |     ~~~~~~~~~~~~~~^^^^^^^\n    |   File \"/workspaces/test/.venv/lib/python3.13/site-packages/httpcore/_exceptions.py\", line 14, in map_exceptions\n    |     raise to_exc(exc) from exc\n    | httpcore.ConnectError: All connection attempts failed\n    | \n    | The above exception was the direct cause of the following exception:\n    | \n    | Traceback (most recent call last):\n    |   File \"/workspaces/test/.venv/lib/python3.13/site-packages/mcp/client/streamable_http.py\", line 391, in handle_request_async\n    |     await self._handle_post_request(ctx)\n    |   File \"/workspaces/test/.venv/lib/python3.13/site-packages/mcp/client/streamable_http.py\", line 251, in _handle_post_request\n    |     async with ctx.client.stream(\n    |                ~~~~~~~~~~~~~~~~~^\n    |         \"POST\",\n    |         ^^^^^^^\n    |     ...<2 lines>...\n    |         headers=headers,\n    |         ^^^^^^^^^^^^^^^^\n    |     ) as response:\n    |     ^\n    |   File \"/usr/local/lib/python3.13/contextlib.py\", line 214, in __aenter__\n    |     return await anext(self.gen)\n    |            ^^^^^^^^^^^^^^^^^^^^^\n    |   File \"/workspaces/test/.venv/lib/python3.13/site-packages/httpx/_client.py\", line 1583, in stream\n    |     response = await self.send(\n    |                ^^^^^^^^^^^^^^^^\n    |     ...<4 lines>...\n    |     )\n    |     ^\n    |   File \"/workspaces/test/.venv/lib/python3.13/site-packages/httpx/_client.py\", line 1629, in send\n    |     response = await self._send_handling_auth(\n    |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n    |     ...<4 lines>...\n    |     )\n    |     ^\n    |   File \"/workspaces/test/.venv/lib/python3.13/site-packages/httpx/_client.py\", line 1657, in _send_handling_auth\n    |     response = await self._send_handling_redirects(\n    |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n    |     ...<3 lines>...\n    |     )\n    |     ^\n    |   File \"/workspaces/test/.venv/lib/python3.13/site-packages/httpx/_client.py\", line 1694, in _send_handling_redirects\n    |     response = await self._send_single_request(request)\n    |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n    |   File \"/workspaces/test/.venv/lib/python3.13/site-packages/httpx/_client.py\", line 1730, in _send_single_request\n    |     response = await transport.handle_async_request(request)\n    |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n    |   File \"/workspaces/test/.venv/lib/python3.13/site-packages/httpx/_transports/default.py\", line 393, in handle_async_request\n    |     with map_httpcore_exceptions():\n    |          ~~~~~~~~~~~~~~~~~~~~~~~^^\n    |   File \"/usr/local/lib/python3.13/contextlib.py\", line 162, in __exit__\n    |     self.gen.throw(value)\n    |     ~~~~~~~~~~~~~~^^^^^^^\n    |   File \"/workspaces/test/.venv/lib/python3.13/site-packages/httpx/_transports/default.py\", line 118, in map_httpcore_exceptions\n    |     raise mapped_exc(message) from exc\n    | httpx.ConnectError: All connection attempts failed\n    +---------------- 2 ----------------\n    | Traceback (most recent call last):\n    |   File \"/workspaces/test/.venv/lib/python3.13/site-packages/mcp/client/streamable_http.py\", line 492, in streamablehttp_client\n    |     yield (\n    |     ...<3 lines>...\n    |     )\n    | GeneratorExit\n    +------------------------------------\n\nDuring handling of the above exception, another exception occurred:\n\nTraceback (most recent call last):\n  File \"/workspaces/test/.venv/lib/python3.13/site-packages/mcp/client/streamable_http.py\", line 464, in streamablehttp_client\n    async with anyio.create_task_group() as tg:\n               ~~~~~~~~~~~~~~~~~~~~~~~^^\n  File \"/workspaces/test/.venv/lib/python3.13/site-packages/anyio/_backends/_asyncio.py\", line 778, in __aexit__\n    if self.cancel_scope.__exit__(type(exc), exc, exc.__traceback__):\n       ~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/workspaces/test/.venv/lib/python3.13/site-packages/anyio/_backends/_asyncio.py\", line 457, in __exit__\n    raise RuntimeError(\n    ...<2 lines>...\n    )\nRuntimeError: Attempted to exit cancel scope in a different task than it was entered in\nTraceback (most recent call last):\n  File \"/workspaces/test/.venv/lib/python3.13/site-packages/anyio/streams/memory.py\", line 111, in receive\n    return self.receive_nowait()\n           ~~~~~~~~~~~~~~~~~~~^^\n  File \"/workspaces/test/.venv/lib/python3.13/site-packages/anyio/streams/memory.py\", line 106, in receive_nowait\n    raise WouldBlock\nanyio.WouldBlock\n\nDuring handling of the above exception, another exception occurred:\n\nTraceback (most recent call last):\n  File \"/workspaces/test.py\", line 14, in <module>\n    asyncio.run(main())\n    ~~~~~~~~~~~^^^^^^^^\n  File \"/usr/local/lib/python3.13/asyncio/runners.py\", line 195, in run\n    return runner.run(main)\n           ~~~~~~~~~~^^^^^^\n  File \"/usr/local/lib/python3.13/asyncio/runners.py\", line 118, in run\n    return self._loop.run_until_complete(task)\n           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^\n  File \"/usr/local/lib/python3.13/asyncio/base_events.py\", line 719, in run_until_complete\n    return future.result()\n           ~~~~~~~~~~~~~^^\n  File \"/workspaces/test.py\", line 10, in main\n    await client_session_group.connect_to_server(server_params)\n  File \"/workspaces/test/.venv/lib/python3.13/site-packages/mcp/client/session_group.py\", line 232, in connect_to_server\n    server_info, session = await self._establish_session(server_params)\n                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/workspaces/test/.venv/lib/python3.13/site-packages/mcp/client/session_group.py\", line 267, in _establish_session\n    result = await session.initialize()\n             ^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/workspaces/test/.venv/lib/python3.13/site-packages/mcp/client/session.py\", line 133, in initialize\n    result = await self.send_request(\n             ^^^^^^^^^^^^^^^^^^^^^^^^\n    ...<15 lines>...\n    )\n    ^\n  File \"/workspaces/test/.venv/lib/python3.13/site-packages/mcp/shared/session.py\", line 283, in send_request\n    response_or_error = await response_stream_reader.receive()\n                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/workspaces/test/.venv/lib/python3.13/site-packages/anyio/streams/memory.py\", line 119, in receive\n    await receive_event.wait()\n  File \"/workspaces/test/.venv/lib/python3.13/site-packages/anyio/_backends/_asyncio.py\", line 1774, in wait\n    await self._event.wait()\n  File \"/usr/local/lib/python3.13/asyncio/locks.py\", line 213, in wait\n    await fut\nasyncio.exceptions.CancelledError: Cancelled by cancel scope ffffa51c4050\n```\n</details>\n\n\n**To Reproduce**\n\nI tested this with this script:\n\n```python\nimport asyncio\n\nfrom mcp.client.session_group import ClientSessionGroup, StreamableHttpParameters\n\n\nasync def main():\n    async with ClientSessionGroup() as client_session_group:\n        server_params = StreamableHttpParameters(url=\"http://localhost:3001/mcp/\")\n        try:\n            await client_session_group.connect_to_server(server_params)\n        except Exception:\n            print(\"this is never reached\")\n\n\nif __name__ == \"__main__\":\n    asyncio.run(main())\n```\n\n**Expected behavior**\n\nI would like to be able to catch any error that happens during `connect_to_server` and handle it within my application code - in my case I am using the `ClientSessionGroup` for multiple MCP servers and want to provide the tools of the running MCP servers to the LLM.\n\n\n**Additional context**\n- I am using version `1.9.3`\n\n",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/915/reactions",
        "total_count": 3,
        "+1": 2,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 1
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/913",
      "id": 3131695012,
      "node_id": "I_kwDOM2n80s66qd-k",
      "number": 913,
      "title": "Inconsistency in `types.py` schema for `RequestParams`",
      "user": {
        "login": "lucasng32",
        "id": 60285534,
        "node_id": "MDQ6VXNlcjYwMjg1NTM0",
        "avatar_url": "https://avatars.githubusercontent.com/u/60285534?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/lucasng32",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 9354757189,
          "node_id": "LA_kwDOM2n80s8AAAACLZZERQ",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/enhancement",
          "name": "enhancement",
          "color": "11b5cc",
          "default": true,
          "description": "Request for a new feature that's not currently supported"
        },
        "1": {
          "id": 9354761244,
          "node_id": "LA_kwDOM2n80s8AAAACLZZUHA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/ready%20for%20work",
          "name": "ready for work",
          "color": "2b9402",
          "default": false,
          "description": "Enough information for someone to start working on"
        },
        "2": {
          "id": 9354772110,
          "node_id": "LA_kwDOM2n80s8AAAACLZZ-jg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P3",
          "name": "P3",
          "color": "c7df49",
          "default": false,
          "description": "Nice to haves, rare edge cases"
        },
        "3": {
          "id": 9412526112,
          "node_id": "LA_kwDOM2n80s8AAAACMQfAIA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/improves%20sdk%20consistency",
          "name": "improves sdk consistency",
          "color": "8f10ec",
          "default": false,
          "description": "Improves consistency with other SDKs such as Tyepscript"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 1,
      "created_at": "2025-06-09T23:03:30Z",
      "updated_at": "2025-10-06T16:10:24Z",
      "closed_at": null,
      "author_association": "NONE",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "**Describe the bug**\n\nNot sure if I'm missing something, but I found that I was unable to add extra fields to `RequestParams` in the MCP Python schema in `types.py` (e.g., I'm trying to pass auth tokens along for `ListToolsRequest`). The Python MCP schema ignores extra fields at the top level of `RequestParams`, but the TypeScript MCP schema does not. \n\n**To Reproduce**\n\nTry to create a `RequestParams` instance with an extra field at the top level (not inside `meta`), e.g.:\n\n```python\nRequestParams(foo=\"bar\", meta=None)\n```\n\nThe additional field `foo` is ignored.\n\n**Expected behavior**\n\nExtra fields at the top level of `RequestParams` should be accepted, matching the TypeScript schema’s behavior.\n\n**Additional context**\n\n- The TypeScript interface allows arbitrary extra fields at the top level of params via:\n\n```ts\nexport interface Request {\n  method: string;\n  params?: {\n    _meta?: {\n      progressToken?: ProgressToken;\n    };\n    [key: string]: unknown;\n  };\n}\n```\n\n- The Python class only allows extra fields inside the `Meta` class:\n\n```python\nclass RequestParams(BaseModel):\n    class Meta(BaseModel):\n        progressToken: ProgressToken | None = None\n        model_config = ConfigDict(extra=\"allow\")\n    meta: Meta | None = Field(alias=\"_meta\", default=None)\n```\n",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/913/reactions",
        "total_count": 0,
        "+1": 0,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/889",
      "id": 3120157439,
      "node_id": "I_kwDOM2n80s65-dL_",
      "number": 889,
      "title": "How to receive notifications on mcp client side?",
      "user": {
        "login": "shashisingh",
        "id": 1263245,
        "node_id": "MDQ6VXNlcjEyNjMyNDU=",
        "avatar_url": "https://avatars.githubusercontent.com/u/1263245?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/shashisingh",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 9331338299,
          "node_id": "LA_kwDOM2n80s8AAAACLDDsOw",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/improves%20spec%20compliance",
          "name": "improves spec compliance",
          "color": "9FD9BD",
          "default": false,
          "description": "When a change improves ability of SDK users to comply with spec definition"
        },
        "1": {
          "id": 9354757189,
          "node_id": "LA_kwDOM2n80s8AAAACLZZERQ",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/enhancement",
          "name": "enhancement",
          "color": "11b5cc",
          "default": true,
          "description": "Request for a new feature that's not currently supported"
        },
        "2": {
          "id": 9354761244,
          "node_id": "LA_kwDOM2n80s8AAAACLZZUHA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/ready%20for%20work",
          "name": "ready for work",
          "color": "2b9402",
          "default": false,
          "description": "Enough information for someone to start working on"
        },
        "3": {
          "id": 9354765360,
          "node_id": "LA_kwDOM2n80s8AAAACLZZkMA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P0",
          "name": "P0",
          "color": "a81d34",
          "default": false,
          "description": "Broken core functionality, security issues, critical missing feature"
        },
        "4": {
          "id": 9412526112,
          "node_id": "LA_kwDOM2n80s8AAAACMQfAIA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/improves%20sdk%20consistency",
          "name": "improves sdk consistency",
          "color": "8f10ec",
          "default": false,
          "description": "Improves consistency with other SDKs such as Tyepscript"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/milestones/22",
        "id": 13811612,
        "node_id": "MI_kwDOM2n80s4A0r-c",
        "number": 22,
        "title": "FastMCP issues",
        "description": null,
        "creator": {
          "login": "felixweinberger",
          "id": 3823880,
          "node_id": "MDQ6VXNlcjM4MjM4ODA=",
          "avatar_url": "https://avatars.githubusercontent.com/u/3823880?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/felixweinberger",
          "type": "User",
          "user_view_type": "public",
          "site_admin": false
        },
        "open_issues": 10,
        "closed_issues": 1,
        "state": "open",
        "created_at": "2025-10-03T14:23:32Z",
        "updated_at": "2025-12-04T09:48:23Z",
        "due_on": null,
        "closed_at": null
      },
      "comments": 1,
      "created_at": "2025-06-05T07:32:20Z",
      "updated_at": "2025-10-07T15:01:33Z",
      "closed_at": null,
      "author_association": "NONE",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "I am trying to send few logging events to the client during a tool invocation. I am using \"Context.info('Hello)\" inside a mcp.tool decorated function. I am using FASTMcp for hosting tools. I was expecting to receive these notifications in my ClientSession's \"_received_notification\" method. But I don't seem to get this to work. I do not see that _received_notification is getting called.  ",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/889/reactions",
        "total_count": 0,
        "+1": 0,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/883",
      "id": 3116194310,
      "node_id": "I_kwDOM2n80s65vVoG",
      "number": 883,
      "title": "AssertionError: Unexpected message while using middlewares",
      "user": {
        "login": "toughnoah",
        "id": 75348324,
        "node_id": "MDQ6VXNlcjc1MzQ4MzI0",
        "avatar_url": "https://avatars.githubusercontent.com/u/75348324?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/toughnoah",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 7511840554,
          "node_id": "LA_kwDOM2n80s8AAAABv72XKg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/bug",
          "name": "bug",
          "color": "d73a4a",
          "default": true,
          "description": "Something isn't working"
        },
        "1": {
          "id": 9354761244,
          "node_id": "LA_kwDOM2n80s8AAAACLZZUHA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/ready%20for%20work",
          "name": "ready for work",
          "color": "2b9402",
          "default": false,
          "description": "Enough information for someone to start working on"
        },
        "2": {
          "id": 9354767859,
          "node_id": "LA_kwDOM2n80s8AAAACLZZt8w",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P1",
          "name": "P1",
          "color": "895d17",
          "default": false,
          "description": "Significant bug affecting many users, highly requested feature"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/milestones/18",
        "id": 13810637,
        "node_id": "MI_kwDOM2n80s4A0rvN",
        "number": 18,
        "title": "HTTP Transport Edge Cases",
        "description": null,
        "creator": {
          "login": "felixweinberger",
          "id": 3823880,
          "node_id": "MDQ6VXNlcjM4MjM4ODA=",
          "avatar_url": "https://avatars.githubusercontent.com/u/3823880?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/felixweinberger",
          "type": "User",
          "user_view_type": "public",
          "site_admin": false
        },
        "open_issues": 6,
        "closed_issues": 4,
        "state": "open",
        "created_at": "2025-10-03T10:46:49Z",
        "updated_at": "2025-12-04T10:36:28Z",
        "due_on": null,
        "closed_at": null
      },
      "comments": 12,
      "created_at": "2025-06-04T03:16:59Z",
      "updated_at": "2025-10-03T12:50:09Z",
      "closed_at": null,
      "author_association": "NONE",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "**Describe the bug**\nwhen I mount the mcp to starlette, and I use middleware to do some prechecks, I met this errors.\n\nDuring handling of the above exception, another exception occurred:\n\nTraceback (most recent call last):\n  File \"/app/.venv/lib/python3.12/site-packages/uvicorn/protocols/http/h11_impl.py\", line 403, in run_asgi\n    result = await app(  # type: ignore[func-returns-value]\n             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/app/.venv/lib/python3.12/site-packages/uvicorn/middleware/proxy_headers.py\", line 60, in __call__\n    return await self.app(scope, receive, send)\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/app/.venv/lib/python3.12/site-packages/starlette/applications.py\", line 113, in __call__\n    await self.middleware_stack(scope, receive, send)\n  File \"/app/.venv/lib/python3.12/site-packages/starlette/middleware/errors.py\", line 187, in __call__\n    raise exc\n  File \"/app/.venv/lib/python3.12/site-packages/starlette/middleware/errors.py\", line 165, in __call__\n    await self.app(scope, receive, _send)\n  File \"/app/.venv/lib/python3.12/site-packages/starlette/middleware/base.py\", line 182, in __call__\n    with recv_stream, send_stream, collapse_excgroups():\n                                   ^^^^^^^^^^^^^^^^^^^^\n  File \"/usr/local/lib/python3.12/contextlib.py\", line 158, in __exit__\n    self.gen.throw(value)\n  File \"/app/.venv/lib/python3.12/site-packages/starlette/_utils.py\", line 83, in collapse_excgroups\n    raise exc\n  File \"/app/.venv/lib/python3.12/site-packages/starlette/middleware/base.py\", line 185, in __call__\n    await response(scope, wrapped_receive, send)\n  File \"/app/.venv/lib/python3.12/site-packages/starlette/middleware/base.py\", line 223, in __call__\n    async for chunk in self.body_iterator:\n  File \"/app/.venv/lib/python3.12/site-packages/starlette/middleware/base.py\", line 169, in body_stream\n    assert message[\"type\"] == \"http.response.body\", f\"Unexpected message: {message}\"\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\nAssertionError: Unexpected message: {'type': 'http.response.start', 'status': 200, 'headers': [(b'content-length', b'0')]}\n\n**To Reproduce**\nSteps to reproduce the behavior:\n1. mount mcp  to starlette\n2. use middlewares\n3. call tools\n```python\nclass CustomHeaderMiddleware(BaseHTTPMiddleware):\n    async def dispatch(self, request, call_next):\n        return await call_next(request)\n\n\nmiddleware = [\n    Middleware(CustomHeaderMiddleware)\n]\n\napp = Starlette(middleware=middleware)\napp.mount(\"/\", mcp_server.sse_app())\n\ndef main():\n    uvicorn.run(\n        app=\"atlantis_mcp_server:app\",\n        host=\"0.0.0.0\",\n        port=8000,\n        workers=1,\n        log_level=\"info\"\n    )\n\n__all__ = [\"main\"]\n```\n\n**Expected behavior**\nShould not raise type error\n\n**Screenshots**\nIf applicable, add screenshots to help explain your problem.\n\n**Desktop (please complete the following information):**\n - OS: [e.g. iOS]\n - Browser [e.g. chrome, safari]\n - Version [e.g. 22]\n\n**Smartphone (please complete the following information):**\n - Device: [e.g. iPhone6]\n - OS: [e.g. iOS8.1]\n - Browser [e.g. stock browser, safari]\n - Version [e.g. 22]\n\n**Additional context**\nAdd any other context about the problem here.\n",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/883/reactions",
        "total_count": 6,
        "+1": 6,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/881",
      "id": 3115574641,
      "node_id": "I_kwDOM2n80s65s-Vx",
      "number": 881,
      "title": "Client Credentials In the token Handler",
      "user": {
        "login": "SoldierSacha",
        "id": 55644767,
        "node_id": "MDQ6VXNlcjU1NjQ0NzY3",
        "avatar_url": "https://avatars.githubusercontent.com/u/55644767?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/SoldierSacha",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 9231177417,
          "node_id": "LA_kwDOM2n80s8AAAACJjiWyQ",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/pending%20SEP%20approval",
          "name": "pending SEP approval",
          "color": "390ac3",
          "default": false,
          "description": "When a PR is attached as an implementation detail to a SEP, we mark it as such for triage."
        },
        "1": {
          "id": 9301360597,
          "node_id": "LA_kwDOM2n80s8AAAACKmd_1Q",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/auth",
          "name": "auth",
          "color": "92ad2d",
          "default": false,
          "description": "Issues and PRs related to Authentication / OAuth"
        },
        "2": {
          "id": 9331338299,
          "node_id": "LA_kwDOM2n80s8AAAACLDDsOw",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/improves%20spec%20compliance",
          "name": "improves spec compliance",
          "color": "9FD9BD",
          "default": false,
          "description": "When a change improves ability of SDK users to comply with spec definition"
        },
        "3": {
          "id": 9354757189,
          "node_id": "LA_kwDOM2n80s8AAAACLZZERQ",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/enhancement",
          "name": "enhancement",
          "color": "11b5cc",
          "default": true,
          "description": "Request for a new feature that's not currently supported"
        },
        "4": {
          "id": 9354767859,
          "node_id": "LA_kwDOM2n80s8AAAACLZZt8w",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P1",
          "name": "P1",
          "color": "895d17",
          "default": false,
          "description": "Significant bug affecting many users, highly requested feature"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 1,
      "created_at": "2025-06-03T22:13:00Z",
      "updated_at": "2025-10-06T18:53:33Z",
      "closed_at": null,
      "author_association": "NONE",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "**Is your feature request related to a problem? Please describe.**\nThe MCP Authorization Spec 2.1.1 OAuth Grant Types mentions that both Authorization Code and Client Credentials should be handled. \n\n**Describe the solution you'd like**\nIn /server/auth/handlers/token.py, we only currently support \"authorization-code\".  It would be fantastic if we could support \"client-credentials\" as well. \n\nhttps://github.com/modelcontextprotocol/python-sdk/blob/544176770b53e6a0ae8c413d3b6c5116421f67df/src/mcp/server/auth/handlers/token.py#L26-L47\n\n**Describe alternatives you've considered**\nI mean it's just more convenient, so I don't have to do the whole PKCE exchange thing if it's not necessary. \n\n**Additional context**\n\n<img width=\"641\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/99491d8b-6598-4f82-ad35-9f1ea001dc04\" />\n\nLink to MCP spec: https://modelcontextprotocol.io/specification/2025-03-26/basic/authorization#2-1-1-oauth-grant-types\n",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/881/reactions",
        "total_count": 4,
        "+1": 4,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/880",
      "id": 3114980525,
      "node_id": "I_kwDOM2n80s65qtSt",
      "number": 880,
      "title": "[horizontal scaling] How to actually build session persistence in streamable http MCP server?",
      "user": {
        "login": "karthich",
        "id": 1126522,
        "node_id": "MDQ6VXNlcjExMjY1MjI=",
        "avatar_url": "https://avatars.githubusercontent.com/u/1126522?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/karthich",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 7511840560,
          "node_id": "LA_kwDOM2n80s8AAAABv72XMA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/documentation",
          "name": "documentation",
          "color": "0075ca",
          "default": true,
          "description": "Improvements or additions to documentation"
        },
        "1": {
          "id": 9354761244,
          "node_id": "LA_kwDOM2n80s8AAAACLZZUHA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/ready%20for%20work",
          "name": "ready for work",
          "color": "2b9402",
          "default": false,
          "description": "Enough information for someone to start working on"
        },
        "2": {
          "id": 9354767859,
          "node_id": "LA_kwDOM2n80s8AAAACLZZt8w",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P1",
          "name": "P1",
          "color": "895d17",
          "default": false,
          "description": "Significant bug affecting many users, highly requested feature"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 16,
      "created_at": "2025-06-03T18:19:07Z",
      "updated_at": "2025-10-07T16:55:03Z",
      "closed_at": null,
      "author_association": "NONE",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "I have a question here regarding how to build session persistence into an MCP server.\n\nI am running my mcp server (FastMCP) in an ecs service with multiple tasks. I have built a redis event store to allow for resumability. The service sits behind an ALB that directs HTTPS traffic to it. Inspite of all of it, Im still observing intermittent `Bad Request: No valid session ID provided` 400 errors when I connect the mcpinspector.\n\nMy suspicion is StreamableHTTPSessionManager doesn't seem to be able to store session-id data in an external data source. Therefore traffic from a client has to always hit the same task since the session id is tied to a server.\n\nIn an AWS architecture, how do I configure my server and client to accomplish this. Is using sticky sessions the only route here? Are streamable http sessions not horizontally scalable?",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/880/reactions",
        "total_count": 17,
        "+1": 17,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/874",
      "id": 3112717714,
      "node_id": "I_kwDOM2n80s65iE2S",
      "number": 874,
      "title": "Cannot break out of session.initialize() when using streamable-http",
      "user": {
        "login": "efcwetgw",
        "id": 93235129,
        "node_id": "U_kgDOBY6nuQ",
        "avatar_url": "https://avatars.githubusercontent.com/u/93235129?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/efcwetgw",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 7511840554,
          "node_id": "LA_kwDOM2n80s8AAAABv72XKg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/bug",
          "name": "bug",
          "color": "d73a4a",
          "default": true,
          "description": "Something isn't working"
        },
        "1": {
          "id": 9354761244,
          "node_id": "LA_kwDOM2n80s8AAAACLZZUHA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/ready%20for%20work",
          "name": "ready for work",
          "color": "2b9402",
          "default": false,
          "description": "Enough information for someone to start working on"
        },
        "2": {
          "id": 9354767859,
          "node_id": "LA_kwDOM2n80s8AAAACLZZt8w",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P1",
          "name": "P1",
          "color": "895d17",
          "default": false,
          "description": "Significant bug affecting many users, highly requested feature"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/milestones/18",
        "id": 13810637,
        "node_id": "MI_kwDOM2n80s4A0rvN",
        "number": 18,
        "title": "HTTP Transport Edge Cases",
        "description": null,
        "creator": {
          "login": "felixweinberger",
          "id": 3823880,
          "node_id": "MDQ6VXNlcjM4MjM4ODA=",
          "avatar_url": "https://avatars.githubusercontent.com/u/3823880?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/felixweinberger",
          "type": "User",
          "user_view_type": "public",
          "site_admin": false
        },
        "open_issues": 6,
        "closed_issues": 4,
        "state": "open",
        "created_at": "2025-10-03T10:46:49Z",
        "updated_at": "2025-12-04T10:36:28Z",
        "due_on": null,
        "closed_at": null
      },
      "comments": 5,
      "created_at": "2025-06-03T07:04:28Z",
      "updated_at": "2025-10-09T11:22:08Z",
      "closed_at": null,
      "author_association": "NONE",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "\nWhen I use streaming-http connection, I can't jump out of the session initialization. However, when I debug, I find that the initialization request has been sent and the message from the other party has been received, but I can't jump out of initialize.",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/874/reactions",
        "total_count": 0,
        "+1": 0,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/870",
      "id": 3111768553,
      "node_id": "I_kwDOM2n80s65edHp",
      "number": 870,
      "title": "Add SSL Certificate Verification Options to FastMCP Client",
      "user": {
        "login": "iDataist",
        "id": 46846986,
        "node_id": "MDQ6VXNlcjQ2ODQ2OTg2",
        "avatar_url": "https://avatars.githubusercontent.com/u/46846986?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/iDataist",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 7511840554,
          "node_id": "LA_kwDOM2n80s8AAAABv72XKg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/bug",
          "name": "bug",
          "color": "d73a4a",
          "default": true,
          "description": "Something isn't working"
        },
        "1": {
          "id": 9354761244,
          "node_id": "LA_kwDOM2n80s8AAAACLZZUHA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/ready%20for%20work",
          "name": "ready for work",
          "color": "2b9402",
          "default": false,
          "description": "Enough information for someone to start working on"
        },
        "2": {
          "id": 9354765360,
          "node_id": "LA_kwDOM2n80s8AAAACLZZkMA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P0",
          "name": "P0",
          "color": "a81d34",
          "default": false,
          "description": "Broken core functionality, security issues, critical missing feature"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 20,
      "created_at": "2025-06-02T22:05:46Z",
      "updated_at": "2025-10-27T07:45:47Z",
      "closed_at": null,
      "author_association": "NONE",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "**Is your feature request related to a problem? Please describe.**\n\nWhen connecting to an MCP server over HTTPS with self-signed or internal certificates, the FastMCP Client fails with SSL certificate verification errors. Currently, there's no straightforward way to disable SSL verification or provide custom certificates when using the Client class.\n\n```\nssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1007)\n```\n\n**Describe the solution you'd like**\nPlease add one or more of the following options to the FastMCP Client:\n\nA verify parameter to disable SSL verification or to provide a custom certificate:\n```\nclient = Client(MCP_URL, verify=False)\n```\n\n```\nclient = Client(MCP_URL, verify=\"/path/to/certificate.pem\")\n```\n\nThis is needed when working with internal or development environments that use self-signed certificates or private certificate authorities. \n\n**Describe alternatives you've considered**\nUsers need to resort to insecure workarounds like patching Python's SSL module.\n\n**Additional context**\n\nThe issue appears to be in how the transport is inferred and created from the URL string. When a URL is provided, the infer_transport function creates a StreamableHttpTransport for HTTPS URLs, but there's no way to configure the SSL verification options for this transport.\n\nAccording to FastMCP requirements, streamable-http transport is required for web deployments, and the client needs to connect to the /mcp path. The current implementation doesn't provide a way to handle SSL verification for these connections.\n\nThis would align with how other HTTP client libraries (like requests) handle SSL verification, making the API more intuitive and flexible for enterprise environments.",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/870/reactions",
        "total_count": 12,
        "+1": 12,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/857",
      "id": 3102681777,
      "node_id": "I_kwDOM2n80s647yqx",
      "number": 857,
      "title": "Drop uvicorn from test suite",
      "user": {
        "login": "Kludex",
        "id": 7353520,
        "node_id": "MDQ6VXNlcjczNTM1MjA=",
        "avatar_url": "https://avatars.githubusercontent.com/u/7353520?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/Kludex",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 7511840581,
          "node_id": "LA_kwDOM2n80s8AAAABv72XRQ",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/good%20first%20issue",
          "name": "good first issue",
          "color": "7057ff",
          "default": true,
          "description": "Good for newcomers"
        },
        "1": {
          "id": 9354757189,
          "node_id": "LA_kwDOM2n80s8AAAACLZZERQ",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/enhancement",
          "name": "enhancement",
          "color": "11b5cc",
          "default": true,
          "description": "Request for a new feature that's not currently supported"
        },
        "2": {
          "id": 9354761244,
          "node_id": "LA_kwDOM2n80s8AAAACLZZUHA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/ready%20for%20work",
          "name": "ready for work",
          "color": "2b9402",
          "default": false,
          "description": "Enough information for someone to start working on"
        },
        "3": {
          "id": 9354770246,
          "node_id": "LA_kwDOM2n80s8AAAACLZZ3Rg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P2",
          "name": "P2",
          "color": "d2b457",
          "default": false,
          "description": "Moderate issues affecting some users, edge cases, potentially valuable feature"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 7,
      "created_at": "2025-05-30T09:40:59Z",
      "updated_at": "2025-11-12T18:31:24Z",
      "closed_at": null,
      "author_association": "MEMBER",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "We should be using `httpx.AsyncClient` with `httpx.ASGITransport`.",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/857/reactions",
        "total_count": 0,
        "+1": 0,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": [
        1566
      ]
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/852",
      "id": 3102441597,
      "node_id": "I_kwDOM2n80s6464B9",
      "number": 852,
      "title": "Client Registration Fails with 502 Error When Connecting to Auth Server",
      "user": {
        "login": "Wuhall",
        "id": 46012513,
        "node_id": "MDQ6VXNlcjQ2MDEyNTEz",
        "avatar_url": "https://avatars.githubusercontent.com/u/46012513?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/Wuhall",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 7511840554,
          "node_id": "LA_kwDOM2n80s8AAAABv72XKg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/bug",
          "name": "bug",
          "color": "d73a4a",
          "default": true,
          "description": "Something isn't working"
        },
        "1": {
          "id": 9301360597,
          "node_id": "LA_kwDOM2n80s8AAAACKmd_1Q",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/auth",
          "name": "auth",
          "color": "92ad2d",
          "default": false,
          "description": "Issues and PRs related to Authentication / OAuth"
        },
        "2": {
          "id": 9354761244,
          "node_id": "LA_kwDOM2n80s8AAAACLZZUHA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/ready%20for%20work",
          "name": "ready for work",
          "color": "2b9402",
          "default": false,
          "description": "Enough information for someone to start working on"
        },
        "3": {
          "id": 9354767859,
          "node_id": "LA_kwDOM2n80s8AAAACLZZt8w",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P1",
          "name": "P1",
          "color": "895d17",
          "default": false,
          "description": "Significant bug affecting many users, highly requested feature"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 2,
      "created_at": "2025-05-30T08:12:45Z",
      "updated_at": "2025-10-03T14:08:28Z",
      "closed_at": null,
      "author_association": "NONE",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "Description:  \nWhen running the MCP auth client against a locally started auth server, the client fails during registration with a 502 error, despite the server appearing to start successfully.\n\nSteps to Reproduce:  \nStart the auth server:  \n\n```\ncd path/to/mcp-simple-auth\nuv run mcp-simple-auth --transport streamable-http --port 3001\n```\n   \nServer starts successfully (see logs below).  \nStart the auth client:  \n\n```\n MCP_SERVER_PORT=3001 uv run mcp-simple-auth-client\n```   \n   Client fails with Registration failed: 502 (full traceback below).\n\nExpected Behavior:  \nClient should successfully register with the auth server and establish a connection.  \n\nOAuth flow should complete without HTTP errors.\n\nActual Behavior:  \nClient fails during registration with:  \n\n    httpx.HTTPStatusError: Registration failed: 502\n  \nFull error traceback indicates the failure occurs in mcp/client/auth.py during OAuth client registration.\n\nServer Logs:  \n\nINFO:     Uvicorn running on http://localhost:3001\nINFO:     127.0.0.1:64473 - \"GET /.well-known/oauth-authorization-server HTTP/1.1\" 200 OK\n\n(No errors reported on the server side.)\n\nClient Logs:  \n\n🖥️  Started callback server on http://localhost:3000\n📡 Opening StreamableHTTP transport connection...\n⚡ Starting session initialization...\n❌ Failed to connect: unhandled errors in a TaskGroup (1 sub-exception)\nhttpx.HTTPStatusError: Registration failed: 502\n\nEnvironment:  \nOS: macOS  \n\nTools:  \n\nuv (installed via conda, version 0.7.8)  \n\nPython 3.12 (conda environment)  \n\nRelevant Packages:  \n\nmcp-simple-auth and mcp-simple-auth-client (local paths)  \n\nAdditional Context:  \nThe 502 error suggests the auth server’s registration endpoint (/.well-known/oauth-authorization-server) is reachable (returns 200), but the subsequent client registration request fails.  \n\nNo visible errors in the server logs despite the client-side 502.  \n\nThe issue persists across fresh terminal sessions after verifying uv is correctly in PATH.  \n\nPossible Causes:  \nServer-Side Validation Failure: The auth server might reject the client’s registration request silently.  \n\nMismatched Transport Configuration: streamable-http transport might require additional setup.  \n\nOAuth Endpoint Misconfiguration: The registration endpoint might not handle the client’s payload correctly.  \n\nRequested Help:  \nGuidance on debugging the auth server’s registration logic.  \n\nVerification steps to isolate whether the issue is client-side or server-side.  \n\nLogging suggestions to capture why the server returns 502.  ",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/852/reactions",
        "total_count": 1,
        "+1": 1,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/837",
      "id": 3100287088,
      "node_id": "I_kwDOM2n80s64yqBw",
      "number": 837,
      "title": "Type system complexity creating developer friction and maintenance overhead",
      "user": {
        "login": "davenpi",
        "id": 49379192,
        "node_id": "MDQ6VXNlcjQ5Mzc5MTky",
        "avatar_url": "https://avatars.githubusercontent.com/u/49379192?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/davenpi",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 9230423596,
          "node_id": "LA_kwDOM2n80s8AAAACJi0WLA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/breaking%20change",
          "name": "breaking change",
          "color": "000000",
          "default": false,
          "description": "Will break existing deployments when updated without changes"
        },
        "1": {
          "id": 9230424293,
          "node_id": "LA_kwDOM2n80s8AAAACJi0Y5Q",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/v2",
          "name": "v2",
          "color": "5d2a87",
          "default": false,
          "description": "Ideas, requests and plans for v2 of the SDK which will incorporate major changes and fixes"
        },
        "2": {
          "id": 9354757189,
          "node_id": "LA_kwDOM2n80s8AAAACLZZERQ",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/enhancement",
          "name": "enhancement",
          "color": "11b5cc",
          "default": true,
          "description": "Request for a new feature that's not currently supported"
        },
        "3": {
          "id": 9354761244,
          "node_id": "LA_kwDOM2n80s8AAAACLZZUHA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/ready%20for%20work",
          "name": "ready for work",
          "color": "2b9402",
          "default": false,
          "description": "Enough information for someone to start working on"
        },
        "4": {
          "id": 9354772110,
          "node_id": "LA_kwDOM2n80s8AAAACLZZ-jg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P3",
          "name": "P3",
          "color": "c7df49",
          "default": false,
          "description": "Nice to haves, rare edge cases"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/milestones/3",
        "id": 12112132,
        "node_id": "MI_kwDOM2n80s4AuNEE",
        "number": 3,
        "title": "Python SDK v2.0",
        "description": "",
        "creator": {
          "login": "dsp-ant",
          "id": 167242713,
          "node_id": "U_kgDOCffr2Q",
          "avatar_url": "https://avatars.githubusercontent.com/u/167242713?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/dsp-ant",
          "type": "User",
          "user_view_type": "public",
          "site_admin": false
        },
        "open_issues": 12,
        "closed_issues": 2,
        "state": "open",
        "created_at": "2025-01-02T09:08:45Z",
        "updated_at": "2025-10-07T17:22:59Z",
        "due_on": null,
        "closed_at": null
      },
      "comments": 2,
      "created_at": "2025-05-29T13:05:39Z",
      "updated_at": "2025-12-05T17:40:36Z",
      "closed_at": null,
      "author_association": "CONTRIBUTOR",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "## Context\n\nI've been working with the Python SDK and noticed that the type system has quite a bit of abstraction complexity compared to the underlying TypeScript schema. I'm curious about the design decisions here and wondering if there might be opportunities to simplify.\n\nThe current implementation is comprehensive and handles edge cases well, but I'm finding that simple operations require understanding multiple abstraction layers, which creates friction when reading and debugging code.\n\n## Example: Current complexity vs. original schema\n\nHere's how a progress notification is currently constructed:\n\n```python\n# server/session.py\nasync def send_progress_notification(\n    self,\n    progress_token: str | int,\n    progress: float,\n    total: float | None = None,\n    message: str | None = None,\n    related_request_id: str | None = None,\n) -> None:\n    \"\"\"Send a progress notification.\"\"\"\n    await self.send_notification(\n        types.ServerNotification(\n            types.ProgressNotification(\n                method=\"notifications/progress\",\n                params=types.ProgressNotificationParams(\n                    progressToken=progress_token,\n                    progress=progress,\n                    total=total,\n                    message=message,\n                ),\n            )\n        ),\n        related_request_id,\n    )\n```\n\nThis requires understanding several layers of abstractions in the type system. To send a progress notification, you're working through this chain:\n\n```python\n# 1. Base parameter class\nclass NotificationParams(BaseModel):\n    class Meta(BaseModel):\n        model_config = ConfigDict(extra=\"allow\")\n    meta: Meta | None = Field(alias=\"_meta\", default=None)\n\n# 2. Notification parameter type variables\nNotificationParamsT = TypeVar(\n    \"NotificationParamsT\", bound=NotificationParams | dict[str, Any] | None\n)\n\n# 3. Generic notification base\nclass Notification(BaseModel, Generic[NotificationParamsT, MethodT]):\n    \"\"\"Base class for JSON-RPC notifications.\"\"\"\n    method: MethodT\n    params: NotificationParamsT\n    model_config = ConfigDict(extra=\"allow\")\n\n# 4. Specific parameter class\nclass ProgressNotificationParams(NotificationParams):\n    \"\"\"Parameters for progress notifications.\"\"\"\n    progressToken: ProgressToken\n    progress: float\n    total: float | None = None\n    message: str | None = None\n    model_config = ConfigDict(extra=\"allow\")\n\n# 5. Specific notification class\nclass ProgressNotification(\n    Notification[ProgressNotificationParams, Literal[\"notifications/progress\"]]\n):\n    \"\"\"An out-of-band notification used to inform the receiver of a progress update.\"\"\"\n    method: Literal[\"notifications/progress\"]\n    params: ProgressNotificationParams\n\n# 6. Plus ServerNotification wrapper in actual usage\n```\n\nThat's 5-6 levels of abstraction for what seems fairly simple. For example, the TypeScript schema give us:\n\n```typescript\n\nexport interface Notification {\n  method: string;\n  params?: {\n    _meta?: { [key: string]: unknown };\n    [key: string]: unknown;\n  };\n}\n\nexport interface ProgressNotification extends Notification {\n  method: \"notifications/progress\";\n  params: {\n    progressToken: ProgressToken;\n    progress: number;\n    total?: number;\n    message?: string;\n  };\n}\n```\n\nIn general the Python version introduces several abstraction layers:\n- Generic base classes with type variables (`Request[RequestParamsT, MethodT]`)\n- Nested parameter classes (`ProgressNotificationParams`)\n- Multiple wrapper types (`ServerNotification(ProgressNotification(...))`)\n\n## Questions\n\nAm I missing some context about why these abstractions were chosen? Were there specific requirements that drove this design?\n\nI'm wondering if we could explore simplifying the type system to more closely match the directness of the original TypeScript schema. This might:\n\n- Reduce cognitive load for developers working with the SDK\n- Make debugging easier (fewer abstraction layers to trace through)\n- Reduce maintenance burden when the protocol evolves\n- Make the codebase more approachable for new contributors\n\n## Potential approach\n\nHappy to prototype a simplified version of a few message types (like `PingRequest` and `ProgressNotification`) to demonstrate what this might look like.\n\nThoughts?",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/837/reactions",
        "total_count": 0,
        "+1": 0,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/817",
      "id": 3094401163,
      "node_id": "I_kwDOM2n80s64cNCL",
      "number": 817,
      "title": "STDIO hangs forever when the  using multiprocessing in tools",
      "user": {
        "login": "huang-sh",
        "id": 24741118,
        "node_id": "MDQ6VXNlcjI0NzQxMTE4",
        "avatar_url": "https://avatars.githubusercontent.com/u/24741118?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/huang-sh",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 9354757189,
          "node_id": "LA_kwDOM2n80s8AAAACLZZERQ",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/enhancement",
          "name": "enhancement",
          "color": "11b5cc",
          "default": true,
          "description": "Request for a new feature that's not currently supported"
        },
        "1": {
          "id": 9354761244,
          "node_id": "LA_kwDOM2n80s8AAAACLZZUHA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/ready%20for%20work",
          "name": "ready for work",
          "color": "2b9402",
          "default": false,
          "description": "Enough information for someone to start working on"
        },
        "2": {
          "id": 9354772110,
          "node_id": "LA_kwDOM2n80s8AAAACLZZ-jg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P3",
          "name": "P3",
          "color": "c7df49",
          "default": false,
          "description": "Nice to haves, rare edge cases"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 2,
      "created_at": "2025-05-27T15:45:54Z",
      "updated_at": "2025-11-12T18:31:22Z",
      "closed_at": null,
      "author_association": "NONE",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "**Describe the bug**\nwhen multiprocessing  in a tool, and start mcp client by  STDIO, the mcp server never response.\n\n**To Reproduce**\nSteps to reproduce the behavior:\n1.  write mcp server:\n```\n## test_mcp.py\nfrom mcp.server.fastmcp import FastMCP\nimport multiprocessing as mp\n\n\nmcp = FastMCP()\n\n@mcp.tool()\ndef sum() -> int:\n    \"count number\"\n    with mp.Pool(processes=2) as pool:\n        res =  pool.imap(str, range(10))\n        res = list(res)\n    return res\n\nif __name__ == '__main__':\n    mcp.run()\n\n\n```\n\n2.  write mcp client usig stdio\n```\n## test_client.py\nfrom mcp import ClientSession, StdioServerParameters, types\nfrom mcp.client.stdio import stdio_client\n\n# Create server parameters for stdio connection\nserver_params = StdioServerParameters(\n    command=\"python\",  # Executable\n    args=[\"test_mcp.py\"],  # Optional command line arguments\n    env=None,  # Optional environment variables\n)\n\n\nasync def run():\n    async with stdio_client(server_params) as (read, write):\n        async with ClientSession(\n            read, write\n        ) as session:\n            # Initialize the connection\n            await session.initialize()\n            resources = await session.list_resources()\n            # List available tools\n            tools = await session.list_tools()\n            print(tools)\n            result = await session.call_tool(\n                \"sum\", \n            )\n            print(result)\nasyncio.run(run())\n```\n3.  test running\n```\n$ python test_client.py\n[05/27/25 15:42:13] INFO     Processing request of type ListResourcesRequest                             server.py:551\n                    INFO     Processing request of type ListToolsRequest                                 server.py:551\nmeta=None nextCursor=None tools=[Tool(name='sum', description='count number', inputSchema={'properties': {}, 'title': 'sumArguments', 'type': 'object'}, annotations=None)]\n                    INFO     Processing request of type CallToolRequest                                  server.py:551\n\n```\nThe program is stuck here and won't continue running\n\n**Version**\n```\nName: mcp\nVersion: 1.9.0\nSummary: Model Context Protocol SDK\nHome-page: \nAuthor: Anthropic, PBC.\nAuthor-email: \nLicense: MIT\nLocation: /data/software/micromamba/envs/gbi/lib/python3.10/site-packages\nRequires: anyio, httpx, httpx-sse, pydantic, pydantic-settings, python-multipart, sse-starlette, starlette, uvicorn\nRequired-by: camel-ai, cellrank-mcp, fast-agent-mcp, fastmcp, liana-mcp, mcp-server-calculator, scmcp, scmcp-utils, scmcp_shared\n```\n\n",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/817/reactions",
        "total_count": 0,
        "+1": 0,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/795",
      "id": 3086877237,
      "node_id": "I_kwDOM2n80s63_gI1",
      "number": 795,
      "title": "Support for API Gateway Path Prefixes in SSE Client URL Handling",
      "user": {
        "login": "lizzzcai",
        "id": 22748546,
        "node_id": "MDQ6VXNlcjIyNzQ4NTQ2",
        "avatar_url": "https://avatars.githubusercontent.com/u/22748546?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/lizzzcai",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 7511840554,
          "node_id": "LA_kwDOM2n80s8AAAABv72XKg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/bug",
          "name": "bug",
          "color": "d73a4a",
          "default": true,
          "description": "Something isn't working"
        },
        "1": {
          "id": 9354761244,
          "node_id": "LA_kwDOM2n80s8AAAACLZZUHA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/ready%20for%20work",
          "name": "ready for work",
          "color": "2b9402",
          "default": false,
          "description": "Enough information for someone to start working on"
        },
        "2": {
          "id": 9354767859,
          "node_id": "LA_kwDOM2n80s8AAAACLZZt8w",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P1",
          "name": "P1",
          "color": "895d17",
          "default": false,
          "description": "Significant bug affecting many users, highly requested feature"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/milestones/23",
        "id": 13827829,
        "node_id": "MI_kwDOM2n80s4A0v71",
        "number": 23,
        "title": "Mount / Routing questions",
        "description": null,
        "creator": {
          "login": "felixweinberger",
          "id": 3823880,
          "node_id": "MDQ6VXNlcjM4MjM4ODA=",
          "avatar_url": "https://avatars.githubusercontent.com/u/3823880?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/felixweinberger",
          "type": "User",
          "user_view_type": "public",
          "site_admin": false
        },
        "open_issues": 2,
        "closed_issues": 1,
        "state": "open",
        "created_at": "2025-10-06T18:54:48Z",
        "updated_at": "2025-10-06T18:55:23Z",
        "due_on": null,
        "closed_at": null
      },
      "comments": 1,
      "created_at": "2025-05-23T16:14:35Z",
      "updated_at": "2025-10-06T18:56:33Z",
      "closed_at": null,
      "author_association": "NONE",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "**Is your feature request related to a problem? Please describe.**\n\nWhen using the client SDK to connect MCP server behind an `API gateway` that adds a deployment-specific prefix (e.g., `/gateway_prefix/<deployment_name>`), the backend mcp server is unaware of this prefix and only exposes routes like `/v1/sse` and `/v1/messages`. The client SDK currently only supports [url](https://github.com/modelcontextprotocol/python-sdk/blob/main/src/mcp/client/sse.py#L25) and uses [urljoin](https://github.com/modelcontextprotocol/python-sdk/blob/main/src/mcp/client/sse.py#L75) to resolve endpoint URLs, which causes the gateway prefix to be dropped when joining paths that start with /. This results in incorrect routing through the gateway.\n\ndebug logs:\n\n```\n❯ python3 client.py\nDEBUG:asyncio:Using selector: KqueueSelector\nINFO:mcp.client.sse:Connecting to SSE endpoint: https://example.com/gateway_prefix/<deployment_name>/v1/sse\nDEBUG:httpcore.connection:connect_tcp.started host='https://example.com' port=443 local_address=None timeout=5 socket_options=None\nDEBUG:httpcore.connection:connect_tcp.complete return_value=<httpcore._backends.anyio.AnyIOStream object at 0x10889fef0>\nDEBUG:httpcore.connection:start_tls.started ssl_context=<ssl.SSLContext object at 0x10895ca50> server_hostname='example.com' timeout=5\nDEBUG:httpcore.connection:start_tls.complete return_value=<httpcore._backends.anyio.AnyIOStream object at 0x107fb45c0>\nDEBUG:httpcore.http11:send_request_headers.started request=<Request [b'GET']>\nDEBUG:httpcore.http11:send_request_headers.complete\nDEBUG:httpcore.http11:send_request_body.started request=<Request [b'GET']>\nDEBUG:httpcore.http11:send_request_body.complete\nDEBUG:httpcore.http11:receive_response_headers.started request=<Request [b'GET']>\nDEBUG:httpcore.http11:receive_response_headers.complete return_value=(b'HTTP/1.1', 200, b'OK', [(b'cache-control', b'no-store'), (b'content-type', b'text/event-stream; charset=utf-8'), (b'date', b'Fri, 23 May 2025 15:45:20 GMT'), (b'x-accel-buffering', b'no'), (b'x-upstream-service-time', b'7'), (b'transfer-encoding', b'chunked')])\nINFO:httpx:HTTP Request: GET https://example.com/gateway_prefix/<deployment_name>/v1/sse \"HTTP/1.1 200 OK\" <== correct sse endpoint\nDEBUG:mcp.client.sse:SSE connection established\nDEBUG:httpcore.http11:receive_response_body.started request=<Request [b'GET']>\nDEBUG:mcp.client.sse:Received SSE event: endpoint\nDEBUG:mcp.client.sse:urljoin: https://example.com/gateway_prefix/<deployment_name>/v1/sse + /v1/messages/?session_id=80b1237100a34eaa9795a5993661c76a <== wrong messages endpoint\nINFO:mcp.client.sse:Received endpoint URL: https://example.com/v1/messages/?session_id=80b1237100a34eaa9795a5993661c76a\nINFO:mcp.client.sse:Starting post writer with endpoint URL: https://example.com/v1/messages/?session_id=80b1237100a34eaa9795a5993661c76a\n```\n\n**Describe the solution you'd like**\nThe client SDK should preserve the gateway prefix when joining endpoint URLs, so that requests are routed correctly through the gateway. Ideally, the SDK should provide a way to configure or detect the gateway prefix and ensure all endpoint URLs are constructed with it.\n\n**Describe alternatives you've considered**\n\n**Additional context**\n\nExample:\n```python\nurl = \"https://example.com/gateway_prefix/<deployment_name>/v1/sse\"\npath = \"/v1/messages\"\nurljoin(url, path)\n# Actual:   https://example.com/v1/messages\n# Expected: https://example.com/gateway_prefix/<deployment_name>/v1/messages\n```\nThis is a common pattern for API gateways and reverse proxies, so supporting this would improve compatibility.\n\nsimilar request: \nhttps://github.com/modelcontextprotocol/python-sdk/issues/412#issuecomment-2820077952\nhttps://github.com/modelcontextprotocol/python-sdk/issues/733\nhttps://github.com/modelcontextprotocol/python-sdk/pull/386\n",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/795/reactions",
        "total_count": 3,
        "+1": 3,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/783",
      "id": 3082765960,
      "node_id": "I_kwDOM2n80s63v0aI",
      "number": 783,
      "title": "mount_path does not work with sse_app",
      "user": {
        "login": "kinch-tech",
        "id": 37211900,
        "node_id": "MDQ6VXNlcjM3MjExOTAw",
        "avatar_url": "https://avatars.githubusercontent.com/u/37211900?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/kinch-tech",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 7511840554,
          "node_id": "LA_kwDOM2n80s8AAAABv72XKg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/bug",
          "name": "bug",
          "color": "d73a4a",
          "default": true,
          "description": "Something isn't working"
        },
        "1": {
          "id": 9287721887,
          "node_id": "LA_kwDOM2n80s8AAAACKZdjnw",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/needs%20repro",
          "name": "needs repro",
          "color": "e35211",
          "default": false,
          "description": "needs additional information to be able to reproduce bug"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 2,
      "created_at": "2025-05-22T09:51:10Z",
      "updated_at": "2025-10-03T13:26:47Z",
      "closed_at": null,
      "author_association": "NONE",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "while i start mcp server with mcp.run, provided with mount_path, then client get bad response with 404。\n\nthe endpoint for handling post message should be **normalized_message_endpoint**, not the original message_path\n\n            routes.append(\n                Mount(\n                    self.settings.message_path,\n                    app=sse.handle_post_message,\n                )\n            )\n\n",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/783/reactions",
        "total_count": 0,
        "+1": 0,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/767",
      "id": 3079172303,
      "node_id": "I_kwDOM2n80s63iHDP",
      "number": 767,
      "title": "Feature Proposal: Modular Router System for MCP Python SDK",
      "user": {
        "login": "DamyanBG",
        "id": 93829069,
        "node_id": "U_kgDOBZe3zQ",
        "avatar_url": "https://avatars.githubusercontent.com/u/93829069?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/DamyanBG",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 9354757189,
          "node_id": "LA_kwDOM2n80s8AAAACLZZERQ",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/enhancement",
          "name": "enhancement",
          "color": "11b5cc",
          "default": true,
          "description": "Request for a new feature that's not currently supported"
        },
        "1": {
          "id": 9354761244,
          "node_id": "LA_kwDOM2n80s8AAAACLZZUHA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/ready%20for%20work",
          "name": "ready for work",
          "color": "2b9402",
          "default": false,
          "description": "Enough information for someone to start working on"
        },
        "2": {
          "id": 9354772110,
          "node_id": "LA_kwDOM2n80s8AAAACLZZ-jg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P3",
          "name": "P3",
          "color": "c7df49",
          "default": false,
          "description": "Nice to haves, rare edge cases"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 0,
      "created_at": "2025-05-21T07:07:34Z",
      "updated_at": "2025-10-06T18:09:53Z",
      "closed_at": null,
      "author_association": "NONE",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "This proposal suggests enhancing the Model Context Protocol Python SDK with a modular router system similar to FastAPI's APIRouter. This would allow developers to organize MCP tools, resources, and prompts across multiple files and modules, improving code organization and maintainability for larger applications.\n\n**Current limitation**\n\nCurrently, the MCP Python SDK requires defining all tools, resources, and prompts on a single FastMCP instance:\n\n```\n# main.py\nfrom mcp.server.fastmcp import FastMCP\n\nmcp = FastMCP(\"My App\")\n\n@mcp.tool()\ndef tool_one():\n    # implementation\n\n@mcp.resource()\ndef resource_one():\n    # implementation\n```\n\nFor larger applications, this leads to several issues:\n\n- All MCP components must be defined in a single file or imported into a single namespace\n- Difficult to organise code by domain or feature\n- No clear way to create reusable tool/resource modules\n- Challenging to maintain separation of concerns in larger projects\n\n**Request**\n\nIt would be beneficial to have a modular router system similar to FastAPI's APIRouter that allows developers to:\n\n1. Define tools, resources, and prompts in separate files\n2. Group related functionality in domain-specific modules\n3. Import and combine these modules in a main MCP application\n\nThis would significantly improve code organization and maintainability for larger MCP-based applications, especially those with many tools and resources spanning different domains or features.\n",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/767/reactions",
        "total_count": 2,
        "+1": 2,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/766",
      "id": 3078765582,
      "node_id": "I_kwDOM2n80s63gjwO",
      "number": 766,
      "title": "(discussion) How to best handle instrumenting for `resources` and `prompts`",
      "user": {
        "login": "CakeCrusher",
        "id": 37946988,
        "node_id": "MDQ6VXNlcjM3OTQ2OTg4",
        "avatar_url": "https://avatars.githubusercontent.com/u/37946988?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/CakeCrusher",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 7511840560,
          "node_id": "LA_kwDOM2n80s8AAAABv72XMA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/documentation",
          "name": "documentation",
          "color": "0075ca",
          "default": true,
          "description": "Improvements or additions to documentation"
        },
        "1": {
          "id": 9354761244,
          "node_id": "LA_kwDOM2n80s8AAAACLZZUHA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/ready%20for%20work",
          "name": "ready for work",
          "color": "2b9402",
          "default": false,
          "description": "Enough information for someone to start working on"
        },
        "2": {
          "id": 9354770246,
          "node_id": "LA_kwDOM2n80s8AAAACLZZ3Rg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P2",
          "name": "P2",
          "color": "d2b457",
          "default": false,
          "description": "Moderate issues affecting some users, edge cases, potentially valuable feature"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 1,
      "created_at": "2025-05-21T03:13:58Z",
      "updated_at": "2025-12-04T09:47:13Z",
      "closed_at": null,
      "author_association": "NONE",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "(Unfortunately there is no discussion page in this repo so im posting this here)\n\nI am looking to add instrumentation to this package in https://github.com/Arize-ai/openinference to handle `resources` and `prompts` in a way so that OpenTelemetry spans are created correctly. The purpose is to enable tracing the resources `resources` and `prompts` produced by the server. \n\n(I have already explored the package and have added context (state of the OpenTelemtry span)  propagation for the client and server with the server receiving the context at the `_handle_request`.)\n\nThe question is where should the spans be created for the `resources` and `prompt`?\n\nPS: Not 100% sure if `_handle_request` is the best function to handle the propagation too so advice on that would be great too!",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/766/reactions",
        "total_count": 0,
        "+1": 0,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/762",
      "id": 3077040124,
      "node_id": "I_kwDOM2n80s63Z-f8",
      "number": 762,
      "title": "Allow installing mcp servers from pypi",
      "user": {
        "login": "surister",
        "id": 37985796,
        "node_id": "MDQ6VXNlcjM3OTg1Nzk2",
        "avatar_url": "https://avatars.githubusercontent.com/u/37985796?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/surister",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 9354757189,
          "node_id": "LA_kwDOM2n80s8AAAACLZZERQ",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/enhancement",
          "name": "enhancement",
          "color": "11b5cc",
          "default": true,
          "description": "Request for a new feature that's not currently supported"
        },
        "1": {
          "id": 9354761244,
          "node_id": "LA_kwDOM2n80s8AAAACLZZUHA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/ready%20for%20work",
          "name": "ready for work",
          "color": "2b9402",
          "default": false,
          "description": "Enough information for someone to start working on"
        },
        "2": {
          "id": 9354772110,
          "node_id": "LA_kwDOM2n80s8AAAACLZZ-jg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P3",
          "name": "P3",
          "color": "c7df49",
          "default": false,
          "description": "Nice to haves, rare edge cases"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 2,
      "created_at": "2025-05-20T13:29:52Z",
      "updated_at": "2025-12-04T13:07:28Z",
      "closed_at": null,
      "author_association": "NONE",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "**Is your feature request related to a problem? Please describe.**\nDistribution of python mcp servers is not possible via pypi.\n\n**Describe the solution you'd like**\nRight now we can install mcp servers like:\n`uv run --with mcp[cli] mcp install server.py` but that means that the mcp server\nhas to exist locally\n\nbut it'd be helpful to be able to do:\n\n`uv run --with mcp[cli], cratedb-mcp install cratedb-mcp`, where `cratedb-mcp` is a mcp server available in pypi, installed with the `uv run --with` commands.\n\n**Describe alternatives you've considered**\nExtra scripting.\n",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/762/reactions",
        "total_count": 0,
        "+1": 0,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/754",
      "id": 3073934269,
      "node_id": "I_kwDOM2n80s63OIO9",
      "number": 754,
      "title": "Functionality to fetch output schemas as well on list_tools()",
      "user": {
        "login": "PratyushNag",
        "id": 83463746,
        "node_id": "MDQ6VXNlcjgzNDYzNzQ2",
        "avatar_url": "https://avatars.githubusercontent.com/u/83463746?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/PratyushNag",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 9354757189,
          "node_id": "LA_kwDOM2n80s8AAAACLZZERQ",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/enhancement",
          "name": "enhancement",
          "color": "11b5cc",
          "default": true,
          "description": "Request for a new feature that's not currently supported"
        },
        "1": {
          "id": 9354761244,
          "node_id": "LA_kwDOM2n80s8AAAACLZZUHA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/ready%20for%20work",
          "name": "ready for work",
          "color": "2b9402",
          "default": false,
          "description": "Enough information for someone to start working on"
        },
        "2": {
          "id": 9354770246,
          "node_id": "LA_kwDOM2n80s8AAAACLZZ3Rg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P2",
          "name": "P2",
          "color": "d2b457",
          "default": false,
          "description": "Moderate issues affecting some users, edge cases, potentially valuable feature"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 1,
      "created_at": "2025-05-19T13:52:24Z",
      "updated_at": "2025-10-06T18:11:17Z",
      "closed_at": null,
      "author_association": "NONE",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "**Is your feature request related to a problem? Please describe.**\nI was working on a project and was wondering if it was possible to fetch the output schemas as well on `client.list_tools()`. I realize that the output returned by MCP tools is often a string (or stringified JSON), and having information in advance about the structure of data I would be receiving would be helpful. \n\n**Describe the solution you'd like**\nCurrently the `list_tools()` returns something like :\n```\n {\n        \"meta\": null,\n        \"nextCursor\": null,\n        \"tools\": [\n          {\n            \"name\": \"get-news\",\n            \"description\": \"Get the latest news for a given topic\",\n            \"input_schema\": {\n              \"type\": \"object\",\n              \"properties\": {\n                \"topic\": {\n                  \"type\": \"string\",\n                  \"description\": \"Topic to search for\"\n                },\n                \"page_size\": {\n                  \"type\": \"number\",\n                  \"description\": \"Number of results to return (1-25)\"\n                }\n              },\n              \"required\": [\n                \"topic\",\n                \"page_size\"\n              ]\n            },\n            \"annotations\": null\n          },\n          {\n            \"name\": \"get-headlines\",\n            \"description\": \"Get the latest headlines for a given country\",\n            \"input_schema\": {\n              \"type\": \"object\",\n              \"properties\": {\n                \"country\": {\n                  \"type\": \"string\",\n                  \"description\": \"Country code (2 letters)\"\n                },\n                \"page_size\": {\n                  \"type\": \"number\",\n                  \"description\": \"Number of results to return (1-25)\"\n                }\n              },\n              \"required\": [\n                \"country\",\n                \"page_size\"\n              ]\n            },\n            \"annotations\": null\n          }\n        ]\n      }\n\n```\nI'd like to also get the output schema for each tool alongside the input schema. If the output is a simple string, then just `{\"type\": \"string\"}` would be fine. But for JSON objects, getting the actual JSON schema being returned before stringification would be very helpful.\n\n**Describe alternatives you've considered**\nCurrent alternatives involve manually reading the MCP server code to determine the exact output schema (this is repetitive for each new MCP server we add) or sending a test request and then parsing the output to infer the schema (not feasible in many cases).\n\nSince I'm using MCP with the client only, I don't have an agent to interpret the output on runtime and utilize that information dynamically.",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/754/reactions",
        "total_count": 0,
        "+1": 0,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/750",
      "id": 3073054656,
      "node_id": "I_kwDOM2n80s63KxfA",
      "number": 750,
      "title": "how to get http request headers in mcp tools logic when i use streamable http mode to run mcp server ?",
      "user": {
        "login": "kelify",
        "id": 13515032,
        "node_id": "MDQ6VXNlcjEzNTE1MDMy",
        "avatar_url": "https://avatars.githubusercontent.com/u/13515032?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/kelify",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 9354757189,
          "node_id": "LA_kwDOM2n80s8AAAACLZZERQ",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/enhancement",
          "name": "enhancement",
          "color": "11b5cc",
          "default": true,
          "description": "Request for a new feature that's not currently supported"
        },
        "1": {
          "id": 9354761244,
          "node_id": "LA_kwDOM2n80s8AAAACLZZUHA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/ready%20for%20work",
          "name": "ready for work",
          "color": "2b9402",
          "default": false,
          "description": "Enough information for someone to start working on"
        },
        "2": {
          "id": 9354770246,
          "node_id": "LA_kwDOM2n80s8AAAACLZZ3Rg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P2",
          "name": "P2",
          "color": "d2b457",
          "default": false,
          "description": "Moderate issues affecting some users, edge cases, potentially valuable feature"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/milestones/22",
        "id": 13811612,
        "node_id": "MI_kwDOM2n80s4A0r-c",
        "number": 22,
        "title": "FastMCP issues",
        "description": null,
        "creator": {
          "login": "felixweinberger",
          "id": 3823880,
          "node_id": "MDQ6VXNlcjM4MjM4ODA=",
          "avatar_url": "https://avatars.githubusercontent.com/u/3823880?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/felixweinberger",
          "type": "User",
          "user_view_type": "public",
          "site_admin": false
        },
        "open_issues": 10,
        "closed_issues": 1,
        "state": "open",
        "created_at": "2025-10-03T14:23:32Z",
        "updated_at": "2025-12-04T09:48:23Z",
        "due_on": null,
        "closed_at": null
      },
      "comments": 9,
      "created_at": "2025-05-19T08:50:36Z",
      "updated_at": "2025-10-30T09:54:24Z",
      "closed_at": null,
      "author_association": "NONE",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "i want to create a mcp server base on streamablehttp_stateless running mode(https://github.com/modelcontextprotocol/python-sdk/blob/main/examples/servers/simple-streamablehttp-stateless/mcp_simple_streamablehttp_stateless/server.py example code), but i can not find  any mothed to get http request msg in the tools logic. so how can i get the http request headers msg in the tools define function ?\n\n<img width=\"774\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/68be228e-a6a8-49a6-a589-787b0a03be11\" />",
      "closed_by": {
        "login": "maxisbey",
        "id": 224885523,
        "node_id": "U_kgDODWd7Ew",
        "avatar_url": "https://avatars.githubusercontent.com/u/224885523?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/maxisbey",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/750/reactions",
        "total_count": 9,
        "+1": 9,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": "reopened",
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/737",
      "id": 3069517293,
      "node_id": "I_kwDOM2n80s629R3t",
      "number": 737,
      "title": "Bug Report: FastMCP `RuntimeError: Received request before initialization was complete` Leading to Empty SSE Responses When Embedded in FastAPI",
      "user": {
        "login": "jasny6969",
        "id": 73031409,
        "node_id": "MDQ6VXNlcjczMDMxNDA5",
        "avatar_url": "https://avatars.githubusercontent.com/u/73031409?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/jasny6969",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 7511840554,
          "node_id": "LA_kwDOM2n80s8AAAABv72XKg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/bug",
          "name": "bug",
          "color": "d73a4a",
          "default": true,
          "description": "Something isn't working"
        },
        "1": {
          "id": 9354761244,
          "node_id": "LA_kwDOM2n80s8AAAACLZZUHA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/ready%20for%20work",
          "name": "ready for work",
          "color": "2b9402",
          "default": false,
          "description": "Enough information for someone to start working on"
        },
        "2": {
          "id": 9354767859,
          "node_id": "LA_kwDOM2n80s8AAAACLZZt8w",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P1",
          "name": "P1",
          "color": "895d17",
          "default": false,
          "description": "Significant bug affecting many users, highly requested feature"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/milestones/22",
        "id": 13811612,
        "node_id": "MI_kwDOM2n80s4A0r-c",
        "number": 22,
        "title": "FastMCP issues",
        "description": null,
        "creator": {
          "login": "felixweinberger",
          "id": 3823880,
          "node_id": "MDQ6VXNlcjM4MjM4ODA=",
          "avatar_url": "https://avatars.githubusercontent.com/u/3823880?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/felixweinberger",
          "type": "User",
          "user_view_type": "public",
          "site_admin": false
        },
        "open_issues": 10,
        "closed_issues": 1,
        "state": "open",
        "created_at": "2025-10-03T14:23:32Z",
        "updated_at": "2025-12-04T09:48:23Z",
        "due_on": null,
        "closed_at": null
      },
      "comments": 5,
      "created_at": "2025-05-16T17:12:07Z",
      "updated_at": "2025-10-03T14:29:07Z",
      "closed_at": null,
      "author_association": "NONE",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "  ## Bug Report: FastMCP `RuntimeError: Received request before initialization was complete` Leading to Empty SSE Responses When Embedded in FastAPI\n\n        **Library Version:** `mcp[cli]==1.8.0` (Python SDK)\n        **Python Version:** 3.11.x\n        **Web Framework:** FastAPI (e.g., 0.100+)\n        **ASGI Server:** Uvicorn\n\n        **Problem Description:**\n\n        When embedding `FastMCP.streamable_http_app()` as a sub-application within a FastAPI application and managing its lifecycle via FastAPI's `lifespan` context manager (using `asyncio.TaskGroup` to run `FastMCP` components), we encounter a persistent `RuntimeError: Received request before initialization was complete`.\n\n        This error occurs specifically when an MCP tool is called by a client and is expected to return data via Server-Sent Events (SSE).\n        The sequence of events observed is:\n        1. Client establishes a session successfully (receives `mcp-session-id` header, often with an initial 400 \"Missing session ID\" response which is then handled).\n        2. Client makes a `tools/call` request with the valid `mcp-session-id`.\n        3. The MCP server (FastAPI with FastMCP mounted) sends HTTP 200 OK headers with `Content-Type: text/event-stream`.\n        4. **Immediately after sending the 200 OK headers, before any `event: message` or `data:` lines are sent in the SSE stream, the `mcp.server.streamable_http_manager.StreamableHTTPSessionManager` logs that it is \"shutting down.\"**\n        5. The server then logs a `RuntimeError: Received request before initialization was complete` (traceback points to `mcp/server/session.py`).\n        6. The client receives the 200 OK but with an empty response body, as the SSE stream was closed before any data events were sent.\n\n        This issue occurs even if the tool is designed to return a very simple JSON payload (e.g., `{\"result_id\": \"some_id\"}`). The tool's Python code that prepares the `List[ContentPart]` often appears not to be fully executed, or at least its return value is not successfully processed for SSE streaming due to this premature shutdown.\n\n        **Steps to Reproduce (Conceptual - based on our integration pattern):**\n\n        1.  **`app.py` (FastAPI main application):**\n            *   A global `FastMCP` instance (`mcp_server`) is created. To avoid Uvicorn port conflicts when FastMCP's internal server mechanisms are invoked, we've tried initializing `FastMCP` with `host=\"127.0.0.1\", port=0`.\n            *   Tool modules (e.g., `core_tools.py` with a simple `log_decision` tool returning `[ContentPart(text=\"...\")]`) are imported *after* the global `mcp_server` is created, so decorators use this instance.\n            *   The FastAPI `lifespan` context manager is used:\n                *   It obtains `mcp_server.streamable_http_app()` and mounts it at a sub-path (e.g., `/mcp`).\n                *   It attempts to manage the lifecycle of FastMCP's services. Our current best approach (which starts the session manager but still leads to the runtime error) involves:\n                    ```python\n                    # (Inside lifespan)\n                    # Ensure session manager is created by accessing streamable_http_app first\n                    starlette_app = mcp_server.streamable_http_app()\n                    if mcp_server._session_manager is None:\n                        raise RuntimeError(\"Session manager not initialized by streamable_http_app\")\n\n                    async with mcp_server._session_manager.run(): # Manages StreamableHTTPSessionManager\n                        # We previously also tried running mcp_server.run_streamable_http_async()\n                        # in an asyncio.TaskGroup here, but that method unconditionally\n                        # tries to start its own Uvicorn server, causing port conflicts\n                        # unless host/port in FastMCP settings are None/0.\n                        # However, even then, the \"initialization not complete\" error persists\n                        # for actual data return.\n                        logger.info(\"FastAPI Lifespan: FastMCP components (attempted) started.\")\n                        yield\n                    ```\n        2.  **Client Script:**\n            *   Establishes a session with the `/mcp/mcp/` endpoint (receives `mcp-session-id` header).\n            *   Makes a `tools/call` POST request to `/mcp/mcp/` with the `mcp-session-id` header, targeting a simple tool that should return `List[ContentPart]`.\n            *   Client expects an SSE stream.\n\n        **Expected Behavior:**\n\n        The tool executes, and its `List[ContentPart]` result is serialized and streamed back to the client as SSE `data:` payloads after the initial 200 OK and SSE headers. The `StreamableHTTPSessionManager` should remain active throughout this process for the given session.\n\n        **Actual Behavior:**\n\n        *   HTTP 200 OK is received by the client.\n        *   `Content-Type: text/event-stream` header is present.\n        *   The response body is empty.\n        *   Server logs show `StreamableHTTPSessionManager` shutting down.\n        *   Server logs show `RuntimeError: Received request before initialization was complete` originating from `mcp/server/session.py`.\n        *   The actual tool code that generates the `List[ContentPart]` might not be reached or its result is not processed.\n\n        **Analysis & Hypothesis:**\n\n        It appears there's a race condition or an incomplete initialization of a required component (possibly the `RequestProcessor` or its internal `anyio.TaskGroup`) when FastMCP is embedded and its lifecycle is managed externally by FastAPI's lifespan. The `StreamableHTTPSessionManager` (started via `async with _session_manager.run()`) might be ready to accept HTTP connections and send initial headers, but the underlying machinery to fully process the tool call and stream results is not yet (or no longer) in a ready state when the request is internally dispatched after the initial HTTP handshake.\n\n        The method `FastMCP.run_streamable_http_async()` is documented to \"initialize all necessary components, including the RequestProcessor and its task group.\" However, this method also unconditionally starts its own Uvicorn server. We have not found parameters for `run_streamable_http_async()` or the `FastMCP` constructor that would allow it to perform *only* the service/task-group initializations without starting a new HTTP server instance, which is necessary for embedding within an existing FastAPI application managed by its own Uvicorn process.\n\n        The example `mcp/server/streamable_http_stateless_demo/server.py` in the SDK shows direct use of `StreamableHTTPSessionManager` with `mcp.server.lowlevel.Server`, and its lifespan correctly manages `session_manager.run()`. It seems the `FastMCP` wrapper around these components might have an issue when its `run_streamable_http_async` is not the primary server entry point.\n\n        **Question to SDK Authors:**\n\n        1.  What is the recommended pattern to fully initialize all FastMCP services (including `RequestProcessor` and its task group) when `FastMCP.streamable_http_app()` is mounted as a sub-application in a parent ASGI framework like FastAPI, ensuring that FastMCP does not attempt to start its own HTTP server?\n        2.  Is the `RuntimeError: Received request before initialization was complete` indicative of a specific component's lifecycle not being correctly managed in such an embedded scenario?\n        3.  Are there specific parameters for `FastMCP.__init__` or an alternative to `run_streamable_http_async` for performing a \"service-only\" initialization suitable for embedding?\n\n        Any guidance or clarification on the intended lifecycle management for embedded `FastMCP` instances would be greatly appreciated. We believe resolving this will significantly improve its usability with frameworks like FastAPI.\n\n        Thank you for your work on this SDK.\n",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/737/reactions",
        "total_count": 9,
        "+1": 9,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/710",
      "id": 3061519100,
      "node_id": "I_kwDOM2n80s62exL8",
      "number": 710,
      "title": "how to trigger a resources_changed or listChanged",
      "user": {
        "login": "skunkwerk",
        "id": 64326,
        "node_id": "MDQ6VXNlcjY0MzI2",
        "avatar_url": "https://avatars.githubusercontent.com/u/64326?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/skunkwerk",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 9230424293,
          "node_id": "LA_kwDOM2n80s8AAAACJi0Y5Q",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/v2",
          "name": "v2",
          "color": "5d2a87",
          "default": false,
          "description": "Ideas, requests and plans for v2 of the SDK which will incorporate major changes and fixes"
        },
        "1": {
          "id": 9354757189,
          "node_id": "LA_kwDOM2n80s8AAAACLZZERQ",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/enhancement",
          "name": "enhancement",
          "color": "11b5cc",
          "default": true,
          "description": "Request for a new feature that's not currently supported"
        },
        "2": {
          "id": 9354761244,
          "node_id": "LA_kwDOM2n80s8AAAACLZZUHA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/ready%20for%20work",
          "name": "ready for work",
          "color": "2b9402",
          "default": false,
          "description": "Enough information for someone to start working on"
        },
        "3": {
          "id": 9354770246,
          "node_id": "LA_kwDOM2n80s8AAAACLZZ3Rg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P2",
          "name": "P2",
          "color": "d2b457",
          "default": false,
          "description": "Moderate issues affecting some users, edge cases, potentially valuable feature"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/milestones/22",
        "id": 13811612,
        "node_id": "MI_kwDOM2n80s4A0r-c",
        "number": 22,
        "title": "FastMCP issues",
        "description": null,
        "creator": {
          "login": "felixweinberger",
          "id": 3823880,
          "node_id": "MDQ6VXNlcjM4MjM4ODA=",
          "avatar_url": "https://avatars.githubusercontent.com/u/3823880?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/felixweinberger",
          "type": "User",
          "user_view_type": "public",
          "site_admin": false
        },
        "open_issues": 10,
        "closed_issues": 1,
        "state": "open",
        "created_at": "2025-10-03T14:23:32Z",
        "updated_at": "2025-12-04T09:48:23Z",
        "due_on": null,
        "closed_at": null
      },
      "comments": 10,
      "created_at": "2025-05-14T00:44:31Z",
      "updated_at": "2025-10-07T14:56:17Z",
      "closed_at": null,
      "author_association": "NONE",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "Hi,\n\nThe protocol specifies that there's a notification sent to clients when the list of tools or resources changes on the server-side, but I'm not sure how to trigger this.  Does it happen automatically when add_resource gets called, or do I need to trigger something manually?\n\nthanks",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/710/reactions",
        "total_count": 0,
        "+1": 0,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/709",
      "id": 3061421832,
      "node_id": "I_kwDOM2n80s62eZcI",
      "number": 709,
      "title": "client_credentials grant type for mcp oauth",
      "user": {
        "login": "elvis-cai",
        "id": 38489894,
        "node_id": "MDQ6VXNlcjM4NDg5ODk0",
        "avatar_url": "https://avatars.githubusercontent.com/u/38489894?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/elvis-cai",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 7511840581,
          "node_id": "LA_kwDOM2n80s8AAAABv72XRQ",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/good%20first%20issue",
          "name": "good first issue",
          "color": "7057ff",
          "default": true,
          "description": "Good for newcomers"
        },
        "1": {
          "id": 9301360597,
          "node_id": "LA_kwDOM2n80s8AAAACKmd_1Q",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/auth",
          "name": "auth",
          "color": "92ad2d",
          "default": false,
          "description": "Issues and PRs related to Authentication / OAuth"
        },
        "2": {
          "id": 9354757189,
          "node_id": "LA_kwDOM2n80s8AAAACLZZERQ",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/enhancement",
          "name": "enhancement",
          "color": "11b5cc",
          "default": true,
          "description": "Request for a new feature that's not currently supported"
        },
        "3": {
          "id": 9354761244,
          "node_id": "LA_kwDOM2n80s8AAAACLZZUHA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/ready%20for%20work",
          "name": "ready for work",
          "color": "2b9402",
          "default": false,
          "description": "Enough information for someone to start working on"
        },
        "4": {
          "id": 9354772110,
          "node_id": "LA_kwDOM2n80s8AAAACLZZ-jg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P3",
          "name": "P3",
          "color": "c7df49",
          "default": false,
          "description": "Nice to haves, rare edge cases"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 2,
      "created_at": "2025-05-13T23:14:39Z",
      "updated_at": "2025-11-12T17:44:15Z",
      "closed_at": null,
      "author_association": "NONE",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "**Describe the solution you'd like**\nsupport client_credentials for app to app auth \n\n**Additional context**\nMCP doc mentioned https://modelcontextprotocol.io/specification/2025-03-26/basic/authorization#2-1-1-oauth-grant-types  `client credential` grant type is also supported, just wondering if we have any plan to support it mainly for app to app auth part, thank you.\n",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/709/reactions",
        "total_count": 0,
        "+1": 0,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/705",
      "id": 3060092534,
      "node_id": "I_kwDOM2n80s62ZU52",
      "number": 705,
      "title": "SSE client doesn't raise exception if the MCP server responds with text/html",
      "user": {
        "login": "codemug",
        "id": 9364481,
        "node_id": "MDQ6VXNlcjkzNjQ0ODE=",
        "avatar_url": "https://avatars.githubusercontent.com/u/9364481?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/codemug",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 7511840554,
          "node_id": "LA_kwDOM2n80s8AAAABv72XKg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/bug",
          "name": "bug",
          "color": "d73a4a",
          "default": true,
          "description": "Something isn't working"
        },
        "1": {
          "id": 9287721887,
          "node_id": "LA_kwDOM2n80s8AAAACKZdjnw",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/needs%20repro",
          "name": "needs repro",
          "color": "e35211",
          "default": false,
          "description": "needs additional information to be able to reproduce bug"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 1,
      "created_at": "2025-05-13T13:28:02Z",
      "updated_at": "2025-10-03T13:39:25Z",
      "closed_at": null,
      "author_association": "NONE",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "**Describe the bug**\n\nThe SSE client will not raise any exception if MCP server responds with HTTP 200 and `text/html` content type at the time of connection: \n\n```\nasync with sse_client(url) as (reader, writer)\n```\n\nThe following event is logged. \n\n```\n{\"event\": \"Error in sse_reader: Expected response header Content-Type to contain 'text/event-stream', got 'text/html'\", \"level\": \"error\", \"timestamp\": \"2025-05-13T13:22:19.309017Z\"}\n```\n\nSince no exception is raised, there's no way to detect and rectify this issue in the control loop. I accidentally discovered this because I had mistakenly been running open-webui on port 8080, the same port my MCP server was supposed to run on. \n\n\n**To Reproduce**\nSteps to reproduce the behavior:\n1. Use an HTTP URL that returns 200 with an HTML document in the SSE client initialization\n2. Wrap the initialization in a try-except block, and check whether exception is raised\n\n**Expected behavior**\nClient should raise exception if the response is not correct. \n\n\n**Desktop (please complete the following information):**\n - OS: macOS\n - Version:  15.4.1 (24E263)\n - MCP Package version: 1.8.0\n",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/705/reactions",
        "total_count": 3,
        "+1": 0,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 3
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/702",
      "id": 3059166764,
      "node_id": "I_kwDOM2n80s62Vy4s",
      "number": 702,
      "title": "Auth for MCP - Starlette middleware vs. OAuthAuthorizationServerProvider",
      "user": {
        "login": "Westerby",
        "id": 25503253,
        "node_id": "MDQ6VXNlcjI1NTAzMjUz",
        "avatar_url": "https://avatars.githubusercontent.com/u/25503253?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/Westerby",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 7511840560,
          "node_id": "LA_kwDOM2n80s8AAAABv72XMA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/documentation",
          "name": "documentation",
          "color": "0075ca",
          "default": true,
          "description": "Improvements or additions to documentation"
        },
        "1": {
          "id": 9301360597,
          "node_id": "LA_kwDOM2n80s8AAAACKmd_1Q",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/auth",
          "name": "auth",
          "color": "92ad2d",
          "default": false,
          "description": "Issues and PRs related to Authentication / OAuth"
        },
        "2": {
          "id": 9354761244,
          "node_id": "LA_kwDOM2n80s8AAAACLZZUHA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/ready%20for%20work",
          "name": "ready for work",
          "color": "2b9402",
          "default": false,
          "description": "Enough information for someone to start working on"
        },
        "3": {
          "id": 9354767859,
          "node_id": "LA_kwDOM2n80s8AAAACLZZt8w",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P1",
          "name": "P1",
          "color": "895d17",
          "default": false,
          "description": "Significant bug affecting many users, highly requested feature"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 6,
      "created_at": "2025-05-13T08:14:00Z",
      "updated_at": "2025-10-07T15:45:18Z",
      "closed_at": null,
      "author_association": "NONE",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "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.",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/702/reactions",
        "total_count": 8,
        "+1": 8,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/698",
      "id": 3058107696,
      "node_id": "I_kwDOM2n80s62RwUw",
      "number": 698,
      "title": "Tool.run should not reveal exception value to the client",
      "user": {
        "login": "bendavis78",
        "id": 324392,
        "node_id": "MDQ6VXNlcjMyNDM5Mg==",
        "avatar_url": "https://avatars.githubusercontent.com/u/324392?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/bendavis78",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 7511840554,
          "node_id": "LA_kwDOM2n80s8AAAABv72XKg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/bug",
          "name": "bug",
          "color": "d73a4a",
          "default": true,
          "description": "Something isn't working"
        },
        "1": {
          "id": 9354761244,
          "node_id": "LA_kwDOM2n80s8AAAACLZZUHA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/ready%20for%20work",
          "name": "ready for work",
          "color": "2b9402",
          "default": false,
          "description": "Enough information for someone to start working on"
        },
        "2": {
          "id": 9354767859,
          "node_id": "LA_kwDOM2n80s8AAAACLZZt8w",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P1",
          "name": "P1",
          "color": "895d17",
          "default": false,
          "description": "Significant bug affecting many users, highly requested feature"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/milestones/15",
        "id": 13770333,
        "node_id": "MI_kwDOM2n80s4A0h5d",
        "number": 15,
        "title": "Error catching improvements",
        "description": null,
        "creator": {
          "login": "felixweinberger",
          "id": 3823880,
          "node_id": "MDQ6VXNlcjM4MjM4ODA=",
          "avatar_url": "https://avatars.githubusercontent.com/u/3823880?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/felixweinberger",
          "type": "User",
          "user_view_type": "public",
          "site_admin": false
        },
        "open_issues": 6,
        "closed_issues": 0,
        "state": "open",
        "created_at": "2025-09-26T16:03:50Z",
        "updated_at": "2025-10-07T17:45:27Z",
        "due_on": null,
        "closed_at": null
      },
      "comments": 1,
      "created_at": "2025-05-12T20:51:38Z",
      "updated_at": "2025-10-06T17:47:09Z",
      "closed_at": null,
      "author_association": "NONE",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "If any exception is raised during a tool call, the exception error message is revealed to the client. This is generally bad practice in python, as private information about the server may be conveyed through the exception. \n\n[src/mcp/server/fastmcp/tools/base.py](https://github.com/modelcontextprotocol/python-sdk/blob/main/src/mcp/server/fastmcp/tools/base.py#L100)\n```python\n    async def run(\n        self,\n        arguments: dict[str, Any],\n        context: Context[ServerSessionT, LifespanContextT] | None = None,\n    ) -> Any:\n        \"\"\"Run the tool with arguments.\"\"\"\n        try:\n            return await self.fn_metadata.call_fn_with_arg_validation(\n                self.fn,\n                self.is_async,\n                arguments,\n                {self.context_kwarg: context}\n                if self.context_kwarg is not None\n                else None,\n            )\n        except Exception as e:\n            raise ToolError(f\"Error executing tool {self.name}: {e}\") from e\n```\n\nThis exposes the server to vulnerabilities such as information leakage, attack surface mapping, etc.\n\nIdeally whomever is implementing the tool should be handling errors and explicitly raising `ToolError` if the error is meant to be seen by the client. The run definition should be modified to \n\n```python\n    async def run(\n        self,\n        arguments: dict[str, Any],\n        context: Context[ServerSessionT, LifespanContextT] | None = None,\n    ) -> Any:\n        \"\"\"Run the tool with arguments.\"\"\"\n        try:\n            return await self.fn_metadata.call_fn_with_arg_validation(\n                self.fn,\n                self.is_async,\n                arguments,\n                {self.context_kwarg: context}\n                if self.context_kwarg is not None\n                else None,\n            )\n        except ToolError:\n            # Re-raise if it's a handled error\n            raise\n        except Exception as e:\n            logger.exception(e)\n            raise ToolError(f\"An unexpected error occurred while executing tool {self.name}\")\n```\n\nThere may be other areas where this is occurring such as resources or prompts, but I have not yet tested to see if those also expose internal errors.",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/698/reactions",
        "total_count": 0,
        "+1": 0,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/686",
      "id": 3055324842,
      "node_id": "I_kwDOM2n80s62HI6q",
      "number": 686,
      "title": "Implement support for the new authorization specification",
      "user": {
        "login": "localden",
        "id": 53200638,
        "node_id": "MDQ6VXNlcjUzMjAwNjM4",
        "avatar_url": "https://avatars.githubusercontent.com/u/53200638?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/localden",
        "type": "User",
        "user_view_type": "public",
        "site_admin": true
      },
      "labels": {
        "0": {
          "id": 9354757189,
          "node_id": "LA_kwDOM2n80s8AAAACLZZERQ",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/enhancement",
          "name": "enhancement",
          "color": "11b5cc",
          "default": true,
          "description": "Request for a new feature that's not currently supported"
        },
        "1": {
          "id": 9354761244,
          "node_id": "LA_kwDOM2n80s8AAAACLZZUHA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/ready%20for%20work",
          "name": "ready for work",
          "color": "2b9402",
          "default": false,
          "description": "Enough information for someone to start working on"
        },
        "2": {
          "id": 9354765360,
          "node_id": "LA_kwDOM2n80s8AAAACLZZkMA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P0",
          "name": "P0",
          "color": "a81d34",
          "default": false,
          "description": "Broken core functionality, security issues, critical missing feature"
        },
        "3": {
          "id": 9412526112,
          "node_id": "LA_kwDOM2n80s8AAAACMQfAIA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/improves%20sdk%20consistency",
          "name": "improves sdk consistency",
          "color": "8f10ec",
          "default": false,
          "description": "Improves consistency with other SDKs such as Tyepscript"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 1,
      "created_at": "2025-05-12T00:20:57Z",
      "updated_at": "2025-10-07T12:49:47Z",
      "closed_at": null,
      "author_association": "NONE",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "**Is your feature request related to a problem? Please describe.**\n\nImplement support for the [draft authorization specification](https://modelcontextprotocol.io/specification/draft/basic/authorization) that was merged earlier last month.\n\n**Describe the solution you'd like**\n\nImplement supoprt for [RFC9728](https://datatracker.ietf.org/doc/html/rfc9728), along with other requirements outlined in the spec.\n\n**Describe alternatives you've considered**\n\nN/A\n\n**Additional context**\n\n- C# implementation: https://github.com/modelcontextprotocol/csharp-sdk/pull/377\n",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/686/reactions",
        "total_count": 4,
        "+1": 4,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/671",
      "id": 3051048670,
      "node_id": "I_kwDOM2n80s61207e",
      "number": 671,
      "title": "MCP Tool execution hangs indefinitely in stdio mode when calling external Python scripts",
      "user": {
        "login": "ycycycl",
        "id": 94345876,
        "node_id": "U_kgDOBZ-alA",
        "avatar_url": "https://avatars.githubusercontent.com/u/94345876?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/ycycycl",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 7511840554,
          "node_id": "LA_kwDOM2n80s8AAAABv72XKg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/bug",
          "name": "bug",
          "color": "d73a4a",
          "default": true,
          "description": "Something isn't working"
        },
        "1": {
          "id": 9354761244,
          "node_id": "LA_kwDOM2n80s8AAAACLZZUHA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/ready%20for%20work",
          "name": "ready for work",
          "color": "2b9402",
          "default": false,
          "description": "Enough information for someone to start working on"
        },
        "2": {
          "id": 9354772110,
          "node_id": "LA_kwDOM2n80s8AAAACLZZ-jg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P3",
          "name": "P3",
          "color": "c7df49",
          "default": false,
          "description": "Nice to haves, rare edge cases"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 6,
      "created_at": "2025-05-09T06:17:05Z",
      "updated_at": "2025-10-03T17:57:21Z",
      "closed_at": null,
      "author_association": "NONE",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "**Describe the bug**\nWhen using FastMCP in stdio transport mode, any tool that attempts to execute an external Python script will hang indefinitely until timeout, without returning any result or error. The same code works perfectly when using SSE transport mode.\n\n**To Reproduce**\nSteps to reproduce the behavior:\n1. Create a minimal external script (minimal_script.py) that simply prints output and exits\n```\nimport sys\n\ndef main():\n    print(\"Successfully Call!\")\n    return 0\n\nif __name__ == \"__main__\":\n    sys.exit(main())\n```\n2. Create an MCP server with a tool that calls this external script\n```\nimport os\nimport sys\nimport asyncio\nimport subprocess\nfrom typing import Dict, Any\n\nfrom mcp.server.fastmcp import FastMCP\n\n# Initialize MCP\nmcp = FastMCP(\"bug_demo\")\n\n@mcp.tool()\nasync def call_external_script() -> Dict[str, Any]:\n    \"\"\"Call external script and return result\"\"\"\n    # Get script path\n    current_dir = os.path.dirname(os.path.abspath(__file__))\n    script_path = os.path.join(current_dir, \"minimal_script.py\")\n    \n    # Build command\n    cmd = [sys.executable, script_path]\n    \n    try:\n        # Execute external command\n        process = await asyncio.create_subprocess_exec(\n            *cmd,\n            stdout=subprocess.PIPE,\n            stderr=subprocess.PIPE\n        )\n        \n        # Wait for process to complete and get output\n        stdout, stderr = await process.communicate()\n        \n        return {\n            \"success\": process.returncode == 0,\n            \"stdout\": stdout.decode().strip(),\n            \"stderr\": stderr.decode().strip(),\n            \"return_code\": process.returncode\n        }\n    except Exception as e:\n        return {\n            \"success\": False,\n            \"error\": str(e)\n        }\n\nif __name__ == \"__main__\":\n    mcp.run(transport=\"stdio\")\n    # mcp.run(transport=\"sse\")\n```\n3. Run the server in stdio mode\n4. Call the tool (Using MCP Inspector) that executes the external script\n5. Observe that the tool call hangs indefinitely with no response\n\n\n**Expected behavior**\nThe tool should execute the external Python script, capture its output, and return the results promptly, regardless of the transport mode used (stdio or SSE).\n\n**Screenshots**\nWhen using stdio, the tool will hang indefinitely until timeout.\n![Image](https://github.com/user-attachments/assets/4903cabe-d1aa-49fe-8ee8-25b303a97e28)\n\nHowever, correct results can be obtained by using SSE mode.\n![Image](https://github.com/user-attachments/assets/3897ba01-052e-4b4b-85f9-483ad30eef07)\n\n**Desktop (please complete the following information):**\n - OS: Windows 11 24H2 26100.3775\n - Python 3.10.0\n - mcp 1.7.1\n - asyncio 3.4.3\n\n**Additional context**\n· The issue persists regardless of whether using asyncio.create_subprocess_exec() or subprocess.run().\n· I tried printing something in an external py script and found that when calling the tool in STDIO mode, it would be unresponsive, but after timeout, the external py script would be executed and something would be printed out. This is like the running of a py script being blocked until the tool call times out before it can run\n",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/671/reactions",
        "total_count": 1,
        "+1": 1,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/638",
      "id": 3043114504,
      "node_id": "I_kwDOM2n80s61Yj4I",
      "number": 638,
      "title": "FastMCP Auth Context in tools",
      "user": {
        "login": "anant-singh",
        "id": 1830816,
        "node_id": "MDQ6VXNlcjE4MzA4MTY=",
        "avatar_url": "https://avatars.githubusercontent.com/u/1830816?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/anant-singh",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 9301360597,
          "node_id": "LA_kwDOM2n80s8AAAACKmd_1Q",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/auth",
          "name": "auth",
          "color": "92ad2d",
          "default": false,
          "description": "Issues and PRs related to Authentication / OAuth"
        },
        "1": {
          "id": 9354757189,
          "node_id": "LA_kwDOM2n80s8AAAACLZZERQ",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/enhancement",
          "name": "enhancement",
          "color": "11b5cc",
          "default": true,
          "description": "Request for a new feature that's not currently supported"
        },
        "2": {
          "id": 9354761244,
          "node_id": "LA_kwDOM2n80s8AAAACLZZUHA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/ready%20for%20work",
          "name": "ready for work",
          "color": "2b9402",
          "default": false,
          "description": "Enough information for someone to start working on"
        },
        "3": {
          "id": 9354767859,
          "node_id": "LA_kwDOM2n80s8AAAACLZZt8w",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P1",
          "name": "P1",
          "color": "895d17",
          "default": false,
          "description": "Significant bug affecting many users, highly requested feature"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 4,
      "created_at": "2025-05-06T14:52:15Z",
      "updated_at": "2025-10-07T15:58:47Z",
      "closed_at": null,
      "author_association": "NONE",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "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",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/638/reactions",
        "total_count": 0,
        "+1": 0,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/622",
      "id": 3037641300,
      "node_id": "I_kwDOM2n80s61DrpU",
      "number": 622,
      "title": "[Feature] De-couple Starlette from FastMCP to make it easier to implement MCP endpoints in other frameworks",
      "user": {
        "login": "bendavis78",
        "id": 324392,
        "node_id": "MDQ6VXNlcjMyNDM5Mg==",
        "avatar_url": "https://avatars.githubusercontent.com/u/324392?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/bendavis78",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 9354757189,
          "node_id": "LA_kwDOM2n80s8AAAACLZZERQ",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/enhancement",
          "name": "enhancement",
          "color": "11b5cc",
          "default": true,
          "description": "Request for a new feature that's not currently supported"
        },
        "1": {
          "id": 9354761244,
          "node_id": "LA_kwDOM2n80s8AAAACLZZUHA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/ready%20for%20work",
          "name": "ready for work",
          "color": "2b9402",
          "default": false,
          "description": "Enough information for someone to start working on"
        },
        "2": {
          "id": 9354772110,
          "node_id": "LA_kwDOM2n80s8AAAACLZZ-jg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P3",
          "name": "P3",
          "color": "c7df49",
          "default": false,
          "description": "Nice to haves, rare edge cases"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 1,
      "created_at": "2025-05-03T22:16:51Z",
      "updated_at": "2025-12-04T00:04:57Z",
      "closed_at": null,
      "author_association": "NONE",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "If someone wanted to implement an MCP server in another framework such as Django or some other ASGI implementation, one would have to use the `mcp.server.lowlevel.Server` class and implement handlers for the low-level server. This means we have to sacrifice a ton of functionality from `FastMCP` that really has nothing to do with the python server backend. For example tool/resource/prompt managers, decorators, etc would have to be re-impemented. \n\nIt seems that these features of FastMCP could be decoupled in to a base class or mixin that handles all the tool/resource/prompt management & decorators, as well as the integration with the low-level `Server`. You could then extend that class to implement your own server with all the routing and request/response logic.\n\nThe proposed base class would have minimal dependencies on these framework-specific concerns:\n\nBase Class Dependencies:\n\n- MCPServer from mcp.server.lowlevel.server\n- Tool/Resource/Prompt managers\n- Basic handler methods (list_tools, call_tool, etc.)\n- The decorators (@tool, @resource, @prompt)\n\nServer-specific Responsibilities:\n\n- Settings handling (Settings class with HTTP config)\n- Transport logic (stdio vs SSE)\n- Routing (custom_route, Starlette routing)\n\n```python\nclass FastMCPBase:\n    \"\"\"Base class or mixin with tool/resource/prompt management and core handlers\"\"\"\n    \n    def __init__(self, name: str, instructions: str = None):\n        self._mcp_server = MCPServer(name=name, instructions=instructions)\n        self._tool_manager = ToolManager()\n        self._resource_manager = ResourceManager()\n        self._prompt_manager = PromptManager()\n        self._setup_handlers()\n    \n    # All the @tool, @resource, @prompt decorators\n    # All the list_tools, call_tool, etc. handler methods\n    # Context management\n\nclass FastMCP(FastMCPBase):\n    \"\"\"Starlette-specific implementation\"\"\"\n    \n    def __init__(self, name: str, **settings):\n        super().__init__(name)\n        self.settings = Settings(**settings)\n        self._custom_starlette_routes = []\n    \n    # Only Starlette-specific methods like sse_app, routing, etc.\n```\n\nThe implementation in the other library could look like this:\n```python \nclass DjangoMCP(FastMCPBase):\n    \"\"\"Django-specific implementation\"\"\"\n    # Django-specific routing & transport logic\n```\n\nOne slight complication could be the `Context` class as it has a reference to the `FastMCP` instance (`self._fastmcp`. However the only function that's used is `read_resource` which would already be on the base class. So possible just need to change the type hint to use the base class.",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/622/reactions",
        "total_count": 13,
        "+1": 8,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 2,
        "eyes": 3
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/600",
      "id": 3027119482,
      "node_id": "I_kwDOM2n80s60bi16",
      "number": 600,
      "title": "SDKs and other middleware SHOULD allow these timeouts to be configured on a per-request basis.",
      "user": {
        "login": "grll",
        "id": 1738060,
        "node_id": "MDQ6VXNlcjE3MzgwNjA=",
        "avatar_url": "https://avatars.githubusercontent.com/u/1738060?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/grll",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 9354757189,
          "node_id": "LA_kwDOM2n80s8AAAACLZZERQ",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/enhancement",
          "name": "enhancement",
          "color": "11b5cc",
          "default": true,
          "description": "Request for a new feature that's not currently supported"
        },
        "1": {
          "id": 9354761244,
          "node_id": "LA_kwDOM2n80s8AAAACLZZUHA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/ready%20for%20work",
          "name": "ready for work",
          "color": "2b9402",
          "default": false,
          "description": "Enough information for someone to start working on"
        },
        "2": {
          "id": 9354770246,
          "node_id": "LA_kwDOM2n80s8AAAACLZZ3Rg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P2",
          "name": "P2",
          "color": "d2b457",
          "default": false,
          "description": "Moderate issues affecting some users, edge cases, potentially valuable feature"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/milestones/13",
        "id": 13746145,
        "node_id": "MI_kwDOM2n80s4A0b_h",
        "number": 13,
        "title": "Middleware Support",
        "description": "",
        "creator": {
          "login": "felixweinberger",
          "id": 3823880,
          "node_id": "MDQ6VXNlcjM4MjM4ODA=",
          "avatar_url": "https://avatars.githubusercontent.com/u/3823880?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/felixweinberger",
          "type": "User",
          "user_view_type": "public",
          "site_admin": false
        },
        "open_issues": 3,
        "closed_issues": 3,
        "state": "open",
        "created_at": "2025-09-23T10:48:37Z",
        "updated_at": "2025-12-03T22:03:37Z",
        "due_on": null,
        "closed_at": null
      },
      "comments": 3,
      "created_at": "2025-04-29T05:45:37Z",
      "updated_at": "2025-10-07T12:12:31Z",
      "closed_at": null,
      "author_association": "CONTRIBUTOR",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "**Describe the bug**\nAccording to the [MCP specs](https://modelcontextprotocol.io/specification/2025-03-26/basic/lifecycle#timeouts): \n> \"SDKs and other middleware SHOULD allow these timeouts to be configured on a per-request basis.\"\n\nBut looking at the code the timeouts are set at the session level and not easily configured on a per-request basis as the specs recommend:\n\n```python\nasync def send_request(\n   self,\n   request: SendRequestT,\n   result_type: type[ReceiveResultT],\n) -> ReceiveResultT:\n    ...\n        try:\n            with anyio.fail_after(\n                None\n                if self._read_timeout_seconds is None\n                else self._read_timeout_seconds.total_seconds()\n            ):\n                response_or_error = await response_stream_reader.receive()\n        except TimeoutError:\n            raise McpError(\n                ErrorData(\n                    code=httpx.codes.REQUEST_TIMEOUT,\n                    message=(\n                        f\"Timed out while waiting for response to \"\n                        f\"{request.__class__.__name__}. Waited \"\n                        f\"{self._read_timeout_seconds} seconds.\"\n                    ),\n                )\n            )\n```\n[see](https://github.com/modelcontextprotocol/python-sdk/blob/697b6e8e05accf6c9dc16627319e2e12ce4b5d5c/src/mcp/shared/session.py#L246-L263)\n\n**Suggestion**\n\nAdd an optional argument `request_read_timeout_seconds` and rename current _read_timeout_seconds into `session_read_timeout_seconds` if `request_read_timeout_seconds` is set it would override the session one.\n\nI will publish a small PR in that sense.\n",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/600/reactions",
        "total_count": 3,
        "+1": 3,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/592",
      "id": 3023369116,
      "node_id": "I_kwDOM2n80s60NPOc",
      "number": 592,
      "title": "MCP stdio transport inconsistent CallTooResult return",
      "user": {
        "login": "wilson-urdaneta",
        "id": 102034447,
        "node_id": "U_kgDOBhTsDw",
        "avatar_url": "https://avatars.githubusercontent.com/u/102034447?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/wilson-urdaneta",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 7511840554,
          "node_id": "LA_kwDOM2n80s8AAAABv72XKg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/bug",
          "name": "bug",
          "color": "d73a4a",
          "default": true,
          "description": "Something isn't working"
        },
        "1": {
          "id": 9082681979,
          "node_id": "LA_kwDOM2n80s8AAAACHV66ew",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/needs%20confirmation",
          "name": "needs confirmation",
          "color": "aaaaaa",
          "default": false,
          "description": "Needs confirmation that the PR is actually required or needed."
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 1,
      "created_at": "2025-04-27T22:51:05Z",
      "updated_at": "2025-10-06T16:02:03Z",
      "closed_at": null,
      "author_association": "NONE",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "**Describe the bug**\nWhen using the MCP stdio transport (`mcp.client.stdio.stdio_client` and `mcp.client.session.ClientSession`), if a server tool returns a `CallToolResult` containing `TextContent` where the `text` field holds the string representation of a primitive type (string, number, boolean, null), the client-side `ClientSession` incorrectly populates the resulting `TextContent.text` attribute. Instead of containing the simple string representation (e.g., `\"42\"`), it contains the full JSON string representation of the *entire* `CallToolResult` object (e.g., `'{\"_meta\": null, \"content\": [{\"type\": \"text\", \"text\": \"42\", \"annotations\": null}], \"isError\": false}'`).\n\nThis issue does *not* seem to affect cases where the server returns complex types (dicts, lists) serialized as JSON strings within `TextContent.text`.\n\n**To Reproduce**\nSteps to reproduce the behavior:\n\n1.  **Create an MCP stdio server** (`stdio_server_script.py`) with a simple tool that returns a primitive type within `TextContent`:\n\n    ```python\n    # stdio_server_script.py\n    import asyncio\n    import json\n    import logging\n    import sys\n    from typing import Any\n    from mcp.server.fastmcp import FastMCP, Context\n    from mcp.types import CallToolResult, TextContent\n\n    logging.basicConfig(level=logging.DEBUG, stream=sys.stderr)\n    server = FastMCP(\"TestStdioServer\", log_level=\"DEBUG\")\n\n    @server.tool(\"echo_primitive\", description=\"Echo back primitive as string\")\n    async def echo_primitive(context: Context, message: Any = None) -> CallToolResult:\n        text_value = str(message) if message is not None else \"null\"\n        logging.debug(f\"Echo returning primitive text: {text_value}\")\n        # Attempt to return primitive string representation in TextContent\n        return CallToolResult(content=[TextContent(type=\"text\", text=text_value)])\n\n    async def main():\n        await server.run_stdio_async()\n\n    if __name__ == \"__main__\":\n        asyncio.run(main())\n    ```\n\n2.  **Create an MCP client** that connects via stdio and calls the tool:\n\n    ```python\n    # stdio_client_test.py\n    import asyncio\n    import sys\n    import json\n    import logging\n    from mcp.client.session import ClientSession\n    from mcp.client.stdio import StdioServerParameters, stdio_client\n    from mcp.types import TextContent\n\n    logging.basicConfig(level=logging.DEBUG)\n\n    async def run_test():\n        server_script = \"stdio_server_script.py\"\n        params = StdioServerParameters(command=sys.executable, args=[server_script])\n\n        async with stdio_client(params) as streams:\n            read_stream, write_stream = streams\n            async with ClientSession(read_stream, write_stream) as session:\n                await asyncio.wait_for(session.initialize(), timeout=5.0)\n                await asyncio.sleep(1.0) # Ensure initialization completes\n\n                input_value = 42\n                expected_text = \"42\"\n\n                result = await session.call_tool(\"echo_primitive\", {\"message\": input_value})\n                logging.info(f\"Received result: {result}\")\n\n                assert result.content and len(result.content) > 0\n                text_content = result.content[0]\n                assert isinstance(text_content, TextContent)\n                actual_text = text_content.text\n\n                logging.info(f\"Input value: {input_value}\")\n                logging.info(f\"Expected text: '{expected_text}'\")\n                logging.info(f\"Actual text in text_content.text: '{actual_text}'\")\n\n                # This assertion fails\n                assert actual_text == expected_text, f\"Assertion Failed: Expected '{expected_text}', got '{actual_text}'\"\n\n    if __name__ == \"__main__\":\n        asyncio.run(run_test())\n    ```\n\n3.  **Run the client script**: `python stdio_client_test.py`\n\n4.  **See error**: Observe the logged output and the `AssertionError`. The `actual_text` will contain the full JSON string, not just `\"42\"`.\n\n    ```\n    # Example Output Snippet\n    INFO:root:Received result: CallToolResult(_meta=None, content=[TextContent(type='text', text='{\"_meta\": null, \"content\": [{\"type\": \"text\", \"text\": \"42\", \"annotations\": null}], \"isError\": false}', annotations=None)], isError=False)\n    INFO:root:Input value: 42\n    INFO:root:Expected text: '42'\n    INFO:root:Actual text in text_content.text: '{\"_meta\": null, \"content\": [{\"type\": \"text\", \"text\": \"42\", \"annotations\": null}], \"isError\": false}'\n    ...\n    AssertionError: Assertion Failed: Expected '42', got '{\"_meta\": null, \"content\": [{\"type\": \"text\", \"text\": \"42\", \"annotations\": null}], \"isError\": false}'\n    ```\n\n**Expected behavior**\nThe `text_content.text` attribute on the client side should contain the exact string value that the server placed in the `TextContent`'s `text` field when returning a primitive type. In the example above, `actual_text` should be equal to `\"42\"`.\n\n**Screenshots**\nN/A (See console output above).\n\n**Desktop (please complete the following information):**\n - OS: macOS Sonoma 14.4 (Darwin 24.4.0)\n - Python Version: 3.10.17\n - `mcp` Library Version: 1.6.0 (Assuming based on project instructions)\n\n**Smartphone (please complete the following information):**\nN/A\n\n**Additional context**\n- This bug forces clients using the stdio transport to implement a workaround where they check if `TextContent.text` contains a JSON string representing the full response and parse it manually to extract the *actual* intended text field.\n- The issue seems specific to the `stdio` transport combined with primitive return types in `TextContent`. Returning complex types (dict/list) as JSON strings works as expected (client receives the JSON string in `TextContent.text` and can parse it). Returning primitives via SSE transport might behave differently (needs verification).",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/592/reactions",
        "total_count": 0,
        "+1": 0,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/577",
      "id": 3015643538,
      "node_id": "I_kwDOM2n80s6zvxGS",
      "number": 577,
      "title": "`RuntimeError: Attempted to exit cancel scope in a different task` when cleaning up multiple MCPClient instances out-of-order",
      "user": {
        "login": "HMJiangGatech",
        "id": 29517186,
        "node_id": "MDQ6VXNlcjI5NTE3MTg2",
        "avatar_url": "https://avatars.githubusercontent.com/u/29517186?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/HMJiangGatech",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 7511840554,
          "node_id": "LA_kwDOM2n80s8AAAABv72XKg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/bug",
          "name": "bug",
          "color": "d73a4a",
          "default": true,
          "description": "Something isn't working"
        },
        "1": {
          "id": 9354761244,
          "node_id": "LA_kwDOM2n80s8AAAACLZZUHA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/ready%20for%20work",
          "name": "ready for work",
          "color": "2b9402",
          "default": false,
          "description": "Enough information for someone to start working on"
        },
        "2": {
          "id": 9354767859,
          "node_id": "LA_kwDOM2n80s8AAAACLZZt8w",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P1",
          "name": "P1",
          "color": "895d17",
          "default": false,
          "description": "Significant bug affecting many users, highly requested feature"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 10,
      "created_at": "2025-04-24T01:39:22Z",
      "updated_at": "2025-10-24T14:14:17Z",
      "closed_at": null,
      "author_association": "NONE",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "**Describe the bug**\nIf two `MCPClient` objects are instantiated and cleaned up in non-FILO order (i.e., the first-created client is cleaned up before the second), teardown fails with a cascade of `RuntimeError`/`CancelledError` exceptions coming from `anyio` and `mcp.client.stdio.`\n\n**To Reproduce**\nMinimal repro:\n```python\nimport os, asyncio, json\nfrom typing import Optional\nfrom contextlib import AsyncExitStack\nfrom mcp import ClientSession, StdioServerParameters\nfrom mcp.types import TextContent\nfrom mcp.client.stdio import stdio_client\n\nclass MCPClient:\n    def __init__(self, command: str, args: list[str], env: Optional[dict] = None):\n        self.session: Optional[ClientSession] = None\n        self.command, self.args, self.env = command, args, env\n        self._cleanup_lock = asyncio.Lock()\n        self.exit_stack: Optional[AsyncExitStack] = None\n\n    async def connect_to_server(self):\n        await self.cleanup()\n        self.exit_stack = AsyncExitStack()\n\n        server_params = StdioServerParameters(\n            command=self.command, args=self.args, env=self.env\n        )\n        stdio_transport = await self.exit_stack.enter_async_context(stdio_client(server_params))\n        self.stdio, self.write = stdio_transport\n        self.session = await self.exit_stack.enter_async_context(\n            ClientSession(self.stdio, self.write)\n        )\n        await self.session.initialize()\n\n    async def cleanup(self):\n        if self.exit_stack:\n            async with self._cleanup_lock:\n                await self.exit_stack.aclose()\n                self.session = None\n            self.exit_stack = None\n\nasync def main():\n    cfg = {\n        \"command\": \"npx\",\n        \"args\": [\"-y\", \"@adenot/mcp-google-search\"],\n        \"env\": {\n            \"GOOGLE_API_KEY\": os.environ[\"GOOGLE_API_KEY\"],\n            \"GOOGLE_SEARCH_ENGINE_ID\": os.environ[\"GOOGLE_SEARCH_ENGINE_ID\"],\n        },\n    }\n\n    c1, c2 = MCPClient(**cfg), MCPClient(**cfg)\n    await c1.connect_to_server()\n    await c2.connect_to_server()\n\n    # Works (FILO)\n    # await c2.cleanup()\n    # await c1.cleanup()\n\n    # Fails (FIFO)\n    await c1.cleanup()      # <-- boom\n    await c2.cleanup()\n\nif __name__ == \"__main__\":\n    asyncio.run(main())\n```\n\n**Expected behavior**\n\n`cleanup()` should succeed regardless of the order in which multiple `MCPClient` instances are closed, as long as each instance’s own exit_stack is intact. A single client ought to manage its own lifetime without depending on external FILO discipline.\n\n**Actual Traceback**\n```\nRuntimeError: Attempted to exit cancel scope in a different task than it was entered in\n...\nasyncio.exceptions.CancelledError: Cancelled by cancel scope ...\n...\nRuntimeError: Attempted to exit a cancel scope that isn't the current task's current cancel scope\n\n```\n\n**Environment**\n\nItem | Version\n-- | --\nmcp | 1.6.0\nPython | 3.12.10\nanyio | 4.9.0\nOS | macOS 14.4 (Apple Silicon)\n\n",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/577/reactions",
        "total_count": 6,
        "+1": 6,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/565",
      "id": 3012004289,
      "node_id": "I_kwDOM2n80s6zh4nB",
      "number": 565,
      "title": "Context.log does not actually accept or pass forward extra kwargs",
      "user": {
        "login": "LucasRoesler",
        "id": 891889,
        "node_id": "MDQ6VXNlcjg5MTg4OQ==",
        "avatar_url": "https://avatars.githubusercontent.com/u/891889?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/LucasRoesler",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 7511840554,
          "node_id": "LA_kwDOM2n80s8AAAABv72XKg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/bug",
          "name": "bug",
          "color": "d73a4a",
          "default": true,
          "description": "Something isn't working"
        },
        "1": {
          "id": 7511840581,
          "node_id": "LA_kwDOM2n80s8AAAABv72XRQ",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/good%20first%20issue",
          "name": "good first issue",
          "color": "7057ff",
          "default": true,
          "description": "Good for newcomers"
        },
        "2": {
          "id": 9354761244,
          "node_id": "LA_kwDOM2n80s8AAAACLZZUHA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/ready%20for%20work",
          "name": "ready for work",
          "color": "2b9402",
          "default": false,
          "description": "Enough information for someone to start working on"
        },
        "3": {
          "id": 9354772110,
          "node_id": "LA_kwDOM2n80s8AAAACLZZ-jg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P3",
          "name": "P3",
          "color": "c7df49",
          "default": false,
          "description": "Nice to haves, rare edge cases"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 2,
      "created_at": "2025-04-22T20:04:43Z",
      "updated_at": "2025-11-12T17:44:14Z",
      "closed_at": null,
      "author_association": "NONE",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "The utility methods on Context for logging all document `**extra` as being passed forward to the logger. However, `Context.log` does not actually allow any additional kwargs to be passed. This results in errors such as \n\n```\nContext.log() got an unexpected keyword argument \n```\n \n**To Reproduce**\nAny usage of the context methods with extra kwargs will produce the error, for example\n\n```python\nawait context.info(\n    \"request finished\",\n    channel_id=channel_id,\n    status=response.get(\"ok\"),\n)\n```\n\n**Expected behavior**\nThe `Context.log` method is documented with \n```\nArgs:\n  level: Log level (debug, info, warning, error)\n  message: Log message\n  logger_name: Optional logger name\n  **extra: Additional structured data to include\n```\n\nThis (and the helper methods) should either be documented as _not_ supporting additional structured data _or_ the log message `data` needs to be structured, for example, something like this \n\n```python \n    async def log(\n        self,\n        level: Literal[\"debug\", \"info\", \"warning\", \"error\"],\n        message: str,\n        *,\n        logger_name: str | None = None,\n        **extra: Any\n    ) -> None:\n        \"\"\"Send a log message to the client.\n\n        Args:\n            level: Log level (debug, info, warning, error)\n            message: Log message\n            logger_name: Optional logger name\n            **extra: Additional structured data to include\n        \"\"\"\n        log_data = {\n           \"message\": message, **extra\n        }\n        await self.request_context.session.send_log_message(\n            level=level, data=log_data, logger=logger_name\n        )\n```\n\n",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/565/reactions",
        "total_count": 0,
        "+1": 0,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/547",
      "id": 3007314837,
      "node_id": "I_kwDOM2n80s6zP_uV",
      "number": 547,
      "title": "MCP Server Hangs Indefinitely After KqueueSelector Log on macOS (Python 3.12, Both STDIO & SSE)",
      "user": {
        "login": "jlcases",
        "id": 69396384,
        "node_id": "MDQ6VXNlcjY5Mzk2Mzg0",
        "avatar_url": "https://avatars.githubusercontent.com/u/69396384?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/jlcases",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 7511840554,
          "node_id": "LA_kwDOM2n80s8AAAABv72XKg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/bug",
          "name": "bug",
          "color": "d73a4a",
          "default": true,
          "description": "Something isn't working"
        },
        "1": {
          "id": 9082681979,
          "node_id": "LA_kwDOM2n80s8AAAACHV66ew",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/needs%20confirmation",
          "name": "needs confirmation",
          "color": "aaaaaa",
          "default": false,
          "description": "Needs confirmation that the PR is actually required or needed."
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 3,
      "created_at": "2025-04-21T00:26:08Z",
      "updated_at": "2025-10-06T17:40:24Z",
      "closed_at": null,
      "author_association": "NONE",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "\n\n**Describe the bug**\n\nWhen running an MCP server using `mcp-sdk` (both `FastMCP` and the low-level `Server` with `mcp.server.stdio.stdio_server`) on macOS with Python 3.12, the server process hangs indefinitely immediately after the `DEBUG - Using selector: KqueueSelector` log message appears. This happens during the `server.run()` or `mcp.run()` call.\n\nThe hang occurs regardless of whether the STDIO transport (`transport=\"stdio\"`) or the default web/SSE transport is used. It also occurs even with a minimal server configuration with no custom tools, resources, or plugins registered.\n\n**Environment:**\n\n*   **OS:** macOS 15 Sequoia (Darwin 24.5.0)\n*   **Python:** 3.12.9 (via Homebrew - *Please update if incorrect*)\n*   **mcp-sdk Version:** 1.6.1.dev14+babb477 (Installed via `pip install -e .` from Git main branch using `mcp @ git+https://github.com/modelcontextprotocol/python-sdk.git` in `pyproject.toml` with `hatchling` and `allow-direct-references = true`)\n*   **Key Dependencies:**\n    *   uvicorn: 0.30.3\n    *   starlette: 0.37.2\n    *   anyio: 4.9.0\n\n**To Reproduce**\n\nSteps to reproduce the behavior:\n1.  Ensure Python 3.12.9 and `mcp-sdk` (tested with version `1.6.1.dev14+babb477` installed from Git main branch) are installed in your environment on macOS.\n2.  Save the following minimal STDIO server example (based on the SDK documentation) as `mcp_stdio_test.py`:\n    ```python\n    # From https://github.com/modelcontextprotocol/python-sdk README (Low-Level Server example)\n    import mcp.server.stdio\n    import mcp.types as types\n    from mcp.server.lowlevel import NotificationOptions, Server\n    from mcp.server.models import InitializationOptions\n    import logging # Add logging\n    import asyncio # Add asyncio\n\n    # Configure logging\n    logging.basicConfig(level=logging.DEBUG, format='%(asctime)s - %(levelname)s - %(message)s')\n    logger = logging.getLogger(__name__)\n\n\n    # Create a server instance\n    logger.debug(\"Creating Server instance...\")\n    server = Server(\"example-server\")\n    logger.debug(\"Server instance created.\")\n\n\n    @server.list_prompts()\n    async def handle_list_prompts() -> list[types.Prompt]:\n        logger.debug(\"Handling list_prompts request...\")\n        return [\n            types.Prompt(\n                name=\"example-prompt\",\n                description=\"An example prompt template\",\n                arguments=[\n                    types.PromptArgument(\n                        name=\"arg1\", description=\"Example argument\", required=True\n                    )\n                ],\n            )\n        ]\n    logger.debug(\"list_prompts handler defined.\")\n\n\n    @server.get_prompt()\n    async def handle_get_prompt(\n        name: str, arguments: dict[str, str] | None\n    ) -> types.GetPromptResult:\n        logger.debug(f\"Handling get_prompt request for: {name}\")\n        if name != \"example-prompt\":\n            raise ValueError(f\"Unknown prompt: {name}\")\n\n        return types.GetPromptResult(\n            description=\"Example prompt\",\n            messages=[\n                types.PromptMessage(\n                    role=\"user\",\n                    content=types.TextContent(type=\"text\", text=\"Example prompt text\"),\n                )\n            ],\n        )\n    logger.debug(\"get_prompt handler defined.\")\n\n\n    async def run():\n        logger.debug(\"run() function started.\")\n        async with mcp.server.stdio.stdio_server() as (read_stream, write_stream):\n            logger.debug(\"stdio_server context entered.\")\n            init_options = InitializationOptions(\n                    server_name=\"example\",\n                    server_version=\"0.1.0\",\n                    capabilities=server.get_capabilities(\n                        notification_options=NotificationOptions(),\n                        experimental_capabilities={},\n                    ),\n                )\n            logger.debug(f\"Initialization options created: {init_options}\")\n            logger.debug(\"Attempting server.run()...\")\n            # Note: Using low-level server.run, not FastMCP's run\n            await server.run(\n                read_stream,\n                write_stream,\n                init_options\n            )\n            logger.debug(\"server.run() finished.\") # This likely won't be reached in normal operation\n\n\n    if __name__ == \"__main__\":\n        logger.info(\"Starting asyncio event loop...\")\n        try:\n            asyncio.run(run())\n        except KeyboardInterrupt:\n            logger.info(\"KeyboardInterrupt received, exiting.\")\n        except Exception as e:\n            logger.critical(f\"Unhandled exception in main loop: {e}\", exc_info=True)\n        finally:\n            logger.info(\"asyncio event loop finished.\")\n    ```\n3.  Run the script from the terminal: `python mcp_stdio_test.py`\n4.  **See error:** Observe the log output. The script hangs indefinitely after the `Attempting server.run()...` log message.\n\n**Expected behavior**\n\nThe server should successfully start, remain running, and be ready to accept MCP connections via STDIO (or SSE if run without `transport=\"stdio\"`). It should not hang during initialization.\n\n**Screenshots**\n\nN/A - The issue is a process hang, the relevant output is text logs shown below.\n\n**Desktop:**\n\n*   **OS:** macOS 15 Sequoia (Darwin 24.5.0)\n*   **Python Version:** 3.12.9 (via Homebrew - *Please update if incorrect*)\n*   **mcp-sdk Version:** 1.6.1.dev14+babb477 (Installed from Git main branch)\n*   **Key Dependencies:**\n    *   uvicorn: 0.30.3\n    *   starlette: 0.37.2\n    *   anyio: 4.9.0\n\n**Smartphone:**\n\nN/A\n\n**Additional context**\n\n*   The issue occurs with both `FastMCP().run(...)` and the low-level `Server().run(...)` implementation.\n*   The hang happens even when all custom tools, resources, plugins, and prompts defined in the application code are commented out.\n*   The issue persists whether using `mcp` installed from PyPI or directly from the Git main branch.\n*   Pinning `uvicorn[standard]` to `0.30.3` (a version used in a previously working commit) did not resolve the issue.\n*   Adding a `time.sleep(10)` before the `run()` call (which seemed to help in older commits) no longer prevents the hang.\n*   Issue #396 seems potentially related as it also involves problems with the STDIO transport, although it describes the client not detecting server termination rather than the server hanging on startup.\n\nThis strongly suggests an underlying issue within `mcp-sdk`'s core run logic or its interaction with `asyncio`/`KqueueSelector` on macOS with recent Python versions or recent `mcp-sdk` versions. The hang point after `KqueueSelector` seems critical.\n\n**Log Output Showing Hang:**\n\n```\n2025-04-21 02:17:29,965 - DEBUG - Creating Server instance...\n2025-04-21 02:17:29,966 - DEBUG - Initializing server 'example-server'\n2025-04-21 02:17:29,966 - DEBUG - Server instance created.\n2025-04-21 02:17:29,966 - DEBUG - Registering handler for PromptListRequest\n2025-04-21 02:17:29,966 - DEBUG - list_prompts handler defined.\n2025-04-21 02:17:29,966 - DEBUG - Registering handler for GetPromptRequest\n2025-04-21 02:17:29,966 - DEBUG - get_prompt handler defined.\n2025-04-21 02:17:29,966 - INFO - Starting asyncio event loop...\n2025-04-21 02:17:29,966 - DEBUG - Using selector: KqueueSelector\n2025-04-21 02:17:29,971 - DEBUG - run() function started.\n2025-04-21 02:17:29,973 - DEBUG - stdio_server context entered.\n2025-04-21 02:17:29,973 - DEBUG - Initialization options created: server_name='example' server_version='0.1.0' capabilities=ServerCapabilities(experimental={}, logging=None, prompts=PromptsCapability(listChanged=False), resources=None, tools=None) instructions=None\n2025-04-21 02:17:29,973 - DEBUG - Attempting server.run()...\n<-- HANGS HERE INDEFINITELY -->\n``` ",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/547/reactions",
        "total_count": 2,
        "+1": 2,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/539",
      "id": 3005904080,
      "node_id": "I_kwDOM2n80s6zKnTQ",
      "number": 539,
      "title": "We need some more client and sampling examples and use-cases.",
      "user": {
        "login": "z29",
        "id": 6579258,
        "node_id": "MDQ6VXNlcjY1NzkyNTg=",
        "avatar_url": "https://avatars.githubusercontent.com/u/6579258?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/z29",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 7511840560,
          "node_id": "LA_kwDOM2n80s8AAAABv72XMA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/documentation",
          "name": "documentation",
          "color": "0075ca",
          "default": true,
          "description": "Improvements or additions to documentation"
        },
        "1": {
          "id": 9354761244,
          "node_id": "LA_kwDOM2n80s8AAAACLZZUHA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/ready%20for%20work",
          "name": "ready for work",
          "color": "2b9402",
          "default": false,
          "description": "Enough information for someone to start working on"
        },
        "2": {
          "id": 9354767859,
          "node_id": "LA_kwDOM2n80s8AAAACLZZt8w",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P1",
          "name": "P1",
          "color": "895d17",
          "default": false,
          "description": "Significant bug affecting many users, highly requested feature"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 7,
      "created_at": "2025-04-18T22:58:57Z",
      "updated_at": "2025-11-04T14:41:27Z",
      "closed_at": null,
      "author_association": "NONE",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "The client examples provided are vague and the sampling examples, non-existant. The best I could find was:\n\n```\n  async def handle_sampling_message(\n      message: types.CreateMessageRequestParams,\n  ) -> types.CreateMessageResult:\n      return types.CreateMessageResult(\n          role=\"assistant\",\n          content=types.TextContent(\n              type=\"text\",\n              text=\"Hello, world! from model\",\n          ),\n          model=\"gpt-3.5-turbo\",\n          stopReason=\"endTurn\",\n      )\n```\n\nthis barely explains how it works, and worse, doesn't show how to invoke sampling on the server-side. The documentation on the mcp website is even more vague. \n\nThen there seem to be multiple ways to create a client:\n- creating an MCPClient class like in https://modelcontextprotocol.io/quickstart/client\n- aysnc with ClientSession like in your readme https://github.com/modelcontextprotocol/python-sdk/blob/main/README.md#writing-mcp-clients\n\nI'm just trying to learn, but its confusing ",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/539/reactions",
        "total_count": 2,
        "+1": 2,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": [
        1436
      ]
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/526",
      "id": 2998049922,
      "node_id": "I_kwDOM2n80s6yspyC",
      "number": 526,
      "title": "MCP Server with Python on Claude Desktop Never Exits",
      "user": {
        "login": "RodrigoPAml",
        "id": 41243039,
        "node_id": "MDQ6VXNlcjQxMjQzMDM5",
        "avatar_url": "https://avatars.githubusercontent.com/u/41243039?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/RodrigoPAml",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 7511840554,
          "node_id": "LA_kwDOM2n80s8AAAABv72XKg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/bug",
          "name": "bug",
          "color": "d73a4a",
          "default": true,
          "description": "Something isn't working"
        },
        "1": {
          "id": 9354761244,
          "node_id": "LA_kwDOM2n80s8AAAACLZZUHA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/ready%20for%20work",
          "name": "ready for work",
          "color": "2b9402",
          "default": false,
          "description": "Enough information for someone to start working on"
        },
        "2": {
          "id": 9354770246,
          "node_id": "LA_kwDOM2n80s8AAAACLZZ3Rg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P2",
          "name": "P2",
          "color": "d2b457",
          "default": false,
          "description": "Moderate issues affecting some users, edge cases, potentially valuable feature"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 6,
      "created_at": "2025-04-16T01:16:18Z",
      "updated_at": "2025-11-12T17:47:44Z",
      "closed_at": null,
      "author_association": "NONE",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "**Describe the bug**\nWhen using an MCP Server (stdio) installed in Claude Desktop with the command ```uv run mcp istall server_test.py``` and then closing Claude Desktop, the process mcp.exe remains active in Task Manager on Windows 10.\nIf you open and close Claude Desktop again, the number of lingering mcp.exe processes increases.\n\n**To Reproduce**\nSteps to reproduce the behavior:\n1. Install ```server_test.py``` using the command above.\n2. Open Claude Desktop and ensure the MCP server is correctly set up.\n3. Close Claude Desktop and check Task Manager for ```mcp.exe```  or ```python.exe``` still running.\n4. Repeat steps 2 and 3 to see the processes being duplicated.\n\n**Expected behavior**\nThe process should exit cleanly when Claude Desktop is closed.\nI tested the MCP server provided by the C# SDK, and it exits correctly — so the issue might be specific to the Python implementation or FastMCP.\n\n**Screenshots**\n![Image](https://github.com/user-attachments/assets/0b9e792b-62b6-413b-9645-65955eba11e4)\n\n**Desktop**\n - OS: Windows 10\n - Python 3.13.3\n - Claude Desktop version 0.9.2\n - mcp[cli]>=1.6.0\n - uv 0.6.13",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/526/reactions",
        "total_count": 5,
        "+1": 5,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/520",
      "id": 2996289145,
      "node_id": "I_kwDOM2n80s6yl755",
      "number": 520,
      "title": "MCP Server Session Lost in Multi-Worker Environment",
      "user": {
        "login": "Mile-Away",
        "id": 103566763,
        "node_id": "U_kgDOBixNqw",
        "avatar_url": "https://avatars.githubusercontent.com/u/103566763?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/Mile-Away",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 7511840554,
          "node_id": "LA_kwDOM2n80s8AAAABv72XKg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/bug",
          "name": "bug",
          "color": "d73a4a",
          "default": true,
          "description": "Something isn't working"
        },
        "1": {
          "id": 9082681979,
          "node_id": "LA_kwDOM2n80s8AAAACHV66ew",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/needs%20confirmation",
          "name": "needs confirmation",
          "color": "aaaaaa",
          "default": false,
          "description": "Needs confirmation that the PR is actually required or needed."
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 11,
      "created_at": "2025-04-15T12:38:17Z",
      "updated_at": "2025-10-03T12:24:09Z",
      "closed_at": null,
      "author_association": "NONE",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "## Describe the bug\nWhen deploying the MCP server in a Kubernetes environment with gunicorn's multi-process configuration, SSE connections disconnect after a period of time, resulting in subsequent messages receiving a 404 error \"Could not find session for ID\". This occurs because SSE sessions are created in one worker process, but subsequent requests may be routed to different worker processes where the session state is not shared.\n\n## Steps to reproduce\n1. Deploy an MCP server in a Kubernetes environment using gunicorn\n2. Configure gunicorn with multiple workers (`workers > 1`)\n3. Connect a client to the MCP server and establish an SSE connection (initial connection succeeds)\n4. Send the first message (successfully processed, returns 202)\n5. Wait a few seconds or try to send a second message\n6. Receive error: `WARNING mcp.server.sse Could not find session for ID: xxx-xxx-xxx`\n\n## Logs\n```\n[2025-04-15 19:26:26 +0800] [32] [INFO] connection open\n127.0.0.1:48270 - \"GET /mcps/sse HTTP/1.1\" 200\n127.0.0.1:48280 - \"POST /mcps/messages/?session_id=cb7ed84c8f2f4109b5712f9fb025a5c2 HTTP/1.1\" 202\n127.0.0.1:48280 - \"POST /mcps/messages/?session_id=cb7ed84c8f2f4109b5712f9fb025a5c2 HTTP/1.1\" 202\n127.0.0.1:48280 - \"POST /mcps/messages/?session_id=cb7ed84c8f2f4109b5712f9fb025a5c2 HTTP/1.1\" 202\n127.0.0.1:48280 - \"POST /mcps/messages/?session_id=cb7ed84c8f2f4109b5712f9fb025a5c2 HTTP/1.1\" 202\n127.0.0.1:48280 - \"POST /mcps/messages/?session_id=cb7ed84c8f2f4109b5712f9fb025a5c2 HTTP/1.1\" 202\n127.0.0.1:39380 - \"POST /mcps/messages/?session_id=cb7ed84c8f2f4109b5712f9fb025a5c2 HTTP/1.1\" 202\n[2025-04-15 19:26:47 +0800] [32] [WARNING] mcp.server.sse Could not find session for ID: cb7ed84c-8f2f-4109-b571-2f9fb025a5c2\n127.0.0.1:53124 - \"POST /mcps/messages/?session_id=cb7ed84c8f2f4109b5712f9fb025a5c2 HTTP/1.1\" 404\n[2025-04-15 19:26:47 +0800] [32] [ERROR] mcp.client.sse Error in post_writer: Client error '404 Not Found' for url 'http://localhost:8000/mcps/messages/?session_id=cb7ed84c8f2f4109b5712f9fb025a5c2'\n```\n\n## Expected behavior\nAll messages, whether initial or subsequent, should be processed normally without any session not found errors. Even when using multiple workers, SSE sessions should maintain continuous connections.\n\n## Environment information\n- Deployment environment: Kubernetes\n- Web server: gunicorn + uvicorn.workers.UvicornWorker\n- Session ID handling: Server converts UUIDs without hyphens to the hyphenated format\n- Local environment (running directly with uvicorn, single process) does not exhibit this issue\n\n## Reproduction conditions\n- Using gunicorn with multiple workers (`workers > 1`)\n- Proxying multiple services (using ASGI routing)\n- Each worker maintains its own session state, with no session sharing between processes\n\n## Solution\nI resolved this issue by setting the worker count to 1:\n```bash\n# Before\nworkers=$(nproc --all)  # Use all available CPU cores\n\n# After\nworkers=1  # Use single worker to maintain session consistency\n```\n\nHowever, this is not an ideal solution as it limits the service's scalability.\n\n## Suggested improvements\n1. Implement distributed session storage (e.g., Redis) in the MCP server to allow multiple workers to share session state\n2. Document the MCP server's session management limitations in multi-process environments\n3. Provide session recovery/reconnection mechanisms to handle session disconnections\n\n## Additional context\n- Server code (`session.py`) shows that session state is stored in process memory\n- In our implementation, we solved the problem by separating the MCP service from the main application, deploying it independently with a single worker\n- Regular ping operations can mitigate the issue but cannot completely solve the session state sharing problem in multi-process environments\n\n## Potential solution approach\nCould the MCP server be modified to add a session storage abstraction layer that allows users to configure different session storage backends (memory, Redis, file, etc.) to support distributed deployments?",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/520/reactions",
        "total_count": 12,
        "+1": 11,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 1
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": [
        1519
      ]
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/514",
      "id": 2994309207,
      "node_id": "I_kwDOM2n80s6yeYhX",
      "number": 514,
      "title": "FastMCP server with SSE transport fails to shut down on a signal",
      "user": {
        "login": "growler",
        "id": 166108,
        "node_id": "MDQ6VXNlcjE2NjEwOA==",
        "avatar_url": "https://avatars.githubusercontent.com/u/166108?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/growler",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 7511840554,
          "node_id": "LA_kwDOM2n80s8AAAABv72XKg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/bug",
          "name": "bug",
          "color": "d73a4a",
          "default": true,
          "description": "Something isn't working"
        },
        "1": {
          "id": 9354761244,
          "node_id": "LA_kwDOM2n80s8AAAACLZZUHA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/ready%20for%20work",
          "name": "ready for work",
          "color": "2b9402",
          "default": false,
          "description": "Enough information for someone to start working on"
        },
        "2": {
          "id": 9354772110,
          "node_id": "LA_kwDOM2n80s8AAAACLZZ-jg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P3",
          "name": "P3",
          "color": "c7df49",
          "default": false,
          "description": "Nice to haves, rare edge cases"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 11,
      "created_at": "2025-04-14T21:46:41Z",
      "updated_at": "2025-11-28T10:10:40Z",
      "closed_at": null,
      "author_association": "NONE",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "A very simple server fails to shut down on a signal if it processed at least one request:\n\n```\n❯ python test-server.py --port=8085\nINFO:     Started server process [216035]\nINFO:     Waiting for application startup.\nINFO:     Application startup complete.\nINFO:     Uvicorn running on http://0.0.0.0:8085 (Press CTRL+C to quit)\nINFO:     127.0.0.1:55188 - \"GET /sse HTTP/1.1\" 200 OK\nINFO:     127.0.0.1:55192 - \"POST /messages/?session_id=e690de9733914d09aebf2b0e8c78191c HTTP/1.1\" 202 Accepted\nINFO:     127.0.0.1:55192 - \"POST /messages/?session_id=e690de9733914d09aebf2b0e8c78191c HTTP/1.1\" 202 Accepted\nINFO:     127.0.0.1:55192 - \"POST /messages/?session_id=e690de9733914d09aebf2b0e8c78191c HTTP/1.1\" 202 Accepted\nProcessing request of type CallToolRequest\n^CINFO:     Shutting down\nINFO:     Waiting for background tasks to complete. (CTRL+C to force quit)\n```\n\nThe expected behaviour would be:\n\n```\n❯ python test-server.py --port=8085\nINFO:     Started server process [216006]\nINFO:     Waiting for application startup.\nINFO:     Application startup complete.\nINFO:     Uvicorn running on http://0.0.0.0:8085 (Press CTRL+C to quit)\n^CINFO:     Shutting down\nINFO:     Waiting for application shutdown.\nINFO:     Application shutdown complete.\nINFO:     Finished server process [216006]\n```\n\nHere is the code for both the server and the client.\n\nWhat do I miss?\n\nthe server\n\n```\nimport click\nimport sys\nfrom pydantic import Field\nfrom mcp.server.fastmcp import FastMCP\n\n@click.command()\n@click.option(\"--port\", default=8085, help=\"Port to listen\", type=int)\ndef main(port: int):\n    mcp = FastMCP(\n        \"mcp-echo-tool\",\n        debug=True,\n        log_level=\"INFO\",\n        port=port,\n    )\n\n    @mcp.tool(name=\"echo\")\n    async def echo_tool(string: str = Field(description=\"A string to echo back\")) -> str:\n        \"\"\"Echoes back the input string\"\"\"\n        return string\n\n    mcp.run(transport='sse')\n    return 0\n\nif __name__ == \"__main__\":\n    sys.exit(main())\n```\n\nand the client\n\n```\nimport asyncio\nimport click\nimport sys\nfrom mcp.client.session import ClientSession\nfrom mcp.client.sse import sse_client\n\nasync def client(url, string):\n    async with sse_client(url) as (read, write):\n        async with ClientSession(read, write) as session:\n            await session.initialize()\n            result = await session.call_tool(\"echo\", {\"string\": string})\n            print(result.content)\n\n@click.command()\n@click.option('--url', default='http://localhost:8085', help='MCP Server URL', type=str)\n@click.argument('string', type=str)\ndef main(url: str, string: str):\n    asyncio.run(client(url, string))\n\nif __name__ == \"__main__\":\n    sys.exit(main())\n```\n\n",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/514/reactions",
        "total_count": 6,
        "+1": 6,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/509",
      "id": 2993068805,
      "node_id": "I_kwDOM2n80s6yZpsF",
      "number": 509,
      "title": "Force returning tool result/ressource as artifact without regeneration",
      "user": {
        "login": "maxschulz-COL",
        "id": 83698606,
        "node_id": "MDQ6VXNlcjgzNjk4NjA2",
        "avatar_url": "https://avatars.githubusercontent.com/u/83698606?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/maxschulz-COL",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 9354757189,
          "node_id": "LA_kwDOM2n80s8AAAACLZZERQ",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/enhancement",
          "name": "enhancement",
          "color": "11b5cc",
          "default": true,
          "description": "Request for a new feature that's not currently supported"
        },
        "1": {
          "id": 9354761244,
          "node_id": "LA_kwDOM2n80s8AAAACLZZUHA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/ready%20for%20work",
          "name": "ready for work",
          "color": "2b9402",
          "default": false,
          "description": "Enough information for someone to start working on"
        },
        "2": {
          "id": 9354770246,
          "node_id": "LA_kwDOM2n80s8AAAACLZZ3Rg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P2",
          "name": "P2",
          "color": "d2b457",
          "default": false,
          "description": "Moderate issues affecting some users, edge cases, potentially valuable feature"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 3,
      "created_at": "2025-04-14T13:22:47Z",
      "updated_at": "2025-10-07T13:02:58Z",
      "closed_at": null,
      "author_association": "NONE",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "**Is your feature request related to a problem? Please describe.**\nThe problem I am facing is that I am currently creating an MCP server that through tools creates artifacts (python code, html code)\n\nThere is no problem in the model receiving the outcome, but when it presents it in the chat, it essentially regenerates it which causes the following problems:\n- slight alterations\n- token usage\n- speed\n\n**Describe the solution you'd like**\nI would like to be able to enforce the direct return of the tool/ressource. \n\nIf using Claude desktop, I would like to even return the output as an artifact, but that is of course specific to anthropic/Claude\n\n_Examples:_\n- Tool creates a custom URL, Ideally this becomes visible in chat as is, quickly and without alteration\n- Tool creates Python code, ideally this is just visible as is in the chat OR even claude artifacts\n\n**Describe alternatives you've considered**\nI have tried to prompt/describe my tools to enforce this, but this did not work\n\n**Additional context**\nI am not sure if this is the correct place to ask, but would be very keen to discuss this as I can imagine it is a common problem?\n\nI can also help refine the problem statement a bit more if that's of interest\n",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/509/reactions",
        "total_count": 4,
        "+1": 4,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/503",
      "id": 2991533061,
      "node_id": "I_kwDOM2n80s6yTywF",
      "number": 503,
      "title": "Unable to work properly with SSE transport when perform long time task",
      "user": {
        "login": "huang-sh",
        "id": 24741118,
        "node_id": "MDQ6VXNlcjI0NzQxMTE4",
        "avatar_url": "https://avatars.githubusercontent.com/u/24741118?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/huang-sh",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 7511840554,
          "node_id": "LA_kwDOM2n80s8AAAABv72XKg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/bug",
          "name": "bug",
          "color": "d73a4a",
          "default": true,
          "description": "Something isn't working"
        },
        "1": {
          "id": 9287721887,
          "node_id": "LA_kwDOM2n80s8AAAACKZdjnw",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/needs%20repro",
          "name": "needs repro",
          "color": "e35211",
          "default": false,
          "description": "needs additional information to be able to reproduce bug"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 2,
      "created_at": "2025-04-13T22:45:57Z",
      "updated_at": "2025-10-03T13:13:03Z",
      "closed_at": null,
      "author_association": "NONE",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "Dear mcp team,\n\n**Describe the bug**\nI'm building an mcp-server that reads large files, which can be time-consuming.\n\nWhen using stdio as the transport, everything works well. However, when switching to sse, the server fails to work properly. Could you provide some help?\n\n```\nWARNING:root:Failed to validate notification: RequestResponder must be used as a context manager. \nMessage was: method='notifications/cancelled' params={'requestId': 2, 'reason': 'McpError: MCP error -32001: Request timed out'} jsonrpc='2.0'\n```\n\n```\n{\n    \"isError\": true,\n    \"content\": [\n      {\n        \"type\": \"text\",\n        \"text\": \"Error calling tool read_h5ad: {}\"\n      }\n    ]\n  }\n```\n\n\nsse start code \n```\n## Create application using SSE transport\ndef create_sse_app(port=8000):\n    \"\"\"\n    Create application using SSE transport\n    \n    Parameters:\n        port: Server port number\n        \n    Returns:\n        Starlette application instance\n    \"\"\"\n    from starlette.applications import Starlette\n    from starlette.routing import Route, Mount\n    from starlette.requests import Request\n    from mcp.server.sse import SseServerTransport\n    \n    # Create SSE transport object\n    sse = SseServerTransport(\"/messages/\")\n\n    # Define SSE handler function\n    async def handle_sse(request):\n        async with sse.connect_sse(\n            request.scope, request.receive, request._send\n        ) as streams:\n            await server.run(\n                streams[0], streams[1], \n                InitializationOptions(\n                    server_name=f\"scanpy-mcp-{MODULE}\",\n                    server_version=\"0.1.2\",\n                    capabilities=server.get_capabilities(\n                        notification_options=NotificationOptions(),\n                        experimental_capabilities={},\n                    ),\n                )\n            )\n\n    # Create Starlette application\n    starlette_app = Starlette(\n        routes=[\n            Route(\"/sse\", endpoint=handle_sse),\n            Mount(\"/messages/\", app=sse.handle_post_message),\n            Route(\"/figures/{figure_name}\", endpoint=get_figure),\n        ]\n    )\n    \n    return starlette_app\n\nimport uvicorn\napp = create_sse_app(port=port)\nuvicorn.run(app, host=\"0.0.0.0\", port=port)\n```",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/503/reactions",
        "total_count": 0,
        "+1": 0,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/498",
      "id": 2990493183,
      "node_id": "I_kwDOM2n80s6yP03_",
      "number": 498,
      "title": "How do python clients and servers use prompt",
      "user": {
        "login": "dgzxx-2000",
        "id": 204829314,
        "node_id": "U_kgDODDVygg",
        "avatar_url": "https://avatars.githubusercontent.com/u/204829314?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/dgzxx-2000",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 7511840560,
          "node_id": "LA_kwDOM2n80s8AAAABv72XMA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/documentation",
          "name": "documentation",
          "color": "0075ca",
          "default": true,
          "description": "Improvements or additions to documentation"
        },
        "1": {
          "id": 9354761244,
          "node_id": "LA_kwDOM2n80s8AAAACLZZUHA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/ready%20for%20work",
          "name": "ready for work",
          "color": "2b9402",
          "default": false,
          "description": "Enough information for someone to start working on"
        },
        "2": {
          "id": 9354767859,
          "node_id": "LA_kwDOM2n80s8AAAACLZZt8w",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P1",
          "name": "P1",
          "color": "895d17",
          "default": false,
          "description": "Significant bug affecting many users, highly requested feature"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 4,
      "created_at": "2025-04-12T14:08:52Z",
      "updated_at": "2025-10-07T15:23:31Z",
      "closed_at": null,
      "author_association": "NONE",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "How does the client call and how does the server use the mcp.prompt wrapped function\n\neg\n\nfrom mcp.server.fastmcp import FastMCP\nfrom mcp.server.fastmcp.prompts import base\n\nmcp = FastMCP(\"My App\")\n\n\n@mcp.prompt()\ndef review_code(code: str) -> str:\n    return f\"Please review this code:\\n\\n{code}\"\n\n\n@mcp.prompt()\ndef debug_error(error: str) -> list[base.Message]:\n    return [\n        base.UserMessage(\"I'm seeing this error:\"),\n        base.UserMessage(error),\n        base.AssistantMessage(\"I'll help debug that. What have you tried so far?\"),\n    ]\n\n",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/498/reactions",
        "total_count": 2,
        "+1": 2,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/486",
      "id": 2987763956,
      "node_id": "I_kwDOM2n80s6yFaj0",
      "number": 486,
      "title": "Support generate input schema from  \"Args\" part of func doc with decorater @mcp.tool()",
      "user": {
        "login": "ddrcrow",
        "id": 155370419,
        "node_id": "U_kgDOCULDsw",
        "avatar_url": "https://avatars.githubusercontent.com/u/155370419?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/ddrcrow",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 7511840581,
          "node_id": "LA_kwDOM2n80s8AAAABv72XRQ",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/good%20first%20issue",
          "name": "good first issue",
          "color": "7057ff",
          "default": true,
          "description": "Good for newcomers"
        },
        "1": {
          "id": 9354757189,
          "node_id": "LA_kwDOM2n80s8AAAACLZZERQ",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/enhancement",
          "name": "enhancement",
          "color": "11b5cc",
          "default": true,
          "description": "Request for a new feature that's not currently supported"
        },
        "2": {
          "id": 9354761244,
          "node_id": "LA_kwDOM2n80s8AAAACLZZUHA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/ready%20for%20work",
          "name": "ready for work",
          "color": "2b9402",
          "default": false,
          "description": "Enough information for someone to start working on"
        },
        "3": {
          "id": 9354772110,
          "node_id": "LA_kwDOM2n80s8AAAACLZZ-jg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P3",
          "name": "P3",
          "color": "c7df49",
          "default": false,
          "description": "Nice to haves, rare edge cases"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 2,
      "created_at": "2025-04-11T07:04:51Z",
      "updated_at": "2025-11-12T18:31:20Z",
      "closed_at": null,
      "author_association": "NONE",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "**Is your feature request related to a problem? Please describe.**\nCurrent decorator @mcp.tool can only get the function doc as the function description which indicates what the function does.\nbut the \"Args\" part is not extracted to generate the parameter schema. this missing leads the client side unable to call the tool with correct parameters. \n\n**Describe the solution you'd like**\nalthough it can be implemented with @server.list_tools, but since the mcp.tool() decorator already add tool in a tool manager, implementing it in @mcp.tool() will be more convenient and readable.\n\n**Describe alternatives you've considered**\nserver.list_tools may be a alternative, but I don't know if it will be conflict with the mcp.tool() decorator, and the mixing is not beautiful at all\n\n**Additional context**\nAdd any other context or screenshots about the feature request here.\n",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/486/reactions",
        "total_count": 10,
        "+1": 9,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 1,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/485",
      "id": 2987668515,
      "node_id": "I_kwDOM2n80s6yFDQj",
      "number": 485,
      "title": "How to get session_id in tool",
      "user": {
        "login": "bhxiaoxinba",
        "id": 35289615,
        "node_id": "MDQ6VXNlcjM1Mjg5NjE1",
        "avatar_url": "https://avatars.githubusercontent.com/u/35289615?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/bhxiaoxinba",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 9354757189,
          "node_id": "LA_kwDOM2n80s8AAAACLZZERQ",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/enhancement",
          "name": "enhancement",
          "color": "11b5cc",
          "default": true,
          "description": "Request for a new feature that's not currently supported"
        },
        "1": {
          "id": 9354761244,
          "node_id": "LA_kwDOM2n80s8AAAACLZZUHA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/ready%20for%20work",
          "name": "ready for work",
          "color": "2b9402",
          "default": false,
          "description": "Enough information for someone to start working on"
        },
        "2": {
          "id": 9354767859,
          "node_id": "LA_kwDOM2n80s8AAAACLZZt8w",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P1",
          "name": "P1",
          "color": "895d17",
          "default": false,
          "description": "Significant bug affecting many users, highly requested feature"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 5,
      "created_at": "2025-04-11T06:22:07Z",
      "updated_at": "2025-10-07T15:56:50Z",
      "closed_at": null,
      "author_association": "NONE",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "in the function of  @mcp.tool , i want to get session_id, how i can get it?",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/485/reactions",
        "total_count": 1,
        "+1": 1,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/472",
      "id": 2984908636,
      "node_id": "I_kwDOM2n80s6x6hdc",
      "number": 472,
      "title": "can we call tools and return steaming output?",
      "user": {
        "login": "guanyang-nb",
        "id": 77432355,
        "node_id": "MDQ6VXNlcjc3NDMyMzU1",
        "avatar_url": "https://avatars.githubusercontent.com/u/77432355?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/guanyang-nb",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 9354757189,
          "node_id": "LA_kwDOM2n80s8AAAACLZZERQ",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/enhancement",
          "name": "enhancement",
          "color": "11b5cc",
          "default": true,
          "description": "Request for a new feature that's not currently supported"
        },
        "1": {
          "id": 9354761244,
          "node_id": "LA_kwDOM2n80s8AAAACLZZUHA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/ready%20for%20work",
          "name": "ready for work",
          "color": "2b9402",
          "default": false,
          "description": "Enough information for someone to start working on"
        },
        "2": {
          "id": 9354765360,
          "node_id": "LA_kwDOM2n80s8AAAACLZZkMA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P0",
          "name": "P0",
          "color": "a81d34",
          "default": false,
          "description": "Broken core functionality, security issues, critical missing feature"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 6,
      "created_at": "2025-04-10T08:33:52Z",
      "updated_at": "2025-11-12T17:43:06Z",
      "closed_at": null,
      "author_association": "NONE",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "such as \n@mcp.tool()\nasync def function(text: str):\n\n    url =URL\n\n    headers = {\n        \"User-Agent\": USER_AGENT\n    }\n\n    async with httpx.AsyncClient() as client:\n        try:\n            async with client.stream(\"POST\", url, headers=headers, json={\"text\": text}, timeout=100) as response:\n                response.raise_for_status()\n                async for chunk in response.aiter_bytes():\n                    yield chunk\n        except Exception as e:\n            print(\"error\", e)",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/472/reactions",
        "total_count": 5,
        "+1": 5,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/457",
      "id": 2980469326,
      "node_id": "I_kwDOM2n80s6xplpO",
      "number": 457,
      "title": "Documentation for mcp command flags",
      "user": {
        "login": "alnickle",
        "id": 97119522,
        "node_id": "U_kgDOBcntIg",
        "avatar_url": "https://avatars.githubusercontent.com/u/97119522?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/alnickle",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 7511840560,
          "node_id": "LA_kwDOM2n80s8AAAABv72XMA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/documentation",
          "name": "documentation",
          "color": "0075ca",
          "default": true,
          "description": "Improvements or additions to documentation"
        },
        "1": {
          "id": 9354761244,
          "node_id": "LA_kwDOM2n80s8AAAACLZZUHA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/ready%20for%20work",
          "name": "ready for work",
          "color": "2b9402",
          "default": false,
          "description": "Enough information for someone to start working on"
        },
        "2": {
          "id": 9354767859,
          "node_id": "LA_kwDOM2n80s8AAAACLZZt8w",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P1",
          "name": "P1",
          "color": "895d17",
          "default": false,
          "description": "Significant bug affecting many users, highly requested feature"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 1,
      "created_at": "2025-04-08T17:22:14Z",
      "updated_at": "2025-10-07T15:26:35Z",
      "closed_at": null,
      "author_association": "NONE",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "**Is your feature request related to a problem? Please describe.**\nThe documentation doesn't mention the `-t, --transport` command flag for `mcp run <filename>.py`. I was unable to get Cursor to connect to my locally-running MCP server correctly without explicitly setting the transport flag, which I only discovered from reading the code (running in Ubuntu).\n\n**Describe the solution you'd like**\nThe `-t, --transport` flag (and all other flags for mcp commands) should be documented in the README.md so that devs and LLMs alike can have the necessary context to connect.\n",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/457/reactions",
        "total_count": 0,
        "+1": 0,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/447",
      "id": 2976691918,
      "node_id": "I_kwDOM2n80s6xbLbO",
      "number": 447,
      "title": "sse_client blocks indefinitely when server has incorrect base URL",
      "user": {
        "login": "Kudryavkaz",
        "id": 123923640,
        "node_id": "U_kgDOB2LsuA",
        "avatar_url": "https://avatars.githubusercontent.com/u/123923640?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/Kudryavkaz",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 7511840554,
          "node_id": "LA_kwDOM2n80s8AAAABv72XKg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/bug",
          "name": "bug",
          "color": "d73a4a",
          "default": true,
          "description": "Something isn't working"
        },
        "1": {
          "id": 9082681979,
          "node_id": "LA_kwDOM2n80s8AAAACHV66ew",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/needs%20confirmation",
          "name": "needs confirmation",
          "color": "aaaaaa",
          "default": false,
          "description": "Needs confirmation that the PR is actually required or needed."
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 11,
      "created_at": "2025-04-07T12:24:44Z",
      "updated_at": "2025-10-03T13:52:24Z",
      "closed_at": null,
      "author_association": "NONE",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "**Describe the bug**\nWhen using the `sse_client` function to connect to a remote MCP server, if the MCP server sets an incorrect base URL (like http://localhost:8080), the `sse_client` will raise an exception in the following code:\nhttps://github.com/modelcontextprotocol/python-sdk/blob/c2ca8e03e046908935d089a2ceed4e80b0c29a24/src/mcp/client/sse.py#L81\n\nThe `read_stream_writer` then sends this exception to the `read_stream`:\nhttps://github.com/modelcontextprotocol/python-sdk/blob/c2ca8e03e046908935d089a2ceed4e80b0c29a24/src/mcp/client/sse.py#L107\n\nHowever, since the `read_stream` has not been yielded yet, the exception will never be received.\nAs a result, the `sse_client` will be blocked indefinitely.\n\n**To Reproduce**\n1. Set up an MCP server with an incorrect base URL on a remote server, for example:\n```typescript\nimport express, { Request, Response } from 'express';\nimport { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';\nimport { SSEServerTransport } from '@modelcontextprotocol/sdk/server/sse.js';\nimport { z } from 'zod';\n\nconst server = new McpServer({\n    name: 'example-server',\n    version: '1.0.0',\n});\n\nserver.tool(\n  \"calculate-bmi\",\n  {\n    weightKg: z.number(),\n    heightM: z.number()\n  },\n  async ({ weightKg, heightM }) => ({\n    content: [{\n      type: \"text\",\n      text: String(weightKg / (heightM * heightM))\n    }]\n  })\n);\n\nconst app = express();\n\nconst transports: { [sessionId: string]: SSEServerTransport } = {};\n\napp.get('/sse', async (_: Request, res: Response) => {\n    // set baseUrl for the transport\n    const baseUrl = 'http://localhost:8080';\n    const transport = new SSEServerTransport(`${baseUrl}/messages`, res);\n    transports[transport.sessionId] = transport;\n    res.on('close', () => {\n        delete transports[transport.sessionId];\n    });\n    await server.connect(transport);\n});\n\napp.post('/messages', async (req: Request, res: Response) => {\n    const sessionId = req.query.sessionId as string;\n    const transport = transports[sessionId];\n    if (transport) {\n        await transport.handlePostMessage(req, res);\n    } else {\n        res.status(400).send('No transport found for sessionId');\n    }\n});\n\napp.listen(8080);\n```\n\n2. Try to connect to the remote MCP server, for example:\n```python\nimport asyncio\n\nfrom mcp.client.sse import sse_client\n\n\nasync def run():\n    try:\n        async with sse_client(\"http://{your_remote_server}:8080/sse\"):\n            print(\"Connected to SSE endpoint successfully.\")\n    except Exception as e:\n        print(f\"Error: {e}\")\n\n\nif __name__ == \"__main__\":\n    asyncio.run(run())\n```\n\n**Expected behavior**\nThe sse_client should raise an exception and exit gracefully.\n\n**Logs**\nNone\n\n**Additional context**\nNone",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/447/reactions",
        "total_count": 0,
        "+1": 0,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/436",
      "id": 2974530995,
      "node_id": "I_kwDOM2n80s6xS72z",
      "number": 436,
      "title": "Question: How to get a resource argument containing \"/\" ?",
      "user": {
        "login": "Gelembjuk",
        "id": 1552191,
        "node_id": "MDQ6VXNlcjE1NTIxOTE=",
        "avatar_url": "https://avatars.githubusercontent.com/u/1552191?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/Gelembjuk",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 7511840554,
          "node_id": "LA_kwDOM2n80s8AAAABv72XKg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/bug",
          "name": "bug",
          "color": "d73a4a",
          "default": true,
          "description": "Something isn't working"
        },
        "1": {
          "id": 9354761244,
          "node_id": "LA_kwDOM2n80s8AAAACLZZUHA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/ready%20for%20work",
          "name": "ready for work",
          "color": "2b9402",
          "default": false,
          "description": "Enough information for someone to start working on"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 6,
      "created_at": "2025-04-05T22:07:29Z",
      "updated_at": "2025-12-04T09:45:45Z",
      "closed_at": null,
      "author_association": "NONE",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "I want to make the resource like\n\n`@mcp.resource(\"folder://{path}\")\ndef folder_contents(path: str) -> list[str]:`\n\nThe path should be something like xxx/. or xxx/abc/zzz/\n\nWith the @mcp.resource(\"folder://{path}\") it doesn't work. Is there a way to implement it?",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/436/reactions",
        "total_count": 0,
        "+1": 0,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/431",
      "id": 2973391673,
      "node_id": "I_kwDOM2n80s6xOls5",
      "number": 431,
      "title": "Question: How to authorise a client with Bearer header with SSE?",
      "user": {
        "login": "Gelembjuk",
        "id": 1552191,
        "node_id": "MDQ6VXNlcjE1NTIxOTE=",
        "avatar_url": "https://avatars.githubusercontent.com/u/1552191?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/Gelembjuk",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 7511840560,
          "node_id": "LA_kwDOM2n80s8AAAABv72XMA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/documentation",
          "name": "documentation",
          "color": "0075ca",
          "default": true,
          "description": "Improvements or additions to documentation"
        },
        "1": {
          "id": 9301360597,
          "node_id": "LA_kwDOM2n80s8AAAACKmd_1Q",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/auth",
          "name": "auth",
          "color": "92ad2d",
          "default": false,
          "description": "Issues and PRs related to Authentication / OAuth"
        },
        "2": {
          "id": 9354761244,
          "node_id": "LA_kwDOM2n80s8AAAACLZZUHA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/ready%20for%20work",
          "name": "ready for work",
          "color": "2b9402",
          "default": false,
          "description": "Enough information for someone to start working on"
        },
        "3": {
          "id": 9354767859,
          "node_id": "LA_kwDOM2n80s8AAAACLZZt8w",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P1",
          "name": "P1",
          "color": "895d17",
          "default": false,
          "description": "Significant bug affecting many users, highly requested feature"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 17,
      "created_at": "2025-04-04T21:22:01Z",
      "updated_at": "2025-10-07T15:38:11Z",
      "closed_at": null,
      "author_association": "NONE",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "I am building the MCP server application to connect some services to LLM . \nOne of things i want to implement is authorisation of a user with the token.\n\nI see it must be possible somehow. Because MCP inspector has the Authentification and Bearer Token field\n\nMost of tutorials about MCP are related to STDIO kind of a server run. My will be SSE.\n\nThere is my code:\n\n```\nfrom mcp.server.fastmcp import FastMCP\nfrom fastapi import FastAPI, Request, Depends, HTTPException\n\napp = FastAPI()\nmcp = FastMCP(\"SMB Share Server\")\n\n@mcp.tool()\ndef create_folder(parent_path: str, name: str) -> str:\n    \"\"\"Create new subfolder in the specified path\"\"\"\n    return f\"Folder {name} created in {parent_path}\"\n\napp.mount(\"/\", mcp.sse_app())\n```\n\nHow can i read Authorization header in case if it is sent by the client?\n\nI tried to use approaches of FastAPI - setting dependency, adding request:Request to arguments but this doesn't work.\n\nIs there a way?",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/431/reactions",
        "total_count": 0,
        "+1": 0,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/423",
      "id": 2970806952,
      "node_id": "I_kwDOM2n80s6xEuqo",
      "number": 423,
      "title": "MCP SSE Server: Received request before initialization was complete",
      "user": {
        "login": "folkvir",
        "id": 7128943,
        "node_id": "MDQ6VXNlcjcxMjg5NDM=",
        "avatar_url": "https://avatars.githubusercontent.com/u/7128943?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/folkvir",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 7511840554,
          "node_id": "LA_kwDOM2n80s8AAAABv72XKg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/bug",
          "name": "bug",
          "color": "d73a4a",
          "default": true,
          "description": "Something isn't working"
        },
        "1": {
          "id": 9354761244,
          "node_id": "LA_kwDOM2n80s8AAAACLZZUHA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/ready%20for%20work",
          "name": "ready for work",
          "color": "2b9402",
          "default": false,
          "description": "Enough information for someone to start working on"
        },
        "2": {
          "id": 9354770246,
          "node_id": "LA_kwDOM2n80s8AAAACLZZ3Rg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P2",
          "name": "P2",
          "color": "d2b457",
          "default": false,
          "description": "Moderate issues affecting some users, edge cases, potentially valuable feature"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/milestones/20",
        "id": 13810645,
        "node_id": "MI_kwDOM2n80s4A0rvV",
        "number": 20,
        "title": "SSE Transport Issues",
        "description": null,
        "creator": {
          "login": "felixweinberger",
          "id": 3823880,
          "node_id": "MDQ6VXNlcjM4MjM4ODA=",
          "avatar_url": "https://avatars.githubusercontent.com/u/3823880?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/felixweinberger",
          "type": "User",
          "user_view_type": "public",
          "site_admin": false
        },
        "open_issues": 2,
        "closed_issues": 0,
        "state": "open",
        "created_at": "2025-10-03T10:49:04Z",
        "updated_at": "2025-10-03T10:57:50Z",
        "due_on": null,
        "closed_at": null
      },
      "comments": 23,
      "created_at": "2025-04-03T22:11:23Z",
      "updated_at": "2025-10-03T11:00:41Z",
      "closed_at": null,
      "author_association": "NONE",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "**Describe the bug**\n\nThe MCP server receives `Received request before initialization was complete` after a second deployment when a client is trying to list the different tools or even when it tries to run a tool on the server.\n\n**To Reproduce**\n\nSImple main.py which is one of your examples\n```python\nimport httpx\nfrom mcp.server.fastmcp import FastMCP\n\nmcp = FastMCP(\"My App\")\n\n\n@mcp.tool()\ndef calculate_bmi(weight_kg: float, height_m: float) -> float:\n    \"\"\"Calculate BMI given weight in kg and height in meters\"\"\"\n    return weight_kg / (height_m**2)\n\n\n@mcp.tool()\nasync def fetch_weather(city: str) -> str:\n    \"\"\"Fetch current weather for a city\"\"\"\n    async with httpx.AsyncClient() as client:\n        response = await client.get(f\"https://api.weather.com/{city}\")\n        return response.text\n\napp = mcp.sse_app()\n```\n\n* Start using uvicorn `FASTMCP_LOG_LEVEL=DEBUG uv run uvicorn main:app --port=8001 --host=0.0.0.0 --timeout-graceful-shutdown 5`\n\n* Run the inspector in SSE mode and listen on `http://localhost:8001/see`. You will be able to list tools.\n* But now, reload you server to simulate a new deployment using the same command: `FASTMCP_LOG_LEVEL=DEBUG uv run uvicorn main:app --port=8001 --host=0.0.0.0 --timeout-graceful-shutdown 5`\n* Go to the inspector and try to list the tools, it will timeout and you'll get the following server logs\n\n```bash\nFASTMCP_LOG_LEVEL=DEBUG uv run uvicorn main:app --port=8001 --host=0.0.0.0 --timeout-graceful-shutdown 5                                       \n[04/03/25 23:48:40] DEBUG    SseServerTransport initialized with endpoint: /messages/                                                                                                 sse.py:79\nINFO:     Started server process [89042]\nINFO:     Waiting for application startup.\nINFO:     Application startup complete.\nINFO:     Uvicorn running on http://0.0.0.0:8001 (Press CTRL+C to quit)\n[04/03/25 23:48:41] DEBUG    Setting up SSE connection                                                                                                                                    sse.py:87\n                    DEBUG    Created new session with ID: f55c6f64-be08-464c-bbab-203223adb44c                                                                                           sse.py:100\n                    DEBUG    Starting SSE response task                                                                                                                                  sse.py:127\n                    DEBUG    Yielding read and write streams                                                                                                                             sse.py:130\nINFO:     127.0.0.1:62930 - \"GET /sse HTTP/1.1\" 200 OK\n                    DEBUG    Starting SSE writer                                                                                                                                         sse.py:107\n                    DEBUG    Sent endpoint event: /messages/?session_id=f55c6f64be08464cbbab203223adb44c                                                                                 sse.py:110\n                    DEBUG    chunk: b'event: endpoint\\r\\ndata: /messages/?session_id=f55c6f64be08464cbbab203223adb44c\\r\\n\\r\\n'                                                           sse.py:156\n[04/03/25 23:48:45] DEBUG    Handling POST message                                                                                                                                       sse.py:136\n                    DEBUG    Parsed session ID: f55c6f64-be08-464c-bbab-203223adb44c                                                                                                     sse.py:147\nwriter:  MemoryObjectSendStream(_state=MemoryObjectStreamState(max_buffer_size=0, buffer=deque([]), open_send_channels=1, open_receive_channels=1, waiting_receivers=OrderedDict({<anyio._backends._asyncio.Event object at 0x103ff6f00>: MemoryObjectItemReceiver(task_info=AsyncIOTaskInfo(id=4386289792, name='mcp.shared.session.BaseSession._receive_loop'), item=None)}), waiting_senders=OrderedDict()), _closed=False)\n                    DEBUG    Received JSON: b'{\"jsonrpc\":\"2.0\",\"id\":3,\"method\":\"tools/list\",\"params\":{}}'                                                                                sse.py:161\n                    DEBUG    Validated client message: root=JSONRPCRequest(method='tools/list', params={}, jsonrpc='2.0', id=3)                                                          sse.py:165\n                    DEBUG    Sending message to writer: root=JSONRPCRequest(method='tools/list', params={}, jsonrpc='2.0', id=3)                                                         sse.py:173\nINFO:     127.0.0.1:62936 - \"POST /messages/?session_id=f55c6f64be08464cbbab203223adb44c HTTP/1.1\" 202 Accepted\n                    DEBUG    Got event: http.disconnect. Stop streaming.                                                                                                                 sse.py:177\nERROR:    Exception in ASGI application\n  + Exception Group Traceback (most recent call last):\n  |   File \"/Users/xxxxx/.venv/lib/python3.12/site-packages/uvicorn/protocols/http/h11_impl.py\", line 403, in run_asgi\n  |     result = await app(  # type: ignore[func-returns-value]\n  |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  |   File \"/Users/xxxxx/.venv/lib/python3.12/site-packages/uvicorn/middleware/proxy_headers.py\", line 60, in __call__\n  |     return await self.app(scope, receive, send)\n  |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  |   File \"/Users/xxxxx/.venv/lib/python3.12/site-packages/starlette/applications.py\", line 112, in __call__\n  |     await self.middleware_stack(scope, receive, send)\n  |   File \"/Users/xxxxx/.venv/lib/python3.12/site-packages/starlette/middleware/errors.py\", line 187, in __call__\n  |     raise exc\n  |   File \"/Users/xxxxx/.venv/lib/python3.12/site-packages/starlette/middleware/errors.py\", line 165, in __call__\n  |     await self.app(scope, receive, _send)\n  |   File \"/Users/xxxxx/.venv/lib/python3.12/site-packages/starlette/middleware/exceptions.py\", line 62, in __call__\n  |     await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)\n  |   File \"/Users/xxxxx/.venv/lib/python3.12/site-packages/starlette/_exception_handler.py\", line 53, in wrapped_app\n  |     raise exc\n  |   File \"/Users/xxxxx/.venv/lib/python3.12/site-packages/starlette/_exception_handler.py\", line 42, in wrapped_app\n  |     await app(scope, receive, sender)\n  |   File \"/Users/xxxxx/.venv/lib/python3.12/site-packages/starlette/routing.py\", line 714, in __call__\n  |     await self.middleware_stack(scope, receive, send)\n  |   File \"/Users/xxxxx/.venv/lib/python3.12/site-packages/starlette/routing.py\", line 734, in app\n  |     await route.handle(scope, receive, send)\n  |   File \"/Users/xxxxx/.venv/lib/python3.12/site-packages/starlette/routing.py\", line 288, in handle\n  |     await self.app(scope, receive, send)\n  |   File \"/Users/xxxxx/.venv/lib/python3.12/site-packages/starlette/routing.py\", line 76, in app\n  |     await wrap_app_handling_exceptions(app, request)(scope, receive, send)\n  |   File \"/Users/xxxxx/.venv/lib/python3.12/site-packages/starlette/_exception_handler.py\", line 53, in wrapped_app\n  |     raise exc\n  |   File \"/Users/xxxxx/.venv/lib/python3.12/site-packages/starlette/_exception_handler.py\", line 42, in wrapped_app\n  |     await app(scope, receive, sender)\n  |   File \"/Users/xxxxx/.venv/lib/python3.12/site-packages/starlette/routing.py\", line 73, in app\n  |     response = await f(request)\n  |                ^^^^^^^^^^^^^^^^\n  |   File \"/Users/xxxxx/.venv/lib/python3.12/site-packages/mcp/server/fastmcp/server.py\", line 485, in handle_sse\n  |     async with sse.connect_sse(\n  |   File \"/Users/xxxxx/.pyenv/versions/3.12.2/lib/python3.12/contextlib.py\", line 231, in __aexit__\n  |     await self.gen.athrow(value)\n  |   File \"/Users/xxxxx/.venv/lib/python3.12/site-packages/mcp/server/sse.py\", line 123, in connect_sse\n  |     async with anyio.create_task_group() as tg:\n  |   File \"/Users/xxxxx/.venv/lib/python3.12/site-packages/anyio/_backends/_asyncio.py\", line 772, in __aexit__\n  |     raise BaseExceptionGroup(\n  | ExceptionGroup: unhandled errors in a TaskGroup (1 sub-exception)\n  +-+---------------- 1 ----------------\n    | Exception Group Traceback (most recent call last):\n    |   File \"/Users/xxxxx/.venv/lib/python3.12/site-packages/mcp/server/sse.py\", line 131, in connect_sse\n    |     yield (read_stream, write_stream)\n    |   File \"/Users/xxxxx.venv/lib/python3.12/site-packages/mcp/server/fastmcp/server.py\", line 490, in handle_sse\n    |     await self._mcp_server.run(\n    |   File \"/Users/xxxxx/.venv/lib/python3.12/site-packages/mcp/server/lowlevel/server.py\", line 483, in run\n    |     async with AsyncExitStack() as stack:\n    |   File \"/Users/xxxxx/.pyenv/versions/3.12.2/lib/python3.12/contextlib.py\", line 754, in __aexit__\n    |     raise exc_details[1]\n    |   File \"/Users/xxxxx/.pyenv/versions/3.12.2/lib/python3.12/contextlib.py\", line 737, in __aexit__\n    |     cb_suppress = await cb(*exc_details)\n    |                   ^^^^^^^^^^^^^^^^^^^^^^\n    |   File \"/Users/xxxxx/.venv/lib/python3.12/site-packages/mcp/shared/session.py\", line 210, in __aexit__\n    |     return await self._task_group.__aexit__(exc_type, exc_val, exc_tb)\n    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n    |   File \"/Users/xxxxx/.venv/lib/python3.12/site-packages/anyio/_backends/_asyncio.py\", line 772, in __aexit__\n    |     raise BaseExceptionGroup(\n    | ExceptionGroup: unhandled errors in a TaskGroup (1 sub-exception)\n    +-+---------------- 1 ----------------\n      | Traceback (most recent call last):\n      |   File \"/Users/xxxxx/.venv/lib/python3.12/site-packages/mcp/shared/session.py\", line 324, in _receive_loop\n      |     await self._received_request(responder)\n      |   File \"/Users/xxxxx/.venv/lib/python3.12/site-packages/mcp/server/session.py\", line 163, in _received_request\n      |     raise RuntimeError(\n      | RuntimeError: Received request before initialization was complete\n      +------------------------------------\n[04/03/25 23:48:48] DEBUG    Setting up SSE connection                                                                                                                                    sse.py:87\n                    DEBUG    Created new session with ID: 1541ccf4-7bf9-407b-b2a2-94552715a527                                                                                           sse.py:100\n                    DEBUG    Starting SSE response task                                                                                                                                  sse.py:127\n                    DEBUG    Yielding read and write streams                                                                                                                             sse.py:130\nINFO:     127.0.0.1:62938 - \"GET /sse HTTP/1.1\" 200 OK\n                    DEBUG    Starting SSE writer                                                                                                                                         sse.py:107\n                    DEBUG    Sent endpoint event: /messages/?session_id=1541ccf47bf9407bb2a294552715a527                                                                                 sse.py:110\n                    DEBUG    chunk: b'event: endpoint\\r\\ndata: /messages/?session_id=1541ccf47bf9407bb2a294552715a527\\r\\n\\r\\n'                                                           sse.py:156\n[04/03/25 23:48:55] DEBUG    Handling POST message                                                                                                                                       sse.py:136\n                    DEBUG    Parsed session ID: 1541ccf4-7bf9-407b-b2a2-94552715a527                                                                                                     sse.py:147\nwriter:  MemoryObjectSendStream(_state=MemoryObjectStreamState(max_buffer_size=0, buffer=deque([]), open_send_channels=1, open_receive_channels=1, waiting_receivers=OrderedDict({<anyio._backends._asyncio.Event object at 0x105916510>: MemoryObjectItemReceiver(task_info=AsyncIOTaskInfo(id=4386290368, name='mcp.shared.session.BaseSession._receive_loop'), item=None)}), waiting_senders=OrderedDict()), _closed=False)\n                    DEBUG    Received JSON: b'{\"jsonrpc\":\"2.0\",\"method\":\"notifications/cancelled\",\"params\":{\"requestId\":3,\"reason\":\"Request timed out\"}}'                                sse.py:161\n                    DEBUG    Validated client message: root=JSONRPCNotification(method='notifications/cancelled', params={'requestId': 3, 'reason': 'Request timed out'}, jsonrpc='2.0') sse.py:165\n                    DEBUG    Sending message to writer: root=JSONRPCNotification(method='notifications/cancelled', params={'requestId': 3, 'reason': 'Request timed out'},               sse.py:173\n                             jsonrpc='2.0')                                                                                                                                                        \nINFO:     127.0.0.1:62945 - \"POST /messages/?session_id=1541ccf47bf9407bb2a294552715a527 HTTP/1.1\" 202 Accepted\n[04/03/25 23:49:03] DEBUG    ping: b': ping - 2025-04-03 21:49:03.579244+00:00\\r\\n\\r\\n'\n\n```\n\n**Expected behavior**\n\nSomehow, a POST message is accepted while it should not. Is it correct to accept such request?\nShouldn't we have a 404 here instead of a 200 after the second reload? 🤔  https://github.com/modelcontextprotocol/python-sdk/blob/c2ca8e03e046908935d089a2ceed4e80b0c29a24/src/mcp/server/sse.py#L153-L157\n\nEDIT: I actually tested to comment this line and it works correctly now! \n\nhttps://github.com/modelcontextprotocol/python-sdk/blob/c2ca8e03e046908935d089a2ceed4e80b0c29a24/src/mcp/server/session.py#L162-L165\n\nTested with fast-agent, LibreChat and Inspector. Even after a server reload, call tools are still working.\nIf I understand correctly the [global mechanism ](https://spec.modelcontextprotocol.io/specification/2024-11-05/architecture/#capability-negotiation) It should not be possible to have, at this point (after a server reload), a session-id corresponding to a SSE transport that should not have been initialized. So this comment actually is a patch on something that should not happen 😬 \n\n\n**Desktop:**\n - OS: MacOS 15.3\n - Browser chrome latest\n - Python 3.12\n ```\n\"mcp[cli]>=1.6.0\",\n\"starlette>=0.46.1\",\n\"uvicorn>=0.34.0\",\n```",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/423/reactions",
        "total_count": 27,
        "+1": 23,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 4
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/421",
      "id": 2969356115,
      "node_id": "I_kwDOM2n80s6w_MdT",
      "number": 421,
      "title": "Adding Opentelemetry to MCP SDK",
      "user": {
        "login": "fali007",
        "id": 28902818,
        "node_id": "MDQ6VXNlcjI4OTAyODE4",
        "avatar_url": "https://avatars.githubusercontent.com/u/28902818?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/fali007",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 9354757189,
          "node_id": "LA_kwDOM2n80s8AAAACLZZERQ",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/enhancement",
          "name": "enhancement",
          "color": "11b5cc",
          "default": true,
          "description": "Request for a new feature that's not currently supported"
        },
        "1": {
          "id": 9354761244,
          "node_id": "LA_kwDOM2n80s8AAAACLZZUHA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/ready%20for%20work",
          "name": "ready for work",
          "color": "2b9402",
          "default": false,
          "description": "Enough information for someone to start working on"
        },
        "2": {
          "id": 9354772110,
          "node_id": "LA_kwDOM2n80s8AAAACLZZ-jg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P3",
          "name": "P3",
          "color": "c7df49",
          "default": false,
          "description": "Nice to haves, rare edge cases"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": {
        "login": "Kludex",
        "id": 7353520,
        "node_id": "MDQ6VXNlcjczNTM1MjA=",
        "avatar_url": "https://avatars.githubusercontent.com/u/7353520?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/Kludex",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "assignees": {
        "0": {
          "login": "Kludex",
          "id": 7353520,
          "node_id": "MDQ6VXNlcjczNTM1MjA=",
          "avatar_url": "https://avatars.githubusercontent.com/u/7353520?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/Kludex",
          "type": "User",
          "user_view_type": "public",
          "site_admin": false
        }
      },
      "milestone": null,
      "comments": 10,
      "created_at": "2025-04-03T12:02:53Z",
      "updated_at": "2025-11-28T13:11:33Z",
      "closed_at": null,
      "author_association": "NONE",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "**Is your feature request related to a problem? Please describe.**\n\nI would like to see Opentelemetry traces and Metrics baked into SDK. \nE.g. \n1. Traces emitted on all Requests from client and server side of MCP SDK. \n2. Metrics for tool/prompt/resource calls\n\n**Describe the solution you'd like**\n\nI am trying to use Opentelemetry sdk to add traces and metrics features.\n### Steps\n1. Creating session in client and server.\n2. Initialise tracer (Opentelemetry tracer instances) in `BaseSession` (`src/mcp/shared/session.py`).\n3. Binding trace context (`traceparent`) to `_meta` of `RequestParams.Meta` before sending request from client (`send_request` in `src/mcp/shared/session.py`)\n4. In server use the `traceparent` from received request to create new span with incoming span as parent span.\n\n**Describe alternatives you've considered**\n\nI tried to implement the same via traceloop. I was not able to get correct parent - child relationship between spans while doing so.\n\n**Additional context**\n\nI am able to achieve distributed tracing across my Agentic application and MCP server.\n\n<img width=\"1728\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/2165c7ca-6283-447b-9495-a9e9406fda4f\" />",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/421/reactions",
        "total_count": 12,
        "+1": 12,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": [
        1693
      ]
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/420",
      "id": 2969040487,
      "node_id": "I_kwDOM2n80s6w9_Zn",
      "number": 420,
      "title": "Option to not rewrite the logging configuration",
      "user": {
        "login": "carlosemart",
        "id": 1837442,
        "node_id": "MDQ6VXNlcjE4Mzc0NDI=",
        "avatar_url": "https://avatars.githubusercontent.com/u/1837442?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/carlosemart",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 9354757189,
          "node_id": "LA_kwDOM2n80s8AAAACLZZERQ",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/enhancement",
          "name": "enhancement",
          "color": "11b5cc",
          "default": true,
          "description": "Request for a new feature that's not currently supported"
        },
        "1": {
          "id": 9354761244,
          "node_id": "LA_kwDOM2n80s8AAAACLZZUHA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/ready%20for%20work",
          "name": "ready for work",
          "color": "2b9402",
          "default": false,
          "description": "Enough information for someone to start working on"
        },
        "2": {
          "id": 9354767859,
          "node_id": "LA_kwDOM2n80s8AAAACLZZt8w",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P1",
          "name": "P1",
          "color": "895d17",
          "default": false,
          "description": "Significant bug affecting many users, highly requested feature"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/milestones/22",
        "id": 13811612,
        "node_id": "MI_kwDOM2n80s4A0r-c",
        "number": 22,
        "title": "FastMCP issues",
        "description": null,
        "creator": {
          "login": "felixweinberger",
          "id": 3823880,
          "node_id": "MDQ6VXNlcjM4MjM4ODA=",
          "avatar_url": "https://avatars.githubusercontent.com/u/3823880?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/felixweinberger",
          "type": "User",
          "user_view_type": "public",
          "site_admin": false
        },
        "open_issues": 10,
        "closed_issues": 1,
        "state": "open",
        "created_at": "2025-10-03T14:23:32Z",
        "updated_at": "2025-12-04T09:48:23Z",
        "due_on": null,
        "closed_at": null
      },
      "comments": 10,
      "created_at": "2025-04-03T10:14:04Z",
      "updated_at": "2025-10-07T12:16:33Z",
      "closed_at": null,
      "author_association": "NONE",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "**Is your feature request related to a problem? Please describe.**\nWe are integrating FastMcp into a larger python process that requires a custom logging handler and when initialising the FastMCP server (in our case in sse mode) we see that the logging library configuration changes with a custom configuration of the server itself.\n\n**Describe the solution you'd like**\nDefine a configuration parameter that disables the logging configuration performed by the server.\n\n**Describe alternatives you've considered**\nReviewing the configuration parameters I have seen the existence of the parameter log_level (https://github.com/modelcontextprotocol/python-sdk/blob/c2ca8e03e046908935d089a2ceed4e80b0c29a24/src/mcp/server/fastmcp/server.py#L71) and perhaps if this parameter allowed the value None this could prevent the reconfiguration from being carried out.\n\n**Additional context**\nAs far as I have been able to identify, there are two points where this configuration is being made and which should be modified:\n- The call to the configure_logging method (https://github.com/modelcontextprotocol/python-sdk/blob/c2ca8e03e046908935d089a2ceed4e80b0c29a24/src/mcp/server/fastmcp/server.py#L138), which should be prevented.\n- The configuration of uvicorn (https://github.com/modelcontextprotocol/python-sdk/blob/c2ca8e03e046908935d089a2ceed4e80b0c29a24/src/mcp/server/fastmcp/server.py#L471) that if the parameters log_config and log_level are not None also makes the change.",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/420/reactions",
        "total_count": 18,
        "+1": 18,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/412",
      "id": 2966900247,
      "node_id": "I_kwDOM2n80s6w104X",
      "number": 412,
      "title": "sse_app() ignores mount prefix, resulting in 404 from client",
      "user": {
        "login": "allieus",
        "id": 13359,
        "node_id": "MDQ6VXNlcjEzMzU5",
        "avatar_url": "https://avatars.githubusercontent.com/u/13359?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/allieus",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 7511840554,
          "node_id": "LA_kwDOM2n80s8AAAABv72XKg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/bug",
          "name": "bug",
          "color": "d73a4a",
          "default": true,
          "description": "Something isn't working"
        },
        "1": {
          "id": 9354761244,
          "node_id": "LA_kwDOM2n80s8AAAACLZZUHA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/ready%20for%20work",
          "name": "ready for work",
          "color": "2b9402",
          "default": false,
          "description": "Enough information for someone to start working on"
        },
        "2": {
          "id": 9354770246,
          "node_id": "LA_kwDOM2n80s8AAAACLZZ3Rg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P2",
          "name": "P2",
          "color": "d2b457",
          "default": false,
          "description": "Moderate issues affecting some users, edge cases, potentially valuable feature"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/milestones/23",
        "id": 13827829,
        "node_id": "MI_kwDOM2n80s4A0v71",
        "number": 23,
        "title": "Mount / Routing questions",
        "description": null,
        "creator": {
          "login": "felixweinberger",
          "id": 3823880,
          "node_id": "MDQ6VXNlcjM4MjM4ODA=",
          "avatar_url": "https://avatars.githubusercontent.com/u/3823880?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/felixweinberger",
          "type": "User",
          "user_view_type": "public",
          "site_admin": false
        },
        "open_issues": 2,
        "closed_issues": 1,
        "state": "open",
        "created_at": "2025-10-06T18:54:48Z",
        "updated_at": "2025-10-06T18:55:23Z",
        "due_on": null,
        "closed_at": null
      },
      "comments": 12,
      "created_at": "2025-04-02T16:00:51Z",
      "updated_at": "2025-10-06T18:55:01Z",
      "closed_at": null,
      "author_association": "NONE",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "**Describe the bug**\n\nWhen mounting sse_app() from FastMCP with a URL prefix using Starlette’s Mount, the SSE stream still returns the default /messages/ endpoint without the prefix. This causes the MCP client to resolve an incorrect URL (e.g., /messages/ instead of /mcp/messages/), resulting in a 404 error.\n\n**To Reproduce**\n\nSteps to reproduce the behavior:\n\n1. Define an MCP server as below:\n\n```python\nfrom mcp.server.fastmcp import FastMCP\nfrom starlette.applications import Starlette\nfrom starlette.routing import Mount\n\nmcp = FastMCP(\n    # sse_path=\"/sse\",  # default\n    # message_path=\"/messages/\",  # default\n)\n\n\napplication = Starlette(\n    routes=[\n        Mount(\"/mcp\", app=mcp.sse_app()),  # HERE !!!\n    ]\n)\n```\n\n2. Start the server and navigate to http://127.0.0.1:8000/mcp/sse in your browser\n3. Observe the response in the browser. You will receive an SSE event like:\n\n```\nevent: endpoint\ndata: /messages/?session_id=...\n```\n\nAt this point, the MCP client performs a `urljoin` operation between the SSE URL (http://127.0.0.1:8000/mcp/sse) and the endpoint path (/messages/). This causes the resolved endpoint URL to become http://127.0.0.1:8000/messages/.\n\n4. The client tries to connect to http://127.0.0.1:8000/messages/, which results in a 404.\n\n**Expected behavior**\n\nThe SSE stream should return the correct full path reflecting the prefix, e.g.:\n\n```\ndata: /mcp/messages/?session_id=...\n```\n\nThis would allow the client to connect to the actual valid message endpoint.\n\n**Screenshots**\nIf applicable, add screenshots to help explain your problem.\n\n**Desktop (please complete the following information):**\n\n - OS: macOS\n - Browser : Arc\n - Version : 1.87.1 (60573)\n\n**Smartphone (please complete the following information):**\n - Device: N/A\n - OS: N/A\n - Browser : N/A\n - Version : N/A\n\n**Additional context**\n\nThis behavior seems to originate from hardcoded endpoint generation inside sse_app():\n\nhttps://github.com/modelcontextprotocol/python-sdk/blob/c2ca8e03e046908935d089a2ceed4e80b0c29a24/src/mcp/server/sse.py#L98\n\nIt would be great to have support for specifying a prefix in sse_app() or for the prefix to be auto-detected from the ASGI scope.\n\nThank you!",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/412/reactions",
        "total_count": 13,
        "+1": 13,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/397",
      "id": 2959614058,
      "node_id": "I_kwDOM2n80s6waCBq",
      "number": 397,
      "title": "Context logging function types are not spec compliant",
      "user": {
        "login": "alejandro5042",
        "id": 3143819,
        "node_id": "MDQ6VXNlcjMxNDM4MTk=",
        "avatar_url": "https://avatars.githubusercontent.com/u/3143819?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/alejandro5042",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 7511840554,
          "node_id": "LA_kwDOM2n80s8AAAABv72XKg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/bug",
          "name": "bug",
          "color": "d73a4a",
          "default": true,
          "description": "Something isn't working"
        },
        "1": {
          "id": 7511840581,
          "node_id": "LA_kwDOM2n80s8AAAABv72XRQ",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/good%20first%20issue",
          "name": "good first issue",
          "color": "7057ff",
          "default": true,
          "description": "Good for newcomers"
        },
        "2": {
          "id": 9354761244,
          "node_id": "LA_kwDOM2n80s8AAAACLZZUHA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/ready%20for%20work",
          "name": "ready for work",
          "color": "2b9402",
          "default": false,
          "description": "Enough information for someone to start working on"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 8,
      "created_at": "2025-03-31T06:48:24Z",
      "updated_at": "2025-11-12T17:41:34Z",
      "closed_at": null,
      "author_association": "NONE",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "**Describe the bug**\n\nAccording to the MCP spec, the data that may be logged can be of any type.\n\n\n```js\n    /**\n     * The data to be logged, such as a string message or an object. Any JSON serializable type is allowed here.\n     */\n    data: unknown;\n```\n\n[MCP Schema](https://github.com/modelcontextprotocol/specification/blob/main/schema/2025-03-26/schema.ts#L833C1-L836C19)\n\nYou can even see an example [here](https://spec.modelcontextprotocol.io/specification/2025-03-26/server/utilities/logging/#log-message-notifications).\n\nHowever, `ctx.info` and friends have message typed as `str`:\n\n```python\nasync def info(self, message: str, **extra: Any) -> None:\n```\n\nEven so, the underlying `ServerSession.send_log_message` does indicate that data is `Any` type:\n\n```python\n    async def send_log_message(\n        self, level: types.LoggingLevel, data: Any, logger: str | None = None\n    ) -> None:\n```\n\nAnd so does `LoggingMessageNotificationParams`:\n\n```python\n    data: Any\n    \"\"\"\n    The data to be logged, such as a string message or an object. Any JSON serializable\n    type is allowed here.\n    \"\"\"\n```\n\nAlso, it is unclear what the `extra` parameters should be for.\n\n**To Reproduce**\nJust look at the source file:\n\nhttps://github.com/modelcontextprotocol/python-sdk/blob/main/src/mcp/server/fastmcp/server.py#L703\n\n**Expected behavior**\nThis library should follow the spec and allow any JSON serializable type to be logged.\n\nFor example, this should work without giving a type error:\n\n```python\nctx.info({\"test\": \"Hello World!\"})\n```\n\nMCP servers can use logging to send rich notifications back to the client.\n\n**Screenshots**\nIf applicable, add screenshots to help explain your problem.\n\n**Additional context**\n\n`mcp 1.4.1`\n",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/397/reactions",
        "total_count": 0,
        "+1": 0,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/396",
      "id": 2959475133,
      "node_id": "I_kwDOM2n80s6wZgG9",
      "number": 396,
      "title": "MCP Server: Inconsistent Exception Handling in @app.call_tool and Client Undetected Server Termination via Stdio",
      "user": {
        "login": "omasoud",
        "id": 16273458,
        "node_id": "MDQ6VXNlcjE2MjczNDU4",
        "avatar_url": "https://avatars.githubusercontent.com/u/16273458?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/omasoud",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 7511840554,
          "node_id": "LA_kwDOM2n80s8AAAABv72XKg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/bug",
          "name": "bug",
          "color": "d73a4a",
          "default": true,
          "description": "Something isn't working"
        },
        "1": {
          "id": 9354761244,
          "node_id": "LA_kwDOM2n80s8AAAACLZZUHA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/ready%20for%20work",
          "name": "ready for work",
          "color": "2b9402",
          "default": false,
          "description": "Enough information for someone to start working on"
        },
        "2": {
          "id": 9354772110,
          "node_id": "LA_kwDOM2n80s8AAAACLZZ-jg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P3",
          "name": "P3",
          "color": "c7df49",
          "default": false,
          "description": "Nice to haves, rare edge cases"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 1,
      "created_at": "2025-03-31T04:58:36Z",
      "updated_at": "2025-09-29T12:46:25Z",
      "closed_at": null,
      "author_association": "NONE",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "**Describe the bug**\nThere are two distinct issues observed when using the MCP Python SDK with the stdio transport:\n\n1. Inconsistent Exception Handling: Exceptions raised within handlers decorated with @app.call_tool are not correctly translated into JSON-RPC error responses sent to the client. Instead, the server catches the exception and sends a successful response where the content field contains the exception's message as plain text. This contrasts with handlers like @app.list_resources, where exceptions are correctly translated into McpError responses received by the client.\n2. Undetected Server Termination: When the server process terminates abruptly (e.g., via sys.exit(1) during a tool call), the client connected via mcp.client.stdio.stdio_client does not detect the broken pipe or EOF. Client calls awaiting a response from the terminated server hang indefinitely until an application-level timeout (like asyncio.wait_for) expires, instead of raising a transport-level error (e.g., BrokenPipeError, EOFError, anyio.EndOfStream, etc.).\n\n\n**To Reproduce**\n\n1. Save the attached minimal_server.py and minimal_client.py files.\n2. Ensure the mcp library is installed (pip install mcp).\n3. Run the client from the command line: python -m minimal_client\n4. Observe the output:\n* The \"Testing list_resources\" step correctly shows an McpError being caught.\n* The \"Testing working_tool\" step correctly shows a successful call.\n* The \"Testing normal_error_tool\" step incorrectly shows a successful call, with the ValueError message appearing inside the Result: [TextContent(...)].\n* The \"Testing exit_tool\" step hangs for the duration of the asyncio.wait_for timeout (2 seconds in the example) and then prints the timeout error message, instead of failing immediately due to the server process termination.\n\n**Expected behavior**\n\n1. Consistent Exception Handling: Exceptions raised within @app.call_tool handlers should be treated the same way as exceptions in @app.list_resources. The server should send a standard JSON-RPC error response, which the client should receive as an McpError (or a subclass thereof). The client should not receive a successful response containing the error message text.\n2. Server Termination Detection: When the server process connected via stdio terminates unexpectedly, the client's read/write operations on the transport should fail immediately with an appropriate transport-level exception (like BrokenPipeError, EOFError, anyio.EndOfStream, anyio.BrokenResourceError, etc.), allowing the client application to detect and handle the disconnection promptly without relying on application-level timeouts for pending requests.\n\n**Screenshots**\nThe console output provided in the previous conversation turn serves as evidence for the actual behavior:\n```\nPS G:\\projects\\mcp-exp> python -m minimal_client\nConnecting to server\n\n--- Testing list_resources ---\nCalling list_resources tool\nError calling list_resources\nMcpError: This is a deliberate error from list_resources\nTraceback (most recent call last):\n  File \"G:\\projects\\mcp-exp\\minimal_client.py\", line 74, in call_list_resources\n    response = await self.session.list_resources()\n               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"C:\\ProgramData\\Anaconda3\\envs\\py3128\\Lib\\site-packages\\mcp\\client\\session.py\", line 196, in list_resources\n    return await self.send_request(\n           ^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"C:\\ProgramData\\Anaconda3\\envs\\py3128\\Lib\\site-packages\\mcp\\shared\\session.py\", line 266, in send_request\n    raise McpError(response_or_error.error)\nmcp.shared.exceptions.McpError: This is a deliberate error from list_resources\n\n--- Testing working_tool ---\nCalling tool: working_tool\n\nSuccessfully called tool 'working_tool'\nResult: [TextContent(type='text', text='Hello from working_tool! Args: {}', annotations=None)]\n\n--- Testing normal_error_tool ---\nCalling tool: normal_error_tool\n\nSuccessfully called tool 'normal_error_tool'\nResult: [TextContent(type='text', text='This is a deliberate error from normal_error_tool', annotations=None)]\n\n--- Testing exit_tool ---\nCalling tool: exit_tool\nERROR calling tool 'exit_tool': Call timed out after 2.0s.\n   This is expected for 'exit_tool' due to undetected server termination.\nCleaning up client resources\n```\n\n**Desktop (please complete the following information):**\n - OS: Windows 11 (but likely affects other OS)\n - Environment: Python 3.12.8 (via Anaconda)\n - Version: MCP version 1.6.1.dev4+2ea1495\n\n\n**Additional context**\nThe minimal reproducible example files (minimal_client.py and minimal_server.py) are below (attaching .py isn't allowed). The key issue seems to be how the mcp.server handles exceptions differently based on the decorator used (@app.call_tool vs @app.list_resources) and how the mcp.client.stdio.stdio_client transport interacts with terminated subprocesses.\n\n`====minimal_server.py====`\n```python\n    import asyncio\n    import sys\n    import mcp.types as types\n    from mcp.server import Server\n    from mcp.server.stdio import stdio_server\n\n    # Create a minimal server\n    app = Server(\"minimal-server\")\n\n\n    @app.list_resources()\n    async def handle_list_resources() -> list[types.Resource]:\n        \"\"\"Handles the list_resources request.\"\"\"\n        # Simulate a deliberate error for testing purposes\n        # This will be caught by MCP and sent back to client as an error\n        raise ValueError(\"This is a deliberate error from list_resources\")\n\n\n    @app.call_tool()\n    async def handle_tool_call(name: str, arguments: dict) -> list:\n        \"\"\"Handles calls for working_tool, normal_error_tool, and exit_tool.\"\"\"\n\n        if name == \"working_tool\":\n            # Return the content part directly\n            return [\n                types.TextContent(type=\"text\", text=f'Hello from working_tool! Args: {arguments}')\n            ]\n        elif name == \"normal_error_tool\":\n            # Raise a standard Python exception\n            raise ValueError(\"This is a deliberate error from normal_error_tool\")\n            # No return needed here\n        elif name == \"exit_tool\":\n            # Abruptly terminate the server process.\n            sys.exit(1)\n            # No return needed here\n        else:\n            # Handle unknown tool names if necessary\n            raise ValueError(f\"Unknown tool: {name}\") # Or return an error content dict\n\n\n    # Main execution function\n    async def main():\n        async with stdio_server() as streams:\n            read_stream, write_stream = streams\n            await app.run(\n                read_stream,\n                write_stream,\n                app.create_initialization_options()\n            )\n\n\n    if __name__ == \"__main__\":\n        asyncio.run(main())\n```\n\n`====minimal_client.py====`\n```python\nimport asyncio\nimport traceback\nfrom typing import Optional\n\nfrom mcp import ClientSession, StdioServerParameters, McpError\nfrom mcp.client.stdio import stdio_client\nfrom contextlib import AsyncExitStack\n\n\nclass MinimalClient:\n    def __init__(self):\n        self.session: Optional[ClientSession] = None\n        self.exit_stack = AsyncExitStack()\n        self.stdio = None\n        self.write = None\n        \n    async def connect(self):\n        print(\"Connecting to server\")\n        \n        server_params = StdioServerParameters(\n            command=\"python\",\n            args=['minimal_server.py'],\n        )\n        \n        # Create stdio connection\n        stdio_transport = await self.exit_stack.enter_async_context(\n            stdio_client(server_params)\n        )\n        \n        self.stdio, self.write = stdio_transport\n        \n        # Create client session with timeout and log handler\n        self.session = await self.exit_stack.enter_async_context(\n            ClientSession(\n                self.stdio,\n                self.write\n           )\n        )\n    \n        await self.session.initialize()\n            \n        \n    async def call_tool(self, tool_name: str, timeout_seconds: float = 2.0):\n        \"\"\"Call a tool with timeout\"\"\"\n        if not self.session:\n            raise RuntimeError(\"Client not connected to server\")\n            \n        print(f\"Calling tool: {tool_name}\")\n        try:\n            #response = await self.session.call_tool(name=tool_name, arguments={})             \n            response = await asyncio.wait_for(\n                self.session.call_tool(name=tool_name, arguments={}),\n                timeout=timeout_seconds\n            )            \n            print(f\"\\nSuccessfully called tool '{tool_name}'\")\n            print(f\"Result: {response.content}\")\n            return response.content\n        except TimeoutError: # *** Catch TimeoutError ***\n            print(f\"ERROR calling tool '{tool_name}': Call timed out after {timeout_seconds}s.\")\n            print(\"   This is expected for 'exit_tool' due to undetected server termination.\")\n        except McpError as e:\n            print(f\"\\nERROR calling tool '{tool_name}':\")\n            print(f\"{type(e).__name__}: {e}\")\n            traceback.print_exc()\n\n\n    async def call_list_resources(self):\n        \"\"\"Call list_resources tool\"\"\"\n        if not self.session:\n            raise RuntimeError(\"Client not connected to server\")\n            \n        print(\"Calling list_resources tool\")\n        try:\n            response = await self.session.list_resources()\n            print(f\"Resources: {response.resources}\")\n            return response.resources\n        except McpError as e:\n            print(f\"Error calling list_resources\")\n            print(f\"{type(e).__name__}: {e}\")\n            traceback.print_exc()\n            \n            \n    async def cleanup(self):\n        \"\"\"Clean up resources\"\"\"\n        print(\"Cleaning up client resources\")\n        await self.exit_stack.aclose()\n        \n\nasync def main():\n    \n   \n    client = MinimalClient()\n    try:\n        # Connect to server\n        await client.connect()\n\n        # Test list_resources that raises an error (This is a deliberate error from handle_list_resources)\n        print(\"\\n--- Testing list_resources ---\")\n        # Ideal: Expecting the client to receive an error representing the server's ValueError\n        # Actual = Ideal (The client correctly receives an McpError, matching the ideal behavior for this specific handler type)\n        await client.call_list_resources()\n\n        # Test working tool first\n        print(\"\\n--- Testing working_tool ---\")\n        # Ideal: Expecting a successful call\n        # Actual = Ideal (The call succeeds as expected)\n        await client.call_tool(\"working_tool\")\n\n        # Test normal error tool (This is a deliberate error from normal_error_tool)\n        print(\"\\n--- Testing normal_error_tool ---\")\n        # Ideal: Expecting the client to receive an error representing the server's ValueError\n        # Actual: The client incorrectly receives a successful response containing the error message text, highlighting the inconsistent error handling for @app.call_tool.\n        await client.call_tool(\"normal_error_tool\")\n\n        # Test exit tool\n        print(\"\\n--- Testing exit_tool ---\")\n        # Ideal: Expecting the client to detect the broken stdio pipe, likely resulting in a transport-level error (e.g., BrokenPipeError, EOFError, or similar).\n        # Actual: The client fails to detect the termination and hangs until the asyncio.wait_for timeout occurs, demonstrating the core issue with termination detection.\n        await client.call_tool(\"exit_tool\")\n\n\n    except Exception as e:\n        print(f\"\\nError in main execution: {type(e).__name__}: {e}\")\n        # traceback.print_exc() # Uncomment for full traceback if needed\n    finally:\n        await client.cleanup()\n\n\nif __name__ == \"__main__\":\n    asyncio.run(main())\n```",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/396/reactions",
        "total_count": 0,
        "+1": 0,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/381",
      "id": 2952202861,
      "node_id": "I_kwDOM2n80s6v9wpt",
      "number": 381,
      "title": "Fastmcp tool parameter parsing type error",
      "user": {
        "login": "weester-yan",
        "id": 26929430,
        "node_id": "MDQ6VXNlcjI2OTI5NDMw",
        "avatar_url": "https://avatars.githubusercontent.com/u/26929430?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/weester-yan",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 7511840554,
          "node_id": "LA_kwDOM2n80s8AAAABv72XKg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/bug",
          "name": "bug",
          "color": "d73a4a",
          "default": true,
          "description": "Something isn't working"
        },
        "1": {
          "id": 9354761244,
          "node_id": "LA_kwDOM2n80s8AAAACLZZUHA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/ready%20for%20work",
          "name": "ready for work",
          "color": "2b9402",
          "default": false,
          "description": "Enough information for someone to start working on"
        },
        "2": {
          "id": 9354767859,
          "node_id": "LA_kwDOM2n80s8AAAACLZZt8w",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P1",
          "name": "P1",
          "color": "895d17",
          "default": false,
          "description": "Significant bug affecting many users, highly requested feature"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/milestones/7",
        "id": 12814448,
        "node_id": "MI_kwDOM2n80s4Aw4hw",
        "number": 7,
        "title": "r-05-25",
        "description": "",
        "creator": {
          "login": "ihrpr",
          "id": 21148364,
          "node_id": "MDQ6VXNlcjIxMTQ4MzY0",
          "avatar_url": "https://avatars.githubusercontent.com/u/21148364?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/ihrpr",
          "type": "User",
          "user_view_type": "public",
          "site_admin": false
        },
        "open_issues": 1,
        "closed_issues": 29,
        "state": "closed",
        "created_at": "2025-04-29T19:35:21Z",
        "updated_at": "2025-10-17T14:31:47Z",
        "due_on": null,
        "closed_at": "2025-09-30T11:34:56Z"
      },
      "comments": 9,
      "created_at": "2025-03-27T09:20:21Z",
      "updated_at": "2025-10-03T15:15:52Z",
      "closed_at": null,
      "author_association": "NONE",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "When I define the tool parameter as string, the parameter parsing function of fastmcp parses the numeric string I pass in into a numeric value.\n\n- mcp/server/fastmcp/utilities/func_metadata.py\n\n```\n    def pre_parse_json(self, data: dict[str, Any]) -> dict[str, Any]:\n        \"\"\"Pre-parse data from JSON.\n\n        Return a dict with same keys as input but with values parsed from JSON\n        if appropriate.\n\n        This is to handle cases like `[\"a\", \"b\", \"c\"]` being passed in as JSON inside\n        a string rather than an actual list. Claude desktop is prone to this - in fact\n        it seems incapable of NOT doing this. For sub-models, it tends to pass\n        dicts (JSON objects) as JSON strings, which can be pre-parsed here.\n        \"\"\"\n        new_data = data.copy()  # Shallow copy\n        for field_name, field_info in self.arg_model.model_fields.items():\n            import logging\n            logging.info((field_name, field_info))\n            logging.info(\"before parse: \", new_data)\n            if field_name not in data.keys():\n                continue\n            if isinstance(data[field_name], str):\n                try:\n                    pre_parsed = json.loads(data[field_name])\n                except json.JSONDecodeError:\n                    continue  # Not JSON - skip\n                if isinstance(pre_parsed, str):\n                    # This is likely that the raw value is e.g. `\"hello\"` which we\n                    # Should really be parsed as '\"hello\"' in Python - but if we parse\n                    # it as JSON it'll turn into just 'hello'. So we skip it.\n                    continue\n                new_data[field_name] = pre_parsed\n             logging.info(\"after parse: \", new_data)\n        assert new_data.keys() == data.keys()\n        return new_data\n```\n\ntest output:\n```\nvideo-1  | ('cid', FieldInfo(annotation=str, required=True, description='xxx.'))\nvideo-1  | before parse: {'cid': '1.2'}\nvideo-1  | after parse: {'cid': 1.2}\nvideo-1  | Error calling tool: Error executing tool getinfo: 1 validation error for getinfoArguments\nvideo-1  | cid\nvideo-1  |   Input should be a valid string [type=string_type, input_value=1.2, input_type=float]\nvideo-1  |     For further information visit https://errors.pydantic.dev/2.10/v/string_type\n```\n\n\nHere, json.loads will parse the incoming string \"1.2\" into the floating point number 1.2\n\nSo, when I use pydantic to define parameters in tool, a validation error occurs\n```\nfrom pydantic import validate_call, Field\n\n@server.tool(description=\"xxx\")\n@validate_call\nasync def getinfo(\n        cid: str = Field(..., description=\"xxx.\"),\n) -> bool | None:\n```\n\nIs my understanding correct?\n",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/381/reactions",
        "total_count": 0,
        "+1": 0,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/378",
      "id": 2950883140,
      "node_id": "I_kwDOM2n80s6v4udE",
      "number": 378,
      "title": "FastMCP should support all of RFC 6570",
      "user": {
        "login": "ciccolo-anthropic",
        "id": 197836308,
        "node_id": "U_kgDOC8q-FA",
        "avatar_url": "https://avatars.githubusercontent.com/u/197836308?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/ciccolo-anthropic",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 9354757189,
          "node_id": "LA_kwDOM2n80s8AAAACLZZERQ",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/enhancement",
          "name": "enhancement",
          "color": "11b5cc",
          "default": true,
          "description": "Request for a new feature that's not currently supported"
        },
        "1": {
          "id": 9354761244,
          "node_id": "LA_kwDOM2n80s8AAAACLZZUHA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/ready%20for%20work",
          "name": "ready for work",
          "color": "2b9402",
          "default": false,
          "description": "Enough information for someone to start working on"
        },
        "2": {
          "id": 9354767859,
          "node_id": "LA_kwDOM2n80s8AAAACLZZt8w",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P1",
          "name": "P1",
          "color": "895d17",
          "default": false,
          "description": "Significant bug affecting many users, highly requested feature"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 4,
      "created_at": "2025-03-26T22:10:16Z",
      "updated_at": "2025-10-07T12:53:06Z",
      "closed_at": null,
      "author_association": "CONTRIBUTOR",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "**Is your feature request related to a problem? Please describe.**\nThe MCP protocol [docs](https://github.com/modelcontextprotocol/docs/blob/main/docs/concepts/resources.mdx#resource-templates) state that resource templates are specified according to RFC 6570. But the MCP code uses a [regex](https://github.com/modelcontextprotocol/python-sdk/blob/main/src/mcp/server/fastmcp/server.py#L369) that rejects some valid URI templates. In particular, it rejects templates with multiple optional params like `search://emails{?query,start,end}`, which would be useful to have.\n\n**Describe the solution you'd like**\nFastMCP accepts and correctly handles any valid RFC 6570 template.\n\n**Describe alternatives you've considered**\nOptional params can be made mandatory with the tool treating an empty string as if the param was not set. If the full spec is too hard to implement, incrementally supporting it might still be useful.\n",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/378/reactions",
        "total_count": 1,
        "+1": 1,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/375",
      "id": 2949932336,
      "node_id": "I_kwDOM2n80s6v1GUw",
      "number": 375,
      "title": "Passing client context to tools",
      "user": {
        "login": "samirbajaj",
        "id": 37282578,
        "node_id": "MDQ6VXNlcjM3MjgyNTc4",
        "avatar_url": "https://avatars.githubusercontent.com/u/37282578?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/samirbajaj",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 9354757189,
          "node_id": "LA_kwDOM2n80s8AAAACLZZERQ",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/enhancement",
          "name": "enhancement",
          "color": "11b5cc",
          "default": true,
          "description": "Request for a new feature that's not currently supported"
        },
        "1": {
          "id": 9354761244,
          "node_id": "LA_kwDOM2n80s8AAAACLZZUHA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/ready%20for%20work",
          "name": "ready for work",
          "color": "2b9402",
          "default": false,
          "description": "Enough information for someone to start working on"
        },
        "2": {
          "id": 9354767859,
          "node_id": "LA_kwDOM2n80s8AAAACLZZt8w",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P1",
          "name": "P1",
          "color": "895d17",
          "default": false,
          "description": "Significant bug affecting many users, highly requested feature"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 5,
      "created_at": "2025-03-26T14:59:38Z",
      "updated_at": "2025-10-07T17:27:47Z",
      "closed_at": null,
      "author_association": "NONE",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "(This may be related to https://github.com/modelcontextprotocol/python-sdk/issues/373)\n\nI would like to be able to pass some \"out of band\" context to a tool in an MCP server. This would be separate from the arguments that are extracted by the LLM and provided to the tool function.\n\nHow do I pass this \"extra\" data to the tool?\n\nThank you for any help.\n",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/375/reactions",
        "total_count": 2,
        "+1": 2,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/373",
      "id": 2948417895,
      "node_id": "I_kwDOM2n80s6vvUln",
      "number": 373,
      "title": "How to set / get `client_id`?",
      "user": {
        "login": "samirbajaj",
        "id": 37282578,
        "node_id": "MDQ6VXNlcjM3MjgyNTc4",
        "avatar_url": "https://avatars.githubusercontent.com/u/37282578?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/samirbajaj",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 7511840554,
          "node_id": "LA_kwDOM2n80s8AAAABv72XKg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/bug",
          "name": "bug",
          "color": "d73a4a",
          "default": true,
          "description": "Something isn't working"
        },
        "1": {
          "id": 9354761244,
          "node_id": "LA_kwDOM2n80s8AAAACLZZUHA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/ready%20for%20work",
          "name": "ready for work",
          "color": "2b9402",
          "default": false,
          "description": "Enough information for someone to start working on"
        },
        "2": {
          "id": 9354767859,
          "node_id": "LA_kwDOM2n80s8AAAACLZZt8w",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P1",
          "name": "P1",
          "color": "895d17",
          "default": false,
          "description": "Significant bug affecting many users, highly requested feature"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 2,
      "created_at": "2025-03-26T05:10:15Z",
      "updated_at": "2025-10-07T15:59:40Z",
      "closed_at": null,
      "author_association": "NONE",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "I'd like to be able to retrieve the `client_id` from inside a tool call on an MCP server. However, it is always `None`. What do I need to set in the MCP client in order to be able to retrieve it on the server?\n\nThe client code is basically taken from the documentation:\n```\nfrom mcp import ClientSession, StdioServerParameters, types\nfrom mcp.client.stdio import stdio_client\n\nserver_params = StdioServerParameters(\n    command=\"python\",  # Executable\n    args=[\"example_server.py\"],  # Optional command line arguments\n    env=None,  # Optional environment variables\n)\n\n\nasync def run():\n    async with stdio_client(server_params) as (read, write):\n        async with ClientSession(\n            read, write\n        ) as session:\n            # Initialize the connection\n            await session.initialize()\n\n            # Call a tool\n            result = await session.call_tool(\"my_tool\")\n```\n\nThe tool function is as follows:\n\n```\nmcp = FastMCP(\"docint\")\n\n@mcp.tool()\nasync def my_tool(ctx: Context) -> Optional[str]:\n    \"\"\"\n    Extracts client ID and request ID from the context.\n\n    Returns:\n        client ID and request ID from the context.\n    \"\"\"\n    return f\"{ctx.client_id} {ctx.request_id}\" # <----- THIS\n```\n\nThis prints `None 2` (`client_id` as `None`).\n\nWhat am I missing?\n\nThank you.\n",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/373/reactions",
        "total_count": 0,
        "+1": 0,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/359",
      "id": 2942627093,
      "node_id": "I_kwDOM2n80s6vZO0V",
      "number": 359,
      "title": "stdio_client not starting in windows: getting NotImplementedError",
      "user": {
        "login": "JexinSam",
        "id": 79640466,
        "node_id": "MDQ6VXNlcjc5NjQwNDY2",
        "avatar_url": "https://avatars.githubusercontent.com/u/79640466?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/JexinSam",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 7511840554,
          "node_id": "LA_kwDOM2n80s8AAAABv72XKg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/bug",
          "name": "bug",
          "color": "d73a4a",
          "default": true,
          "description": "Something isn't working"
        },
        "1": {
          "id": 9082681979,
          "node_id": "LA_kwDOM2n80s8AAAACHV66ew",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/needs%20confirmation",
          "name": "needs confirmation",
          "color": "aaaaaa",
          "default": false,
          "description": "Needs confirmation that the PR is actually required or needed."
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 9,
      "created_at": "2025-03-24T09:38:32Z",
      "updated_at": "2025-09-26T10:23:36Z",
      "closed_at": null,
      "author_association": "NONE",
      "type": {
        "id": 23633469,
        "node_id": "IT_kwDOCt2Azc4BaJ49",
        "name": "Bug",
        "description": "An unexpected problem or behavior",
        "color": "red",
        "created_at": "2024-09-20T20:53:29Z",
        "updated_at": "2024-09-20T20:53:29Z",
        "is_enabled": true
      },
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "anyio.open_process in stdio_client not working in windows. It raises NotImplementedError.\n\n```python\nasync with stdio_client(server_params) as (read, write):\n        async with ClientSession(\n            read, write, sampling_callback=handle_sampling_message\n        ) as session:\n            # Initialize the connection\n            await session.initialize()\n```\n\nIt gives out error:\n\n```\n   async with stdio_client(server_param) as (read, write):\n  File \"C:\\Python311\\Lib\\contextlib.py\", line 204, in __aenter__\n    return await anext(self.gen)\n           ^^^^^^^^^^^^^^^^^^^^^\n  File \"C:\\Python311\\Lib\\site-packages\\mcp\\client\\stdio.py\", line 104, in stdio_client\n    process = await anyio.open_process(\n              ^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"C:\\Python311\\Lib\\site-packages\\anyio\\_core\\_subprocesses.py\", line 190, in open_process\n    return await get_async_backend().open_process(\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"C:\\Python311\\Lib\\site-packages\\anyio\\_backends\\_asyncio.py\", line 2561, in open_process\n    process = await asyncio.create_subprocess_exec(\n              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"C:\\Python311\\Lib\\asyncio\\subprocess.py\", line 218, in create_subprocess_exec\n    transport, protocol = await loop.subprocess_exec(\n                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"C:\\Python311\\Lib\\asyncio\\base_events.py\", line 1680, in subprocess_exec\n    transport = await self._make_subprocess_transport(\n                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"C:\\Python311\\Lib\\asyncio\\base_events.py\", line 502, in _make_subprocess_transport\n    raise NotImplementedError\nNotImplementedError\n```\n\n\nIs there a solution to this?",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/359/reactions",
        "total_count": 0,
        "+1": 0,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/348",
      "id": 2941022722,
      "node_id": "I_kwDOM2n80s6vTHIC",
      "number": 348,
      "title": "No way to set isError=True for arbitrary tool result content",
      "user": {
        "login": "ezyang",
        "id": 13564,
        "node_id": "MDQ6VXNlcjEzNTY0",
        "avatar_url": "https://avatars.githubusercontent.com/u/13564?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/ezyang",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 7511840581,
          "node_id": "LA_kwDOM2n80s8AAAABv72XRQ",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/good%20first%20issue",
          "name": "good first issue",
          "color": "7057ff",
          "default": true,
          "description": "Good for newcomers"
        },
        "1": {
          "id": 9354757189,
          "node_id": "LA_kwDOM2n80s8AAAACLZZERQ",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/enhancement",
          "name": "enhancement",
          "color": "11b5cc",
          "default": true,
          "description": "Request for a new feature that's not currently supported"
        },
        "2": {
          "id": 9354761244,
          "node_id": "LA_kwDOM2n80s8AAAACLZZUHA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/ready%20for%20work",
          "name": "ready for work",
          "color": "2b9402",
          "default": false,
          "description": "Enough information for someone to start working on"
        },
        "3": {
          "id": 9354772110,
          "node_id": "LA_kwDOM2n80s8AAAACLZZ-jg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P3",
          "name": "P3",
          "color": "c7df49",
          "default": false,
          "description": "Nice to haves, rare edge cases"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": {
        "login": "Kludex",
        "id": 7353520,
        "node_id": "MDQ6VXNlcjczNTM1MjA=",
        "avatar_url": "https://avatars.githubusercontent.com/u/7353520?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/Kludex",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "assignees": {
        "0": {
          "login": "Kludex",
          "id": 7353520,
          "node_id": "MDQ6VXNlcjczNTM1MjA=",
          "avatar_url": "https://avatars.githubusercontent.com/u/7353520?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/Kludex",
          "type": "User",
          "user_view_type": "public",
          "site_admin": false
        }
      },
      "milestone": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/milestones/15",
        "id": 13770333,
        "node_id": "MI_kwDOM2n80s4A0h5d",
        "number": 15,
        "title": "Error catching improvements",
        "description": null,
        "creator": {
          "login": "felixweinberger",
          "id": 3823880,
          "node_id": "MDQ6VXNlcjM4MjM4ODA=",
          "avatar_url": "https://avatars.githubusercontent.com/u/3823880?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/felixweinberger",
          "type": "User",
          "user_view_type": "public",
          "site_admin": false
        },
        "open_issues": 6,
        "closed_issues": 0,
        "state": "open",
        "created_at": "2025-09-26T16:03:50Z",
        "updated_at": "2025-10-07T17:45:27Z",
        "due_on": null,
        "closed_at": null
      },
      "comments": 1,
      "created_at": "2025-03-23T08:30:33Z",
      "updated_at": "2025-10-07T13:31:32Z",
      "closed_at": null,
      "author_association": "NONE",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "There appears to be no way to manually toggle isError=True for non-text content. For example, you can't return an image with isError=True. I noticed this when implementing a proxy using mcp.tool that recursively dispatches to call_tool. Returning content is fine, but there's no good way to make use of isError, unless you have a single string in which case you can raise an Exception and get isError toggled that way.",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/348/reactions",
        "total_count": 0,
        "+1": 0,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/339",
      "id": 2937493424,
      "node_id": "I_kwDOM2n80s6vFpew",
      "number": 339,
      "title": "[docs] How to run FastMCP with args or env vars?",
      "user": {
        "login": "exeex",
        "id": 18139162,
        "node_id": "MDQ6VXNlcjE4MTM5MTYy",
        "avatar_url": "https://avatars.githubusercontent.com/u/18139162?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/exeex",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 7511840560,
          "node_id": "LA_kwDOM2n80s8AAAABv72XMA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/documentation",
          "name": "documentation",
          "color": "0075ca",
          "default": true,
          "description": "Improvements or additions to documentation"
        },
        "1": {
          "id": 9354761244,
          "node_id": "LA_kwDOM2n80s8AAAACLZZUHA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/ready%20for%20work",
          "name": "ready for work",
          "color": "2b9402",
          "default": false,
          "description": "Enough information for someone to start working on"
        },
        "2": {
          "id": 9354770246,
          "node_id": "LA_kwDOM2n80s8AAAACLZZ3Rg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P2",
          "name": "P2",
          "color": "d2b457",
          "default": false,
          "description": "Moderate issues affecting some users, edge cases, potentially valuable feature"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 2,
      "created_at": "2025-03-21T06:57:33Z",
      "updated_at": "2025-10-07T18:04:01Z",
      "closed_at": null,
      "author_association": "NONE",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "https://github.com/modelcontextprotocol/python-sdk/tree/main?tab=readme-ov-file#development-mode\n\n```markdown\n# Development Mode\nThe fastest way to test and debug your server is with the MCP Inspector:\n\nmcp dev server.py\n\n# Add dependencies\nmcp dev server.py --with pandas --with numpy\n\n# Mount local code\nmcp dev server.py --with-editable .\n```\n\nThis didn't show how to run with args in dev mode.\nExpected to see something like this:\n\n```markdown\nmcp install server.py -v API_KEY=abc123 -v DB_URL=postgres://...\nmcp install server.py -f .env\n```\n\nHowever this is not dev mode",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/339/reactions",
        "total_count": 1,
        "+1": 1,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/309",
      "id": 2926727789,
      "node_id": "I_kwDOM2n80s6uclJt",
      "number": 309,
      "title": "Synchronous Python Client",
      "user": {
        "login": "mattzh72",
        "id": 16374343,
        "node_id": "MDQ6VXNlcjE2Mzc0MzQz",
        "avatar_url": "https://avatars.githubusercontent.com/u/16374343?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/mattzh72",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 9082681979,
          "node_id": "LA_kwDOM2n80s8AAAACHV66ew",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/needs%20confirmation",
          "name": "needs confirmation",
          "color": "aaaaaa",
          "default": false,
          "description": "Needs confirmation that the PR is actually required or needed."
        },
        "1": {
          "id": 9354757189,
          "node_id": "LA_kwDOM2n80s8AAAACLZZERQ",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/enhancement",
          "name": "enhancement",
          "color": "11b5cc",
          "default": true,
          "description": "Request for a new feature that's not currently supported"
        },
        "2": {
          "id": 9354770246,
          "node_id": "LA_kwDOM2n80s8AAAACLZZ3Rg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P2",
          "name": "P2",
          "color": "d2b457",
          "default": false,
          "description": "Moderate issues affecting some users, edge cases, potentially valuable feature"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 6,
      "created_at": "2025-03-18T00:42:12Z",
      "updated_at": "2025-11-12T17:47:07Z",
      "closed_at": null,
      "author_association": "NONE",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "We would like to have a synchronous Python client. Our code is primarily synchronous, so writing a ton of async -> sync wrapper code is tedious and bug prone. \n\n[Letta](https://github.com/letta-ai/letta) team is also happy to contribute this to the codebase.",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/309/reactions",
        "total_count": 15,
        "+1": 11,
        "-1": 1,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 3,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/301",
      "id": 2923518709,
      "node_id": "I_kwDOM2n80s6uQVr1",
      "number": 301,
      "title": "Fast MCP Server Initializes Twice",
      "user": {
        "login": "dino-su",
        "id": 1509875,
        "node_id": "MDQ6VXNlcjE1MDk4NzU=",
        "avatar_url": "https://avatars.githubusercontent.com/u/1509875?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/dino-su",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 7511840554,
          "node_id": "LA_kwDOM2n80s8AAAABv72XKg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/bug",
          "name": "bug",
          "color": "d73a4a",
          "default": true,
          "description": "Something isn't working"
        },
        "1": {
          "id": 9354761244,
          "node_id": "LA_kwDOM2n80s8AAAACLZZUHA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/ready%20for%20work",
          "name": "ready for work",
          "color": "2b9402",
          "default": false,
          "description": "Enough information for someone to start working on"
        },
        "2": {
          "id": 9354767859,
          "node_id": "LA_kwDOM2n80s8AAAACLZZt8w",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P1",
          "name": "P1",
          "color": "895d17",
          "default": false,
          "description": "Significant bug affecting many users, highly requested feature"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/milestones/22",
        "id": 13811612,
        "node_id": "MI_kwDOM2n80s4A0r-c",
        "number": 22,
        "title": "FastMCP issues",
        "description": null,
        "creator": {
          "login": "felixweinberger",
          "id": 3823880,
          "node_id": "MDQ6VXNlcjM4MjM4ODA=",
          "avatar_url": "https://avatars.githubusercontent.com/u/3823880?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/felixweinberger",
          "type": "User",
          "user_view_type": "public",
          "site_admin": false
        },
        "open_issues": 10,
        "closed_issues": 1,
        "state": "open",
        "created_at": "2025-10-03T14:23:32Z",
        "updated_at": "2025-12-04T09:48:23Z",
        "due_on": null,
        "closed_at": null
      },
      "comments": 3,
      "created_at": "2025-03-17T01:48:37Z",
      "updated_at": "2025-10-03T14:23:32Z",
      "closed_at": null,
      "author_association": "NONE",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "**Describe the bug**\n\nWhen running Fast MCP Server with the current configuration, the server initializes twice in quick succession (within ~1 second). This can be observed in the logs where the \"Initializing server...\" message appears twice, followed by two successful connections and identical initialize method calls. \n\n**To Reproduce**\n1. Configure Fast MCP Server with the following settings:\n\n```json\n\"git\": {\n  \"command\": \"uv\",\n  \"args\": [\n    \"run\",\n    \"--with\",\n    \"mcp[cli]\",\n    \"mcp\",\n    \"run\",\n    \"fastmcp_git_servers.py\"\n  ]\n}\n```\n\n2. Start the Claude Desktop app\n3. Observe the duplicate initialization messages\n\n**Observation**\n\nThe server initializes twice as shown in the logs below. Note the timestamps showing two initialization sequences less than 1 second apart:\n\n```\n2025-03-16T13:52:00.467Z [Git] [info] Initializing server...\n2025-03-16T13:52:00.491Z [Git] [info] Server started and connected successfully\n2025-03-16T13:52:00.495Z [Git] [info] Message from client: {\"method\":\"initialize\",\"params\":{\"protocolVersion\":\"2024-11-05\",\"capabilities\":{},\"clientInfo\":{\"name\":\"claude-ai\",\"version\":\"0.1.0\"}},\"jsonrpc\":\"2.0\",\"id\":0}\n2025-03-16T13:52:01.398Z [Git] [info] Initializing server...\n2025-03-16T13:52:01.707Z [Git] [info] Server started and connected successfully\n2025-03-16T13:52:01.708Z [Git] [info] Message from client: {\"method\":\"initialize\",\"params\":{\"protocolVersion\":\"2024-11-05\",\"capabilities\":{},\"clientInfo\":{\"name\":\"claude-ai\",\"version\":\"0.1.0\"}},\"jsonrpc\":\"2.0\",\"id\":0}\n```\n\n**Expected behavior**\nThe server should initialize only once per execution.\n\n**Desktop (please complete the following information):**\n - OS: macOS Sonoma 14.2.1\n - Claude Desktop: 0.8.1\n - Python SDK: 1.4.0\n\n**Additional context**\n\nThe non-fast MCP server implementation doesn't have this problem. The key difference appears to be in how the server is launched:\n\n```json\n\"git\": {\n  \"command\": \"uv\",\n  \"args\": [\n    \"--directory\",\n    \"src/non-fast-mcp-server\",\n    \"run\",\n    \"git\"\n  ]\n}\n```\n",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/301/reactions",
        "total_count": 2,
        "+1": 2,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/299",
      "id": 2923198116,
      "node_id": "I_kwDOM2n80s6uPHak",
      "number": 299,
      "title": "Low-level Server support for mcp dev and mcp run command",
      "user": {
        "login": "john0312",
        "id": 3593823,
        "node_id": "MDQ6VXNlcjM1OTM4MjM=",
        "avatar_url": "https://avatars.githubusercontent.com/u/3593823?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/john0312",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 9354757189,
          "node_id": "LA_kwDOM2n80s8AAAACLZZERQ",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/enhancement",
          "name": "enhancement",
          "color": "11b5cc",
          "default": true,
          "description": "Request for a new feature that's not currently supported"
        },
        "1": {
          "id": 9354761244,
          "node_id": "LA_kwDOM2n80s8AAAACLZZUHA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/ready%20for%20work",
          "name": "ready for work",
          "color": "2b9402",
          "default": false,
          "description": "Enough information for someone to start working on"
        },
        "2": {
          "id": 9354767859,
          "node_id": "LA_kwDOM2n80s8AAAACLZZt8w",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P1",
          "name": "P1",
          "color": "895d17",
          "default": false,
          "description": "Significant bug affecting many users, highly requested feature"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 2,
      "created_at": "2025-03-16T17:24:48Z",
      "updated_at": "2025-10-06T18:42:04Z",
      "closed_at": null,
      "author_association": "CONTRIBUTOR",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "Currently the `mcp dev` and `mcp run` command does not support the low-level `Server` class. I think it's a better developer experience if we support both classes for these 2 commands, assuming there's no inherent reason for not doing so.\n\nI'm interested in adding support for the low-level `Server` to both `mcp dev` and `mcp run` and I would like seek the maintainer's guidance on this. It looks like the only thing missing is the `dependencies` field, which is pulled from the `Settings` class and does not exist in the low-level `Server`. I'm thinking about adding a similar `Settings` class to `server/lowlevel/server.py` and thus introducing the `dependencies` field. The downside is more complexity in `server/lowlevel/server.py` which I'm not sure if it's acceptable to the maintainers and falls in line with the long term roadmap for the code base.\n\nPlease advise. Thanks.",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/299/reactions",
        "total_count": 5,
        "+1": 5,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/279",
      "id": 2918446045,
      "node_id": "I_kwDOM2n80s6t8_Pd",
      "number": 279,
      "title": "Return resources as structured JSON instead of text?",
      "user": {
        "login": "abegong",
        "id": 1239085,
        "node_id": "MDQ6VXNlcjEyMzkwODU=",
        "avatar_url": "https://avatars.githubusercontent.com/u/1239085?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/abegong",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 9082681979,
          "node_id": "LA_kwDOM2n80s8AAAACHV66ew",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/needs%20confirmation",
          "name": "needs confirmation",
          "color": "aaaaaa",
          "default": false,
          "description": "Needs confirmation that the PR is actually required or needed."
        },
        "1": {
          "id": 9354757189,
          "node_id": "LA_kwDOM2n80s8AAAACLZZERQ",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/enhancement",
          "name": "enhancement",
          "color": "11b5cc",
          "default": true,
          "description": "Request for a new feature that's not currently supported"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 3,
      "created_at": "2025-03-13T21:39:55Z",
      "updated_at": "2025-11-12T17:47:06Z",
      "closed_at": null,
      "author_association": "NONE",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "Is it possible to resources as structured JSON instead of text?\n\nHere's a minimal example:\n```\nfrom mcp.server.fastmcp import FastMCP\nfrom pydantic import BaseModel\n\nmcp = FastMCP(\"Demo\")\n\nclass MyModel(BaseModel):\n    id: str\n    name: str\n\n@mcp.resource(\"resources://my-model\", mime_type=\"application/json\")\ndef get_model() -> MyModel:\n    \"\"\"Get a collection by name\"\"\"\n    return MyModel(id=\"foo\", name=\"bar\")\n```\n\nWhen I call the `resources://my-model` endpoint, the response contains:\n\n```\n{\n  \"contents\": [\n    {\n      \"uri\": \"resources://my-model\",\n      \"mimeType\": \"application/json\",\n      \"text\": \"{\\\"id\\\": \\\"foo\\\", \\\"name\\\": \\\"bar\\\"}\"\n    }\n  ]\n}\n```\n\nInstead, I want to produce something like this:\n\n```\n{\n  \"contents\": [\n    {\n      \"uri\": \"resources://my-model\",\n      \"mimeType\": \"application/json\",\n      \"data\": {\"id\": \"foo\", \"name\": \"bar\"}\n    }\n  ]\n}\n```\n\nIs that possible?\n\nIt's strange to send a request with a json/application mimeType, then get back most of the object as text that must be parsed a second time.",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/279/reactions",
        "total_count": 23,
        "+1": 23,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/268",
      "id": 2913941306,
      "node_id": "I_kwDOM2n80s6trzc6",
      "number": 268,
      "title": "Important - List Resource is not working",
      "user": {
        "login": "raolak",
        "id": 851129,
        "node_id": "MDQ6VXNlcjg1MTEyOQ==",
        "avatar_url": "https://avatars.githubusercontent.com/u/851129?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/raolak",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 7511840554,
          "node_id": "LA_kwDOM2n80s8AAAABv72XKg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/bug",
          "name": "bug",
          "color": "d73a4a",
          "default": true,
          "description": "Something isn't working"
        },
        "1": {
          "id": 9354761244,
          "node_id": "LA_kwDOM2n80s8AAAACLZZUHA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/ready%20for%20work",
          "name": "ready for work",
          "color": "2b9402",
          "default": false,
          "description": "Enough information for someone to start working on"
        },
        "2": {
          "id": 9354765360,
          "node_id": "LA_kwDOM2n80s8AAAACLZZkMA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P0",
          "name": "P0",
          "color": "a81d34",
          "default": false,
          "description": "Broken core functionality, security issues, critical missing feature"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 5,
      "created_at": "2025-03-12T13:16:41Z",
      "updated_at": "2025-10-03T14:37:21Z",
      "closed_at": null,
      "author_association": "NONE",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "I have trouble getting listresource working.. inspector is unable to list therreources.. I tried the example from the guide.. I tried both list resource and list template resources from inspector.. its not listing.. is only static resources supported for now? Dynamic resources doesnt work?\n\n# echo_server.py\nfrom mcp.server.fastmcp import FastMCP\n\n\ndef create_server():\n    # Create an MCP server\n    mcp = FastMCP(\"Echo\", port=8020) \n\n    # Add a dynamic echo resource\n    @mcp.resource(\"echo://{message}\")\n    def echo_resource(message: str) -> str:\n        \"\"\"Echo a message as a resource\"\"\"\n        print(f\"Echo resource called with message: {message}\")\n        return f\"Resource echo: {message}\"\n\n    # Add an echo tool\n    @mcp.tool()\n    def echo_tool(message: str) -> str:\n        \"\"\"Echo a message as a tool\"\"\"\n        print(f\"Echo tool called with message: {message}\")\n        return f\"Tool echo: {message}\"\n\n    # Add an echo prompt\n    @mcp.prompt()\n    def echo_prompt(message: str) -> str:\n        \"\"\"Create an echo prompt\"\"\"\n        print(f\"Echo prompt called with message: {message}\")\n\n        return f\"Please process this message: {message}\"\n\n    return mcp\n\nif __name__ == \"__main__\":\n    server = create_server()\n    server.run(transport=\"sse\")\n\nCa some one help me to fix resourec listing and getting resources issue?\n\nI am using sse transport to test this in inspector",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/268/reactions",
        "total_count": 3,
        "+1": 3,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/263",
      "id": 2912518632,
      "node_id": "I_kwDOM2n80s6tmYHo",
      "number": 263,
      "title": "dynamic resource not working in Claude desktop",
      "user": {
        "login": "Nriver",
        "id": 6752679,
        "node_id": "MDQ6VXNlcjY3NTI2Nzk=",
        "avatar_url": "https://avatars.githubusercontent.com/u/6752679?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/Nriver",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 9354757189,
          "node_id": "LA_kwDOM2n80s8AAAACLZZERQ",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/enhancement",
          "name": "enhancement",
          "color": "11b5cc",
          "default": true,
          "description": "Request for a new feature that's not currently supported"
        },
        "1": {
          "id": 9354765360,
          "node_id": "LA_kwDOM2n80s8AAAACLZZkMA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P0",
          "name": "P0",
          "color": "a81d34",
          "default": false,
          "description": "Broken core functionality, security issues, critical missing feature"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 22,
      "created_at": "2025-03-12T03:32:13Z",
      "updated_at": "2025-11-29T16:53:05Z",
      "closed_at": null,
      "author_association": "NONE",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "**Describe the bug**\nA clear and concise description of what the bug is.\n\n**To Reproduce**\nuse the demo server in quick start document\n```\n# server.py\nfrom mcp.server.fastmcp import FastMCP\n\n# Create an MCP server\nmcp = FastMCP(\"Demo\")\n\n@mcp.resource(\"config://app\")\ndef get_config() -> str:\n    \"\"\"Static configuration data\"\"\"\n    return \"App configuration here\"\n\n# dynamic resource\n@mcp.resource(\"greeting://{name}\")\ndef get_greeting(name: str) -> str:\n    \"\"\"Get a personalized greeting\"\"\"\n    return f\"Hello, {name}!\"\n```\n\nClaude can not see the dynamic resource, only the static one works.\n\n**Expected behavior**\nUse dynamic resource in Claude\n\n**Screenshots**\n\n![Image](https://github.com/user-attachments/assets/855468b1-e0fb-420e-9ae7-d3d1d98e1429)\n\n**Desktop (please complete the following information):**\n - OS: windows 10\n\n",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/263/reactions",
        "total_count": 14,
        "+1": 13,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 1
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/262",
      "id": 2912474917,
      "node_id": "I_kwDOM2n80s6tmNcl",
      "number": 262,
      "title": "cannot get response from  await session.call_tool()",
      "user": {
        "login": "herrrX",
        "id": 202729726,
        "node_id": "U_kgDODBVo_g",
        "avatar_url": "https://avatars.githubusercontent.com/u/202729726?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/herrrX",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 7511840554,
          "node_id": "LA_kwDOM2n80s8AAAABv72XKg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/bug",
          "name": "bug",
          "color": "d73a4a",
          "default": true,
          "description": "Something isn't working"
        },
        "1": {
          "id": 9354761244,
          "node_id": "LA_kwDOM2n80s8AAAACLZZUHA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/ready%20for%20work",
          "name": "ready for work",
          "color": "2b9402",
          "default": false,
          "description": "Enough information for someone to start working on"
        },
        "2": {
          "id": 9354767859,
          "node_id": "LA_kwDOM2n80s8AAAACLZZt8w",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P1",
          "name": "P1",
          "color": "895d17",
          "default": false,
          "description": "Significant bug affecting many users, highly requested feature"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 14,
      "created_at": "2025-03-12T03:08:44Z",
      "updated_at": "2025-10-06T16:03:44Z",
      "closed_at": null,
      "author_association": "NONE",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "hello, I'm sorry to bother you. I've recently encountered a blocking issue with the MCP client.\nI've set up an MCP server, and it runs in Claude successfully. However, when I use the client I set up, the call to the tool result = await session.call_tool() gets stuck and doesn't return a response. But when I use tools = await session.list_tools(), I can retrieve the list of tools.\n\nThrough logging within the client file, I'm able to confirm that the tool call has been initiated and executed successfully, and the result is obtained, but the client side can't receive the result. It seems there's an issue with the transmission layer of the protocol. I've been struggling with this for two days and have looked for solutions without success, even after upgrading the system version.\n\n\nI removed the other logic and only kept the tool invocation. The code is as follows.\n\nLooking forward to your reply.\n\n```\n\nfrom mcp import ClientSession, StdioServerParameters, types\nfrom mcp.client.stdio import stdio_client\n\n\nserver_params = StdioServerParameters(  # Create server parameters for stdio connection\n    command=\"uvx\",\n    args=[\n        \"--from\",\n        \"git+ssh://xxxx.xx.xxx\",\n        \"server-name\"\n    ],\n    env=None\n)\n\n# Optional: create a sampling callback\nasync def handle_sampling_message(message: types.CreateMessageRequestParams) -> types.CreateMessageResult:\n    return types.CreateMessageResult(\n        role=\"assistant\",\n        content=types.TextContent(\n            type=\"text\",\n            text=\"Hello, world! from model\",\n        ),\n        model=\"gpt-3.5-turbo\",\n        stopReason=\"endTurn\",\n    )\n\nasync def run():\n    async with stdio_client(server_params) as (read, write):\n        async with ClientSession(read, write, sampling_callback=handle_sampling_message) as session:\n            # Initialize the connection\n            await session.initialize()\n            # List available tools\n            tools = await session.list_tools()\n            # Call a tool\n            result = await session.call_tool(\"query-api-infos\", arguments={\"api_info_id\": \"8768555\"})\n            print(result)\n\nif __name__ == \"__main__\":\n    import asyncio\n    asyncio.run(run())\n```",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/262/reactions",
        "total_count": 4,
        "+1": 4,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/253",
      "id": 2907300836,
      "node_id": "I_kwDOM2n80s6tSePk",
      "number": 253,
      "title": "Support low-level interface for modifying the underlying Uvicorn server",
      "user": {
        "login": "ycd",
        "id": 62724709,
        "node_id": "MDQ6VXNlcjYyNzI0NzA5",
        "avatar_url": "https://avatars.githubusercontent.com/u/62724709?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/ycd",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 7511840581,
          "node_id": "LA_kwDOM2n80s8AAAABv72XRQ",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/good%20first%20issue",
          "name": "good first issue",
          "color": "7057ff",
          "default": true,
          "description": "Good for newcomers"
        },
        "1": {
          "id": 9230424293,
          "node_id": "LA_kwDOM2n80s8AAAACJi0Y5Q",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/v2",
          "name": "v2",
          "color": "5d2a87",
          "default": false,
          "description": "Ideas, requests and plans for v2 of the SDK which will incorporate major changes and fixes"
        },
        "2": {
          "id": 9354757189,
          "node_id": "LA_kwDOM2n80s8AAAACLZZERQ",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/enhancement",
          "name": "enhancement",
          "color": "11b5cc",
          "default": true,
          "description": "Request for a new feature that's not currently supported"
        },
        "3": {
          "id": 9354761244,
          "node_id": "LA_kwDOM2n80s8AAAACLZZUHA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/ready%20for%20work",
          "name": "ready for work",
          "color": "2b9402",
          "default": false,
          "description": "Enough information for someone to start working on"
        },
        "4": {
          "id": 9354772110,
          "node_id": "LA_kwDOM2n80s8AAAACLZZ-jg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P3",
          "name": "P3",
          "color": "c7df49",
          "default": false,
          "description": "Nice to haves, rare edge cases"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 2,
      "created_at": "2025-03-10T13:36:49Z",
      "updated_at": "2025-11-12T17:44:12Z",
      "closed_at": null,
      "author_association": "NONE",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "\n\n\nIt would be great to have an API to interact with the MCP's underlying Uvicorn server.\n\n\nMore specifically, It would be great to have a leaky interface, that can act as a bridge with the abstraction of the underlying Uvicorn server, a way to configure it, or maybe just allowing us to pass arguments/kwargs to the Uvicorn server.\n\n## Problem\n\nAs a start, there is no clean way to close a Uvicorn server programmatically/gracefully, there are some hacks to go around it, here are some related issues: \n\n**Uvicorn cannot be shutdown programmatically** - https://github.com/encode/uvicorn/discussions/1103 \n**Uvicorn cannot be shutdown programmatically** - https://github.com/encode/uvicorn/issues/742\n**Running multiple Uvicorn servers simultaneously hangs on shutdown** - https://github.com/encode/uvicorn/issues/1773\n**Uvicorn eats SIGINTs, does not propagate exceptions** - https://github.com/encode/uvicorn/issues/1579\n\nAnd so on.... \n\n\n## Idea\n\nYou might say that, we already have access to the server and low-level API with\n\n```python\nfrom mcp.server.lowlevel.server import Server\n```\n\nHowever just to handle a graceful shutdown, not being able to handle all the out-of-box features that  `FastMCP` class provides, feels like re-inventing the wheel.\n\n\nSo one of the easiest way(s) to do it is, passing the `timeout_graceful_shutdown=0` to the `uvicorn.Config` which solves the (partially) hanging server problem. \n\n\nUvicorn is configurable via environment variables, when they are prefixed with [`UVICORN_`](https://www.uvicorn.org/settings/#settings), so in a similar way, when we pass values to:\n\n```python\nFastMCP(\n    \"some_server\",\n    lifespan=app_lifespan,\n    debug=True, # no prefix, for the Settings class\n    uvicorn_timeout_graceful_shutdown=0, # uvicorn prefix, for UvicornConfig?\n)\n```\n\nWe can buffer this, similar to `**settings` then we can pass to the initialization of the server, would it be feasible? \n\nI'm sure there will be other use cases for this, also I'm not sure if the example above is the best way to handle that,  just to give you a brief idea.\n\n\n\n\n",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/253/reactions",
        "total_count": 1,
        "+1": 1,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/235",
      "id": 2883753381,
      "node_id": "I_kwDOM2n80s6r4pWl",
      "number": 235,
      "title": "Official Adapter Functions for LLM Providers in MCP Python SDK",
      "user": {
        "login": "yu-iskw",
        "id": 1523515,
        "node_id": "MDQ6VXNlcjE1MjM1MTU=",
        "avatar_url": "https://avatars.githubusercontent.com/u/1523515?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/yu-iskw",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 9354757189,
          "node_id": "LA_kwDOM2n80s8AAAACLZZERQ",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/enhancement",
          "name": "enhancement",
          "color": "11b5cc",
          "default": true,
          "description": "Request for a new feature that's not currently supported"
        },
        "1": {
          "id": 9354761244,
          "node_id": "LA_kwDOM2n80s8AAAACLZZUHA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/ready%20for%20work",
          "name": "ready for work",
          "color": "2b9402",
          "default": false,
          "description": "Enough information for someone to start working on"
        },
        "2": {
          "id": 9354765360,
          "node_id": "LA_kwDOM2n80s8AAAACLZZkMA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P0",
          "name": "P0",
          "color": "a81d34",
          "default": false,
          "description": "Broken core functionality, security issues, critical missing feature"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 6,
      "created_at": "2025-02-27T08:11:02Z",
      "updated_at": "2025-10-07T12:30:01Z",
      "closed_at": null,
      "author_association": "NONE",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "**Is your feature request related to a problem? Please describe.**\n\nCurrently, when integrating MCP tools with various LLM providers, developers must implement their own adapter functions to convert MCP tool schemas to the target provider’s format. This repetitive and manual process increases development time and introduces potential inconsistencies and errors across different implementations. For example, while one developer may create a conversion adapter for the Gemini tool, another might duplicate the effort in their own project, leading to fragmented solutions and maintenance challenges.\n\n**Describe the solution you'd like**\n\nI propose that the official Python SDK for Model Context Server includes a suite of built-in adapter functions to facilitate seamless conversion from MCP tool schemas to those required by popular LLM providers (e.g., Gemini, GPT-4, etc.). By providing these adapters, the SDK would:\n\n- Standardize the conversion process across projects.\n- Reduce development time and prevent duplication of code.\n- Enhance consistency and reliability when integrating with multiple LLM providers.\n- Allow developers to focus on higher-level integration concerns rather than schema translation.\n\n**Describe alternatives you've considered**\n\nOne alternative is for each developer to write their own adapter functions, as demonstrated by the sample code below. However, this approach is inefficient and can lead to fragmented and non-standardized implementations. Another alternative would be to provide partial documentation and code snippets as guidance, but without official support, developers might still encounter integration challenges and maintenance issues.\n\n**Additional context**\n\nThe inclusion of official adapters would not only streamline the integration process for MCP clients but also foster a more robust and unified ecosystem. The sample code below illustrates how a conversion function from an MCP tool to a Gemini tool might look, serving as a basis for the kind of functionality that should be officially supported:\n\n```python\nfrom google.genai import types as genai_types\nfrom mcp import types as mcp_types\n\ndef to_gemini_tool(mcp_tool: mcp_types.Tool) -> genai_types.Tool:\n    \"\"\"\n    Converts an MCP tool schema to a Gemini tool.\n\n    Args:\n        mcp_tool: The MCP tool containing name, description, and input schema.\n\n    Returns:\n        A Gemini tool with the appropriate function declaration.\n    \"\"\"\n    function_declaration = to_gemini_function_declarations(mcp_tool)\n    return genai_types.Tool(function_declarations=[function_declaration])\n\ndef to_gemini_function_declarations(\n    mcp_tool: mcp_types.Tool,\n) -> genai_types.FunctionDeclarationDict:\n    required_params: list[str] = mcp_tool.inputSchema.get(\"required\", [])\n    properties = {}\n    for key, value in mcp_tool.inputSchema.get(\"properties\", {}).items():\n        schema_dict = {\n            \"type\": value.get(\"type\", \"STRING\").upper(),\n            \"description\": value.get(\"description\", \"\"),\n        }\n        properties[key] = genai_types.SchemaDict(**schema_dict)\n\n    function_declaration = genai_types.FunctionDeclarationDict(\n        name=mcp_tool.name,\n        description=mcp_tool.description,\n        parameters=genai_types.SchemaDict(\n            type=\"OBJECT\",\n            properties=properties,\n            required=required_params,\n        ),\n    )\n    return function_declaration\n```\n",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/235/reactions",
        "total_count": 18,
        "+1": 10,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 8,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": [
        1709
      ]
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/230",
      "id": 2874504983,
      "node_id": "I_kwDOM2n80s6rVXcX",
      "number": 230,
      "title": "No way to get `request_id` for a tool call to cancel it",
      "user": {
        "login": "ihrpr",
        "id": 21148364,
        "node_id": "MDQ6VXNlcjIxMTQ4MzY0",
        "avatar_url": "https://avatars.githubusercontent.com/u/21148364?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/ihrpr",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 9354757189,
          "node_id": "LA_kwDOM2n80s8AAAACLZZERQ",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/enhancement",
          "name": "enhancement",
          "color": "11b5cc",
          "default": true,
          "description": "Request for a new feature that's not currently supported"
        },
        "1": {
          "id": 9354761244,
          "node_id": "LA_kwDOM2n80s8AAAACLZZUHA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/ready%20for%20work",
          "name": "ready for work",
          "color": "2b9402",
          "default": false,
          "description": "Enough information for someone to start working on"
        },
        "2": {
          "id": 9354770246,
          "node_id": "LA_kwDOM2n80s8AAAACLZZ3Rg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P2",
          "name": "P2",
          "color": "d2b457",
          "default": false,
          "description": "Moderate issues affecting some users, edge cases, potentially valuable feature"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 1,
      "created_at": "2025-02-24T10:32:54Z",
      "updated_at": "2025-10-07T12:32:56Z",
      "closed_at": null,
      "author_association": "CONTRIBUTOR",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "**Describe the bug**\nWhen trying to cancel a tool by sending a cancel notification, there is no way to know request_id.\n\nIt would be useful to set a request id during the tool call.\n\n**To Reproduce**\nTry cancelling a tool call\n\n**Expected behavior**\nHave a `reques_id` known to cancel it\n\n\n",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/230/reactions",
        "total_count": 1,
        "+1": 1,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/226",
      "id": 2869503373,
      "node_id": "I_kwDOM2n80s6rCSWN",
      "number": 226,
      "title": "Improving how function docstring gets converted to tool's jsonschema for FastMCP",
      "user": {
        "login": "salman1993",
        "id": 7154255,
        "node_id": "MDQ6VXNlcjcxNTQyNTU=",
        "avatar_url": "https://avatars.githubusercontent.com/u/7154255?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/salman1993",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 7511840581,
          "node_id": "LA_kwDOM2n80s8AAAABv72XRQ",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/good%20first%20issue",
          "name": "good first issue",
          "color": "7057ff",
          "default": true,
          "description": "Good for newcomers"
        },
        "1": {
          "id": 9354757189,
          "node_id": "LA_kwDOM2n80s8AAAACLZZERQ",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/enhancement",
          "name": "enhancement",
          "color": "11b5cc",
          "default": true,
          "description": "Request for a new feature that's not currently supported"
        },
        "2": {
          "id": 9354761244,
          "node_id": "LA_kwDOM2n80s8AAAACLZZUHA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/ready%20for%20work",
          "name": "ready for work",
          "color": "2b9402",
          "default": false,
          "description": "Enough information for someone to start working on"
        },
        "3": {
          "id": 9354770246,
          "node_id": "LA_kwDOM2n80s8AAAACLZZ3Rg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P2",
          "name": "P2",
          "color": "d2b457",
          "default": false,
          "description": "Moderate issues affecting some users, edge cases, potentially valuable feature"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 4,
      "created_at": "2025-02-21T16:33:44Z",
      "updated_at": "2025-11-12T17:44:11Z",
      "closed_at": null,
      "author_association": "CONTRIBUTOR",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "**Is your feature request related to a problem? Please describe.**\nTool descriptions are not parsed as expected from the function docstring when using FastMCP. This affects tool calling performance.\n\nCurrently, FastMCP does some function inspection to create the docstring here: \n- https://github.com/modelcontextprotocol/python-sdk/blob/775f87981300660ee957b63c2a14b448ab9c3675/src/mcp/server/fastmcp/tools/base.py#L55-L59\n- https://github.com/modelcontextprotocol/python-sdk/blob/775f87981300660ee957b63c2a14b448ab9c3675/src/mcp/server/fastmcp/utilities/func_metadata.py#L105-L174\n\nFrom my understanding, it creates a FuncMetadata model in pydantic which then gets converted to jsonschema.\n\n**Current behaviour:**\nIf we have a tool such as:\n```\ndef add_numbers(a: float, b: float) -> float:\n    \"\"\"\n    Adds two numbers and returns the result.\n\n    Args:\n        a (float): The first number.\n        b (float): The second number.\n\n    Returns:\n        float: The sum of a and b.\n    \"\"\"\n    return a + b\n```\n\nit gets parsed into:\n```\n>>> func_arg_metadata = func_metadata(add_numbers)\n>>> parameters = func_arg_metadata.arg_model.model_json_schema()\n>>> parameters\n{'properties': {'a': {'title': 'A', 'type': 'number'}, 'b': {'title': 'B', 'type': 'number'}}, 'required': ['a', 'b'], 'title': 'add_numbersArguments', 'type': 'object'}\n\n>>> add_numbers.__doc__  \n'\\nAdds two numbers and returns the result.\\n\\nArgs:\\n    a (float): The first number.\\n    b (float): The second number.\\n\\nReturns:\\n    float: The sum of a and b.\\n'\n```\n\n**Describe the solution you'd like**\nIt'd be nicer to follow one of the python docstring styles and parse out the argument descriptions from the docstring. \n```\n{\n  \"name\": \"add_numbers\",\n  \"description\": \"Adds two numbers and returns the sum.\",\n  \"parameters\": {\n    \"type\": \"object\",\n    \"properties\": {\n      \"a\": {\n        \"type\": \"number\",\n        \"description\": \"The first number to add.\"\n      },\n      \"b\": {\n        \"type\": \"number\",\n        \"description\": \"The second number to add.\"\n      }\n    },\n    \"required\": [\"a\", \"b\"]\n  }\n}\n```\n\n**Describe alternatives you've considered**\nwe used to do this in a previous python version of goose: https://github.com/block/goose/blob/eccb1b22614f39b751db4e5efd73d728d9ca40fc/packages/exchange/src/exchange/utils.py#L82-L107\n\nhere are some test examples: https://github.com/block/goose/blob/eccb1b22614f39b751db4e5efd73d728d9ca40fc/packages/exchange/tests/test_utils.py#L32-L136\n\n**Additional context**\nI am happy to add this in - wanted to post this first to check that you're okay with enforcing a docstring style (`\"google\", \"numpy\", \"sphinx\"`)  & adding `griffe` as a dependency.\n",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/226/reactions",
        "total_count": 13,
        "+1": 13,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/220",
      "id": 2865887824,
      "node_id": "I_kwDOM2n80s6q0fpQ",
      "number": 220,
      "title": "Support for `path` convertor `{value:path}` in FastMCP",
      "user": {
        "login": "dsp-ant",
        "id": 167242713,
        "node_id": "U_kgDOCffr2Q",
        "avatar_url": "https://avatars.githubusercontent.com/u/167242713?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/dsp-ant",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 7511840581,
          "node_id": "LA_kwDOM2n80s8AAAABv72XRQ",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/good%20first%20issue",
          "name": "good first issue",
          "color": "7057ff",
          "default": true,
          "description": "Good for newcomers"
        },
        "1": {
          "id": 9287728201,
          "node_id": "LA_kwDOM2n80s8AAAACKZd8SQ",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/needs%20maintainer%20action",
          "name": "needs maintainer action",
          "color": "d33428",
          "default": false,
          "description": "Potentially serious issue - needs proactive fix and maintainer attention"
        },
        "2": {
          "id": 9354757189,
          "node_id": "LA_kwDOM2n80s8AAAACLZZERQ",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/enhancement",
          "name": "enhancement",
          "color": "11b5cc",
          "default": true,
          "description": "Request for a new feature that's not currently supported"
        },
        "3": {
          "id": 9354761244,
          "node_id": "LA_kwDOM2n80s8AAAACLZZUHA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/ready%20for%20work",
          "name": "ready for work",
          "color": "2b9402",
          "default": false,
          "description": "Enough information for someone to start working on"
        },
        "4": {
          "id": 9354767859,
          "node_id": "LA_kwDOM2n80s8AAAACLZZt8w",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P1",
          "name": "P1",
          "color": "895d17",
          "default": false,
          "description": "Significant bug affecting many users, highly requested feature"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 2,
      "created_at": "2025-02-20T11:28:56Z",
      "updated_at": "2025-10-07T13:46:23Z",
      "closed_at": null,
      "author_association": "MEMBER",
      "type": {
        "id": 23633470,
        "node_id": "IT_kwDOCt2Azc4BaJ4-",
        "name": "Enhancement",
        "description": "A request, idea, or new functionality",
        "color": "blue",
        "created_at": "2024-09-20T20:53:29Z",
        "updated_at": "2025-11-14T20:09:31Z",
        "is_enabled": true
      },
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "Currently we do not allow for matching paths in resource templates, meaning that\n\n```\n@app.resource(\"test://{foo}\")\n```\n\nwill not match `test://foo/bar`. This is intended. However at times people want to explicitly match paths. FastAPI offers in this case a `path` convertor, such that\n\n```\n@app.resource(\"test://{foo:path}\")\n```\n\nwould match `test://foo/bar`.\n\nWe should consider adding a convertor approach or something similar to resource templates.",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/220/reactions",
        "total_count": 2,
        "+1": 1,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 1
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/194",
      "id": 2838805062,
      "node_id": "I_kwDOM2n80s6pNLpG",
      "number": 194,
      "title": "Allow customization of the Starlette app (middleware, routes, etc)",
      "user": {
        "login": "mconflitti-pbc",
        "id": 189644927,
        "node_id": "U_kgDOC03Afw",
        "avatar_url": "https://avatars.githubusercontent.com/u/189644927?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/mconflitti-pbc",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 9354757189,
          "node_id": "LA_kwDOM2n80s8AAAACLZZERQ",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/enhancement",
          "name": "enhancement",
          "color": "11b5cc",
          "default": true,
          "description": "Request for a new feature that's not currently supported"
        },
        "1": {
          "id": 9354761244,
          "node_id": "LA_kwDOM2n80s8AAAACLZZUHA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/ready%20for%20work",
          "name": "ready for work",
          "color": "2b9402",
          "default": false,
          "description": "Enough information for someone to start working on"
        },
        "2": {
          "id": 9354767859,
          "node_id": "LA_kwDOM2n80s8AAAACLZZt8w",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P1",
          "name": "P1",
          "color": "895d17",
          "default": false,
          "description": "Significant bug affecting many users, highly requested feature"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/milestones/13",
        "id": 13746145,
        "node_id": "MI_kwDOM2n80s4A0b_h",
        "number": 13,
        "title": "Middleware Support",
        "description": "",
        "creator": {
          "login": "felixweinberger",
          "id": 3823880,
          "node_id": "MDQ6VXNlcjM4MjM4ODA=",
          "avatar_url": "https://avatars.githubusercontent.com/u/3823880?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/felixweinberger",
          "type": "User",
          "user_view_type": "public",
          "site_admin": false
        },
        "open_issues": 3,
        "closed_issues": 3,
        "state": "open",
        "created_at": "2025-09-23T10:48:37Z",
        "updated_at": "2025-12-03T22:03:37Z",
        "due_on": null,
        "closed_at": null
      },
      "comments": 8,
      "created_at": "2025-02-07T18:20:48Z",
      "updated_at": "2025-10-07T12:43:10Z",
      "closed_at": null,
      "author_association": "NONE",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "**Is your feature request related to a problem? Please describe.**\nFound that it has been useful in my fork of this repo to split out the creation of the starlette app into its own function so I can create it and customize it in my code before running it.\n\n**Describe the solution you'd like**\n```python\n    async def _create_sse_app(self):\n        \"\"\"Run the server using SSE transport.\"\"\"\n        from starlette.applications import Starlette\n        from starlette.routing import Mount, Route\n\n        sse = SseServerTransport(\"/messages/\")\n\n        async def handle_sse(request):\n            async with sse.connect_sse(\n                request.scope, request.receive, request._send\n            ) as streams:\n                await self._mcp_server.run(\n                    streams[0],\n                    streams[1],\n                    self._mcp_server.create_initialization_options(),\n                )\n\n        starlette_app = Starlette(\n            debug=self.settings.debug,\n            routes=[\n                Route(\"/sse\", endpoint=handle_sse),\n                Mount(\"/messages/\", app=sse.handle_post_message),\n            ],\n        )\n        \n        return starlette_app\n\n    async def run_sse_async(self) -> None:\n        \"\"\"Run the server using SSE transport.\"\"\"\n        starlette_app = self._create_sse_app()\n        # ... rest is same\n```\n\nand then use this like:\n\n```python\nmcp_server = FastMCP(\"example\", transport=\"sse\")\n\n#...server set up\n\napp = mcp_server._create_sse_app()\napp.add_route(...)\napp.add_middleware(...)\n\n# run with this or the uvicorn cli\nif __name__ == \"__main__\":\n    uvicorn.run(app, host=\"0.0.0.0\", port=8000)\n```\n\n**Describe alternatives you've considered**\nnone since it is currently contained in the run_sse_async function\n\n",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/194/reactions",
        "total_count": 4,
        "+1": 4,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/193",
      "id": 2838791020,
      "node_id": "I_kwDOM2n80s6pNINs",
      "number": 193,
      "title": "Add default /docs route to list information about the SSE MCP server",
      "user": {
        "login": "mconflitti-pbc",
        "id": 189644927,
        "node_id": "U_kgDOC03Afw",
        "avatar_url": "https://avatars.githubusercontent.com/u/189644927?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/mconflitti-pbc",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 7511840581,
          "node_id": "LA_kwDOM2n80s8AAAABv72XRQ",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/good%20first%20issue",
          "name": "good first issue",
          "color": "7057ff",
          "default": true,
          "description": "Good for newcomers"
        },
        "1": {
          "id": 9354757189,
          "node_id": "LA_kwDOM2n80s8AAAACLZZERQ",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/enhancement",
          "name": "enhancement",
          "color": "11b5cc",
          "default": true,
          "description": "Request for a new feature that's not currently supported"
        },
        "2": {
          "id": 9354761244,
          "node_id": "LA_kwDOM2n80s8AAAACLZZUHA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/ready%20for%20work",
          "name": "ready for work",
          "color": "2b9402",
          "default": false,
          "description": "Enough information for someone to start working on"
        },
        "3": {
          "id": 9354772110,
          "node_id": "LA_kwDOM2n80s8AAAACLZZ-jg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P3",
          "name": "P3",
          "color": "c7df49",
          "default": false,
          "description": "Nice to haves, rare edge cases"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 5,
      "created_at": "2025-02-07T18:12:32Z",
      "updated_at": "2025-12-03T21:58:14Z",
      "closed_at": null,
      "author_association": "NONE",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "**Is your feature request related to a problem? Please describe.**\nWould be useful to have an equivalent to something like how FastAPI generates OpenAPI docs and are automatically accessible at /docs route. \n\n**Describe the solution you'd like**\nAdd a /docs route to the starlette app that provides information about the mcp server (available tools, prompts, resources, version, etc.)\n\n**Describe alternatives you've considered**\nnone\n\n**Additional context**\nBasic example I currently use:\n![Image](https://github.com/user-attachments/assets/5de6a8b2-923e-481f-85ef-c2c606b63cd5)\n",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/193/reactions",
        "total_count": 1,
        "+1": 1,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/187",
      "id": 2827313996,
      "node_id": "I_kwDOM2n80s6ohWNM",
      "number": 187,
      "title": "Better CORS defaults for SSE transport",
      "user": {
        "login": "jspahrsummers",
        "id": 432536,
        "node_id": "MDQ6VXNlcjQzMjUzNg==",
        "avatar_url": "https://avatars.githubusercontent.com/u/432536?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/jspahrsummers",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 9354757189,
          "node_id": "LA_kwDOM2n80s8AAAACLZZERQ",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/enhancement",
          "name": "enhancement",
          "color": "11b5cc",
          "default": true,
          "description": "Request for a new feature that's not currently supported"
        },
        "1": {
          "id": 9354761244,
          "node_id": "LA_kwDOM2n80s8AAAACLZZUHA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/ready%20for%20work",
          "name": "ready for work",
          "color": "2b9402",
          "default": false,
          "description": "Enough information for someone to start working on"
        },
        "2": {
          "id": 9354767859,
          "node_id": "LA_kwDOM2n80s8AAAACLZZt8w",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P1",
          "name": "P1",
          "color": "895d17",
          "default": false,
          "description": "Significant bug affecting many users, highly requested feature"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 4,
      "created_at": "2025-02-03T12:01:56Z",
      "updated_at": "2025-11-12T18:31:19Z",
      "closed_at": null,
      "author_association": "MEMBER",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "It's likely that _most_ MCP servers accessible over SSE should be contactable by frontend web applications, which means the right CORS headers need to be set. The SDK should likely opt-in to this by default, with an opt-out available.\n\nSee also https://github.com/modelcontextprotocol/typescript-sdk/issues/143.",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/187/reactions",
        "total_count": 2,
        "+1": 2,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/156",
      "id": 2794939918,
      "node_id": "I_kwDOM2n80s6ml2YO",
      "number": 156,
      "title": "support logging to stderr in Jupyter Notebook Environments.",
      "user": {
        "login": "grll",
        "id": 1738060,
        "node_id": "MDQ6VXNlcjE3MzgwNjA=",
        "avatar_url": "https://avatars.githubusercontent.com/u/1738060?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/grll",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 7511840554,
          "node_id": "LA_kwDOM2n80s8AAAABv72XKg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/bug",
          "name": "bug",
          "color": "d73a4a",
          "default": true,
          "description": "Something isn't working"
        },
        "1": {
          "id": 7511840581,
          "node_id": "LA_kwDOM2n80s8AAAABv72XRQ",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/good%20first%20issue",
          "name": "good first issue",
          "color": "7057ff",
          "default": true,
          "description": "Good for newcomers"
        },
        "2": {
          "id": 9354761244,
          "node_id": "LA_kwDOM2n80s8AAAACLZZUHA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/ready%20for%20work",
          "name": "ready for work",
          "color": "2b9402",
          "default": false,
          "description": "Enough information for someone to start working on"
        },
        "3": {
          "id": 9354772110,
          "node_id": "LA_kwDOM2n80s8AAAACLZZ-jg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P3",
          "name": "P3",
          "color": "c7df49",
          "default": false,
          "description": "Nice to haves, rare edge cases"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/milestones/4",
        "id": 12208685,
        "node_id": "MI_kwDOM2n80s4Aukot",
        "number": 4,
        "title": "SDK 1.2.x",
        "description": "",
        "creator": {
          "login": "dsp-ant",
          "id": 167242713,
          "node_id": "U_kgDOCffr2Q",
          "avatar_url": "https://avatars.githubusercontent.com/u/167242713?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/dsp-ant",
          "type": "User",
          "user_view_type": "public",
          "site_admin": false
        },
        "open_issues": 1,
        "closed_issues": 4,
        "state": "closed",
        "created_at": "2025-01-23T12:05:04Z",
        "updated_at": "2025-12-03T23:23:36Z",
        "due_on": null,
        "closed_at": "2025-09-30T11:35:03Z"
      },
      "comments": 3,
      "created_at": "2025-01-17T09:09:24Z",
      "updated_at": "2025-11-12T17:44:09Z",
      "closed_at": null,
      "author_association": "CONTRIBUTOR",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "**Is your feature request related to a problem? Please describe.**\nI want to make mcp python-sdk jupyter notebook compatible. When running in a notebook environment, MCP work but do not output stderr as it does normally.\n\nFor instance in jupyter notebook:\n\n```python\nimport mcp\nimport os\nfrom mcp.client.stdio import stdio_client\n\nserverparams = mcp.StdioServerParameters(\n    command=\"uv\",\n    args=[\"--quiet\", \"run\", \"../src/echo.py\"],\n    env={\"UV_PYTHON\": \"3.12\", **os.environ},\n)\n\nasync with stdio_client(serverparams) as (read, write):\n    async with mcp.ClientSession(read, write) as session:\n        await session.initialize()\n        tools = await session.list_tools()\n        print(tools)\n```\nOutputs:\n```\nmeta=None nextCursor=None tools=[Tool(name='echo_tool', description='Echo the input text\\n\\n    Args:\\n        text (str): The text to echo\\n\\n    Returns:\\n        str: The echoed text\\n    ', inputSchema={'properties': {'text': {'title': 'Text', 'type': 'string'}}, 'required': ['text'], 'title': 'echo_toolArguments', 'type': 'object'})]\n```\n\nwhile running the server without jupyter notebook:\n\n```bash\n❯ uv run --quiet src/echo.py\nstarting echo server\n```\n\nstderr is correctly displayed.\n\nThis is a big problem mostly because if the server is crashing or the command is wrong you have no way to know what's wrong: nothing is logged and the jupyter notebook cell just hangs.\n\n**Describe the solution you'd like**\nI found the culprit being the use of:\n\n```python \nprocess = await anyio.open_process(\n        [server.command, *server.args],\n        env=server.env if server.env is not None else get_default_environment(),\n        stderr=sys.stderr,\n )\n```\nIn particular sys.stderr here is not working in the jupyter / ipython context. Instead I would suggest a working change as follow:\n\n1. remove the stderr params from the process and handle process.stderr in an async function as stdout / stdin is handled.\n2. to that effect, use a `stderr_reader` async function  like the following:\n\n```python\n    async def stderr_reader():\n        assert process.stderr, \"Opened process is missing stderr\"\n        try:\n            async for line in process.stderr:\n                if is_jupyter_notebook():\n                    print(f\"\\033[91m {line.decode().strip()}\")\n                else:\n                    # redirect to stderr as before\n                    print(line.decode().strip(), file=sys.stderr)\n        except anyio.ClosedResourceError:\n            await anyio.lowlevel.checkpoint()\n```\n\nThis would result in the same behavior as before while allowing the stderr to be logged in the jupyter notebook context.\n\n**Additional context**\nJupyter notebook support support is also requested for mcpadapt which bring MCP server tools in any agentic framework, as many agentic framework demonstrate usage in jupyter notebooks.\nhttps://github.com/grll/mcpadapt \n",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/156/reactions",
        "total_count": 0,
        "+1": 0,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": [
        1707
      ]
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/97",
      "id": 2731989348,
      "node_id": "I_kwDOM2n80s6i1tlk",
      "number": 97,
      "title": "mcp.types.Tool is not following python's naming convention ",
      "user": {
        "login": "santosflores",
        "id": 1733648,
        "node_id": "MDQ6VXNlcjE3MzM2NDg=",
        "avatar_url": "https://avatars.githubusercontent.com/u/1733648?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/santosflores",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 9230423596,
          "node_id": "LA_kwDOM2n80s8AAAACJi0WLA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/breaking%20change",
          "name": "breaking change",
          "color": "000000",
          "default": false,
          "description": "Will break existing deployments when updated without changes"
        },
        "1": {
          "id": 9230424293,
          "node_id": "LA_kwDOM2n80s8AAAACJi0Y5Q",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/v2",
          "name": "v2",
          "color": "5d2a87",
          "default": false,
          "description": "Ideas, requests and plans for v2 of the SDK which will incorporate major changes and fixes"
        },
        "2": {
          "id": 9354757189,
          "node_id": "LA_kwDOM2n80s8AAAACLZZERQ",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/enhancement",
          "name": "enhancement",
          "color": "11b5cc",
          "default": true,
          "description": "Request for a new feature that's not currently supported"
        },
        "3": {
          "id": 9354761244,
          "node_id": "LA_kwDOM2n80s8AAAACLZZUHA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/ready%20for%20work",
          "name": "ready for work",
          "color": "2b9402",
          "default": false,
          "description": "Enough information for someone to start working on"
        },
        "4": {
          "id": 9354772110,
          "node_id": "LA_kwDOM2n80s8AAAACLZZ-jg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P3",
          "name": "P3",
          "color": "c7df49",
          "default": false,
          "description": "Nice to haves, rare edge cases"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/milestones/3",
        "id": 12112132,
        "node_id": "MI_kwDOM2n80s4AuNEE",
        "number": 3,
        "title": "Python SDK v2.0",
        "description": "",
        "creator": {
          "login": "dsp-ant",
          "id": 167242713,
          "node_id": "U_kgDOCffr2Q",
          "avatar_url": "https://avatars.githubusercontent.com/u/167242713?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/dsp-ant",
          "type": "User",
          "user_view_type": "public",
          "site_admin": false
        },
        "open_issues": 12,
        "closed_issues": 2,
        "state": "open",
        "created_at": "2025-01-02T09:08:45Z",
        "updated_at": "2025-10-07T17:22:59Z",
        "due_on": null,
        "closed_at": null
      },
      "comments": 1,
      "created_at": "2024-12-11T06:55:19Z",
      "updated_at": "2025-12-05T17:40:32Z",
      "closed_at": null,
      "author_association": "NONE",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "**Describe the bug**\r\nThe input schema property is not following the snake case convention. Currently the property is defined as \"inputSchema\" instead of \"input_schema\". Ideally we can follow the convention as it is widely adopted. Additionally, not following the convention requires more lines of code on the client when passing the available tools to the API request.\r\n\r\nhttps://github.com/modelcontextprotocol/python-sdk/blob/aaf32b530738ff79ba607c2884374243350f521c/src/mcp/types.py#L660 \r\n\r\n**Expected behavior**\r\ninputSchema get renamed to input_schema\r\n\r\n**Screenshots**\r\nN/A\r\n",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/97/reactions",
        "total_count": 1,
        "+1": 1,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/73",
      "id": 2695887035,
      "node_id": "I_kwDOM2n80s6gr_i7",
      "number": 73,
      "title": "Better logging of when handlers are called and what they return when DEBUG is set",
      "user": {
        "login": "dsp-ant",
        "id": 167242713,
        "node_id": "U_kgDOCffr2Q",
        "avatar_url": "https://avatars.githubusercontent.com/u/167242713?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/dsp-ant",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 9354757189,
          "node_id": "LA_kwDOM2n80s8AAAACLZZERQ",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/enhancement",
          "name": "enhancement",
          "color": "11b5cc",
          "default": true,
          "description": "Request for a new feature that's not currently supported"
        },
        "1": {
          "id": 9354761244,
          "node_id": "LA_kwDOM2n80s8AAAACLZZUHA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/ready%20for%20work",
          "name": "ready for work",
          "color": "2b9402",
          "default": false,
          "description": "Enough information for someone to start working on"
        },
        "2": {
          "id": 9354772110,
          "node_id": "LA_kwDOM2n80s8AAAACLZZ-jg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P3",
          "name": "P3",
          "color": "c7df49",
          "default": false,
          "description": "Nice to haves, rare edge cases"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 1,
      "created_at": "2024-11-26T19:36:00Z",
      "updated_at": "2025-10-07T12:37:14Z",
      "closed_at": null,
      "author_association": "MEMBER",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": null,
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/73/reactions",
        "total_count": 0,
        "+1": 0,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/47",
      "id": 2652030103,
      "node_id": "I_kwDOM2n80s6eEsSX",
      "number": 47,
      "title": "Validate local capabilities",
      "user": {
        "login": "jspahrsummers",
        "id": 432536,
        "node_id": "MDQ6VXNlcjQzMjUzNg==",
        "avatar_url": "https://avatars.githubusercontent.com/u/432536?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/jspahrsummers",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 9354757189,
          "node_id": "LA_kwDOM2n80s8AAAACLZZERQ",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/enhancement",
          "name": "enhancement",
          "color": "11b5cc",
          "default": true,
          "description": "Request for a new feature that's not currently supported"
        },
        "1": {
          "id": 9354761244,
          "node_id": "LA_kwDOM2n80s8AAAACLZZUHA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/ready%20for%20work",
          "name": "ready for work",
          "color": "2b9402",
          "default": false,
          "description": "Enough information for someone to start working on"
        },
        "2": {
          "id": 9354767859,
          "node_id": "LA_kwDOM2n80s8AAAACLZZt8w",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P1",
          "name": "P1",
          "color": "895d17",
          "default": false,
          "description": "Significant bug affecting many users, highly requested feature"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 0,
      "created_at": "2024-11-12T12:20:55Z",
      "updated_at": "2025-11-12T18:31:17Z",
      "closed_at": null,
      "author_association": "MEMBER",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "Ensure that the capabilities that the local client or server is configured with cover:\r\n1. Notifications that are sent at runtime\r\n2. Any request handlers that are added\r\n\r\nSee https://github.com/modelcontextprotocol/typescript-sdk/pull/52 for the TS equivalent.",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/47/reactions",
        "total_count": 0,
        "+1": 0,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/12",
      "id": 2581095121,
      "node_id": "I_kwDOM2n80s6Z2GLR",
      "number": 12,
      "title": "Add conveniences for MCP proxy pattern",
      "user": {
        "login": "jspahrsummers",
        "id": 432536,
        "node_id": "MDQ6VXNlcjQzMjUzNg==",
        "avatar_url": "https://avatars.githubusercontent.com/u/432536?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/jspahrsummers",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 9230424293,
          "node_id": "LA_kwDOM2n80s8AAAACJi0Y5Q",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/v2",
          "name": "v2",
          "color": "5d2a87",
          "default": false,
          "description": "Ideas, requests and plans for v2 of the SDK which will incorporate major changes and fixes"
        },
        "1": {
          "id": 9354757189,
          "node_id": "LA_kwDOM2n80s8AAAACLZZERQ",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/enhancement",
          "name": "enhancement",
          "color": "11b5cc",
          "default": true,
          "description": "Request for a new feature that's not currently supported"
        },
        "2": {
          "id": 9354761244,
          "node_id": "LA_kwDOM2n80s8AAAACLZZUHA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/ready%20for%20work",
          "name": "ready for work",
          "color": "2b9402",
          "default": false,
          "description": "Enough information for someone to start working on"
        },
        "3": {
          "id": 9354767859,
          "node_id": "LA_kwDOM2n80s8AAAACLZZt8w",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P1",
          "name": "P1",
          "color": "895d17",
          "default": false,
          "description": "Significant bug affecting many users, highly requested feature"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": null,
      "comments": 0,
      "created_at": "2024-10-11T11:04:06Z",
      "updated_at": "2025-11-12T18:31:16Z",
      "closed_at": null,
      "author_association": "MEMBER",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "TypeScript example, but should also be portable to our Python SDK:\r\n\r\n```typescript\r\nexport function mcpProxy({\r\n  transportToClient,\r\n  transportToServer,\r\n  onerror,\r\n}: {\r\n  transportToClient: Transport;\r\n  transportToServer: Transport;\r\n  onerror: (error: Error) => void;\r\n}) {\r\n  transportToClient.onmessage = (message) => {\r\n    transportToServer.send(message).catch(onerror);\r\n  };\r\n\r\n  transportToServer.onmessage = (message) => {\r\n    transportToClient.send(message).catch(onerror);\r\n  };\r\n\r\n  transportToClient.onclose = () => {\r\n    transportToServer.close().catch(onerror);\r\n  };\r\n\r\n  transportToServer.onclose = () => {\r\n    transportToClient.close().catch(onerror);\r\n  };\r\n\r\n  transportToClient.onerror = onerror;\r\n  transportToServer.onerror = onerror;\r\n}\r\n```",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/12/reactions",
        "total_count": 0,
        "+1": 0,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": [
        1711
      ]
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/3",
      "id": 2547777397,
      "node_id": "I_kwDOM2n80s6X2_91",
      "number": 3,
      "title": "Specific transports could be Python package extras",
      "user": {
        "login": "dsp-ant",
        "id": 167242713,
        "node_id": "U_kgDOCffr2Q",
        "avatar_url": "https://avatars.githubusercontent.com/u/167242713?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/dsp-ant",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "labels": {
        "0": {
          "id": 9230423596,
          "node_id": "LA_kwDOM2n80s8AAAACJi0WLA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/breaking%20change",
          "name": "breaking change",
          "color": "000000",
          "default": false,
          "description": "Will break existing deployments when updated without changes"
        },
        "1": {
          "id": 9230424293,
          "node_id": "LA_kwDOM2n80s8AAAACJi0Y5Q",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/v2",
          "name": "v2",
          "color": "5d2a87",
          "default": false,
          "description": "Ideas, requests and plans for v2 of the SDK which will incorporate major changes and fixes"
        },
        "2": {
          "id": 9354757189,
          "node_id": "LA_kwDOM2n80s8AAAACLZZERQ",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/enhancement",
          "name": "enhancement",
          "color": "11b5cc",
          "default": true,
          "description": "Request for a new feature that's not currently supported"
        },
        "3": {
          "id": 9354761244,
          "node_id": "LA_kwDOM2n80s8AAAACLZZUHA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/ready%20for%20work",
          "name": "ready for work",
          "color": "2b9402",
          "default": false,
          "description": "Enough information for someone to start working on"
        },
        "4": {
          "id": 9354772110,
          "node_id": "LA_kwDOM2n80s8AAAACLZZ-jg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P3",
          "name": "P3",
          "color": "c7df49",
          "default": false,
          "description": "Nice to haves, rare edge cases"
        }
      },
      "state": "open",
      "locked": false,
      "assignee": null,
      "assignees": {},
      "milestone": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/milestones/3",
        "id": 12112132,
        "node_id": "MI_kwDOM2n80s4AuNEE",
        "number": 3,
        "title": "Python SDK v2.0",
        "description": "",
        "creator": {
          "login": "dsp-ant",
          "id": 167242713,
          "node_id": "U_kgDOCffr2Q",
          "avatar_url": "https://avatars.githubusercontent.com/u/167242713?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/dsp-ant",
          "type": "User",
          "user_view_type": "public",
          "site_admin": false
        },
        "open_issues": 12,
        "closed_issues": 2,
        "state": "open",
        "created_at": "2025-01-02T09:08:45Z",
        "updated_at": "2025-10-07T17:22:59Z",
        "due_on": null,
        "closed_at": null
      },
      "comments": 1,
      "created_at": "2024-09-25T11:53:12Z",
      "updated_at": "2025-12-05T17:40:26Z",
      "closed_at": null,
      "author_association": "MEMBER",
      "type": null,
      "active_lock_reason": null,
      "sub_issues_summary": {
        "total": 0,
        "completed": 0,
        "percent_completed": 0
      },
      "issue_dependencies_summary": {
        "blocked_by": 0,
        "total_blocked_by": 0,
        "blocking": 0,
        "total_blocking": 0
      },
      "body": "e.g., we could have mcp_python as just the base definitions, `mcp_python[stdio]`, `mcp_python[sse]`, etc.",
      "closed_by": null,
      "reactions": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/3/reactions",
        "total_count": 3,
        "+1": 3,
        "-1": 0,
        "laugh": 0,
        "hooray": 0,
        "confused": 0,
        "heart": 0,
        "rocket": 0,
        "eyes": 0
      },
      "performed_via_github_app": null,
      "state_reason": null,
      "linked_prs": []
    }
  ],
  "pulls": [
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1722",
      "id": 3072180988,
      "node_id": "PR_kwDOM2n80s63HcL8",
      "number": 1722,
      "state": "open",
      "locked": false,
      "title": "feat: client-side support for SEP-1577 sampling with tools",
      "user": {
        "login": "jlowin",
        "id": 153965,
        "node_id": "MDQ6VXNlcjE1Mzk2NQ==",
        "avatar_url": "https://avatars.githubusercontent.com/u/153965?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/jlowin",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "body": "[SEP-1577](https://github.com/modelcontextprotocol/modelcontextprotocol/issues/1577) added tool calling support to sampling (via #1594). This PR adds the necessary client-side support:\r\n\r\n1. **Capability advertisement**: The spec requires servers to error when `tools` or `toolChoice` are provided but `clientCapabilities.sampling.tools` is missing. The SDK's types already support this, but `ClientSession` had no way to advertise it—servers would always see the capability as missing and error. This adds a `sampling_capabilities` parameter. If not provided, the previous logic applies: the presence of a `sampling_callback` enables basic sampling support without tools.\r\n\r\n```python\r\nsession = ClientSession(\r\n    read_stream, write_stream,\r\n    sampling_callback=my_callback,\r\n    sampling_capabilities=SamplingCapability(\r\n        tools=SamplingToolsCapability()\r\n    ),\r\n)\r\n```\r\n\r\n2. **Return type for tool responses**: When tools are provided in a sampling request, the LLM may respond with tool calls, requiring `CreateMessageResultWithTools` (which supports array content). The `SamplingFnT` callback and `ClientResultType` didn't include this type, so the client's response validation would reject it before it could be sent back to the server. This adds `CreateMessageResultWithTools` to both.\r\n\r\n\r\nFWIW, with these changes we have full agentic sampling wired up in a branch of FastMCP, which is extremely exciting!",
      "created_at": "2025-12-04T17:05:12Z",
      "updated_at": "2025-12-04T17:27:49Z",
      "closed_at": null,
      "merged_at": null,
      "merge_commit_sha": "fb0951f661421619f2cf3fb7351ded6fd4b8aa39",
      "assignee": null,
      "assignees": {},
      "requested_reviewers": {},
      "requested_teams": {},
      "labels": {},
      "milestone": null,
      "draft": false,
      "head": {
        "label": "jlowin:feat/sampling-capabilities-parameter",
        "ref": "feat/sampling-capabilities-parameter",
        "sha": "540e4193bf24aee3710e295aa60ebda759e1f732",
        "user": {
          "login": "jlowin",
          "id": 153965,
          "node_id": "MDQ6VXNlcjE1Mzk2NQ==",
          "avatar_url": "https://avatars.githubusercontent.com/u/153965?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/jlowin",
          "type": "User",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 966291087,
          "node_id": "R_kgDOOZhujw",
          "name": "mcp-python-sdk",
          "full_name": "jlowin/mcp-python-sdk",
          "private": false,
          "owner": {
            "login": "jlowin",
            "id": 153965,
            "node_id": "MDQ6VXNlcjE1Mzk2NQ==",
            "avatar_url": "https://avatars.githubusercontent.com/u/153965?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/jlowin",
            "type": "User",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": true,
          "url": "https://api.github.com/repos/jlowin/mcp-python-sdk",
          "created_at": "2025-04-14T17:40:32Z",
          "updated_at": "2025-12-03T20:55:08Z",
          "pushed_at": "2025-12-04T17:25:55Z",
          "homepage": "https://modelcontextprotocol.io",
          "size": 3452,
          "stargazers_count": 6,
          "watchers_count": 6,
          "language": "Python",
          "has_issues": false,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": true,
          "has_discussions": false,
          "forks_count": 1,
          "archived": false,
          "disabled": false,
          "open_issues_count": 0,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 1,
          "open_issues": 0,
          "watchers": 6,
          "default_branch": "main"
        }
      },
      "base": {
        "label": "modelcontextprotocol:main",
        "ref": "main",
        "sha": "89ff338174cec2b28f23deaec6136a4f3b11e875",
        "user": {
          "login": "modelcontextprotocol",
          "id": 182288589,
          "node_id": "O_kgDOCt2AzQ",
          "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/modelcontextprotocol",
          "type": "Organization",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 862584018,
          "node_id": "R_kgDOM2n80g",
          "name": "python-sdk",
          "full_name": "modelcontextprotocol/python-sdk",
          "private": false,
          "owner": {
            "login": "modelcontextprotocol",
            "id": 182288589,
            "node_id": "O_kgDOCt2AzQ",
            "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/modelcontextprotocol",
            "type": "Organization",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": false,
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk",
          "created_at": "2024-09-24T21:01:35Z",
          "updated_at": "2025-12-06T05:02:17Z",
          "pushed_at": "2025-12-04T18:04:06Z",
          "homepage": "https://modelcontextprotocol.github.io/python-sdk/",
          "size": 4194,
          "stargazers_count": 20439,
          "watchers_count": 20439,
          "language": "Python",
          "has_issues": true,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": true,
          "has_discussions": false,
          "forks_count": 2843,
          "archived": false,
          "disabled": false,
          "open_issues_count": 345,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 2843,
          "open_issues": 345,
          "watchers": 20439,
          "default_branch": "main"
        }
      },
      "_links": {
        "self": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1722"
        },
        "html": {
          "href": "https://github.com/modelcontextprotocol/python-sdk/pull/1722"
        },
        "issue": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1722"
        },
        "comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1722/comments"
        },
        "review_comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1722/comments"
        },
        "review_comment": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/comments{/number}"
        },
        "commits": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1722/commits"
        },
        "statuses": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/statuses/540e4193bf24aee3710e295aa60ebda759e1f732"
        }
      },
      "author_association": "CONTRIBUTOR",
      "auto_merge": null,
      "active_lock_reason": null,
      "linked_issues": [
        1
      ]
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1721",
      "id": 3072043238,
      "node_id": "PR_kwDOM2n80s63G6jm",
      "number": 1721,
      "state": "open",
      "locked": false,
      "title": "Implement SEP-990 Enterprise Managed OAuth",
      "user": {
        "login": "BinoyOza-okta",
        "id": 202102938,
        "node_id": "U_kgDODAvYmg",
        "avatar_url": "https://avatars.githubusercontent.com/u/202102938?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/BinoyOza-okta",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "body": "This PR implements the **client-side** components of **SEP-990: Enterprise Managed Authorization**. It introduces the `EnterpriseAuthOAuthClientProvider` to handle the full token exchange flow required for Enterprise SSO, including RFC 8693 (Token Exchange) and RFC 7523 (JWT Bearer Grant).\r\n\r\n## Motivation and Context\r\n**Implements:** [SEP-990](https://github.com/modelcontextprotocol/modelcontextprotocol/issues/990)\r\n\r\nTo support enterprise environments where direct API keys are not compliant, the Python SDK needs to support \"Managed Authorization.\" This implementation allows the SDK to:\r\n1.  **Exchange Tokens:** Convert an existing Identity Provider (IdP) token (e.g., OIDC ID Token or SAML Assertion) into an MCP-specific \"ID-JAG\" token using **RFC 8693**.\r\n2.  **Authenticate:** Exchange the ID-JAG token for a usable Access Token via **RFC 7523**.\r\n\r\nThis aligns the Python SDK with the architecture defined in the SEP-990 implementation guide.\r\n\r\n## Implementation Details\r\nThe following components have been added to `src/mcp/client/auth/extensions/enterprise_managed_auth.py`:\r\n* **Data Models:** `TokenExchangeParameters` and `TokenExchangeResponse` using Pydantic to strictly type the exchange payloads.\r\n* **Client Provider:** `EnterpriseAuthOAuthClientProvider`, which extends the base `OAuthClientProvider` to orchestrate the exchange logic.\r\n* **ID-JAG Logic:** Support for `urn:ietf:params:oauth:token-type:id-jag` token types.\r\n\r\n## How Has This Been Tested?\r\nI have implemented comprehensive unit tests in `tests/client/auth/test_enterprise_managed_auth_client.py` using `pytest` and `unittest.mock`.\r\n\r\nThe testing suite covers the following scenarios:\r\n\r\n1.  **Data Model Validation:**\r\n    * Verified `TokenExchangeParameters` correctly generates requests for both **OIDC ID Tokens** (`test_token_exchange_params_from_id_token`) and **SAML Assertions** (`test_token_exchange_params_from_saml_assertion`).\r\n    * Validated enforcement of required fields (audience, resource, subject_token).\r\n\r\n2.  **RFC 8693 Token Exchange Logic:**\r\n    * **Success Path:** Mocked `httpx` to verify the correct payload structure (grant types, token types) is sent to the IdP.\r\n    * **Client Authentication:** Verified that `client_id` and `client_secret` are correctly injected into the request body when configured (`test_exchange_token_with_client_authentication`).\r\n    * **Error Handling:** Validated graceful handling of HTTP 400/500 errors, non-JSON error responses, and unexpected token types.\r\n\r\n3.  **RFC 7523 JWT Bearer Grant Logic:**\r\n    * **Success Path:** Verified the exchange of an ID-JAG token for a final Access Token.\r\n    * **Metadata Checks:** Ensured the flow fails appropriately if the MCP server's OAuth metadata (token endpoint) is missing.\r\n\r\n4.  **Network Edge Cases:**\r\n    * Simulated network failures (`httpx.ConnectError`, `httpx.ReadTimeout`) to ensure `OAuthTokenError` is raised with descriptive messages.\r\n## Breaking Changes\r\n**No.**\r\nThis is an additive extension. The core `OAuthClientProvider` remains backward compatible. Only users specifically importing and using `EnterpriseAuthOAuthClientProvider` will be affected.\r\n\r\n## Types of changes\r\n- [ ] Bug fix (non-breaking change which fixes an issue)\r\n- [x] New feature (non-breaking change which adds functionality)\r\n- [ ] Breaking change (fix or feature that would cause existing functionality to change)\r\n- [ ] Documentation update\r\n\r\n## Checklist\r\n- [x] I have read the [MCP Documentation](https://modelcontextprotocol.io)\r\n- [x] My code follows the repository's style guidelines\r\n- [x] New and existing tests pass locally\r\n- [x] I have added appropriate error handling\r\n- [x] I have added or updated documentation as needed\r\n\r\n## Additional context\r\n* **Dependencies:** Utilizes `pydantic` for model validation and `httpx` for async requests.\r\n* **Scope:** As agreed, this PR includes the **Client** implementation (`src/mcp/client/auth/extensions/`).",
      "created_at": "2025-12-04T16:29:20Z",
      "updated_at": "2025-12-04T16:29:20Z",
      "closed_at": null,
      "merged_at": null,
      "merge_commit_sha": "17648ecd4ff9f379722bf64a29a58552de1a1835",
      "assignee": null,
      "assignees": {},
      "requested_reviewers": {},
      "requested_teams": {},
      "labels": {},
      "milestone": null,
      "draft": false,
      "head": {
        "label": "BinoyOza-okta:feature/sep-990-enterprise-oauth",
        "ref": "feature/sep-990-enterprise-oauth",
        "sha": "09c05aa6bc5c2d0270d008e6b58ab7c6e167a295",
        "user": {
          "login": "BinoyOza-okta",
          "id": 202102938,
          "node_id": "U_kgDODAvYmg",
          "avatar_url": "https://avatars.githubusercontent.com/u/202102938?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/BinoyOza-okta",
          "type": "User",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 1110013039,
          "node_id": "R_kgDOQil0bw",
          "name": "python-sdk",
          "full_name": "BinoyOza-okta/python-sdk",
          "private": false,
          "owner": {
            "login": "BinoyOza-okta",
            "id": 202102938,
            "node_id": "U_kgDODAvYmg",
            "avatar_url": "https://avatars.githubusercontent.com/u/202102938?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/BinoyOza-okta",
            "type": "User",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": true,
          "url": "https://api.github.com/repos/BinoyOza-okta/python-sdk",
          "created_at": "2025-12-04T15:38:36Z",
          "updated_at": "2025-12-04T15:38:36Z",
          "pushed_at": "2025-12-04T16:06:03Z",
          "homepage": "https://modelcontextprotocol.github.io/python-sdk/",
          "size": 2573,
          "stargazers_count": 0,
          "watchers_count": 0,
          "language": null,
          "has_issues": false,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": false,
          "has_discussions": false,
          "forks_count": 0,
          "archived": false,
          "disabled": false,
          "open_issues_count": 0,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 0,
          "open_issues": 0,
          "watchers": 0,
          "default_branch": "main"
        }
      },
      "base": {
        "label": "modelcontextprotocol:main",
        "ref": "main",
        "sha": "89ff338174cec2b28f23deaec6136a4f3b11e875",
        "user": {
          "login": "modelcontextprotocol",
          "id": 182288589,
          "node_id": "O_kgDOCt2AzQ",
          "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/modelcontextprotocol",
          "type": "Organization",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 862584018,
          "node_id": "R_kgDOM2n80g",
          "name": "python-sdk",
          "full_name": "modelcontextprotocol/python-sdk",
          "private": false,
          "owner": {
            "login": "modelcontextprotocol",
            "id": 182288589,
            "node_id": "O_kgDOCt2AzQ",
            "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/modelcontextprotocol",
            "type": "Organization",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": false,
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk",
          "created_at": "2024-09-24T21:01:35Z",
          "updated_at": "2025-12-06T05:02:17Z",
          "pushed_at": "2025-12-04T18:04:06Z",
          "homepage": "https://modelcontextprotocol.github.io/python-sdk/",
          "size": 4194,
          "stargazers_count": 20439,
          "watchers_count": 20439,
          "language": "Python",
          "has_issues": true,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": true,
          "has_discussions": false,
          "forks_count": 2843,
          "archived": false,
          "disabled": false,
          "open_issues_count": 345,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 2843,
          "open_issues": 345,
          "watchers": 20439,
          "default_branch": "main"
        }
      },
      "_links": {
        "self": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1721"
        },
        "html": {
          "href": "https://github.com/modelcontextprotocol/python-sdk/pull/1721"
        },
        "issue": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1721"
        },
        "comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1721/comments"
        },
        "review_comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1721/comments"
        },
        "review_comment": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/comments{/number}"
        },
        "commits": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1721/commits"
        },
        "statuses": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/statuses/09c05aa6bc5c2d0270d008e6b58ab7c6e167a295"
        }
      },
      "author_association": "NONE",
      "auto_merge": null,
      "active_lock_reason": null,
      "linked_issues": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1720",
      "id": 3071928577,
      "node_id": "PR_kwDOM2n80s63GekB",
      "number": 1720,
      "state": "open",
      "locked": false,
      "title": "Fix JSON-RPC error response ID matching",
      "user": {
        "login": "crondinini-ant",
        "id": 224883180,
        "node_id": "U_kgDODWdx7A",
        "avatar_url": "https://avatars.githubusercontent.com/u/224883180?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/crondinini-ant",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "body": "## Motivation and Context\r\n\r\n \r\n\r\nWhen an MCP server returns a JSON-RPC response with the request ID as a string (e.g., `\"id\": \"0\"`) but the client sent the request with an integer ID (e.g., `\"id\": 0`), the response fails to match the pending request. This causes the client to timeout waiting for a response that was already received but couldn't be correlated.\r\n\r\n \r\n\r\nThe root cause is in [`src/mcp/shared/session.py:256-260`](https://github.com/modelcontextprotocol/python-sdk/blob/main/src/mcp/shared/session.py#L256-L260) where the client stores pending requests using an integer counter:\r\n\r\n \r\n\r\n```python\r\n\r\nrequest_id = self._request_id  # always int\r\n\r\nself._request_id = request_id + 1\r\n\r\nself._response_streams[request_id] = response_stream  # key is int\r\n\r\n```\r\n\r\n \r\n\r\nWhen a response arrives, the lookup `self._response_streams.pop(response_id, None)` fails silently if `response_id` is `\"0\"` (string) because Python dict lookups are type-sensitive (`0 != \"0\"`).\r\n\r\n \r\n\r\nThis is valid per the JSON-RPC spec and the SDK's own type definition at [`src/mcp/types.py:40`](https://github.com/modelcontextprotocol/python-sdk/blob/main/src/mcp/types.py#L40):\r\n\r\n \r\n\r\n```python\r\n\r\nRequestId = Annotated[int, Field(strict=True)] | str\r\n\r\n```\r\n\r\n \r\n\r\n## How Has This Been Tested?\r\n\r\n \r\n\r\nAdded three new unit tests in `tests/shared/test_session.py`:\r\n\r\n- `test_response_id_type_mismatch_string_to_int` - success responses with string IDs match integer request IDs\r\n\r\n- `test_error_response_id_type_mismatch_string_to_int` - error responses with string IDs match integer request IDs\r\n\r\n- `test_response_id_non_numeric_string_no_match` - non-numeric string IDs (like `\"abc\"`) don't incorrectly match\r\n\r\n \r\n\r\n## Breaking Changes\r\n\r\n \r\n\r\nNone. This is a backwards-compatible fix that makes the client more tolerant of server responses.\r\n\r\n \r\n\r\n## Types of changes\r\n\r\n \r\n\r\n- [x] Bug fix (non-breaking change which fixes an issue)\r\n\r\n- [ ] New feature (non-breaking change which adds functionality)\r\n\r\n- [ ] Breaking change (fix or feature that would cause existing functionality to change)\r\n\r\n- [ ] Documentation update\r\n\r\n \r\n\r\n## Checklist\r\n\r\n \r\n\r\n- [x] I have read the [MCP Documentation](https://modelcontextprotocol.io)\r\n\r\n- [x] My code follows the repository's style guidelines\r\n\r\n- [x] New and existing tests pass locally\r\n\r\n- [x] I have added appropriate error handling\r\n\r\n- [x] I have added or updated documentation as needed\r\n\r\n \r\n\r\n## Additional context\r\n\r\n \r\n\r\nThe fix adds a `_pop_response_stream()` helper method that:\r\n\r\n1. First tries an exact match lookup\r\n\r\n2. If the ID is a string, tries converting to int and looks up again\r\n\r\n3. If the ID is an int, tries converting to string and looks up again\r\n\r\n \r\n\r\nThis handles the common case where servers echo back IDs in a different but semantically equivalent format.",
      "created_at": "2025-12-04T15:57:06Z",
      "updated_at": "2025-12-04T15:57:06Z",
      "closed_at": null,
      "merged_at": null,
      "merge_commit_sha": "0c020009daec86be49452cdc997def9d863d2893",
      "assignee": null,
      "assignees": {},
      "requested_reviewers": {},
      "requested_teams": {},
      "labels": {},
      "milestone": null,
      "draft": true,
      "head": {
        "label": "modelcontextprotocol:claude/fix-jsonrpc-error-id-01QqyBAK4y2ewZ4nv8sfb5c9",
        "ref": "claude/fix-jsonrpc-error-id-01QqyBAK4y2ewZ4nv8sfb5c9",
        "sha": "97466ea79909c1711f9e5efb7955d89add9a9385",
        "user": {
          "login": "modelcontextprotocol",
          "id": 182288589,
          "node_id": "O_kgDOCt2AzQ",
          "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/modelcontextprotocol",
          "type": "Organization",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 862584018,
          "node_id": "R_kgDOM2n80g",
          "name": "python-sdk",
          "full_name": "modelcontextprotocol/python-sdk",
          "private": false,
          "owner": {
            "login": "modelcontextprotocol",
            "id": 182288589,
            "node_id": "O_kgDOCt2AzQ",
            "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/modelcontextprotocol",
            "type": "Organization",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": false,
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk",
          "created_at": "2024-09-24T21:01:35Z",
          "updated_at": "2025-12-06T05:02:17Z",
          "pushed_at": "2025-12-04T18:04:06Z",
          "homepage": "https://modelcontextprotocol.github.io/python-sdk/",
          "size": 4194,
          "stargazers_count": 20439,
          "watchers_count": 20439,
          "language": "Python",
          "has_issues": true,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": true,
          "has_discussions": false,
          "forks_count": 2843,
          "archived": false,
          "disabled": false,
          "open_issues_count": 345,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 2843,
          "open_issues": 345,
          "watchers": 20439,
          "default_branch": "main"
        }
      },
      "base": {
        "label": "modelcontextprotocol:main",
        "ref": "main",
        "sha": "89ff338174cec2b28f23deaec6136a4f3b11e875",
        "user": {
          "login": "modelcontextprotocol",
          "id": 182288589,
          "node_id": "O_kgDOCt2AzQ",
          "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/modelcontextprotocol",
          "type": "Organization",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 862584018,
          "node_id": "R_kgDOM2n80g",
          "name": "python-sdk",
          "full_name": "modelcontextprotocol/python-sdk",
          "private": false,
          "owner": {
            "login": "modelcontextprotocol",
            "id": 182288589,
            "node_id": "O_kgDOCt2AzQ",
            "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/modelcontextprotocol",
            "type": "Organization",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": false,
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk",
          "created_at": "2024-09-24T21:01:35Z",
          "updated_at": "2025-12-06T05:02:17Z",
          "pushed_at": "2025-12-04T18:04:06Z",
          "homepage": "https://modelcontextprotocol.github.io/python-sdk/",
          "size": 4194,
          "stargazers_count": 20439,
          "watchers_count": 20439,
          "language": "Python",
          "has_issues": true,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": true,
          "has_discussions": false,
          "forks_count": 2843,
          "archived": false,
          "disabled": false,
          "open_issues_count": 345,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 2843,
          "open_issues": 345,
          "watchers": 20439,
          "default_branch": "main"
        }
      },
      "_links": {
        "self": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1720"
        },
        "html": {
          "href": "https://github.com/modelcontextprotocol/python-sdk/pull/1720"
        },
        "issue": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1720"
        },
        "comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1720/comments"
        },
        "review_comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1720/comments"
        },
        "review_comment": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/comments{/number}"
        },
        "commits": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1720/commits"
        },
        "statuses": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/statuses/97466ea79909c1711f9e5efb7955d89add9a9385"
        }
      },
      "author_association": "CONTRIBUTOR",
      "auto_merge": null,
      "active_lock_reason": null,
      "linked_issues": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1718",
      "id": 3067833505,
      "node_id": "PR_kwDOM2n80s6222yh",
      "number": 1718,
      "state": "open",
      "locked": false,
      "title": "Fix UnboundLocalError in send_request when response not assigned",
      "user": {
        "login": "maxisbey",
        "id": 224885523,
        "node_id": "U_kgDODWd7Ew",
        "avatar_url": "https://avatars.githubusercontent.com/u/224885523?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/maxisbey",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "body": "Fixes an intermittent `UnboundLocalError` that could occur in `send_request()` at the line checking `isinstance(response_or_error, JSONRPCError)`.\n\n## Motivation and Context\n\nWe received a report of intermittent `UnboundLocalError` exceptions in `send_request()`:\n\n```\nUnboundLocalError: cannot access local variable 'response_or_error' where it is not associated with a value\n```\n\nThis can occur due to a race condition in anyio's `fail_after` context manager ([anyio#589](https://github.com/agronholm/anyio/issues/589)) where exceptions may be incorrectly suppressed, leaving the `response_or_error` variable unassigned while execution continues past the try/except block.\n\nThe fix:\n- Initializes `response_or_error` to `None` before the try block\n- Adds a `_process_response` static method with a defensive `None` check\n- Handles `EndOfStream` and `ClosedResourceError` exceptions explicitly\n- Uses try/except/else structure for cleaner control flow\n\n## How Has This Been Tested?\n\n- Added unit tests for `_process_response` covering all code paths\n- All existing session tests pass (23/23)\n- Created a minimal reproduction script demonstrating the bug and fix\n\n## Breaking Changes\n\nNone. This is a defensive fix that handles edge cases more gracefully.\n\n## Types of changes\n\n- [x] Bug fix (non-breaking change which fixes an issue)\n- [ ] New feature (non-breaking change which adds functionality)\n- [ ] Breaking change (fix or feature that would cause existing functionality to change)\n- [ ] Documentation update\n\n## Checklist\n\n- [x] I have read the [MCP Documentation](https://modelcontextprotocol.io)\n- [x] My code follows the repository's style guidelines\n- [x] New and existing tests pass locally\n- [x] I have added appropriate error handling\n- [x] I have added or updated documentation as needed\n\n## Additional context\n\nCloses #1717\n\nThe root cause is a race condition in anyio where `fail_after`'s cancel scope can incorrectly suppress exceptions when a timeout and successful completion happen simultaneously. While this was reportedly fixed in anyio 4.0 ([PR #591](https://github.com/agronholm/anyio/pull/591)), edge cases may remain. This fix adds defensive code to handle the scenario gracefully rather than crashing with `UnboundLocalError`.",
      "created_at": "2025-12-03T15:18:46Z",
      "updated_at": "2025-12-03T15:27:10Z",
      "closed_at": null,
      "merged_at": null,
      "merge_commit_sha": "fbbbca8d5136d8a2b072b1505e0cc846091b7f02",
      "assignee": null,
      "assignees": {},
      "requested_reviewers": {},
      "requested_teams": {},
      "labels": {
        "0": {
          "id": 7511840554,
          "node_id": "LA_kwDOM2n80s8AAAABv72XKg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/bug",
          "name": "bug",
          "color": "d73a4a",
          "default": true,
          "description": "Something isn't working"
        }
      },
      "milestone": null,
      "draft": false,
      "head": {
        "label": "modelcontextprotocol:fix/send-request-unbound-local-error",
        "ref": "fix/send-request-unbound-local-error",
        "sha": "ee2a010de7d2d146e6ee2e9567edc96181684bad",
        "user": {
          "login": "modelcontextprotocol",
          "id": 182288589,
          "node_id": "O_kgDOCt2AzQ",
          "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/modelcontextprotocol",
          "type": "Organization",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 862584018,
          "node_id": "R_kgDOM2n80g",
          "name": "python-sdk",
          "full_name": "modelcontextprotocol/python-sdk",
          "private": false,
          "owner": {
            "login": "modelcontextprotocol",
            "id": 182288589,
            "node_id": "O_kgDOCt2AzQ",
            "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/modelcontextprotocol",
            "type": "Organization",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": false,
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk",
          "created_at": "2024-09-24T21:01:35Z",
          "updated_at": "2025-12-06T05:02:17Z",
          "pushed_at": "2025-12-04T18:04:06Z",
          "homepage": "https://modelcontextprotocol.github.io/python-sdk/",
          "size": 4194,
          "stargazers_count": 20439,
          "watchers_count": 20439,
          "language": "Python",
          "has_issues": true,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": true,
          "has_discussions": false,
          "forks_count": 2843,
          "archived": false,
          "disabled": false,
          "open_issues_count": 345,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 2843,
          "open_issues": 345,
          "watchers": 20439,
          "default_branch": "main"
        }
      },
      "base": {
        "label": "modelcontextprotocol:main",
        "ref": "main",
        "sha": "8e02fc17e196295116d3fa4e993116ce6e0171c7",
        "user": {
          "login": "modelcontextprotocol",
          "id": 182288589,
          "node_id": "O_kgDOCt2AzQ",
          "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/modelcontextprotocol",
          "type": "Organization",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 862584018,
          "node_id": "R_kgDOM2n80g",
          "name": "python-sdk",
          "full_name": "modelcontextprotocol/python-sdk",
          "private": false,
          "owner": {
            "login": "modelcontextprotocol",
            "id": 182288589,
            "node_id": "O_kgDOCt2AzQ",
            "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/modelcontextprotocol",
            "type": "Organization",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": false,
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk",
          "created_at": "2024-09-24T21:01:35Z",
          "updated_at": "2025-12-06T05:02:17Z",
          "pushed_at": "2025-12-04T18:04:06Z",
          "homepage": "https://modelcontextprotocol.github.io/python-sdk/",
          "size": 4194,
          "stargazers_count": 20439,
          "watchers_count": 20439,
          "language": "Python",
          "has_issues": true,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": true,
          "has_discussions": false,
          "forks_count": 2843,
          "archived": false,
          "disabled": false,
          "open_issues_count": 345,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 2843,
          "open_issues": 345,
          "watchers": 20439,
          "default_branch": "main"
        }
      },
      "_links": {
        "self": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1718"
        },
        "html": {
          "href": "https://github.com/modelcontextprotocol/python-sdk/pull/1718"
        },
        "issue": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1718"
        },
        "comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1718/comments"
        },
        "review_comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1718/comments"
        },
        "review_comment": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/comments{/number}"
        },
        "commits": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1718/commits"
        },
        "statuses": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/statuses/ee2a010de7d2d146e6ee2e9567edc96181684bad"
        }
      },
      "author_association": "CONTRIBUTOR",
      "auto_merge": null,
      "active_lock_reason": null,
      "linked_issues": [
        5,
        1,
        1717
      ]
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1712",
      "id": 3060387493,
      "node_id": "PR_kwDOM2n80s62ac6l",
      "number": 1712,
      "state": "open",
      "locked": false,
      "title": "Add working example to easily integrate a FastMCP endpoint to a FastAPI app (which is not trivial)",
      "user": {
        "login": "vemonet",
        "id": 3778439,
        "node_id": "MDQ6VXNlcjM3Nzg0Mzk=",
        "avatar_url": "https://avatars.githubusercontent.com/u/3778439?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/vemonet",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "body": "This PR adds an example for integrating a FastMCP endpoint in a FastAPI app (which is not straightforward, and could be better documented). \r\n\r\nI have added an `examples/servers/fastapi/` folder with a minimal, focused, working example: `main.py`, `pyproject.toml`, and `README.md` (with basic uvicorn command).\r\n\r\nI have also added a line to point to this folder in the README, this way devs searching for \"fastapi\" with ctrl+F in the readme will find the docs easily.\r\n\r\n## Motivation and Context\r\n\r\nFor now only Starlette is documented, but as far as I know, most developers build APIs directly with FastAPI (which is a wrapper around Starlette) and not Starlette directly:\r\n\r\n- FastAPI provides out of the box OpenAPI specs and docs from type annotations\r\n- FastAPI enables devs to build well documented APIs easily, exactly the same way as FastMCP does: by using decorators and type annotations\r\n- FastMCP took a huge inspiration from FastAPI (which is even reflected in its name!), but it is not clear how to make the 2 interoperable, current documentation encourages to use Starlette when many developers want to use the same dev friendly API for the MCP tools and other API endpoints: \"Decorators and type annotations for me (MCP), not for thee (every other endpoints on the API)\" :)\r\n\r\nI already discussed the issue in https://github.com/modelcontextprotocol/python-sdk/issues/1367 without fully solving the problem (and I was already not the only one to face this problem according to the reactions on the issue)\r\n\r\nThe main problem when building a FastAPI app with a MCP endpoint is the missing `run()` lifespan (it is predefined for Starlette, but needs to be manually defined for FastAPI). It is not much, but it is not documented, and increases friction when wanting to integrate FastMCP in FastAPI.\r\n\r\nTrying to simply mount a Starlette `mcp.streamable_http_app()` on a FastAPI `app` will end up throwing this error at runtime:\r\n\r\n```\r\n  File \".venv/lib/python3.13/site-packages/mcp/server/streamable_http_manager.py\", line 138, in handle_request\r\n    raise RuntimeError(\"Task group is not initialized. Make sure to use run().\")\r\nRuntimeError: Task group is not initialized. Make sure to use run().\r\n```\r\n\r\nMeanwhile it works out of the box when mounting on a Starlette app, so all existing Starlette example are a bit misleading when you want to use FastAPI (which is a large amount of the users)\r\n\r\n## How Has This Been Tested?\r\n\r\nI have ran the command documented in the `README.md` of the folder `examples/servers/fastapi/` locally and it worked\r\n\r\n\r\n## Breaking Changes\r\n\r\nNo, it's just an example added to the existing docs\r\n\r\n## Types of changes\r\n<!-- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->\r\n- [ ] Bug fix (non-breaking change which fixes an issue)\r\n- [ ] New feature (non-breaking change which adds functionality)\r\n- [ ] Breaking change (fix or feature that would cause existing functionality to change)\r\n- [x] Documentation update\r\n\r\n## Checklist\r\n<!-- Go over all the following points, and put an `x` in all the boxes that apply. -->\r\n- [x] I have read the [MCP Documentation](https://modelcontextprotocol.io)\r\n- [x] My code follows the repository's style guidelines\r\n- [x] New and existing tests pass locally\r\n- [x] I have added appropriate error handling\r\n- [x] I have added or updated documentation as needed\r\n\r\n## Additional context\r\n\r\nI have added `exclude = [\"examples/servers/fastapi\"]` to the pyright config in the root `pyproject.toml`, otherwise pyright checks fails because monorepo is still not supported by pyright. I also tried to add `[tool.pyright] exclude = [\".\"]` to the `examples/servers/fastapi/pyproject.toml`, but it does not seems like pyright understand the concept of nested config files.\r\n\r\nIt would be good for the sake of diversity of provided examples that the examples can use dependencies not defined in the main `pyproject.toml`\r\n\r\nOther solutions to fix this pyright fumble could be:\r\n- Adding `fastapi` to the dev dependency group in the root `pyproject.toml`\r\n- Telling pyright in the root `pyproject.toml` to ignore the folder\r\n\r\n> I am used to `mypy` and waiting for `ty`, so my knowledge of `pyright` config is limited, let me know if there is a better approach to this \r\n\r\nWe could also make this a snippet directly integrated in the root `README.md` through `examples/snippets/` folder if you prefer\r\n\r\n",
      "created_at": "2025-12-01T18:13:45Z",
      "updated_at": "2025-12-01T18:14:21Z",
      "closed_at": null,
      "merged_at": null,
      "merge_commit_sha": "37184be0103d02da18bd5325e8e5cdbc13dd6567",
      "assignee": null,
      "assignees": {},
      "requested_reviewers": {},
      "requested_teams": {},
      "labels": {},
      "milestone": null,
      "draft": false,
      "head": {
        "label": "vemonet:add-fastapi-example",
        "ref": "add-fastapi-example",
        "sha": "c24195511ebd2509a3befe23ca77a518387b3b5c",
        "user": {
          "login": "vemonet",
          "id": 3778439,
          "node_id": "MDQ6VXNlcjM3Nzg0Mzk=",
          "avatar_url": "https://avatars.githubusercontent.com/u/3778439?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/vemonet",
          "type": "User",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 1107820635,
          "node_id": "R_kgDOQggAWw",
          "name": "python-sdk",
          "full_name": "vemonet/python-sdk",
          "private": false,
          "owner": {
            "login": "vemonet",
            "id": 3778439,
            "node_id": "MDQ6VXNlcjM3Nzg0Mzk=",
            "avatar_url": "https://avatars.githubusercontent.com/u/3778439?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/vemonet",
            "type": "User",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": true,
          "url": "https://api.github.com/repos/vemonet/python-sdk",
          "created_at": "2025-12-01T16:49:49Z",
          "updated_at": "2025-12-01T16:49:49Z",
          "pushed_at": "2025-12-01T18:02:37Z",
          "homepage": "https://modelcontextprotocol.github.io/python-sdk/",
          "size": 2511,
          "stargazers_count": 0,
          "watchers_count": 0,
          "language": null,
          "has_issues": false,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": false,
          "has_discussions": false,
          "forks_count": 1,
          "archived": false,
          "disabled": false,
          "open_issues_count": 0,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 1,
          "open_issues": 0,
          "watchers": 0,
          "default_branch": "main"
        }
      },
      "base": {
        "label": "modelcontextprotocol:main",
        "ref": "main",
        "sha": "2cd178a962ab454e3add228ecd721784b7b36e99",
        "user": {
          "login": "modelcontextprotocol",
          "id": 182288589,
          "node_id": "O_kgDOCt2AzQ",
          "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/modelcontextprotocol",
          "type": "Organization",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 862584018,
          "node_id": "R_kgDOM2n80g",
          "name": "python-sdk",
          "full_name": "modelcontextprotocol/python-sdk",
          "private": false,
          "owner": {
            "login": "modelcontextprotocol",
            "id": 182288589,
            "node_id": "O_kgDOCt2AzQ",
            "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/modelcontextprotocol",
            "type": "Organization",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": false,
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk",
          "created_at": "2024-09-24T21:01:35Z",
          "updated_at": "2025-12-06T05:02:17Z",
          "pushed_at": "2025-12-04T18:04:06Z",
          "homepage": "https://modelcontextprotocol.github.io/python-sdk/",
          "size": 4194,
          "stargazers_count": 20439,
          "watchers_count": 20439,
          "language": "Python",
          "has_issues": true,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": true,
          "has_discussions": false,
          "forks_count": 2843,
          "archived": false,
          "disabled": false,
          "open_issues_count": 345,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 2843,
          "open_issues": 345,
          "watchers": 20439,
          "default_branch": "main"
        }
      },
      "_links": {
        "self": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1712"
        },
        "html": {
          "href": "https://github.com/modelcontextprotocol/python-sdk/pull/1712"
        },
        "issue": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1712"
        },
        "comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1712/comments"
        },
        "review_comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1712/comments"
        },
        "review_comment": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/comments{/number}"
        },
        "commits": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1712/commits"
        },
        "statuses": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/statuses/c24195511ebd2509a3befe23ca77a518387b3b5c"
        }
      },
      "author_association": "NONE",
      "auto_merge": null,
      "active_lock_reason": null,
      "linked_issues": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1711",
      "id": 3060218210,
      "node_id": "PR_kwDOM2n80s62Zzli",
      "number": 1711,
      "state": "open",
      "locked": false,
      "title": "feat: add MCP proxy pattern convenience function (#12)",
      "user": {
        "login": "dgenio",
        "id": 12731907,
        "node_id": "MDQ6VXNlcjEyNzMxOTA3",
        "avatar_url": "https://avatars.githubusercontent.com/u/12731907?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/dgenio",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "body": "## Description\r\n\r\nImplements the `mcp_proxy()` convenience function that enables bidirectional message forwarding between two MCP transports, porting the TypeScript proxy pattern to the Python SDK.\r\n\r\n## Changes\r\n\r\n- Added `mcp_proxy()` context manager in `src/mcp/shared/proxy.py`\r\n- Implements bidirectional message forwarding using `anyio` task groups\r\n- Supports optional error handling with sync/async callbacks\r\n- Automatically closes both transports when one closes\r\n- Comprehensive test coverage in `tests/shared/test_proxy.py`\r\n\r\n## Features\r\n\r\n- **Bidirectional forwarding**: Messages flow in both directions simultaneously\r\n- **Error handling**: Optional `onerror` callback (supports both sync and async)\r\n- **Automatic cleanup**: When one transport closes, the other is also closed\r\n- **Exception handling**: Properly handles `SessionMessage` and `Exception` objects from read streams\r\n- **Resource management**: Uses context manager pattern for proper cleanup\r\n\r\n## Usage Example\r\n\r\nfrom mcp.shared.proxy import mcp_proxy\r\n\r\nasync with mcp_proxy(\r\n    transport_to_client=(client_read, client_write),\r\n    transport_to_server=(server_read, server_write),\r\n    onerror=lambda e: logger.error(f\"Proxy error: {e}\"),\r\n):\r\n    # Proxy is active, forwarding messages bidirectionally\r\n    await some_operation()\r\n# Both transports are closed when exiting the context## Testing\r\n\r\n- Unit tests cover bidirectional forwarding, error handling, stream cleanup, and edge cases\r\n- All tests pass with proper async/await patterns\r\n- Follows existing test patterns in the repository\r\n\r\n## Related\r\n\r\nCloses #12\r\n\r\n## Type of Change\r\n\r\n- [x] New feature (non-breaking change which adds functionality)\r\n- [ ] Bug fix (non-breaking change which fixes an issue)\r\n- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)\r\n- [ ] Documentation update\r\n\r\n## Checklist\r\n\r\n- [x] Code follows the repository's style guidelines\r\n- [x] Tests added/updated for new functionality\r\n- [x] All tests pass locally\r\n- [x] Linting and type checking pass\r\n- [x] Documentation updated (if applicable)",
      "created_at": "2025-12-01T17:27:39Z",
      "updated_at": "2025-12-04T11:33:29Z",
      "closed_at": null,
      "merged_at": null,
      "merge_commit_sha": "e0c1c37bb74049dc34a0882318646ba6a410dbdc",
      "assignee": null,
      "assignees": {},
      "requested_reviewers": {},
      "requested_teams": {},
      "labels": {},
      "milestone": null,
      "draft": true,
      "head": {
        "label": "dgenio:feature/12-mcp-proxy-pattern",
        "ref": "feature/12-mcp-proxy-pattern",
        "sha": "e5bdd4c93066b7138363f9d38fb5ce0dbc843d1d",
        "user": {
          "login": "dgenio",
          "id": 12731907,
          "node_id": "MDQ6VXNlcjEyNzMxOTA3",
          "avatar_url": "https://avatars.githubusercontent.com/u/12731907?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/dgenio",
          "type": "User",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 1105906764,
          "node_id": "R_kgDOQerMTA",
          "name": "python-sdk",
          "full_name": "dgenio/python-sdk",
          "private": false,
          "owner": {
            "login": "dgenio",
            "id": 12731907,
            "node_id": "MDQ6VXNlcjEyNzMxOTA3",
            "avatar_url": "https://avatars.githubusercontent.com/u/12731907?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/dgenio",
            "type": "User",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": true,
          "url": "https://api.github.com/repos/dgenio/python-sdk",
          "created_at": "2025-11-28T10:30:09Z",
          "updated_at": "2025-12-01T17:05:42Z",
          "pushed_at": "2025-12-03T21:29:31Z",
          "homepage": "https://modelcontextprotocol.github.io/python-sdk/",
          "size": 2651,
          "stargazers_count": 0,
          "watchers_count": 0,
          "language": "Python",
          "has_issues": false,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": false,
          "has_discussions": false,
          "forks_count": 0,
          "archived": false,
          "disabled": false,
          "open_issues_count": 0,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 0,
          "open_issues": 0,
          "watchers": 0,
          "default_branch": "main"
        }
      },
      "base": {
        "label": "modelcontextprotocol:main",
        "ref": "main",
        "sha": "9ed0b93cebbd2d008f8162786eb81d9c3992e045",
        "user": {
          "login": "modelcontextprotocol",
          "id": 182288589,
          "node_id": "O_kgDOCt2AzQ",
          "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/modelcontextprotocol",
          "type": "Organization",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 862584018,
          "node_id": "R_kgDOM2n80g",
          "name": "python-sdk",
          "full_name": "modelcontextprotocol/python-sdk",
          "private": false,
          "owner": {
            "login": "modelcontextprotocol",
            "id": 182288589,
            "node_id": "O_kgDOCt2AzQ",
            "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/modelcontextprotocol",
            "type": "Organization",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": false,
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk",
          "created_at": "2024-09-24T21:01:35Z",
          "updated_at": "2025-12-06T05:02:17Z",
          "pushed_at": "2025-12-04T18:04:06Z",
          "homepage": "https://modelcontextprotocol.github.io/python-sdk/",
          "size": 4194,
          "stargazers_count": 20439,
          "watchers_count": 20439,
          "language": "Python",
          "has_issues": true,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": true,
          "has_discussions": false,
          "forks_count": 2843,
          "archived": false,
          "disabled": false,
          "open_issues_count": 345,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 2843,
          "open_issues": 345,
          "watchers": 20439,
          "default_branch": "main"
        }
      },
      "_links": {
        "self": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1711"
        },
        "html": {
          "href": "https://github.com/modelcontextprotocol/python-sdk/pull/1711"
        },
        "issue": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1711"
        },
        "comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1711/comments"
        },
        "review_comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1711/comments"
        },
        "review_comment": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/comments{/number}"
        },
        "commits": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1711/commits"
        },
        "statuses": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/statuses/e5bdd4c93066b7138363f9d38fb5ce0dbc843d1d"
        }
      },
      "author_association": "NONE",
      "auto_merge": null,
      "active_lock_reason": null,
      "linked_issues": [
        1,
        12
      ]
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1709",
      "id": 3059330471,
      "node_id": "PR_kwDOM2n80s62Wa2n",
      "number": 1709,
      "state": "open",
      "locked": false,
      "title": "feat: Add LLM provider adapter documentation and examp",
      "user": {
        "login": "dgenio",
        "id": 12731907,
        "node_id": "MDQ6VXNlcjEyNzMxOTA3",
        "avatar_url": "https://avatars.githubusercontent.com/u/12731907?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/dgenio",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "body": "## Summary\r\n\r\nThis PR addresses #235 by providing comprehensive documentation and examples for creating adapters that convert MCP tool schemas to various LLM provider formats (Gemini, OpenAI, Claude).\r\n\r\n## Changes\r\n\r\n- **New documentation page** (`docs/llm-adapters.md`): Comprehensive guide covering:\r\n  - Basic adapter patterns\r\n  - Complete implementations for Gemini, OpenAI, and Anthropic Claude\r\n  - Advanced schema transformations (nested objects, arrays, enums)\r\n  - Error handling patterns\r\n  - Best practices\r\n\r\n- **Runnable example** (`examples/snippets/clients/llm_adapter_example.py`): Demonstrates:\r\n  - Connecting to MCP servers\r\n  - Listing and converting tools\r\n  - Batch conversion with error handling\r\n  - Validation utilities\r\n\r\n- **Documentation updates**: Added references in:\r\n  - `docs/index.md` - Getting Started section\r\n  - `README.md` - Advanced Usage and Documentation sections\r\n  - `mkdocs.yml` - Navigation menu\r\n\r\n## Design Decision\r\n\r\nFollowing maintainer feedback, this PR provides documentation and examples rather than official adapter utilities. This approach:\r\n- Makes it easy for developers to create adapters\r\n- Avoids maintenance burden of third-party SDK dependencies\r\n- Provides clear patterns and best practices\r\n- Includes working examples for all three major providers\r\n\r\n## Testing\r\n\r\n- ✅ All files pass linting (ruff, pyright)\r\n- ✅ Documentation follows mkdocs format\r\n- ✅ Example script is registered and runnable\r\n- ✅ No breaking changes (documentation only)\r\n\r\n## Related\r\n\r\nCloses #235",
      "created_at": "2025-12-01T13:39:22Z",
      "updated_at": "2025-12-01T17:09:35Z",
      "closed_at": null,
      "merged_at": null,
      "merge_commit_sha": "33aa5e9b266c1895cbafa94249980a210469dfb6",
      "assignee": null,
      "assignees": {},
      "requested_reviewers": {},
      "requested_teams": {},
      "labels": {},
      "milestone": null,
      "draft": false,
      "head": {
        "label": "dgenio:feature/235-llm-provider-adapters-docs",
        "ref": "feature/235-llm-provider-adapters-docs",
        "sha": "a60cdccaced692eecf476a4ed462e64d27243716",
        "user": {
          "login": "dgenio",
          "id": 12731907,
          "node_id": "MDQ6VXNlcjEyNzMxOTA3",
          "avatar_url": "https://avatars.githubusercontent.com/u/12731907?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/dgenio",
          "type": "User",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 1105906764,
          "node_id": "R_kgDOQerMTA",
          "name": "python-sdk",
          "full_name": "dgenio/python-sdk",
          "private": false,
          "owner": {
            "login": "dgenio",
            "id": 12731907,
            "node_id": "MDQ6VXNlcjEyNzMxOTA3",
            "avatar_url": "https://avatars.githubusercontent.com/u/12731907?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/dgenio",
            "type": "User",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": true,
          "url": "https://api.github.com/repos/dgenio/python-sdk",
          "created_at": "2025-11-28T10:30:09Z",
          "updated_at": "2025-12-01T17:05:42Z",
          "pushed_at": "2025-12-03T21:29:31Z",
          "homepage": "https://modelcontextprotocol.github.io/python-sdk/",
          "size": 2651,
          "stargazers_count": 0,
          "watchers_count": 0,
          "language": "Python",
          "has_issues": false,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": false,
          "has_discussions": false,
          "forks_count": 0,
          "archived": false,
          "disabled": false,
          "open_issues_count": 0,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 0,
          "open_issues": 0,
          "watchers": 0,
          "default_branch": "main"
        }
      },
      "base": {
        "label": "modelcontextprotocol:main",
        "ref": "main",
        "sha": "c92bb2f7ffaa61813d7cc350887f4ece38307769",
        "user": {
          "login": "modelcontextprotocol",
          "id": 182288589,
          "node_id": "O_kgDOCt2AzQ",
          "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/modelcontextprotocol",
          "type": "Organization",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 862584018,
          "node_id": "R_kgDOM2n80g",
          "name": "python-sdk",
          "full_name": "modelcontextprotocol/python-sdk",
          "private": false,
          "owner": {
            "login": "modelcontextprotocol",
            "id": 182288589,
            "node_id": "O_kgDOCt2AzQ",
            "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/modelcontextprotocol",
            "type": "Organization",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": false,
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk",
          "created_at": "2024-09-24T21:01:35Z",
          "updated_at": "2025-12-06T05:02:17Z",
          "pushed_at": "2025-12-04T18:04:06Z",
          "homepage": "https://modelcontextprotocol.github.io/python-sdk/",
          "size": 4194,
          "stargazers_count": 20439,
          "watchers_count": 20439,
          "language": "Python",
          "has_issues": true,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": true,
          "has_discussions": false,
          "forks_count": 2843,
          "archived": false,
          "disabled": false,
          "open_issues_count": 345,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 2843,
          "open_issues": 345,
          "watchers": 20439,
          "default_branch": "main"
        }
      },
      "_links": {
        "self": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1709"
        },
        "html": {
          "href": "https://github.com/modelcontextprotocol/python-sdk/pull/1709"
        },
        "issue": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1709"
        },
        "comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1709/comments"
        },
        "review_comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1709/comments"
        },
        "review_comment": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/comments{/number}"
        },
        "commits": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1709/commits"
        },
        "statuses": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/statuses/a60cdccaced692eecf476a4ed462e64d27243716"
        }
      },
      "author_association": "NONE",
      "auto_merge": null,
      "active_lock_reason": null,
      "linked_issues": [
        2,
        235
      ]
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1707",
      "id": 3056203239,
      "node_id": "PR_kwDOM2n80s62KfXn",
      "number": 1707,
      "state": "open",
      "locked": false,
      "title": "feat: support logging to stderr in Jupyter Notebook environments (#156)",
      "user": {
        "login": "dgenio",
        "id": 12731907,
        "node_id": "MDQ6VXNlcjEyNzMxOTA3",
        "avatar_url": "https://avatars.githubusercontent.com/u/12731907?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/dgenio",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "body": "## Summary\r\n\r\nFixes #156 - Adds support for displaying stderr output in Jupyter Notebook environments.\r\n\r\n## Changes\r\n\r\n- Added Jupyter/IPython detection using `IPython.get_ipython()`\r\n- Implemented async stderr reader that reads stderr asynchronously (similar to stdout)\r\n- Added IPython display integration for colored stderr output in Jupyter notebooks\r\n- Updated process creation to pipe stderr instead of redirecting (enables async reading)\r\n- Updated Windows process creation and fallback to support piped stderr\r\n- Updated `FallbackProcess` to wrap stderr in async-compatible streams\r\n\r\n## Design Decisions\r\n\r\n- **Backward compatibility**: `errlog` parameter is kept but behavior adapts based on environment\r\n- **Error handling**: Non-critical errors are logged but don't stop execution\r\n- **Performance**: Matches stdout_reader behavior (line-by-line buffering)\r\n- **Platform support**: Works on both Unix and Windows (including fallback path)\r\n\r\n## Testing\r\n\r\n- Added comprehensive tests for stderr capture, Jupyter detection, and display integration\r\n- All existing tests pass\r\n- Linting and type checking pass\r\n\r\n## Behavior\r\n\r\n- **In Jupyter**: stderr is displayed using IPython's display system with red HTML formatting\r\n- **Outside Jupyter**: stderr is printed to the provided `errlog` stream (defaults to `sys.stderr`)\r\n- **Fallback**: If IPython display fails, falls back to regular print\r\n\r\nThis enables proper debugging of MCP servers in Jupyter notebook environments, addressing the issue where server crashes or command errors were invisible.",
      "created_at": "2025-11-30T08:33:40Z",
      "updated_at": "2025-12-01T12:45:17Z",
      "closed_at": null,
      "merged_at": null,
      "merge_commit_sha": "70df9b5e8af849b5251bc38a9d888278318e90bf",
      "assignee": null,
      "assignees": {},
      "requested_reviewers": {},
      "requested_teams": {},
      "labels": {},
      "milestone": null,
      "draft": false,
      "head": {
        "label": "dgenio:feature/156-jupyter-stderr-clean",
        "ref": "feature/156-jupyter-stderr-clean",
        "sha": "6a5319014a6ceb8827237c4b17839cace4b84307",
        "user": {
          "login": "dgenio",
          "id": 12731907,
          "node_id": "MDQ6VXNlcjEyNzMxOTA3",
          "avatar_url": "https://avatars.githubusercontent.com/u/12731907?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/dgenio",
          "type": "User",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 1105906764,
          "node_id": "R_kgDOQerMTA",
          "name": "python-sdk",
          "full_name": "dgenio/python-sdk",
          "private": false,
          "owner": {
            "login": "dgenio",
            "id": 12731907,
            "node_id": "MDQ6VXNlcjEyNzMxOTA3",
            "avatar_url": "https://avatars.githubusercontent.com/u/12731907?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/dgenio",
            "type": "User",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": true,
          "url": "https://api.github.com/repos/dgenio/python-sdk",
          "created_at": "2025-11-28T10:30:09Z",
          "updated_at": "2025-12-01T17:05:42Z",
          "pushed_at": "2025-12-03T21:29:31Z",
          "homepage": "https://modelcontextprotocol.github.io/python-sdk/",
          "size": 2651,
          "stargazers_count": 0,
          "watchers_count": 0,
          "language": "Python",
          "has_issues": false,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": false,
          "has_discussions": false,
          "forks_count": 0,
          "archived": false,
          "disabled": false,
          "open_issues_count": 0,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 0,
          "open_issues": 0,
          "watchers": 0,
          "default_branch": "main"
        }
      },
      "base": {
        "label": "modelcontextprotocol:main",
        "ref": "main",
        "sha": "c92bb2f7ffaa61813d7cc350887f4ece38307769",
        "user": {
          "login": "modelcontextprotocol",
          "id": 182288589,
          "node_id": "O_kgDOCt2AzQ",
          "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/modelcontextprotocol",
          "type": "Organization",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 862584018,
          "node_id": "R_kgDOM2n80g",
          "name": "python-sdk",
          "full_name": "modelcontextprotocol/python-sdk",
          "private": false,
          "owner": {
            "login": "modelcontextprotocol",
            "id": 182288589,
            "node_id": "O_kgDOCt2AzQ",
            "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/modelcontextprotocol",
            "type": "Organization",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": false,
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk",
          "created_at": "2024-09-24T21:01:35Z",
          "updated_at": "2025-12-06T05:02:17Z",
          "pushed_at": "2025-12-04T18:04:06Z",
          "homepage": "https://modelcontextprotocol.github.io/python-sdk/",
          "size": 4194,
          "stargazers_count": 20439,
          "watchers_count": 20439,
          "language": "Python",
          "has_issues": true,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": true,
          "has_discussions": false,
          "forks_count": 2843,
          "archived": false,
          "disabled": false,
          "open_issues_count": 345,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 2843,
          "open_issues": 345,
          "watchers": 20439,
          "default_branch": "main"
        }
      },
      "_links": {
        "self": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1707"
        },
        "html": {
          "href": "https://github.com/modelcontextprotocol/python-sdk/pull/1707"
        },
        "issue": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1707"
        },
        "comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1707/comments"
        },
        "review_comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1707/comments"
        },
        "review_comment": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/comments{/number}"
        },
        "commits": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1707/commits"
        },
        "statuses": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/statuses/6a5319014a6ceb8827237c4b17839cace4b84307"
        }
      },
      "author_association": "NONE",
      "auto_merge": null,
      "active_lock_reason": null,
      "linked_issues": [
        1,
        156
      ]
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1697",
      "id": 3054336658,
      "node_id": "PR_kwDOM2n80s62DXqS",
      "number": 1697,
      "state": "open",
      "locked": false,
      "title": "docs: clarify Streamable HTTP stateless mode semantics and usage",
      "user": {
        "login": "dgenio",
        "id": 12731907,
        "node_id": "MDQ6VXNlcjEyNzMxOTA3",
        "avatar_url": "https://avatars.githubusercontent.com/u/12731907?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/dgenio",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "body": "## Summary\r\n\r\nThis PR improves the documentation for Streamable HTTP `stateless_http` mode in the Python SDK by clarifying what \"stateless\" means in the MCP context, which features are impacted, and when this mode is appropriate to use.\r\n\r\n## Motivation\r\n\r\nSeveral production deployments rely on Streamable HTTP transport, and stateless mode is particularly attractive for serverless and load-balanced environments. However, the current documentation doesn't fully explain:\r\n\r\n- What \"stateless\" actually means in terms of session lifecycle\r\n- Which MCP features are unavailable or behave differently in stateless mode\r\n- When to choose stateless vs stateful operation\r\n- How to deploy stateless servers effectively\r\n\r\nThis directly addresses the concerns raised in issue #1696 about unclear semantics, limitations, and naming.\r\n\r\n## Changes\r\n\r\n### Added: Comprehensive \"Understanding Stateless Mode\" Section\r\n\r\nLocated after the Streamable HTTP transport examples, this new documentation includes:\r\n\r\n#### 1. **Clear Definition**\r\n- Explains the per-request session model used in stateless mode\r\n- Contrasts with stateful mode's persistent sessions\r\n- Details what happens at the transport level\r\n\r\n#### 2. **Feature Compatibility Table**\r\nShows which MCP features work in each mode:\r\n\r\n| Feature | Stateful | Stateless |\r\n|---------|----------|-----------|\r\n| Server Notifications | ✅ | ❌ |\r\n| Resource Subscriptions | ✅ | ❌ |\r\n| Multi-turn Context | ✅ | ❌ |\r\n| Long-running Tools | ✅ | ⚠️ |\r\n| Tools/Resources/Prompts | ✅ | ✅ |\r\n| Concurrent Requests | ⚠️ | ✅ |\r\n\r\nWith helpful footnotes explaining the limitations.\r\n\r\n#### 3. **Usage Guidance**\r\n**Stateless mode is ideal for:**\r\n- Serverless deployments (AWS Lambda, Cloud Functions, etc.)\r\n- Load-balanced multi-node deployments without sticky sessions\r\n- Stateless APIs where each request is self-contained\r\n- High concurrency scenarios\r\n- Simplified operations without session management\r\n\r\n**Stateful mode is needed for:**\r\n- Server notifications and subscriptions\r\n- Multi-turn conversation state\r\n- Long-running operations with progress updates\r\n- Connection resumability\r\n\r\n#### 4. **Three Deployment Patterns**\r\n- Pure Stateless (recommended for serverless/auto-scaling)\r\n- Stateful with Sticky Sessions (notifications + load balancing)\r\n- Hybrid Approach (both modes side-by-side)\r\n\r\nEach with code examples.\r\n\r\n#### 5. **Technical Details**\r\n- Step-by-step session lifecycle in stateless mode\r\n- Performance characteristics (initialization overhead, memory efficiency, scalability)\r\n- Stateless mode design checklist\r\n\r\n#### 6. **Updated Introduction**\r\nChanged the blanket recommendation for stateless mode to a more nuanced statement that directs users to the new section for guidance.\r\n\r\n## Type of Change\r\n\r\n- [x] Documentation only\r\n- [ ] Bug fix\r\n- [ ] New feature\r\n- [ ] Breaking change\r\n\r\n## Testing\r\n\r\n- [x] Documentation builds without errors\r\n- [x] Markdown formatting is correct\r\n- [x] Internal links work properly\r\n- [x] Code examples are syntactically valid\r\n\r\n## Notes\r\n\r\n- This is a **documentation-only change**; no behavior is modified\r\n- Examples reference existing code in `examples/servers/simple-streamablehttp-stateless/`\r\n- If maintainers prefer alternative terminology (e.g., \"ephemeral mode\"), I'm happy to update accordingly\r\n\r\n## Checklist\r\n\r\n- [x] My code follows the project's style guidelines\r\n- [x] I have performed a self-review of my own changes\r\n- [x] I have commented my code where necessary\r\n- [x] My changes generate no new warnings\r\n- [x] Any dependent changes have been merged and published\r\n\r\nCloses #1696",
      "created_at": "2025-11-28T15:10:12Z",
      "updated_at": "2025-12-03T21:29:33Z",
      "closed_at": null,
      "merged_at": null,
      "merge_commit_sha": "52cc696c7cf428511fcb7f19b19883b2c439bfb1",
      "assignee": null,
      "assignees": {},
      "requested_reviewers": {},
      "requested_teams": {},
      "labels": {},
      "milestone": null,
      "draft": false,
      "head": {
        "label": "dgenio:docs/stateless-http-clarification",
        "ref": "docs/stateless-http-clarification",
        "sha": "ae4b1ca3c2935906f3e1e356a228806d06127b36",
        "user": {
          "login": "dgenio",
          "id": 12731907,
          "node_id": "MDQ6VXNlcjEyNzMxOTA3",
          "avatar_url": "https://avatars.githubusercontent.com/u/12731907?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/dgenio",
          "type": "User",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 1105906764,
          "node_id": "R_kgDOQerMTA",
          "name": "python-sdk",
          "full_name": "dgenio/python-sdk",
          "private": false,
          "owner": {
            "login": "dgenio",
            "id": 12731907,
            "node_id": "MDQ6VXNlcjEyNzMxOTA3",
            "avatar_url": "https://avatars.githubusercontent.com/u/12731907?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/dgenio",
            "type": "User",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": true,
          "url": "https://api.github.com/repos/dgenio/python-sdk",
          "created_at": "2025-11-28T10:30:09Z",
          "updated_at": "2025-12-01T17:05:42Z",
          "pushed_at": "2025-12-03T21:29:31Z",
          "homepage": "https://modelcontextprotocol.github.io/python-sdk/",
          "size": 2651,
          "stargazers_count": 0,
          "watchers_count": 0,
          "language": "Python",
          "has_issues": false,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": false,
          "has_discussions": false,
          "forks_count": 0,
          "archived": false,
          "disabled": false,
          "open_issues_count": 0,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 0,
          "open_issues": 0,
          "watchers": 0,
          "default_branch": "main"
        }
      },
      "base": {
        "label": "modelcontextprotocol:main",
        "ref": "main",
        "sha": "8e02fc17e196295116d3fa4e993116ce6e0171c7",
        "user": {
          "login": "modelcontextprotocol",
          "id": 182288589,
          "node_id": "O_kgDOCt2AzQ",
          "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/modelcontextprotocol",
          "type": "Organization",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 862584018,
          "node_id": "R_kgDOM2n80g",
          "name": "python-sdk",
          "full_name": "modelcontextprotocol/python-sdk",
          "private": false,
          "owner": {
            "login": "modelcontextprotocol",
            "id": 182288589,
            "node_id": "O_kgDOCt2AzQ",
            "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/modelcontextprotocol",
            "type": "Organization",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": false,
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk",
          "created_at": "2024-09-24T21:01:35Z",
          "updated_at": "2025-12-06T05:02:17Z",
          "pushed_at": "2025-12-04T18:04:06Z",
          "homepage": "https://modelcontextprotocol.github.io/python-sdk/",
          "size": 4194,
          "stargazers_count": 20439,
          "watchers_count": 20439,
          "language": "Python",
          "has_issues": true,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": true,
          "has_discussions": false,
          "forks_count": 2843,
          "archived": false,
          "disabled": false,
          "open_issues_count": 345,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 2843,
          "open_issues": 345,
          "watchers": 20439,
          "default_branch": "main"
        }
      },
      "_links": {
        "self": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1697"
        },
        "html": {
          "href": "https://github.com/modelcontextprotocol/python-sdk/pull/1697"
        },
        "issue": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1697"
        },
        "comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1697/comments"
        },
        "review_comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1697/comments"
        },
        "review_comment": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/comments{/number}"
        },
        "commits": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1697/commits"
        },
        "statuses": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/statuses/ae4b1ca3c2935906f3e1e356a228806d06127b36"
        }
      },
      "author_association": "NONE",
      "auto_merge": null,
      "active_lock_reason": null,
      "linked_issues": [
        1,
        1696
      ]
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1693",
      "id": 3054020906,
      "node_id": "PR_kwDOM2n80s62CKkq",
      "number": 1693,
      "state": "open",
      "locked": false,
      "title": "Add pluggable instrumentation interface and request_id logging",
      "user": {
        "login": "dgenio",
        "id": 12731907,
        "node_id": "MDQ6VXNlcjEyNzMxOTA3",
        "avatar_url": "https://avatars.githubusercontent.com/u/12731907?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/dgenio",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "body": "## Summary\r\n\r\nThis PR introduces a **pluggable instrumentation interface** with a **token-based API** for the MCP Python SDK, enabling OpenTelemetry and other observability integrations as requested in [#421](https://github.com/modelcontextprotocol/python-sdk/issues/421).\r\n\r\n## Key Innovation: Token-Based API\r\n\r\nThe instrumentation interface uses a token-based approach that solves a critical design problem:\r\n\r\n```python\r\nclass Instrumenter(Protocol):\r\n    def on_request_start(...) -> Any:  # Returns a token\r\n        \"\"\"Start instrumentation, return state token (e.g., OTel span)\"\"\"\r\n    \r\n    def on_request_end(token: Any, ...) -> None:  # Receives the token\r\n        \"\"\"End instrumentation using the token\"\"\"\r\n    \r\n    def on_error(token: Any, ...) -> None:  # Receives the token\r\n        \"\"\"Handle errors using the token\"\"\"\r\n```\r\n\r\nThis design enables instrumenters to maintain state (like OpenTelemetry spans) **without external storage or side-channels**, addressing feedback from the community on API design best practices.\r\n\r\n## Changes\r\n\r\n### Core Interface\r\n* Defined `Instrumenter` protocol with token-based hooks\r\n* Created `NoOpInstrumenter` as default implementation with minimal overhead\r\n* Token can be any value (span object, dict, etc.)\r\n\r\n### Integration\r\n* Added `instrumenter` parameter to `ServerSession` and `ClientSession` constructors\r\n* Wired instrumentation into `Server._handle_request()` to track:\r\n  * Request start/end with duration tracking\r\n  * Success/failure status\r\n  * Error occurrences with token propagation\r\n* Added `request_id` to logging `extra` fields for correlation\r\n\r\n### OpenTelemetry Example\r\n* **NEW**: Complete `OpenTelemetryInstrumenter` implementation in `examples/opentelemetry_instrumentation.py`\r\n* Demonstrates span management using tokens\r\n* Includes setup code and runnable example\r\n* Shows proper error recording and status codes\r\n\r\n### Testing\r\n* Comprehensive tests verifying:\r\n  * Token flow from start → end/error\r\n  * Hooks are invoked for successful and failed requests\r\n  * `request_id` is consistent across lifecycle\r\n  * Metadata is passed correctly\r\n  * Default no-op behavior works\r\n\r\n### Documentation\r\n* Added `docs/instrumentation.md` with:\r\n  * Token-based API explanation with \"Why Tokens?\" section\r\n  * Complete OpenTelemetry integration guide\r\n  * Usage examples for server and client\r\n  * Custom metrics example\r\n  * Best practices and migration guide\r\n\r\n## Benefits\r\n\r\n1. **No External Storage**: Instrumenters don't need `spans = {}` dictionaries\r\n2. **OpenTelemetry Compatible**: Spans can be returned and passed directly\r\n3. **Thread-Safe**: Each request gets its own token\r\n4. **Automatic Cleanup**: Tokens are garbage collected\r\n5. **Flexible**: Token can be any value\r\n\r\n## Follow-up Work\r\n\r\n* Package OpenTelemetry instrumenter as installable extra (`pip install mcp[opentelemetry]`)\r\n* Additional built-in instrumenters (Prometheus, StatsD, Datadog)\r\n* Distributed tracing via `params._meta.traceparent` propagation\r\n* Client-side instrumentation (server-side is complete)\r\n\r\nFixes #421",
      "created_at": "2025-11-28T12:59:26Z",
      "updated_at": "2025-11-28T14:50:36Z",
      "closed_at": null,
      "merged_at": null,
      "merge_commit_sha": null,
      "assignee": null,
      "assignees": {},
      "requested_reviewers": {},
      "requested_teams": {},
      "labels": {},
      "milestone": null,
      "draft": false,
      "head": {
        "label": "dgenio:feature/instrumentation-interface",
        "ref": "feature/instrumentation-interface",
        "sha": "f631cd4200dad629066b64156873ad26d645b78c",
        "user": {
          "login": "dgenio",
          "id": 12731907,
          "node_id": "MDQ6VXNlcjEyNzMxOTA3",
          "avatar_url": "https://avatars.githubusercontent.com/u/12731907?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/dgenio",
          "type": "User",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 1105906764,
          "node_id": "R_kgDOQerMTA",
          "name": "python-sdk",
          "full_name": "dgenio/python-sdk",
          "private": false,
          "owner": {
            "login": "dgenio",
            "id": 12731907,
            "node_id": "MDQ6VXNlcjEyNzMxOTA3",
            "avatar_url": "https://avatars.githubusercontent.com/u/12731907?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/dgenio",
            "type": "User",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": true,
          "url": "https://api.github.com/repos/dgenio/python-sdk",
          "created_at": "2025-11-28T10:30:09Z",
          "updated_at": "2025-12-01T17:05:42Z",
          "pushed_at": "2025-12-03T21:29:31Z",
          "homepage": "https://modelcontextprotocol.github.io/python-sdk/",
          "size": 2651,
          "stargazers_count": 0,
          "watchers_count": 0,
          "language": "Python",
          "has_issues": false,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": false,
          "has_discussions": false,
          "forks_count": 0,
          "archived": false,
          "disabled": false,
          "open_issues_count": 0,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 0,
          "open_issues": 0,
          "watchers": 0,
          "default_branch": "main"
        }
      },
      "base": {
        "label": "modelcontextprotocol:main",
        "ref": "main",
        "sha": "5983a650cc07d2dc6c6ba098e99d3545889157a9",
        "user": {
          "login": "modelcontextprotocol",
          "id": 182288589,
          "node_id": "O_kgDOCt2AzQ",
          "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/modelcontextprotocol",
          "type": "Organization",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 862584018,
          "node_id": "R_kgDOM2n80g",
          "name": "python-sdk",
          "full_name": "modelcontextprotocol/python-sdk",
          "private": false,
          "owner": {
            "login": "modelcontextprotocol",
            "id": 182288589,
            "node_id": "O_kgDOCt2AzQ",
            "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/modelcontextprotocol",
            "type": "Organization",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": false,
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk",
          "created_at": "2024-09-24T21:01:35Z",
          "updated_at": "2025-12-06T05:02:17Z",
          "pushed_at": "2025-12-04T18:04:06Z",
          "homepage": "https://modelcontextprotocol.github.io/python-sdk/",
          "size": 4194,
          "stargazers_count": 20439,
          "watchers_count": 20439,
          "language": "Python",
          "has_issues": true,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": true,
          "has_discussions": false,
          "forks_count": 2843,
          "archived": false,
          "disabled": false,
          "open_issues_count": 345,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 2843,
          "open_issues": 345,
          "watchers": 20439,
          "default_branch": "main"
        }
      },
      "_links": {
        "self": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1693"
        },
        "html": {
          "href": "https://github.com/modelcontextprotocol/python-sdk/pull/1693"
        },
        "issue": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1693"
        },
        "comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1693/comments"
        },
        "review_comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1693/comments"
        },
        "review_comment": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/comments{/number}"
        },
        "commits": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1693/commits"
        },
        "statuses": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/statuses/f631cd4200dad629066b64156873ad26d645b78c"
        }
      },
      "author_association": "NONE",
      "auto_merge": null,
      "active_lock_reason": null,
      "linked_issues": [
        4,
        421
      ]
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1685",
      "id": 3053859719,
      "node_id": "PR_kwDOM2n80s62BjOH",
      "number": 1685,
      "state": "open",
      "locked": false,
      "title": "feat: Add configurable timeout for tool execution",
      "user": {
        "login": "dgenio",
        "id": 12731907,
        "node_id": "MDQ6VXNlcjEyNzMxOTA3",
        "avatar_url": "https://avatars.githubusercontent.com/u/12731907?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/dgenio",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "body": "## Summary\r\n\r\nImplements baseline timeout behavior for MCP tool calls to prevent indefinite blocking.\r\n\r\nCloses #1374\r\n\r\n## Changes\r\n\r\n### Server-Side Timeout\r\n- **Added REQUEST_TIMEOUT error code** (-32001) to `src/mcp/types.py`\r\n- **Added tool_timeout_seconds setting** to FastMCP with default of 300 seconds (5 minutes)\r\n- **Wrapped tool execution** in `anyio.fail_after()` to enforce timeouts\r\n- **Error mapping**: TimeoutError → McpError with REQUEST_TIMEOUT code\r\n\r\n### Configuration\r\n- Constructor parameter: `FastMCP(tool_timeout_seconds=60.0)`\r\n- Environment variable: `FASTMCP_TOOL_TIMEOUT_SECONDS=120`\r\n- Disable timeout: `FastMCP(tool_timeout_seconds=None)`\r\n\r\n### Testing\r\n- Added 8 comprehensive tests in `test_tool_manager.py`:\r\n  - Timeout exceeded behavior\r\n  - Fast completion before timeout\r\n  - No timeout (None) behavior\r\n  - Sync and async tool timeouts\r\n  - Context injection compatibility\r\n  - Error differentiation\r\n  - FastMCP setting propagation\r\n\r\n### Documentation\r\n- Added \"Tool Timeouts\" section to README.md\r\n- Configuration examples and best practices\r\n- Error handling patterns for clients\r\n\r\n## Design Decisions\r\n\r\n- **Conservative default** (300s) to avoid breaking existing tools\r\n- **Nullable timeout** allows explicit disabling for long operations\r\n- **Standard error code** aligns with TypeScript SDK\r\n- **Environment variable support** for deployment flexibility\r\n\r\n## Client-Side\r\n\r\nClient-side timeout handling already exists in `BaseSession.send_request()` and works correctly with the new server-side timeouts.\r\n\r\n## Testing\r\n\r\nAll new tests pass:\r\n```bash\r\npytest tests/server/fastmcp/test_tool_manager.py::TestToolTimeout -v\r\n```\r\n\r\nLinting passes:\r\n```bash\r\nruff check .\r\n```\r\n\r\n## Checklist\r\n\r\n- [x] Server-side timeout implementation\r\n- [x] Configurable via settings and environment variables\r\n- [x] Proper error code mapping (REQUEST_TIMEOUT)\r\n- [x] Comprehensive tests added\r\n- [x] Documentation updated\r\n- [x] All linting checks pass\r\n- [x] No changes to client-side (already has timeout support)",
      "created_at": "2025-11-28T12:05:12Z",
      "updated_at": "2025-12-03T18:04:42Z",
      "closed_at": null,
      "merged_at": null,
      "merge_commit_sha": "54d3c7ba49fbfaf179287d472ff12a3185649deb",
      "assignee": null,
      "assignees": {},
      "requested_reviewers": {},
      "requested_teams": {},
      "labels": {},
      "milestone": null,
      "draft": false,
      "head": {
        "label": "dgenio:feature/tool-execution-timeouts",
        "ref": "feature/tool-execution-timeouts",
        "sha": "360a8fd323593e6e320dc17f874a2c52fd2eccac",
        "user": {
          "login": "dgenio",
          "id": 12731907,
          "node_id": "MDQ6VXNlcjEyNzMxOTA3",
          "avatar_url": "https://avatars.githubusercontent.com/u/12731907?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/dgenio",
          "type": "User",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 1105906764,
          "node_id": "R_kgDOQerMTA",
          "name": "python-sdk",
          "full_name": "dgenio/python-sdk",
          "private": false,
          "owner": {
            "login": "dgenio",
            "id": 12731907,
            "node_id": "MDQ6VXNlcjEyNzMxOTA3",
            "avatar_url": "https://avatars.githubusercontent.com/u/12731907?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/dgenio",
            "type": "User",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": true,
          "url": "https://api.github.com/repos/dgenio/python-sdk",
          "created_at": "2025-11-28T10:30:09Z",
          "updated_at": "2025-12-01T17:05:42Z",
          "pushed_at": "2025-12-03T21:29:31Z",
          "homepage": "https://modelcontextprotocol.github.io/python-sdk/",
          "size": 2651,
          "stargazers_count": 0,
          "watchers_count": 0,
          "language": "Python",
          "has_issues": false,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": false,
          "has_discussions": false,
          "forks_count": 0,
          "archived": false,
          "disabled": false,
          "open_issues_count": 0,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 0,
          "open_issues": 0,
          "watchers": 0,
          "default_branch": "main"
        }
      },
      "base": {
        "label": "modelcontextprotocol:main",
        "ref": "main",
        "sha": "5983a650cc07d2dc6c6ba098e99d3545889157a9",
        "user": {
          "login": "modelcontextprotocol",
          "id": 182288589,
          "node_id": "O_kgDOCt2AzQ",
          "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/modelcontextprotocol",
          "type": "Organization",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 862584018,
          "node_id": "R_kgDOM2n80g",
          "name": "python-sdk",
          "full_name": "modelcontextprotocol/python-sdk",
          "private": false,
          "owner": {
            "login": "modelcontextprotocol",
            "id": 182288589,
            "node_id": "O_kgDOCt2AzQ",
            "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/modelcontextprotocol",
            "type": "Organization",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": false,
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk",
          "created_at": "2024-09-24T21:01:35Z",
          "updated_at": "2025-12-06T05:02:17Z",
          "pushed_at": "2025-12-04T18:04:06Z",
          "homepage": "https://modelcontextprotocol.github.io/python-sdk/",
          "size": 4194,
          "stargazers_count": 20439,
          "watchers_count": 20439,
          "language": "Python",
          "has_issues": true,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": true,
          "has_discussions": false,
          "forks_count": 2843,
          "archived": false,
          "disabled": false,
          "open_issues_count": 345,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 2843,
          "open_issues": 345,
          "watchers": 20439,
          "default_branch": "main"
        }
      },
      "_links": {
        "self": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1685"
        },
        "html": {
          "href": "https://github.com/modelcontextprotocol/python-sdk/pull/1685"
        },
        "issue": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1685"
        },
        "comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1685/comments"
        },
        "review_comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1685/comments"
        },
        "review_comment": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/comments{/number}"
        },
        "commits": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1685/commits"
        },
        "statuses": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/statuses/360a8fd323593e6e320dc17f874a2c52fd2eccac"
        }
      },
      "author_association": "NONE",
      "auto_merge": null,
      "active_lock_reason": null,
      "linked_issues": [
        1,
        1374
      ]
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1680",
      "id": 3052679441,
      "node_id": "PR_kwDOM2n80s619DER",
      "number": 1680,
      "state": "open",
      "locked": false,
      "title": "Fast mcp and structured output",
      "user": {
        "login": "SSOBHY2",
        "id": 217958672,
        "node_id": "U_kgDODP3JEA",
        "avatar_url": "https://avatars.githubusercontent.com/u/217958672?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/SSOBHY2",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "body": "# FastMCP structured output improvements\r\n\r\nbrief summary of changes :\r\n\r\nImprove FastMCP structured-output handling for 'dict[str, T]' return types and mixed-list tool outputs, and make the test suite/CI more robust:\r\n\r\n- Preserve 'Annotated' / 'Field(...)' metadata for 'dict[str, T]' return types when generating FastMCP function metadata.\r\n- Make mixed-list tool outputs fail gracefully for structured output (disable schema) when Pydantic cannot generate a valid JSON Schema for custom types like 'Image' / 'Audio'.\r\n- Harden a flaky child-process test on Windows and adjust coverage pragmas so the FastMCP test suite passes reliably across the CI matrix.\r\n- Silence a spurious 'PytestUnraisableExceptionWarning' on Windows for icon/metadata tests without changing behavior.\r\n\r\n## Motivation and Context :\r\n\r\n<!-- Why is this change needed? What problem does it solve? -->\r\n\r\nFastMCP’s structured-output support had a couple of rough edges and CI reliability issues:\r\n\r\n- For 'dict[str, T]' return types, the internal 'RootModel' was built from a stripped 'GenericAlias', which lost any top-level 'Annotated' metadata. Root-level 'Field(description=...)' and similar metadata on 'dict[str, T]' outputs were not reflected in the generated JSON Schema.\r\n- For tools that return “mixed” lists (e.g., 'list[Image | Audio | str]'), Pydantic currently cannot generate a valid JSON Schema for the 'Image' / 'Audio' parts. This raised 'PydanticSchemaGenerationError' and caused structured-output generation to fail noisily instead of just disabling structured output for that tool.\r\n- There was a flaky child-process test in 'tests/client/test_stdio.py' on Windows that relied on a fixed 'sleep' to detect file writes, and its polling loop created a partial coverage branch that caused the repository’s strict 'fail_under = 100' coverage threshold to fail.\r\n- On Windows, the icon/metadata tests could emit a 'PytestUnraisableExceptionWarning' for an internal resource cleanup path, which was noisy but not behaviorally relevant.\r\n\r\nThis PR makes structured-output behavior more predictable for users, preserves documented metadata, and ensures the FastMCP test suite passes cleanly across platforms and Python versions.\r\n\r\n## How Has This Been Tested?\r\n<!-- Have you tested this in a real application? Which scenarios were tested? -->\r\n\r\nLocally, in the 'python-sdk' project, I ran the test and tooling commands recommended in 'CONTRIBUTING.md':\r\n\r\n- 'uv run pytest'\r\n  - All FastMCP-related tests, including the new/updated ones, pass.\r\n  - Overall test summary:\r\n    - '787 passed'\r\n    - '5 skipped'\r\n    - '1 xfailed' (expected 'XFAIL' in 'tests/client/test_auth.py::test_build_metadata[simple-url]').\r\n- Coverage\r\n  - The repository’s configured coverage threshold 'fail_under = 100' passes after adjusting the polling-loop pragmas in 'tests/client/test_stdio.py'.\r\n- Pre-commit hooks\r\n- 'pre-commit run --all-files'\r\n- 'ruff', 'pyright', 'markdownlint', and other configured hooks pass after formatting and import-group fixes.\r\n\r\nBehaviorally, the following scenarios are explicitly covered by tests:\r\n\r\n- 'func_metadata' preserves 'Annotated' metadata (e.g., 'Field(description=...)') for 'dict[str, int]' return types.\r\n- A mixed-list tool returning 'list[Image | Audio | str]':\r\n  - Does not crash schema generation.\r\n  - Has 'structuredContent' set to 'None' when Pydantic cannot generate a valid schema, while the tool still works via plain JSON arguments.\r\n- The child-process cleanup test now polls for file growth instead of relying on a single fixed 'sleep', and still asserts that the child process writes to its marker file.\r\n- The icon/metadata tests with Windows-specific behavior still run, but suppress the noisy unraisable-exception warning via 'pytest.mark.filterwarnings' on Windows only.\r\n\r\n## Breaking Changes :\r\n\r\n<!-- Will users need to update their code or configurations? -->\r\n\r\nThese changes are **not** expected to be breaking:\r\n\r\n- The FastMCP structured-output API surface is unchanged.\r\n- For 'dict[str, T]' return types, the generated JSON Schema becomes *more accurate* by including the previously-lost 'Annotated' / 'Field(...)' metadata.\r\n- For mixed-list tool outputs that include types like 'Image' / 'Audio', structured-output is now gracefully disabled (schema set to 'None') instead of raising a Pydantic schema error. Tools continue to function via unstructured arguments.\r\n- Test and CI changes only affect internal tests and warning handling; they do not change the public API.\r\n\r\n## Types of changes\r\n<!-- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->\r\n- [x] Bug fix (non-breaking change which fixes an issue)\r\n- [ ] New feature (non-breaking change which adds functionality)\r\n- [ ] Breaking change (fix or feature that would cause existing functionality to change)\r\n- [ ] Documentation update\r\n\r\n## Checklist\r\n<!-- Go over all the following points, and put an `x` in all the boxes that apply. -->\r\n- [x] I have read the [MCP Documentation](https://modelcontextprotocol.io)\r\n- [x] My code follows the repository's style guidelines\r\n- [x] New and existing tests pass locally\r\n- [x] I have added appropriate error handling\r\n- [ ] I have added or updated documentation as needed (not required for this change; behavior is consistent with existing FastMCP docs)\r\n\r\n## Additional context\r\n\r\n- In 'func_metadata', the helper now passes the *original* annotation (including any 'Annotated' wrapper) to the 'RootModel' used for schema generation, so Pydantic can see and preserve root-level metadata.\r\n- When Pydantic raises 'PydanticSchemaGenerationError', 'pydantic_core.SchemaError', or related exceptions while building a schema for the tool’s return type, FastMCP logs the error and disables structured output for that tool instead of propagating the exception.\r\n- The child-process polling test marks the small polling loop and inner 'if' with '# pragma: no branch' to avoid partial-branch coverage noise while still asserting the intended behavior.\r\n- On Windows only, the icon/metadata tests add a 'pytest.mark.filterwarnings' entry for 'PytestUnraisableExceptionWarning' to keep CI output clean without hiding real test failures.\r\n\r\n",
      "created_at": "2025-11-28T01:05:28Z",
      "updated_at": "2025-12-04T16:55:15Z",
      "closed_at": null,
      "merged_at": null,
      "merge_commit_sha": "36c2aa8b8c3424a3d20ca40a9367e2d24c127cfe",
      "assignee": null,
      "assignees": {},
      "requested_reviewers": {},
      "requested_teams": {},
      "labels": {},
      "milestone": null,
      "draft": false,
      "head": {
        "label": "SSOBHY2:FastMCP-and-structured-output",
        "ref": "FastMCP-and-structured-output",
        "sha": "771532bc107d61f1f595d3517c120dfbec7e14a6",
        "user": {
          "login": "SSOBHY2",
          "id": 217958672,
          "node_id": "U_kgDODP3JEA",
          "avatar_url": "https://avatars.githubusercontent.com/u/217958672?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/SSOBHY2",
          "type": "User",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 1105615096,
          "node_id": "R_kgDOQeZY-A",
          "name": "python-sdk",
          "full_name": "SSOBHY2/python-sdk",
          "private": false,
          "owner": {
            "login": "SSOBHY2",
            "id": 217958672,
            "node_id": "U_kgDODP3JEA",
            "avatar_url": "https://avatars.githubusercontent.com/u/217958672?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/SSOBHY2",
            "type": "User",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": true,
          "url": "https://api.github.com/repos/SSOBHY2/python-sdk",
          "created_at": "2025-11-27T22:29:11Z",
          "updated_at": "2025-11-27T22:29:11Z",
          "pushed_at": "2025-12-04T16:55:14Z",
          "homepage": "https://modelcontextprotocol.github.io/python-sdk/",
          "size": 2561,
          "stargazers_count": 0,
          "watchers_count": 0,
          "language": null,
          "has_issues": false,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": false,
          "has_discussions": false,
          "forks_count": 0,
          "archived": false,
          "disabled": false,
          "open_issues_count": 0,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 0,
          "open_issues": 0,
          "watchers": 0,
          "default_branch": "main"
        }
      },
      "base": {
        "label": "modelcontextprotocol:main",
        "ref": "main",
        "sha": "89ff338174cec2b28f23deaec6136a4f3b11e875",
        "user": {
          "login": "modelcontextprotocol",
          "id": 182288589,
          "node_id": "O_kgDOCt2AzQ",
          "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/modelcontextprotocol",
          "type": "Organization",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 862584018,
          "node_id": "R_kgDOM2n80g",
          "name": "python-sdk",
          "full_name": "modelcontextprotocol/python-sdk",
          "private": false,
          "owner": {
            "login": "modelcontextprotocol",
            "id": 182288589,
            "node_id": "O_kgDOCt2AzQ",
            "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/modelcontextprotocol",
            "type": "Organization",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": false,
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk",
          "created_at": "2024-09-24T21:01:35Z",
          "updated_at": "2025-12-06T05:02:17Z",
          "pushed_at": "2025-12-04T18:04:06Z",
          "homepage": "https://modelcontextprotocol.github.io/python-sdk/",
          "size": 4194,
          "stargazers_count": 20439,
          "watchers_count": 20439,
          "language": "Python",
          "has_issues": true,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": true,
          "has_discussions": false,
          "forks_count": 2843,
          "archived": false,
          "disabled": false,
          "open_issues_count": 345,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 2843,
          "open_issues": 345,
          "watchers": 20439,
          "default_branch": "main"
        }
      },
      "_links": {
        "self": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1680"
        },
        "html": {
          "href": "https://github.com/modelcontextprotocol/python-sdk/pull/1680"
        },
        "issue": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1680"
        },
        "comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1680/comments"
        },
        "review_comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1680/comments"
        },
        "review_comment": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/comments{/number}"
        },
        "commits": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1680/commits"
        },
        "statuses": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/statuses/771532bc107d61f1f595d3517c120dfbec7e14a6"
        }
      },
      "author_association": "NONE",
      "auto_merge": null,
      "active_lock_reason": null,
      "linked_issues": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1677",
      "id": 3050710634,
      "node_id": "PR_kwDOM2n80s611iZq",
      "number": 1677,
      "state": "open",
      "locked": false,
      "title": "feat(fastmcp): add include_in_context parameter to resource decorator",
      "user": {
        "login": "rinaldofesta",
        "id": 5622471,
        "node_id": "MDQ6VXNlcjU2MjI0NzE=",
        "avatar_url": "https://avatars.githubusercontent.com/u/5622471?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/rinaldofesta",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "body": "## Summary\n\nAdds a user-friendly `include_in_context` boolean parameter to the `@resource` decorator that automatically sets `priority=1.0` in annotations. This simplifies marking resources for context inclusion without requiring users to manually create and manage `Annotations` objects.\n\nCloses #1657\n\n## Motivation\n\nCurrently, users must create an `Annotations` object to set resource priority for context inclusion:\n\n```python\n@mcp.resource(\"resource://data\", annotations=Annotations(priority=1.0))\ndef get_data():\n    return \"important data\"\n```\n\nThis PR introduces a simpler API:\n\n```python\n@mcp.resource(\"resource://data\", include_in_context=True)\ndef get_data():\n    return \"important data\"\n```\n\n## Implementation\n\n- **Parameter behavior**: When `include_in_context=True`, automatically sets `priority=1.0`\n- **Override logic**: Always overrides explicit priority values when enabled\n- **Field preservation**: Preserves other annotation fields like `audience`\n- **Broad support**: Works with both regular and template resources, sync and async functions\n\n## Changes\n\n- Modified `FastMCP.resource()` decorator to accept `include_in_context` parameter\n- Added logic to create/update annotations with `priority=1.0` when enabled\n- Updated docstring with parameter documentation\n- Added 6 comprehensive tests covering various scenarios\n\n## Test Plan\n\n- [x] `include_in_context=True` sets priority to 1.0\n- [x] `include_in_context=False` doesn't affect annotations\n- [x] Overrides explicit priority values\n- [x] Preserves audience annotations\n- [x] Works with template resources\n- [x] Works with async functions\n- [x] All existing annotation tests still pass (backward compatibility)",
      "created_at": "2025-11-27T11:46:59Z",
      "updated_at": "2025-11-27T11:50:33Z",
      "closed_at": null,
      "merged_at": null,
      "merge_commit_sha": "9b3ba05bc48b52452d17c92075dafb017e803c68",
      "assignee": null,
      "assignees": {},
      "requested_reviewers": {},
      "requested_teams": {},
      "labels": {},
      "milestone": null,
      "draft": false,
      "head": {
        "label": "rinaldofesta:feature/fastmcp-include-context",
        "ref": "feature/fastmcp-include-context",
        "sha": "51ab558e182da6303518175ce581d22612cba480",
        "user": {
          "login": "rinaldofesta",
          "id": 5622471,
          "node_id": "MDQ6VXNlcjU2MjI0NzE=",
          "avatar_url": "https://avatars.githubusercontent.com/u/5622471?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/rinaldofesta",
          "type": "User",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 1103081273,
          "node_id": "R_kgDOQb-vOQ",
          "name": "python-sdk",
          "full_name": "rinaldofesta/python-sdk",
          "private": false,
          "owner": {
            "login": "rinaldofesta",
            "id": 5622471,
            "node_id": "MDQ6VXNlcjU2MjI0NzE=",
            "avatar_url": "https://avatars.githubusercontent.com/u/5622471?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/rinaldofesta",
            "type": "User",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": true,
          "url": "https://api.github.com/repos/rinaldofesta/python-sdk",
          "created_at": "2025-11-24T12:03:35Z",
          "updated_at": "2025-11-24T12:03:35Z",
          "pushed_at": "2025-11-27T11:50:32Z",
          "homepage": "https://modelcontextprotocol.github.io/python-sdk/",
          "size": 2469,
          "stargazers_count": 0,
          "watchers_count": 0,
          "language": null,
          "has_issues": false,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": false,
          "has_discussions": false,
          "forks_count": 0,
          "archived": false,
          "disabled": false,
          "open_issues_count": 0,
          "license": null,
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 0,
          "open_issues": 0,
          "watchers": 0,
          "default_branch": "main"
        }
      },
      "base": {
        "label": "modelcontextprotocol:main",
        "ref": "main",
        "sha": "5983a650cc07d2dc6c6ba098e99d3545889157a9",
        "user": {
          "login": "modelcontextprotocol",
          "id": 182288589,
          "node_id": "O_kgDOCt2AzQ",
          "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/modelcontextprotocol",
          "type": "Organization",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 862584018,
          "node_id": "R_kgDOM2n80g",
          "name": "python-sdk",
          "full_name": "modelcontextprotocol/python-sdk",
          "private": false,
          "owner": {
            "login": "modelcontextprotocol",
            "id": 182288589,
            "node_id": "O_kgDOCt2AzQ",
            "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/modelcontextprotocol",
            "type": "Organization",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": false,
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk",
          "created_at": "2024-09-24T21:01:35Z",
          "updated_at": "2025-12-06T05:02:17Z",
          "pushed_at": "2025-12-04T18:04:06Z",
          "homepage": "https://modelcontextprotocol.github.io/python-sdk/",
          "size": 4194,
          "stargazers_count": 20439,
          "watchers_count": 20439,
          "language": "Python",
          "has_issues": true,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": true,
          "has_discussions": false,
          "forks_count": 2843,
          "archived": false,
          "disabled": false,
          "open_issues_count": 345,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 2843,
          "open_issues": 345,
          "watchers": 20439,
          "default_branch": "main"
        }
      },
      "_links": {
        "self": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1677"
        },
        "html": {
          "href": "https://github.com/modelcontextprotocol/python-sdk/pull/1677"
        },
        "issue": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1677"
        },
        "comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1677/comments"
        },
        "review_comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1677/comments"
        },
        "review_comment": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/comments{/number}"
        },
        "commits": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1677/commits"
        },
        "statuses": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/statuses/51ab558e182da6303518175ce581d22612cba480"
        }
      },
      "author_association": "NONE",
      "auto_merge": null,
      "active_lock_reason": null,
      "linked_issues": [
        1,
        1657
      ]
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1674",
      "id": 3048987544,
      "node_id": "PR_kwDOM2n80s61u9uY",
      "number": 1674,
      "state": "open",
      "locked": false,
      "title": "Race condition in streamable http",
      "user": {
        "login": "AydarAkhmetzyanov",
        "id": 2051785,
        "node_id": "MDQ6VXNlcjIwNTE3ODU=",
        "avatar_url": "https://avatars.githubusercontent.com/u/2051785?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/AydarAkhmetzyanov",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "body": "# Fix race condition in Streamable HTTP transport\r\n\r\n## Motivation and Context\r\n\r\nWhen using the Streamable HTTP transport, `session.list_tools()` intermittently returns empty results immediately after `session.initialize()` completes.\r\n\r\n**Root Cause**: In `mcp/client/streamable_http.py`, memory streams are created with buffer size 0 (unbuffered), and `post_writer` is started with `tg.start_soon()` which doesn't wait for the task to be ready:\r\n\r\n```python\r\ntg.start_soon(transport.post_writer, ...)  # Doesn't wait for task to start\r\n```\r\n\r\nThis creates a timing issue where subsequent requests can fail before `post_writer` is ready to receive messages.\r\n\r\n**Solution**: Use `tg.start()` instead of `tg.start_soon()` to ensure `post_writer` is fully ready before yielding from the context manager. This follows the existing pattern used in the SSE transport.\r\n\r\n## How Has This Been Tested?\r\n\r\nAdded two new tests:\r\n- `test_streamablehttp_no_race_condition_on_consecutive_requests` - 10 iterations of init → list_tools\r\n- `test_streamablehttp_rapid_request_sequence` - 20 rapid consecutive requests\r\n\r\nAll 36 streamable HTTP tests pass.\r\n\r\n## Breaking Changes\r\n\r\nNone. This is an internal implementation fix that doesn't change any public API.\r\n\r\n## Types of changes\r\n\r\n- [x] Bug fix (non-breaking change which fixes an issue)\r\n- [ ] New feature (non-breaking change which adds functionality)\r\n- [ ] Breaking change (fix or feature that would cause existing functionality to change)\r\n- [ ] Documentation update\r\n\r\n## Checklist\r\n\r\n- [x] I have read the [MCP Documentation](https://modelcontextprotocol.io)\r\n- [x] My code follows the repository's style guidelines\r\n- [x] New and existing tests pass locally\r\n- [x] I have added appropriate error handling\r\n- [ ] I have added or updated documentation as needed\r\n\r\n## Additional context\r\n\r\nThree options were considered for fixing this issue:\r\n- **Option A**: Use a small buffer size instead of 0\r\n- **Option B**: Use `tg.start()` instead of `tg.start_soon()` ✅ (implemented)\r\n- **Option C**: Add an internal ready signal/event\r\n\r\nOption B was chosen because it's minimal, follows existing patterns (SSE transport), and preserves buffer/backpressure semantics.\r\n",
      "created_at": "2025-11-26T21:40:37Z",
      "updated_at": "2025-12-02T19:04:59Z",
      "closed_at": null,
      "merged_at": null,
      "merge_commit_sha": null,
      "assignee": null,
      "assignees": {},
      "requested_reviewers": {},
      "requested_teams": {},
      "labels": {},
      "milestone": null,
      "draft": false,
      "head": {
        "label": "AydarAkhmetzyanov:main",
        "ref": "main",
        "sha": "2f71b42c6cf4f4bc2f6da35d50c0a6978682c420",
        "user": {
          "login": "AydarAkhmetzyanov",
          "id": 2051785,
          "node_id": "MDQ6VXNlcjIwNTE3ODU=",
          "avatar_url": "https://avatars.githubusercontent.com/u/2051785?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/AydarAkhmetzyanov",
          "type": "User",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 1104909892,
          "node_id": "R_kgDOQduWRA",
          "name": "python-sdk",
          "full_name": "AydarAkhmetzyanov/python-sdk",
          "private": false,
          "owner": {
            "login": "AydarAkhmetzyanov",
            "id": 2051785,
            "node_id": "MDQ6VXNlcjIwNTE3ODU=",
            "avatar_url": "https://avatars.githubusercontent.com/u/2051785?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/AydarAkhmetzyanov",
            "type": "User",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": true,
          "url": "https://api.github.com/repos/AydarAkhmetzyanov/python-sdk",
          "created_at": "2025-11-26T21:37:20Z",
          "updated_at": "2025-12-02T19:05:05Z",
          "pushed_at": "2025-12-02T19:04:58Z",
          "homepage": "https://modelcontextprotocol.github.io/python-sdk/",
          "size": 2586,
          "stargazers_count": 0,
          "watchers_count": 0,
          "language": "Python",
          "has_issues": false,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": false,
          "has_discussions": false,
          "forks_count": 0,
          "archived": false,
          "disabled": false,
          "open_issues_count": 0,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 0,
          "open_issues": 0,
          "watchers": 0,
          "default_branch": "main"
        }
      },
      "base": {
        "label": "modelcontextprotocol:main",
        "ref": "main",
        "sha": "8e02fc17e196295116d3fa4e993116ce6e0171c7",
        "user": {
          "login": "modelcontextprotocol",
          "id": 182288589,
          "node_id": "O_kgDOCt2AzQ",
          "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/modelcontextprotocol",
          "type": "Organization",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 862584018,
          "node_id": "R_kgDOM2n80g",
          "name": "python-sdk",
          "full_name": "modelcontextprotocol/python-sdk",
          "private": false,
          "owner": {
            "login": "modelcontextprotocol",
            "id": 182288589,
            "node_id": "O_kgDOCt2AzQ",
            "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/modelcontextprotocol",
            "type": "Organization",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": false,
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk",
          "created_at": "2024-09-24T21:01:35Z",
          "updated_at": "2025-12-06T05:02:17Z",
          "pushed_at": "2025-12-04T18:04:06Z",
          "homepage": "https://modelcontextprotocol.github.io/python-sdk/",
          "size": 4194,
          "stargazers_count": 20439,
          "watchers_count": 20439,
          "language": "Python",
          "has_issues": true,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": true,
          "has_discussions": false,
          "forks_count": 2843,
          "archived": false,
          "disabled": false,
          "open_issues_count": 345,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 2843,
          "open_issues": 345,
          "watchers": 20439,
          "default_branch": "main"
        }
      },
      "_links": {
        "self": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1674"
        },
        "html": {
          "href": "https://github.com/modelcontextprotocol/python-sdk/pull/1674"
        },
        "issue": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1674"
        },
        "comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1674/comments"
        },
        "review_comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1674/comments"
        },
        "review_comment": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/comments{/number}"
        },
        "commits": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1674/commits"
        },
        "statuses": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/statuses/2f71b42c6cf4f4bc2f6da35d50c0a6978682c420"
        }
      },
      "author_association": "NONE",
      "auto_merge": null,
      "active_lock_reason": null,
      "linked_issues": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1666",
      "id": 3042200208,
      "node_id": "PR_kwDOM2n80s61VEqQ",
      "number": 1666,
      "state": "open",
      "locked": false,
      "title": "fix: Fix logic that determines standard resource vs. resource template to account for context param (#1635)",
      "user": {
        "login": "matthew-gries",
        "id": 46942482,
        "node_id": "MDQ6VXNlcjQ2OTQyNDgy",
        "avatar_url": "https://avatars.githubusercontent.com/u/46942482?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/matthew-gries",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "body": "<!-- Provide a brief summary of your changes -->\r\n\r\n- Fix template detection logic to exclude context  when determining if a resource is a template or not\r\n- Add support for FunctionResources to be read with a context param, allowing resources registered with a context param to read from ccontext objects\r\n- Use ` func_metadata.call_fn_with_arg_validation()` to validate arguments in resources while ignoring injected context param, to avoid Pydantic model validation issues \r\n- Extracted `is_async_callable()` as a public utility \r\n\r\n## Motivation and Context\r\n<!-- Why is this change needed? What problem does it solve? -->\r\n\r\nThis solves the issue of context not being properly injected into regular resources. Per #1635, when registering a resource with `@mcp.resource()`, the logic that determines whether to create a standard resource or a resource template was incorrectly counting the Context parameter as a function parameter. This caused functions with only a Context parameter (no URI parameters) to be incorrectly treated as templates.\r\n\r\n## How Has This Been Tested?\r\n<!-- Have you tested this in a real application? Which scenarios were tested? -->\r\n\r\nI added unit tests plus used the following test application to ensure the fix worked as expected and didn't affect existing functionality around resources and resource templates. I tested reading resources and resource templates with and without context params\r\n\r\n```\r\nfrom contextlib import asynccontextmanager\r\nfrom datetime import datetime\r\n\r\nfrom mcp import ServerSession\r\nfrom mcp.server import FastMCP\r\nfrom mcp.server.fastmcp import Context\r\n\r\n\r\nclass AppContext:\r\n    \"\"\"Application context with some shared state.\"\"\"\r\n\r\n    def __init__(self):\r\n        self.server_start_time = datetime.now()\r\n        self.request_count = 0\r\n\r\n    def increment_requests(self):\r\n        self.request_count += 1\r\n\r\n\r\n@asynccontextmanager\r\nasync def lifespan(server: FastMCP):\r\n    \"\"\"Initialize application context.\"\"\"\r\n    print(\"Server starting up...\")\r\n    ctx = AppContext()\r\n    yield ctx\r\n    print(f\"Server shutting down. Total requests: {ctx.request_count}\")\r\n\r\n\r\nmcp = FastMCP(\"Context Test Demo\", lifespan=lifespan)\r\n\r\n\r\n@mcp.resource(\"time://current\")\r\nasync def current_time(ctx: Context[ServerSession, AppContext]) -> str:\r\n    return f\"Current time: {datetime.now().isoformat()}, request {ctx.request_id}\"\r\n\r\n\r\n@mcp.resource(\"time://format\")\r\nasync def time_format() -> str:\r\n    return \"Supported formats: ISO8601, RFC3339, Unix timestamp\"\r\n\r\n\r\n@mcp.resource(\"greeting://{name}\")\r\nasync def personalized_greeting(name: str, ctx: Context[ServerSession, AppContext]) -> str:\r\n    uptime = (datetime.now() - ctx.request_context.lifespan_context.server_start_time).total_seconds()\r\n    return f\"Hello {name}! Server uptime: {uptime:.1f}s\"\r\n\r\n\r\n@mcp.resource(\"math://{operation}/{a}/{b}\")\r\nasync def math_operation(operation: str, a: int, b: int) -> str:\r\n    operations = {\r\n        \"add\": a + b,\r\n        \"subtract\": a - b,\r\n        \"multiply\": a * b,\r\n        \"divide\": a / b if b != 0 else \"Error: Division by zero\"\r\n    }\r\n    result = operations.get(operation, \"Error: Unknown operation\")\r\n    return f\"{operation}({a}, {b}) = {result}\"\r\n\r\n\r\nif __name__ == \"__main__\":\r\n    import asyncio\r\n\r\n    mcp.run()\r\n```\r\n\r\n## Breaking Changes\r\n<!-- Will users need to update their code or configurations? -->\r\n\r\nTechnically yes, because the signature of the `read()` function on the `Resource` type now includes an additional optional `context` param, but this shouldn't break at runtime since the arg is optional \r\n\r\n## Types of changes\r\n<!-- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->\r\n- [ ] Bug fix (non-breaking change which fixes an issue)\r\n- [ ] New feature (non-breaking change which adds functionality)\r\n- [x] Breaking change (fix or feature that would cause existing functionality to change)\r\n- [ ] Documentation update\r\n\r\n## Checklist\r\n<!-- Go over all the following points, and put an `x` in all the boxes that apply. -->\r\n- [x] I have read the [MCP Documentation](https://modelcontextprotocol.io)\r\n- [x] My code follows the repository's style guidelines\r\n- [x] New and existing tests pass locally\r\n- [x] I have added appropriate error handling\r\n- [x] I have added or updated documentation as needed\r\n\r\n## Additional context\r\n<!-- Add any other context, implementation notes, or design decisions -->\r\n",
      "created_at": "2025-11-25T03:17:24Z",
      "updated_at": "2025-11-25T12:15:47Z",
      "closed_at": null,
      "merged_at": null,
      "merge_commit_sha": "34056e2c84be75c0808161da5cfe2499b78efe63",
      "assignee": null,
      "assignees": {},
      "requested_reviewers": {},
      "requested_teams": {},
      "labels": {},
      "milestone": null,
      "draft": false,
      "head": {
        "label": "matthew-gries:1635",
        "ref": "1635",
        "sha": "38c059adbdeb0803330ac5b16a0ad5da228b5ec4",
        "user": {
          "login": "matthew-gries",
          "id": 46942482,
          "node_id": "MDQ6VXNlcjQ2OTQyNDgy",
          "avatar_url": "https://avatars.githubusercontent.com/u/46942482?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/matthew-gries",
          "type": "User",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 1083933936,
          "node_id": "R_kgDOQJuE8A",
          "name": "modelcontextprotocol-python-sdk",
          "full_name": "matthew-gries/modelcontextprotocol-python-sdk",
          "private": false,
          "owner": {
            "login": "matthew-gries",
            "id": 46942482,
            "node_id": "MDQ6VXNlcjQ2OTQyNDgy",
            "avatar_url": "https://avatars.githubusercontent.com/u/46942482?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/matthew-gries",
            "type": "User",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": true,
          "url": "https://api.github.com/repos/matthew-gries/modelcontextprotocol-python-sdk",
          "created_at": "2025-10-27T01:20:46Z",
          "updated_at": "2025-11-25T03:21:46Z",
          "pushed_at": "2025-11-25T03:22:59Z",
          "homepage": "https://modelcontextprotocol.github.io/python-sdk/",
          "size": 2457,
          "stargazers_count": 0,
          "watchers_count": 0,
          "language": "Python",
          "has_issues": false,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": false,
          "has_discussions": false,
          "forks_count": 0,
          "archived": false,
          "disabled": false,
          "open_issues_count": 0,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 0,
          "open_issues": 0,
          "watchers": 0,
          "default_branch": "main"
        }
      },
      "base": {
        "label": "modelcontextprotocol:main",
        "ref": "main",
        "sha": "27279bc157cbc03f7fe7758fd55a4b34c5652f42",
        "user": {
          "login": "modelcontextprotocol",
          "id": 182288589,
          "node_id": "O_kgDOCt2AzQ",
          "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/modelcontextprotocol",
          "type": "Organization",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 862584018,
          "node_id": "R_kgDOM2n80g",
          "name": "python-sdk",
          "full_name": "modelcontextprotocol/python-sdk",
          "private": false,
          "owner": {
            "login": "modelcontextprotocol",
            "id": 182288589,
            "node_id": "O_kgDOCt2AzQ",
            "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/modelcontextprotocol",
            "type": "Organization",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": false,
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk",
          "created_at": "2024-09-24T21:01:35Z",
          "updated_at": "2025-12-06T05:02:17Z",
          "pushed_at": "2025-12-04T18:04:06Z",
          "homepage": "https://modelcontextprotocol.github.io/python-sdk/",
          "size": 4194,
          "stargazers_count": 20439,
          "watchers_count": 20439,
          "language": "Python",
          "has_issues": true,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": true,
          "has_discussions": false,
          "forks_count": 2843,
          "archived": false,
          "disabled": false,
          "open_issues_count": 345,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 2843,
          "open_issues": 345,
          "watchers": 20439,
          "default_branch": "main"
        }
      },
      "_links": {
        "self": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1666"
        },
        "html": {
          "href": "https://github.com/modelcontextprotocol/python-sdk/pull/1666"
        },
        "issue": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1666"
        },
        "comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1666/comments"
        },
        "review_comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1666/comments"
        },
        "review_comment": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/comments{/number}"
        },
        "commits": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1666/commits"
        },
        "statuses": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/statuses/38c059adbdeb0803330ac5b16a0ad5da228b5ec4"
        }
      },
      "author_association": "NONE",
      "auto_merge": null,
      "active_lock_reason": null,
      "linked_issues": [
        1
      ]
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1651",
      "id": 3035330128,
      "node_id": "PR_kwDOM2n80s6063ZQ",
      "number": 1651,
      "state": "open",
      "locked": false,
      "title": "Make refresh_token grant type optional in DCR handler",
      "user": {
        "login": "gazzadownunder",
        "id": 32623517,
        "node_id": "MDQ6VXNlcjMyNjIzNTE3",
        "avatar_url": "https://avatars.githubusercontent.com/u/32623517?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/gazzadownunder",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "body": "Updated the Dynamic Client Registration (DCR) handler to comply with RFC 7591 by making the refresh_token grant type optional. Previously, the handler incorrectly required both authorization_code and refresh_token grant types, which was unnecessarily restrictive and non-compliant with the RFC.\r\n\r\nChanges:\r\n- Modified grant_types validation to only require authorization_code\r\n- Updated error message to reflect the new requirement\r\n- Renamed test to test_client_registration_with_authorization_code_only\r\n- Added test for missing authorization_code (now the true error case)\r\n- Updated test assertions to match new validation behavior\r\n\r\nThis change improves RFC 7591 compliance and provides clients with greater flexibility in their registration options.\r\n\r\nGithub-Issue: #1650\r\n",
      "created_at": "2025-11-22T00:01:01Z",
      "updated_at": "2025-12-03T13:09:11Z",
      "closed_at": null,
      "merged_at": null,
      "merge_commit_sha": "b3e60712d080e7771b555a283568e0a72f0152ea",
      "assignee": null,
      "assignees": {},
      "requested_reviewers": {},
      "requested_teams": {},
      "labels": {},
      "milestone": null,
      "draft": false,
      "head": {
        "label": "gazzadownunder:rfc-7591-grant-type",
        "ref": "rfc-7591-grant-type",
        "sha": "91f353375e2534a25486f24a7c0439e48e73b142",
        "user": {
          "login": "gazzadownunder",
          "id": 32623517,
          "node_id": "MDQ6VXNlcjMyNjIzNTE3",
          "avatar_url": "https://avatars.githubusercontent.com/u/32623517?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/gazzadownunder",
          "type": "User",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 1101606871,
          "node_id": "R_kgDOQakv1w",
          "name": "python-sdk",
          "full_name": "gazzadownunder/python-sdk",
          "private": false,
          "owner": {
            "login": "gazzadownunder",
            "id": 32623517,
            "node_id": "MDQ6VXNlcjMyNjIzNTE3",
            "avatar_url": "https://avatars.githubusercontent.com/u/32623517?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/gazzadownunder",
            "type": "User",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": true,
          "url": "https://api.github.com/repos/gazzadownunder/python-sdk",
          "created_at": "2025-11-21T23:25:40Z",
          "updated_at": "2025-11-21T23:25:40Z",
          "pushed_at": "2025-12-03T13:09:10Z",
          "homepage": "https://modelcontextprotocol.github.io/python-sdk/",
          "size": 2585,
          "stargazers_count": 0,
          "watchers_count": 0,
          "language": null,
          "has_issues": false,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": false,
          "has_discussions": false,
          "forks_count": 0,
          "archived": false,
          "disabled": false,
          "open_issues_count": 0,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 0,
          "open_issues": 0,
          "watchers": 0,
          "default_branch": "main"
        }
      },
      "base": {
        "label": "modelcontextprotocol:main",
        "ref": "main",
        "sha": "8e02fc17e196295116d3fa4e993116ce6e0171c7",
        "user": {
          "login": "modelcontextprotocol",
          "id": 182288589,
          "node_id": "O_kgDOCt2AzQ",
          "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/modelcontextprotocol",
          "type": "Organization",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 862584018,
          "node_id": "R_kgDOM2n80g",
          "name": "python-sdk",
          "full_name": "modelcontextprotocol/python-sdk",
          "private": false,
          "owner": {
            "login": "modelcontextprotocol",
            "id": 182288589,
            "node_id": "O_kgDOCt2AzQ",
            "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/modelcontextprotocol",
            "type": "Organization",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": false,
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk",
          "created_at": "2024-09-24T21:01:35Z",
          "updated_at": "2025-12-06T05:02:17Z",
          "pushed_at": "2025-12-04T18:04:06Z",
          "homepage": "https://modelcontextprotocol.github.io/python-sdk/",
          "size": 4194,
          "stargazers_count": 20439,
          "watchers_count": 20439,
          "language": "Python",
          "has_issues": true,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": true,
          "has_discussions": false,
          "forks_count": 2843,
          "archived": false,
          "disabled": false,
          "open_issues_count": 345,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 2843,
          "open_issues": 345,
          "watchers": 20439,
          "default_branch": "main"
        }
      },
      "_links": {
        "self": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1651"
        },
        "html": {
          "href": "https://github.com/modelcontextprotocol/python-sdk/pull/1651"
        },
        "issue": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1651"
        },
        "comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1651/comments"
        },
        "review_comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1651/comments"
        },
        "review_comment": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/comments{/number}"
        },
        "commits": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1651/commits"
        },
        "statuses": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/statuses/91f353375e2534a25486f24a7c0439e48e73b142"
        }
      },
      "author_association": "NONE",
      "auto_merge": null,
      "active_lock_reason": null,
      "linked_issues": [
        1
      ]
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1647",
      "id": 3030857409,
      "node_id": "PR_kwDOM2n80s60pzbB",
      "number": 1647,
      "state": "open",
      "locked": false,
      "title": "Improve exception handling for ClientDisconnect errors",
      "user": {
        "login": "FanisPapakonstantinou",
        "id": 41926857,
        "node_id": "MDQ6VXNlcjQxOTI2ODU3",
        "avatar_url": "https://avatars.githubusercontent.com/u/41926857?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/FanisPapakonstantinou",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "body": "# Fix: Handle ClientDisconnect gracefully (return 499, not 500)\r\n\r\n## Problem\r\n\r\n`ClientDisconnect` exceptions are currently handled incorrectly in `StreamableHTTPServerTransport._handle_post_request`:\r\n- Returns HTTP 500 (Internal Server Error)\r\n- Logs as ERROR with full traceback\r\n- Triggers production 5XX alerts\r\n\r\nClientDisconnect occurs during normal operations when clients disconnect mid-request due to:\r\n- Network timeouts\r\n- User cancellations\r\n- Load balancer timeouts\r\n- Mobile network interruptions\r\n\r\nThese are **client-side events**, not server failures, and should not be treated as server errors.\r\n\r\n## Root Cause\r\n\r\nThe broad `except Exception` handler in `_handle_post_request` catches `ClientDisconnect` before it can be handled appropriately, resulting in incorrect error logging and HTTP status codes.\r\n\r\n**File:** `src/mcp/server/streamable_http.py` (lines ~490-500)\r\n\r\n## Solution\r\n\r\nThis PR adds a specific `ClientDisconnect` exception handler **before** the broad `Exception` handler:\r\n\r\n1. Catches `ClientDisconnect` explicitly\r\n2. Returns HTTP 499 (Client Closed Request) instead of 500\r\n3. Logs as INFO instead of ERROR\r\n4. Follows the same pattern as other 4xx responses in the file",
      "created_at": "2025-11-20T17:54:37Z",
      "updated_at": "2025-11-20T17:54:37Z",
      "closed_at": null,
      "merged_at": null,
      "merge_commit_sha": "804adf6b4e7bbf12054b6815955fc4e779c3a3c3",
      "assignee": null,
      "assignees": {},
      "requested_reviewers": {},
      "requested_teams": {},
      "labels": {},
      "milestone": null,
      "draft": false,
      "head": {
        "label": "FanisPapakonstantinou:fix/clientdisconnect-handling",
        "ref": "fix/clientdisconnect-handling",
        "sha": "249fe7f38c7b1e8ce07c766d22a90a4c87ee0add",
        "user": {
          "login": "FanisPapakonstantinou",
          "id": 41926857,
          "node_id": "MDQ6VXNlcjQxOTI2ODU3",
          "avatar_url": "https://avatars.githubusercontent.com/u/41926857?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/FanisPapakonstantinou",
          "type": "User",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 1100672048,
          "node_id": "R_kgDOQZrsMA",
          "name": "python-sdk",
          "full_name": "FanisPapakonstantinou/python-sdk",
          "private": false,
          "owner": {
            "login": "FanisPapakonstantinou",
            "id": 41926857,
            "node_id": "MDQ6VXNlcjQxOTI2ODU3",
            "avatar_url": "https://avatars.githubusercontent.com/u/41926857?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/FanisPapakonstantinou",
            "type": "User",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": true,
          "url": "https://api.github.com/repos/FanisPapakonstantinou/python-sdk",
          "created_at": "2025-11-20T15:42:55Z",
          "updated_at": "2025-11-20T15:42:55Z",
          "pushed_at": "2025-11-20T17:50:44Z",
          "homepage": "https://modelcontextprotocol.github.io/python-sdk/",
          "size": 2269,
          "stargazers_count": 0,
          "watchers_count": 0,
          "language": null,
          "has_issues": false,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": false,
          "has_discussions": false,
          "forks_count": 0,
          "archived": false,
          "disabled": false,
          "open_issues_count": 0,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 0,
          "open_issues": 0,
          "watchers": 0,
          "default_branch": "main"
        }
      },
      "base": {
        "label": "modelcontextprotocol:main",
        "ref": "main",
        "sha": "fcffa14b5b90d7b3fc7989a463a782334db9b453",
        "user": {
          "login": "modelcontextprotocol",
          "id": 182288589,
          "node_id": "O_kgDOCt2AzQ",
          "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/modelcontextprotocol",
          "type": "Organization",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 862584018,
          "node_id": "R_kgDOM2n80g",
          "name": "python-sdk",
          "full_name": "modelcontextprotocol/python-sdk",
          "private": false,
          "owner": {
            "login": "modelcontextprotocol",
            "id": 182288589,
            "node_id": "O_kgDOCt2AzQ",
            "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/modelcontextprotocol",
            "type": "Organization",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": false,
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk",
          "created_at": "2024-09-24T21:01:35Z",
          "updated_at": "2025-12-06T05:02:17Z",
          "pushed_at": "2025-12-04T18:04:06Z",
          "homepage": "https://modelcontextprotocol.github.io/python-sdk/",
          "size": 4194,
          "stargazers_count": 20439,
          "watchers_count": 20439,
          "language": "Python",
          "has_issues": true,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": true,
          "has_discussions": false,
          "forks_count": 2843,
          "archived": false,
          "disabled": false,
          "open_issues_count": 345,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 2843,
          "open_issues": 345,
          "watchers": 20439,
          "default_branch": "main"
        }
      },
      "_links": {
        "self": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1647"
        },
        "html": {
          "href": "https://github.com/modelcontextprotocol/python-sdk/pull/1647"
        },
        "issue": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1647"
        },
        "comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1647/comments"
        },
        "review_comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1647/comments"
        },
        "review_comment": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/comments{/number}"
        },
        "commits": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1647/commits"
        },
        "statuses": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/statuses/249fe7f38c7b1e8ce07c766d22a90a4c87ee0add"
        }
      },
      "author_association": "NONE",
      "auto_merge": null,
      "active_lock_reason": null,
      "linked_issues": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1638",
      "id": 3020228015,
      "node_id": "PR_kwDOM2n80s60BQWv",
      "number": 1638,
      "state": "open",
      "locked": false,
      "title": "Add support for _meta attributes in resource contents",
      "user": {
        "login": "calvingiles",
        "id": 2253836,
        "node_id": "MDQ6VXNlcjIyNTM4MzY=",
        "avatar_url": "https://avatars.githubusercontent.com/u/2253836?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/calvingiles",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "body": "This change enables MCP servers to include metadata in resource content using the _meta field, which is part of the MCP specification. This allows servers to provide additional context about resources, such as domain information or other custom metadata.\r\n\r\nChanges:\r\n- Added meta field to ReadResourceContents helper class\r\n- Added _meta field to Resource base class with proper alias\r\n- Updated lowlevel server handler to pass through _meta when creating TextResourceContents and BlobResourceContents\r\n- Updated FastMCP server to pass resource._meta to ReadResourceContents\r\n- Added comprehensive tests for _meta support in both lowlevel and FastMCP resources\r\n\r\nThe implementation maintains backward compatibility - resources without _meta continue to work as before with meta=None.\r\n\r\n<!-- Provide a brief summary of your changes -->\r\n\r\n## Motivation and Context\r\n<!-- Why is this change needed? What problem does it solve? -->\r\n\r\n## How Has This Been Tested?\r\n<!-- Have you tested this in a real application? Which scenarios were tested? -->\r\n\r\n## Breaking Changes\r\n<!-- Will users need to update their code or configurations? -->\r\n\r\n## Types of changes\r\n<!-- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->\r\n- [ ] Bug fix (non-breaking change which fixes an issue)\r\n- [ ] New feature (non-breaking change which adds functionality)\r\n- [ ] Breaking change (fix or feature that would cause existing functionality to change)\r\n- [ ] Documentation update\r\n\r\n## Checklist\r\n<!-- Go over all the following points, and put an `x` in all the boxes that apply. -->\r\n- [ ] I have read the [MCP Documentation](https://modelcontextprotocol.io)\r\n- [ ] My code follows the repository's style guidelines\r\n- [ ] New and existing tests pass locally\r\n- [ ] I have added appropriate error handling\r\n- [ ] I have added or updated documentation as needed\r\n\r\n## Additional context\r\n<!-- Add any other context, implementation notes, or design decisions -->\r\n",
      "created_at": "2025-11-18T06:38:03Z",
      "updated_at": "2025-11-20T14:25:17Z",
      "closed_at": null,
      "merged_at": null,
      "merge_commit_sha": "d73bd66cc78ff6b855e12ac08f69a562c9c423ab",
      "assignee": null,
      "assignees": {},
      "requested_reviewers": {},
      "requested_teams": {},
      "labels": {},
      "milestone": null,
      "draft": false,
      "head": {
        "label": "calvingiles:claude/mcp-resource-meta-attributes-01RyxQ9QERGtw35dmj4TyzVi",
        "ref": "claude/mcp-resource-meta-attributes-01RyxQ9QERGtw35dmj4TyzVi",
        "sha": "d74ebee977e40fe8f2c02aa0f323306a4da6915f",
        "user": {
          "login": "calvingiles",
          "id": 2253836,
          "node_id": "MDQ6VXNlcjIyNTM4MzY=",
          "avatar_url": "https://avatars.githubusercontent.com/u/2253836?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/calvingiles",
          "type": "User",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 1098785690,
          "node_id": "R_kgDOQX4jmg",
          "name": "mcp-python-sdk",
          "full_name": "calvingiles/mcp-python-sdk",
          "private": false,
          "owner": {
            "login": "calvingiles",
            "id": 2253836,
            "node_id": "MDQ6VXNlcjIyNTM4MzY=",
            "avatar_url": "https://avatars.githubusercontent.com/u/2253836?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/calvingiles",
            "type": "User",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": true,
          "url": "https://api.github.com/repos/calvingiles/mcp-python-sdk",
          "created_at": "2025-11-18T06:22:07Z",
          "updated_at": "2025-11-18T06:22:07Z",
          "pushed_at": "2025-11-18T08:01:58Z",
          "homepage": "https://modelcontextprotocol.github.io/python-sdk/",
          "size": 2266,
          "stargazers_count": 0,
          "watchers_count": 0,
          "language": null,
          "has_issues": false,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": false,
          "has_discussions": false,
          "forks_count": 0,
          "archived": false,
          "disabled": false,
          "open_issues_count": 0,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 0,
          "open_issues": 0,
          "watchers": 0,
          "default_branch": "main"
        }
      },
      "base": {
        "label": "modelcontextprotocol:main",
        "ref": "main",
        "sha": "5489e8b6fb19ac32146eb633636df52b1dd049d5",
        "user": {
          "login": "modelcontextprotocol",
          "id": 182288589,
          "node_id": "O_kgDOCt2AzQ",
          "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/modelcontextprotocol",
          "type": "Organization",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 862584018,
          "node_id": "R_kgDOM2n80g",
          "name": "python-sdk",
          "full_name": "modelcontextprotocol/python-sdk",
          "private": false,
          "owner": {
            "login": "modelcontextprotocol",
            "id": 182288589,
            "node_id": "O_kgDOCt2AzQ",
            "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/modelcontextprotocol",
            "type": "Organization",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": false,
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk",
          "created_at": "2024-09-24T21:01:35Z",
          "updated_at": "2025-12-06T05:02:17Z",
          "pushed_at": "2025-12-04T18:04:06Z",
          "homepage": "https://modelcontextprotocol.github.io/python-sdk/",
          "size": 4194,
          "stargazers_count": 20439,
          "watchers_count": 20439,
          "language": "Python",
          "has_issues": true,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": true,
          "has_discussions": false,
          "forks_count": 2843,
          "archived": false,
          "disabled": false,
          "open_issues_count": 345,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 2843,
          "open_issues": 345,
          "watchers": 20439,
          "default_branch": "main"
        }
      },
      "_links": {
        "self": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1638"
        },
        "html": {
          "href": "https://github.com/modelcontextprotocol/python-sdk/pull/1638"
        },
        "issue": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1638"
        },
        "comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1638/comments"
        },
        "review_comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1638/comments"
        },
        "review_comment": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/comments{/number}"
        },
        "commits": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1638/commits"
        },
        "statuses": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/statuses/d74ebee977e40fe8f2c02aa0f323306a4da6915f"
        }
      },
      "author_association": "NONE",
      "auto_merge": null,
      "active_lock_reason": null,
      "linked_issues": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1637",
      "id": 3016399873,
      "node_id": "PR_kwDOM2n80s6zypwB",
      "number": 1637,
      "state": "open",
      "locked": false,
      "title": "add an example for homebrew style file upload",
      "user": {
        "login": "SamYuan1990",
        "id": 7820992,
        "node_id": "MDQ6VXNlcjc4MjA5OTI=",
        "avatar_url": "https://avatars.githubusercontent.com/u/7820992?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/SamYuan1990",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "body": "<!-- Provide a brief summary of your changes -->\r\n\r\n## Motivation and Context\r\n<!-- Why is this change needed? What problem does it solve? -->\r\nan example for https://github.com/modelcontextprotocol/modelcontextprotocol/issues/1306 from https://github.com/modelcontextprotocol/modelcontextprotocol/discussions/1522\r\naddress #1590\r\n\r\n## How Has This Been Tested?\r\n<!-- Have you tested this in a real application? Which scenarios were tested? -->\r\nsee document as readme of this PR.\r\n\r\n## Breaking Changes\r\n<!-- Will users need to update their code or configurations? -->\r\nn/A\r\n\r\n## Types of changes\r\n<!-- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->\r\n- [ ] Bug fix (non-breaking change which fixes an issue)\r\n- [x] New feature (non-breaking change which adds functionality)\r\n- [ ] Breaking change (fix or feature that would cause existing functionality to change)\r\n- [ ] Documentation update\r\n\r\n## Checklist\r\n<!-- Go over all the following points, and put an `x` in all the boxes that apply. -->\r\n- [ ] I have read the [MCP Documentation](https://modelcontextprotocol.io)\r\n- [ ] My code follows the repository's style guidelines\r\n- [ ] New and existing tests pass locally\r\n- [ ] I have added appropriate error handling\r\n- [ ] I have added or updated documentation as needed\r\n\r\n## Additional context\r\n<!-- Add any other context, implementation notes, or design decisions -->\r\n",
      "created_at": "2025-11-17T07:24:36Z",
      "updated_at": "2025-11-20T12:14:48Z",
      "closed_at": null,
      "merged_at": null,
      "merge_commit_sha": "b914c41c9edbbe4016d47bf63b933dcbd071e4bc",
      "assignee": null,
      "assignees": {},
      "requested_reviewers": {},
      "requested_teams": {},
      "labels": {},
      "milestone": null,
      "draft": true,
      "head": {
        "label": "SamYuan1990:homebrewstyleupload",
        "ref": "homebrewstyleupload",
        "sha": "a49d9ce3bd2f8219093e6c24c497360bd07c87e6",
        "user": {
          "login": "SamYuan1990",
          "id": 7820992,
          "node_id": "MDQ6VXNlcjc4MjA5OTI=",
          "avatar_url": "https://avatars.githubusercontent.com/u/7820992?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/SamYuan1990",
          "type": "User",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 1098042277,
          "node_id": "R_kgDOQXLLpQ",
          "name": "python-sdk",
          "full_name": "SamYuan1990/python-sdk",
          "private": false,
          "owner": {
            "login": "SamYuan1990",
            "id": 7820992,
            "node_id": "MDQ6VXNlcjc4MjA5OTI=",
            "avatar_url": "https://avatars.githubusercontent.com/u/7820992?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/SamYuan1990",
            "type": "User",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": true,
          "url": "https://api.github.com/repos/SamYuan1990/python-sdk",
          "created_at": "2025-11-17T07:20:49Z",
          "updated_at": "2025-11-17T07:20:49Z",
          "pushed_at": "2025-11-20T06:19:58Z",
          "homepage": "https://modelcontextprotocol.github.io/python-sdk/",
          "size": 2459,
          "stargazers_count": 0,
          "watchers_count": 0,
          "language": null,
          "has_issues": false,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": false,
          "has_discussions": false,
          "forks_count": 0,
          "archived": false,
          "disabled": false,
          "open_issues_count": 0,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 0,
          "open_issues": 0,
          "watchers": 0,
          "default_branch": "main"
        }
      },
      "base": {
        "label": "modelcontextprotocol:main",
        "ref": "main",
        "sha": "9c8f763aa8ee440ff2edb034cd98ced565707b74",
        "user": {
          "login": "modelcontextprotocol",
          "id": 182288589,
          "node_id": "O_kgDOCt2AzQ",
          "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/modelcontextprotocol",
          "type": "Organization",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 862584018,
          "node_id": "R_kgDOM2n80g",
          "name": "python-sdk",
          "full_name": "modelcontextprotocol/python-sdk",
          "private": false,
          "owner": {
            "login": "modelcontextprotocol",
            "id": 182288589,
            "node_id": "O_kgDOCt2AzQ",
            "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/modelcontextprotocol",
            "type": "Organization",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": false,
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk",
          "created_at": "2024-09-24T21:01:35Z",
          "updated_at": "2025-12-06T05:02:17Z",
          "pushed_at": "2025-12-04T18:04:06Z",
          "homepage": "https://modelcontextprotocol.github.io/python-sdk/",
          "size": 4194,
          "stargazers_count": 20439,
          "watchers_count": 20439,
          "language": "Python",
          "has_issues": true,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": true,
          "has_discussions": false,
          "forks_count": 2843,
          "archived": false,
          "disabled": false,
          "open_issues_count": 345,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 2843,
          "open_issues": 345,
          "watchers": 20439,
          "default_branch": "main"
        }
      },
      "_links": {
        "self": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1637"
        },
        "html": {
          "href": "https://github.com/modelcontextprotocol/python-sdk/pull/1637"
        },
        "issue": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1637"
        },
        "comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1637/comments"
        },
        "review_comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1637/comments"
        },
        "review_comment": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/comments{/number}"
        },
        "commits": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1637/commits"
        },
        "statuses": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/statuses/a49d9ce3bd2f8219093e6c24c497360bd07c87e6"
        }
      },
      "author_association": "NONE",
      "auto_merge": null,
      "active_lock_reason": null,
      "linked_issues": [
        1
      ]
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1634",
      "id": 3014104575,
      "node_id": "PR_kwDOM2n80s6zp5X_",
      "number": 1634,
      "state": "open",
      "locked": false,
      "title": "Server initialize response update to last spec (add title, description)",
      "user": {
        "login": "yannj-fr",
        "id": 4557670,
        "node_id": "MDQ6VXNlcjQ1NTc2NzA=",
        "avatar_url": "https://avatars.githubusercontent.com/u/4557670?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/yannj-fr",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "body": "To match the last protocol spec, the Implementation schema must be updated and new attribute propagated on server constructor.\r\n## Motivation and Context\r\nTo match the last protocol specification update.\r\n\r\n## How Has This Been Tested?\r\nEnd To End test, also added to the test suite\r\n## Breaking Changes\r\nn/a\r\n## Types of changes\r\n<!-- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->\r\n- [x] Bug fix (non-breaking change which fixes an issue)\r\n- [x] New feature (non-breaking change which adds functionality)\r\n- [ ] Breaking change (fix or feature that would cause existing functionality to change)\r\n- [ ] Documentation update\r\n\r\n## Checklist\r\n<!-- Go over all the following points, and put an `x` in all the boxes that apply. -->\r\n- [x] I have read the [MCP Documentation](https://modelcontextprotocol.io)\r\n- [x] My code follows the repository's style guidelines\r\n- [x] New and existing tests pass locally\r\n- [x] I have added appropriate error handling\r\n- [ ] I have added or updated documentation as needed\r\n\r\n## Additional context\r\nAlso fix the version attribute which was not flowing to the _mcp_server object so was always defaulted to package version.",
      "created_at": "2025-11-15T23:13:29Z",
      "updated_at": "2025-11-17T20:00:04Z",
      "closed_at": null,
      "merged_at": null,
      "merge_commit_sha": "4033d1cfbf50ef129b76afcee464606ba24f2ca8",
      "assignee": null,
      "assignees": {},
      "requested_reviewers": {},
      "requested_teams": {},
      "labels": {
        "0": {
          "id": 9331338299,
          "node_id": "LA_kwDOM2n80s8AAAACLDDsOw",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/improves%20spec%20compliance",
          "name": "improves spec compliance",
          "color": "9FD9BD",
          "default": false,
          "description": "When a change improves ability of SDK users to comply with spec definition"
        },
        "1": {
          "id": 9354757189,
          "node_id": "LA_kwDOM2n80s8AAAACLZZERQ",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/enhancement",
          "name": "enhancement",
          "color": "11b5cc",
          "default": true,
          "description": "Request for a new feature that's not currently supported"
        }
      },
      "milestone": null,
      "draft": false,
      "head": {
        "label": "yannj-fr:server-init-implementation-update",
        "ref": "server-init-implementation-update",
        "sha": "e82ed60637500c34bd5ae5f41fb64b63e0135e1c",
        "user": {
          "login": "yannj-fr",
          "id": 4557670,
          "node_id": "MDQ6VXNlcjQ1NTc2NzA=",
          "avatar_url": "https://avatars.githubusercontent.com/u/4557670?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/yannj-fr",
          "type": "User",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 1029953267,
          "node_id": "R_kgDOPWPW8w",
          "name": "mcp-python-sdk",
          "full_name": "yannj-fr/mcp-python-sdk",
          "private": false,
          "owner": {
            "login": "yannj-fr",
            "id": 4557670,
            "node_id": "MDQ6VXNlcjQ1NTc2NzA=",
            "avatar_url": "https://avatars.githubusercontent.com/u/4557670?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/yannj-fr",
            "type": "User",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": true,
          "url": "https://api.github.com/repos/yannj-fr/mcp-python-sdk",
          "created_at": "2025-07-31T21:02:01Z",
          "updated_at": "2025-11-15T21:22:51Z",
          "pushed_at": "2025-11-17T20:00:03Z",
          "homepage": "https://modelcontextprotocol.io",
          "size": 2422,
          "stargazers_count": 0,
          "watchers_count": 0,
          "language": "Python",
          "has_issues": false,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": false,
          "has_discussions": false,
          "forks_count": 0,
          "archived": false,
          "disabled": false,
          "open_issues_count": 0,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 0,
          "open_issues": 0,
          "watchers": 0,
          "default_branch": "main"
        }
      },
      "base": {
        "label": "modelcontextprotocol:main",
        "ref": "main",
        "sha": "5489e8b6fb19ac32146eb633636df52b1dd049d5",
        "user": {
          "login": "modelcontextprotocol",
          "id": 182288589,
          "node_id": "O_kgDOCt2AzQ",
          "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/modelcontextprotocol",
          "type": "Organization",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 862584018,
          "node_id": "R_kgDOM2n80g",
          "name": "python-sdk",
          "full_name": "modelcontextprotocol/python-sdk",
          "private": false,
          "owner": {
            "login": "modelcontextprotocol",
            "id": 182288589,
            "node_id": "O_kgDOCt2AzQ",
            "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/modelcontextprotocol",
            "type": "Organization",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": false,
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk",
          "created_at": "2024-09-24T21:01:35Z",
          "updated_at": "2025-12-06T05:02:17Z",
          "pushed_at": "2025-12-04T18:04:06Z",
          "homepage": "https://modelcontextprotocol.github.io/python-sdk/",
          "size": 4194,
          "stargazers_count": 20439,
          "watchers_count": 20439,
          "language": "Python",
          "has_issues": true,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": true,
          "has_discussions": false,
          "forks_count": 2843,
          "archived": false,
          "disabled": false,
          "open_issues_count": 345,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 2843,
          "open_issues": 345,
          "watchers": 20439,
          "default_branch": "main"
        }
      },
      "_links": {
        "self": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1634"
        },
        "html": {
          "href": "https://github.com/modelcontextprotocol/python-sdk/pull/1634"
        },
        "issue": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1634"
        },
        "comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1634/comments"
        },
        "review_comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1634/comments"
        },
        "review_comment": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/comments{/number}"
        },
        "commits": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1634/commits"
        },
        "statuses": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/statuses/e82ed60637500c34bd5ae5f41fb64b63e0135e1c"
        }
      },
      "author_association": "CONTRIBUTOR",
      "auto_merge": null,
      "active_lock_reason": null,
      "linked_issues": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1622",
      "id": 3006634219,
      "node_id": "PR_kwDOM2n80s6zNZjr",
      "number": 1622,
      "state": "open",
      "locked": false,
      "title": "Replace environment variables with CLI arguments in simple-auth-client",
      "user": {
        "login": "maxisbey",
        "id": 224885523,
        "node_id": "U_kgDODWd7Ew",
        "avatar_url": "https://avatars.githubusercontent.com/u/224885523?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/maxisbey",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "body": "## Summary\n\nReplaces environment variables with command-line arguments in the simple-auth-client example, providing a more flexible and intuitive interface for specifying server URLs and transport types.\n\n## Motivation and Context\n\nThe simple-auth-client previously used environment variables (`MCP_SERVER_PORT` and `MCP_TRANSPORT_TYPE`) to configure connection settings. This approach had limitations:\n- Could only specify localhost ports, not arbitrary URLs\n- Less discoverable for users (no `--help` option)\n- Didn't follow standard CLI conventions\n\nThis change replaces environment variables with proper command-line arguments using argparse, allowing users to specify full server URLs and making the interface more intuitive.\n\n## How Has This Been Tested?\n\n- Verified the `--help` output displays correctly\n- Code passes ruff formatting and linting checks\n- Code passes pyright type checking\n- Pre-commit hooks pass successfully\n\n## Breaking Changes\n\nYes - users will need to update how they invoke the client:\n\n**Before:**\n```bash\nMCP_SERVER_PORT=8001 MCP_TRANSPORT_TYPE=streamable-http uv run mcp-simple-auth-client\n```\n\n**After:**\n```bash\nuv run mcp-simple-auth-client --url http://localhost:8001/mcp --transport streamable-http\n```\n\nHowever, this is an example client, not a production tool, so the impact should be minimal.\n\n## Types of changes\n\n- [x] Bug fix (non-breaking change which fixes an issue)\n- [x] New feature (non-breaking change which adds functionality)\n- [ ] Breaking change (fix or feature that would cause existing functionality to change)\n- [x] Documentation update\n\n## Checklist\n\n- [x] I have read the [MCP Documentation](https://modelcontextprotocol.io)\n- [x] My code follows the repository's style guidelines\n- [x] New and existing tests pass locally\n- [x] I have added appropriate error handling\n- [x] I have added or updated documentation as needed\n\n## Additional context\n\nChanges include:\n- Updated `main.py` to use argparse with `--url` and `--transport` arguments\n- Updated simple-auth-client README.md with new usage examples\n- Updated simple-auth server README.md to reference the new CLI interface\n- Removed unused `os` import from main.py",
      "created_at": "2025-11-13T11:43:55Z",
      "updated_at": "2025-11-13T11:44:11Z",
      "closed_at": null,
      "merged_at": null,
      "merge_commit_sha": null,
      "assignee": null,
      "assignees": {},
      "requested_reviewers": {},
      "requested_teams": {},
      "labels": {
        "0": {
          "id": 9354757189,
          "node_id": "LA_kwDOM2n80s8AAAACLZZERQ",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/enhancement",
          "name": "enhancement",
          "color": "11b5cc",
          "default": true,
          "description": "Request for a new feature that's not currently supported"
        },
        "1": {
          "id": 9354772110,
          "node_id": "LA_kwDOM2n80s8AAAACLZZ-jg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P3",
          "name": "P3",
          "color": "c7df49",
          "default": false,
          "description": "Nice to haves, rare edge cases"
        }
      },
      "milestone": null,
      "draft": false,
      "head": {
        "label": "modelcontextprotocol:simple-auth-client-cli-args",
        "ref": "simple-auth-client-cli-args",
        "sha": "e9afd5473a401bffd3b3ec76078a2e839658d80b",
        "user": {
          "login": "modelcontextprotocol",
          "id": 182288589,
          "node_id": "O_kgDOCt2AzQ",
          "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/modelcontextprotocol",
          "type": "Organization",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 862584018,
          "node_id": "R_kgDOM2n80g",
          "name": "python-sdk",
          "full_name": "modelcontextprotocol/python-sdk",
          "private": false,
          "owner": {
            "login": "modelcontextprotocol",
            "id": 182288589,
            "node_id": "O_kgDOCt2AzQ",
            "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/modelcontextprotocol",
            "type": "Organization",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": false,
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk",
          "created_at": "2024-09-24T21:01:35Z",
          "updated_at": "2025-12-06T05:02:17Z",
          "pushed_at": "2025-12-04T18:04:06Z",
          "homepage": "https://modelcontextprotocol.github.io/python-sdk/",
          "size": 4194,
          "stargazers_count": 20439,
          "watchers_count": 20439,
          "language": "Python",
          "has_issues": true,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": true,
          "has_discussions": false,
          "forks_count": 2843,
          "archived": false,
          "disabled": false,
          "open_issues_count": 345,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 2843,
          "open_issues": 345,
          "watchers": 20439,
          "default_branch": "main"
        }
      },
      "base": {
        "label": "modelcontextprotocol:main",
        "ref": "main",
        "sha": "be730674adae118ad89806cd3011dc699fef8801",
        "user": {
          "login": "modelcontextprotocol",
          "id": 182288589,
          "node_id": "O_kgDOCt2AzQ",
          "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/modelcontextprotocol",
          "type": "Organization",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 862584018,
          "node_id": "R_kgDOM2n80g",
          "name": "python-sdk",
          "full_name": "modelcontextprotocol/python-sdk",
          "private": false,
          "owner": {
            "login": "modelcontextprotocol",
            "id": 182288589,
            "node_id": "O_kgDOCt2AzQ",
            "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/modelcontextprotocol",
            "type": "Organization",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": false,
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk",
          "created_at": "2024-09-24T21:01:35Z",
          "updated_at": "2025-12-06T05:02:17Z",
          "pushed_at": "2025-12-04T18:04:06Z",
          "homepage": "https://modelcontextprotocol.github.io/python-sdk/",
          "size": 4194,
          "stargazers_count": 20439,
          "watchers_count": 20439,
          "language": "Python",
          "has_issues": true,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": true,
          "has_discussions": false,
          "forks_count": 2843,
          "archived": false,
          "disabled": false,
          "open_issues_count": 345,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 2843,
          "open_issues": 345,
          "watchers": 20439,
          "default_branch": "main"
        }
      },
      "_links": {
        "self": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1622"
        },
        "html": {
          "href": "https://github.com/modelcontextprotocol/python-sdk/pull/1622"
        },
        "issue": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1622"
        },
        "comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1622/comments"
        },
        "review_comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1622/comments"
        },
        "review_comment": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/comments{/number}"
        },
        "commits": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1622/commits"
        },
        "statuses": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/statuses/e9afd5473a401bffd3b3ec76078a2e839658d80b"
        }
      },
      "author_association": "CONTRIBUTOR",
      "auto_merge": null,
      "active_lock_reason": null,
      "linked_issues": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1619",
      "id": 3005496594,
      "node_id": "PR_kwDOM2n80s6zJD0S",
      "number": 1619,
      "state": "open",
      "locked": false,
      "title": "Guidance documentation comparing FastMCP (high-level) and Low-Level Server implementations for StreamableHTTP MCP servers in Python",
      "user": {
        "login": "kumarsagar-collab",
        "id": 78397098,
        "node_id": "MDQ6VXNlcjc4Mzk3MDk4",
        "avatar_url": "https://avatars.githubusercontent.com/u/78397098?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/kumarsagar-collab",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "body": "Added comprehensive guidance documentation comparing FastMCP (high-level) and Low-Level Server implementations for StreamableHTTP MCP servers in Python, helping developers choose the right approach for their use case \r\n\r\n## Motivation and Context\r\n Developers working with MCP in Python have two implementation approaches available: FastMCP for quick development and Low-Level Server for fine-grained control. Without clear guidance, developers may:\r\n\r\nChoose an unnecessarily complex approach for simple use cases\r\nMiss important features and best practices\r\nStruggle with configuration and deployment decisions\r\nThis documentation solves these problems by:\r\n\r\nClearly outlining when to use each approach\r\nProviding side-by-side comparisons with code examples\r\nDocumenting stateful vs. stateless modes\r\nExplaining mounting strategies and path configurations\r\nIncluding practical examples for common scenarios\r\n\r\n## How Has This Been Tested?\r\nVerified all code examples match existing examples in the repository\r\n✅ Cross-referenced with actual implementations in [examples]\r\n✅ Reviewed against FastMCP and Low-Level Server source code\r\n✅ Tested markdown rendering and formatting\r\n✅ Validated links and references to other documentation \r\n\r\n## Breaking Changes\r\nNone - This is a documentation-only addition with no impact on existing code or APIs\r\n\r\n## Types of changes\r\nWhat types of changes does your code introduce? Put an `x` in all the boxes that apply: -->\r\n- [ ] Bug fix (non-breaking change which fixes an issue)\r\n- [ ] New feature (non-breaking change which adds functionality)\r\n- [ ] Breaking change (fix or feature that would cause existing functionality to change)\r\n- [X] Documentation update\r\n\r\n## Checklist\r\n<!-- Go over all the following points, and put an `x` in all the boxes that apply. -->\r\n- [ X] I have read the [MCP Documentation](https://modelcontextprotocol.io)\r\n- [X ] My code follows the repository's style guidelines\r\n- [ X] New and existing tests pass locally\r\n- [ X] I have added appropriate error handling\r\n- [X ] I have added or updated documentation as needed\r\n\r\n## Additional context\r\nFile Structure:\r\n\r\nAdded: [guidance-fastmcp-vs-low-level-server.md](552 lines)\r\nKey Sections:\r\n\r\nOverview of both approaches\r\nFastMCP features and advantages (high-level API)\r\nLow-Level Server features and use cases\r\nSide-by-side comparison table\r\nStateful vs. Stateless mode comparison\r\nMigration guidance between approaches\r\nDecision flowchart and recommendations\r\nDocumentation Strategy:\r\n\r\nUses practical code examples from the existing [examples] directory\r\nIncludes comparison tables for quick reference\r\nProvides clear decision-making guidance\r\nLinks to related documentation and examples\r\nThis guidance fills a gap in the documentation by helping developers make informed architectural decisions early in their MCP server development process.\r\n",
      "created_at": "2025-11-13T05:50:10Z",
      "updated_at": "2025-11-13T05:50:10Z",
      "closed_at": null,
      "merged_at": null,
      "merge_commit_sha": "a50b9789146eb22b13688ed992e12169f1f43c8b",
      "assignee": null,
      "assignees": {},
      "requested_reviewers": {},
      "requested_teams": {},
      "labels": {},
      "milestone": null,
      "draft": false,
      "head": {
        "label": "kumarsagar-collab:main",
        "ref": "main",
        "sha": "ae949f6ef9529698d09f6fe5c8272bd50f82fe29",
        "user": {
          "login": "kumarsagar-collab",
          "id": 78397098,
          "node_id": "MDQ6VXNlcjc4Mzk3MDk4",
          "avatar_url": "https://avatars.githubusercontent.com/u/78397098?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/kumarsagar-collab",
          "type": "User",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 1095483791,
          "node_id": "R_kgDOQUvBjw",
          "name": "python-sdk",
          "full_name": "kumarsagar-collab/python-sdk",
          "private": false,
          "owner": {
            "login": "kumarsagar-collab",
            "id": 78397098,
            "node_id": "MDQ6VXNlcjc4Mzk3MDk4",
            "avatar_url": "https://avatars.githubusercontent.com/u/78397098?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/kumarsagar-collab",
            "type": "User",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": true,
          "url": "https://api.github.com/repos/kumarsagar-collab/python-sdk",
          "created_at": "2025-11-13T05:34:38Z",
          "updated_at": "2025-11-13T05:43:21Z",
          "pushed_at": "2025-11-13T05:43:12Z",
          "homepage": "https://modelcontextprotocol.github.io/python-sdk/",
          "size": 2238,
          "stargazers_count": 0,
          "watchers_count": 0,
          "language": "Python",
          "has_issues": false,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": false,
          "has_discussions": false,
          "forks_count": 0,
          "archived": false,
          "disabled": false,
          "open_issues_count": 0,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 0,
          "open_issues": 0,
          "watchers": 0,
          "default_branch": "main"
        }
      },
      "base": {
        "label": "modelcontextprotocol:main",
        "ref": "main",
        "sha": "be730674adae118ad89806cd3011dc699fef8801",
        "user": {
          "login": "modelcontextprotocol",
          "id": 182288589,
          "node_id": "O_kgDOCt2AzQ",
          "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/modelcontextprotocol",
          "type": "Organization",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 862584018,
          "node_id": "R_kgDOM2n80g",
          "name": "python-sdk",
          "full_name": "modelcontextprotocol/python-sdk",
          "private": false,
          "owner": {
            "login": "modelcontextprotocol",
            "id": 182288589,
            "node_id": "O_kgDOCt2AzQ",
            "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/modelcontextprotocol",
            "type": "Organization",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": false,
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk",
          "created_at": "2024-09-24T21:01:35Z",
          "updated_at": "2025-12-06T05:02:17Z",
          "pushed_at": "2025-12-04T18:04:06Z",
          "homepage": "https://modelcontextprotocol.github.io/python-sdk/",
          "size": 4194,
          "stargazers_count": 20439,
          "watchers_count": 20439,
          "language": "Python",
          "has_issues": true,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": true,
          "has_discussions": false,
          "forks_count": 2843,
          "archived": false,
          "disabled": false,
          "open_issues_count": 345,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 2843,
          "open_issues": 345,
          "watchers": 20439,
          "default_branch": "main"
        }
      },
      "_links": {
        "self": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1619"
        },
        "html": {
          "href": "https://github.com/modelcontextprotocol/python-sdk/pull/1619"
        },
        "issue": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1619"
        },
        "comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1619/comments"
        },
        "review_comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1619/comments"
        },
        "review_comment": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/comments{/number}"
        },
        "commits": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1619/commits"
        },
        "statuses": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/statuses/ae949f6ef9529698d09f6fe5c8272bd50f82fe29"
        }
      },
      "author_association": "NONE",
      "auto_merge": null,
      "active_lock_reason": null,
      "linked_issues": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1611",
      "id": 2997027373,
      "node_id": "PR_kwDOM2n80s6yowIt",
      "number": 1611,
      "state": "open",
      "locked": false,
      "title": "Client notification support",
      "user": {
        "login": "kylestratis",
        "id": 4088051,
        "node_id": "MDQ6VXNlcjQwODgwNTE=",
        "avatar_url": "https://avatars.githubusercontent.com/u/4088051?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/kylestratis",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "body": "This PR expands the universe of supported server notification types that a client can handle to include all existing types defined in `types.py`.\r\n\r\n## Motivation and Context\r\n\r\nIn the current state, Python clients can only handle a few notifications sent by servers, essentially making those server-sent notifications useless. To empower client developers to handle any kind of notification servers may send them, I created this PR.\r\n\r\n## How Has This Been Tested?\r\n- Automated testing in `test_custom_notifications.py` and `test_notification_callbacks.py`\r\n- Runnable demo with several example scenarios\r\n\r\n## Breaking Changes\r\nNone, this approach is fully backward-compatible\r\n\r\n## Types of changes\r\n\r\n- [x] Bug fix (non-breaking change which fixes an issue)\r\n- [x] New feature (non-breaking change which adds functionality)\r\n- [x] Documentation update\r\n\r\n## Checklist\r\n<!-- Go over all the following points, and put an `x` in all the boxes that apply. -->\r\n- [x] I have read the [MCP Documentation](https://modelcontextprotocol.io)\r\n- [x] My code follows the repository's style guidelines\r\n- [x] New and existing tests pass locally\r\n- [x] I have added appropriate error handling\r\n- [x] I have added or updated documentation as needed\r\n\r\n## Additional context\r\nThere are several ServerNotification types that aren't handled by the client, so Python clients are unable to handle them with callbacks. This adds support for notification-specific callbacks in the client session, all except the cancellation notification which is handled natively by the `BaseSession`. The progress notification is also handled in `BaseSession` but in that case, `_received_notification()` is still called, so clients can use a callback to do additional handling of a progress notification if they wish.",
      "created_at": "2025-11-10T22:49:10Z",
      "updated_at": "2025-12-05T15:16:14Z",
      "closed_at": null,
      "merged_at": null,
      "merge_commit_sha": "e2320e6d72b2da90f6c361118ccbd803dde848e0",
      "assignee": null,
      "assignees": {},
      "requested_reviewers": {
        "0": {
          "login": "felixweinberger",
          "id": 3823880,
          "node_id": "MDQ6VXNlcjM4MjM4ODA=",
          "avatar_url": "https://avatars.githubusercontent.com/u/3823880?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/felixweinberger",
          "type": "User",
          "user_view_type": "public",
          "site_admin": false
        },
        "1": {
          "login": "ochafik",
          "id": 273860,
          "node_id": "MDQ6VXNlcjI3Mzg2MA==",
          "avatar_url": "https://avatars.githubusercontent.com/u/273860?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/ochafik",
          "type": "User",
          "user_view_type": "public",
          "site_admin": false
        }
      },
      "requested_teams": {},
      "labels": {},
      "milestone": null,
      "draft": false,
      "head": {
        "label": "kylestratis:client_notif_support",
        "ref": "client_notif_support",
        "sha": "1c53a797c83a06022dbb777093f94254552346ba",
        "user": {
          "login": "kylestratis",
          "id": 4088051,
          "node_id": "MDQ6VXNlcjQwODgwNTE=",
          "avatar_url": "https://avatars.githubusercontent.com/u/4088051?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/kylestratis",
          "type": "User",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 1093750000,
          "node_id": "R_kgDOQTFM8A",
          "name": "python-sdk",
          "full_name": "kylestratis/python-sdk",
          "private": false,
          "owner": {
            "login": "kylestratis",
            "id": 4088051,
            "node_id": "MDQ6VXNlcjQwODgwNTE=",
            "avatar_url": "https://avatars.githubusercontent.com/u/4088051?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/kylestratis",
            "type": "User",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": true,
          "url": "https://api.github.com/repos/kylestratis/python-sdk",
          "created_at": "2025-11-10T19:39:55Z",
          "updated_at": "2025-11-25T22:17:08Z",
          "pushed_at": "2025-12-05T15:16:13Z",
          "homepage": "https://modelcontextprotocol.github.io/python-sdk/",
          "size": 2579,
          "stargazers_count": 0,
          "watchers_count": 0,
          "language": "Python",
          "has_issues": false,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": false,
          "has_discussions": false,
          "forks_count": 0,
          "archived": false,
          "disabled": false,
          "open_issues_count": 0,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 0,
          "open_issues": 0,
          "watchers": 0,
          "default_branch": "main"
        }
      },
      "base": {
        "label": "modelcontextprotocol:main",
        "ref": "main",
        "sha": "89ff338174cec2b28f23deaec6136a4f3b11e875",
        "user": {
          "login": "modelcontextprotocol",
          "id": 182288589,
          "node_id": "O_kgDOCt2AzQ",
          "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/modelcontextprotocol",
          "type": "Organization",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 862584018,
          "node_id": "R_kgDOM2n80g",
          "name": "python-sdk",
          "full_name": "modelcontextprotocol/python-sdk",
          "private": false,
          "owner": {
            "login": "modelcontextprotocol",
            "id": 182288589,
            "node_id": "O_kgDOCt2AzQ",
            "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/modelcontextprotocol",
            "type": "Organization",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": false,
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk",
          "created_at": "2024-09-24T21:01:35Z",
          "updated_at": "2025-12-06T05:02:17Z",
          "pushed_at": "2025-12-04T18:04:06Z",
          "homepage": "https://modelcontextprotocol.github.io/python-sdk/",
          "size": 4194,
          "stargazers_count": 20439,
          "watchers_count": 20439,
          "language": "Python",
          "has_issues": true,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": true,
          "has_discussions": false,
          "forks_count": 2843,
          "archived": false,
          "disabled": false,
          "open_issues_count": 345,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 2843,
          "open_issues": 345,
          "watchers": 20439,
          "default_branch": "main"
        }
      },
      "_links": {
        "self": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1611"
        },
        "html": {
          "href": "https://github.com/modelcontextprotocol/python-sdk/pull/1611"
        },
        "issue": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1611"
        },
        "comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1611/comments"
        },
        "review_comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1611/comments"
        },
        "review_comment": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/comments{/number}"
        },
        "commits": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1611/commits"
        },
        "statuses": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/statuses/1c53a797c83a06022dbb777093f94254552346ba"
        }
      },
      "author_association": "NONE",
      "auto_merge": null,
      "active_lock_reason": null,
      "linked_issues": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1608",
      "id": 2996669578,
      "node_id": "PR_kwDOM2n80s6ynYyK",
      "number": 1608,
      "state": "open",
      "locked": false,
      "title": "feat: propagate session_id from transport to tool context",
      "user": {
        "login": "cbcoutinho",
        "id": 12901868,
        "node_id": "MDQ6VXNlcjEyOTAxODY4",
        "avatar_url": "https://avatars.githubusercontent.com/u/12901868?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/cbcoutinho",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "body": "## Summary\r\n\r\nThis PR enables tools to access the transport-level session ID via `Context.session_id`, supporting session-level tracing and observability use cases.\r\n\r\n## Changes\r\n\r\n- **InitializationOptions**: Add optional `session_id` field\r\n- **ServerSession**: Store and expose `session_id` via property\r\n- **RequestContext**: Add `session_id` field to dataclass\r\n- **StreamableHTTPSessionManager**: Pass `session_id` when creating initialization options\r\n- **FastMCP Context**: Add `session_id` property accessible in tools\r\n- **Tests**: Comprehensive test suite for session_id propagation\r\n\r\n## Usage\r\n\r\nTools can now access the session ID like this:\r\n\r\n```python\r\n@mcp.tool()\r\nasync def my_tool(ctx: Context) -> dict:\r\n    session_id = ctx.session_id  # Transport's session ID (streamable-http)\r\n    # Use for tracing, logging, correlation, etc.\r\n    return {\"session_id\": session_id}\r\n```\r\n\r\n## Behavior\r\n\r\n- **Streamable-HTTP (stateful)**: `ctx.session_id` returns the transport's session ID (UUID)\r\n- **Streamable-HTTP (stateless)**: `ctx.session_id` returns `None` (no session tracking)\r\n- **stdio/SSE transports**: `ctx.session_id` returns `None` (session_id not set during initialization)\r\n\r\n## Use Cases\r\n\r\n1. **Distributed Tracing**: Add session_id as a span attribute in OpenTelemetry traces to correlate all tool calls within a session\r\n2. **Session Analytics**: Track per-session metrics and usage patterns\r\n3. **Debugging**: Correlate logs and errors across multiple requests in the same session\r\n4. **Audit Trails**: Associate all operations with a session identifier\r\n\r\n## Testing\r\n\r\n- All 418 existing server tests pass ✓\r\n- New test suite covers session_id propagation scenarios\r\n- Verified no regressions in FastMCP, auth, resource tests\r\n\r\n## Fixes\r\n\r\n- #485\r\n- #942\r\n\r\n## Related\r\n\r\nRelated to #421 (OpenTelemetry tracing integration)\r\n\r\n## Breaking Changes\r\n\r\nNone. This is a backward-compatible addition:\r\n- New optional field in `InitializationOptions`\r\n- New property on `Context` (returns None if not available)\r\n- Existing code continues to work without modifications",
      "created_at": "2025-11-10T20:30:09Z",
      "updated_at": "2025-12-01T15:44:35Z",
      "closed_at": null,
      "merged_at": null,
      "merge_commit_sha": null,
      "assignee": null,
      "assignees": {},
      "requested_reviewers": {},
      "requested_teams": {},
      "labels": {
        "0": {
          "id": 9287728201,
          "node_id": "LA_kwDOM2n80s8AAAACKZd8SQ",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/needs%20maintainer%20action",
          "name": "needs maintainer action",
          "color": "d33428",
          "default": false,
          "description": "Potentially serious issue - needs proactive fix and maintainer attention"
        },
        "1": {
          "id": 9354757189,
          "node_id": "LA_kwDOM2n80s8AAAACLZZERQ",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/enhancement",
          "name": "enhancement",
          "color": "11b5cc",
          "default": true,
          "description": "Request for a new feature that's not currently supported"
        }
      },
      "milestone": null,
      "draft": false,
      "head": {
        "label": "cbcoutinho:feat/session-id-propagation",
        "ref": "feat/session-id-propagation",
        "sha": "4af5453722fb07e622454109b2b5aaa86eb09e46",
        "user": {
          "login": "cbcoutinho",
          "id": 12901868,
          "node_id": "MDQ6VXNlcjEyOTAxODY4",
          "avatar_url": "https://avatars.githubusercontent.com/u/12901868?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/cbcoutinho",
          "type": "User",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 1086488280,
          "node_id": "R_kgDOQMJ-2A",
          "name": "python-sdk",
          "full_name": "cbcoutinho/python-sdk",
          "private": false,
          "owner": {
            "login": "cbcoutinho",
            "id": 12901868,
            "node_id": "MDQ6VXNlcjEyOTAxODY4",
            "avatar_url": "https://avatars.githubusercontent.com/u/12901868?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/cbcoutinho",
            "type": "User",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": true,
          "url": "https://api.github.com/repos/cbcoutinho/python-sdk",
          "created_at": "2025-10-30T13:42:10Z",
          "updated_at": "2025-11-05T14:30:44Z",
          "pushed_at": "2025-11-24T21:03:31Z",
          "homepage": "https://modelcontextprotocol.github.io/python-sdk/",
          "size": 4037,
          "stargazers_count": 0,
          "watchers_count": 0,
          "language": "Python",
          "has_issues": false,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": false,
          "has_discussions": false,
          "forks_count": 0,
          "archived": false,
          "disabled": false,
          "open_issues_count": 0,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 0,
          "open_issues": 0,
          "watchers": 0,
          "default_branch": "main"
        }
      },
      "base": {
        "label": "modelcontextprotocol:main",
        "ref": "main",
        "sha": "da4fce21956cd2ce9e1e94e0bbb4eb2eca888c79",
        "user": {
          "login": "modelcontextprotocol",
          "id": 182288589,
          "node_id": "O_kgDOCt2AzQ",
          "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/modelcontextprotocol",
          "type": "Organization",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 862584018,
          "node_id": "R_kgDOM2n80g",
          "name": "python-sdk",
          "full_name": "modelcontextprotocol/python-sdk",
          "private": false,
          "owner": {
            "login": "modelcontextprotocol",
            "id": 182288589,
            "node_id": "O_kgDOCt2AzQ",
            "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/modelcontextprotocol",
            "type": "Organization",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": false,
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk",
          "created_at": "2024-09-24T21:01:35Z",
          "updated_at": "2025-12-06T05:02:17Z",
          "pushed_at": "2025-12-04T18:04:06Z",
          "homepage": "https://modelcontextprotocol.github.io/python-sdk/",
          "size": 4194,
          "stargazers_count": 20439,
          "watchers_count": 20439,
          "language": "Python",
          "has_issues": true,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": true,
          "has_discussions": false,
          "forks_count": 2843,
          "archived": false,
          "disabled": false,
          "open_issues_count": 345,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 2843,
          "open_issues": 345,
          "watchers": 20439,
          "default_branch": "main"
        }
      },
      "_links": {
        "self": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1608"
        },
        "html": {
          "href": "https://github.com/modelcontextprotocol/python-sdk/pull/1608"
        },
        "issue": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1608"
        },
        "comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1608/comments"
        },
        "review_comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1608/comments"
        },
        "review_comment": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/comments{/number}"
        },
        "commits": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1608/commits"
        },
        "statuses": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/statuses/4af5453722fb07e622454109b2b5aaa86eb09e46"
        }
      },
      "author_association": "CONTRIBUTOR",
      "auto_merge": null,
      "active_lock_reason": null,
      "linked_issues": [
        4,
        9
      ]
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1599",
      "id": 2993201443,
      "node_id": "PR_kwDOM2n80s6yaKEj",
      "number": 1599,
      "state": "open",
      "locked": false,
      "title": "fixed everything-server vscode support using stdio transport",
      "user": {
        "login": "destryteeter",
        "id": 732056,
        "node_id": "MDQ6VXNlcjczMjA1Ng==",
        "avatar_url": "https://avatars.githubusercontent.com/u/732056?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/destryteeter",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "body": "Adds \"transport\" parameter to everything-server example.\r\n\r\n## Motivation and Context\r\nI encountered an error where the process would not finish when adding the mcp server to the `.vscode/mcp.json` file with the given value:\r\n```\r\n{\r\n  \"servers\": {\r\n    \"mcp-server-demo\": {\r\n      \"command\": \"python\",\r\n      \"args\": [\"${workspaceFolder}/server.py\"],\r\n    }\r\n  }\r\n}\r\n```\r\n\r\nLog output:\r\n```\r\n2025-11-09 15:38:21.677 [info] Starting server mcp-server-demo\r\n2025-11-09 15:38:21.678 [info] Connection state: Starting\r\n2025-11-09 15:38:21.685 [info] Starting server from LocalProcess extension host\r\n2025-11-09 15:38:21.686 [info] Connection state: Starting\r\n2025-11-09 15:38:21.687 [info] Connection state: Running\r\n2025-11-09 15:38:22.641 [warning] [server stderr] [11/09/25 15:38:22] INFO     Starting MCP Everything Server on     server.py:307\r\n2025-11-09 15:38:22.641 [warning] [server stderr]                              port 3003\r\n2025-11-09 15:38:22.642 [warning] [server stderr]                     INFO     Endpoint will be:                     server.py:308\r\n2025-11-09 15:38:22.642 [warning] [server stderr]                              http://localhost:3003/mcp\r\n2025-11-09 15:38:22.670 [warning] [server stderr] INFO:     Started server process [19538]\r\n2025-11-09 15:38:22.670 [warning] [server stderr] INFO:     Waiting for application startup.\r\n2025-11-09 15:38:22.673 [warning] [server stderr]                     INFO     StreamableHTTP       streamable_http_manager.py:110\r\n2025-11-09 15:38:22.673 [warning] [server stderr]                              session manager\r\n2025-11-09 15:38:22.673 [warning] [server stderr]                              started\r\n2025-11-09 15:38:22.673 [warning] [server stderr] INFO:     Application startup complete.\r\n2025-11-09 15:38:22.673 [warning] [server stderr] INFO:     Uvicorn running on http://127.0.0.1:3003 (Press CTRL+C to quit)\r\n2025-11-09 15:38:26.689 [info] Waiting for server to respond to `initialize` request...\r\n```\r\n\r\nThe process would never pass \"waiting for server to respod\".\r\n\r\n## How Has This Been Tested?\r\nTested using Visual Studio Code:\r\nVersion: 1.105.1 (Universal)\r\nCommit: 7d842fb85a0275a4a8e4d7e040d2625abbf7f084\r\nDate: 2025-10-14T22:33:36.618Z\r\nElectron: 37.6.0\r\nElectronBuildId: 12502201\r\nChromium: 138.0.7204.251\r\nNode.js: 22.19.0\r\nV8: 13.8.258.32-electron.0\r\nOS: Darwin x64 21.6.0\r\n\r\n## Breaking Changes\r\nNo\r\n\r\n## Types of changes\r\n<!-- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->\r\n- [ X ] Bug fix (non-breaking change which fixes an issue)\r\n- [ ] New feature (non-breaking change which adds functionality)\r\n- [ ] Breaking change (fix or feature that would cause existing functionality to change)\r\n- [ ] Documentation update\r\n\r\n## Checklist\r\n<!-- Go over all the following points, and put an `x` in all the boxes that apply. -->\r\n- [ X ] I have read the [MCP Documentation](https://modelcontextprotocol.io)\r\n- [ X ] My code follows the repository's style guidelines\r\n- [ X ] New and existing tests pass locally\r\n- [ X ] I have added appropriate error handling\r\n- [ X ] I have added or updated documentation as needed\r\n\r\n## Additional context\r\n<!-- Add any other context, implementation notes, or design decisions -->\r\n",
      "created_at": "2025-11-09T23:52:51Z",
      "updated_at": "2025-11-09T23:52:51Z",
      "closed_at": null,
      "merged_at": null,
      "merge_commit_sha": "f261eca34ba6f9d749ec43acf4f13b7b486d7684",
      "assignee": null,
      "assignees": {},
      "requested_reviewers": {},
      "requested_teams": {},
      "labels": {},
      "milestone": null,
      "draft": false,
      "head": {
        "label": "destryteeter:dev",
        "ref": "dev",
        "sha": "12f1d94afcccedc87571b3c3bf22f9993e96a793",
        "user": {
          "login": "destryteeter",
          "id": 732056,
          "node_id": "MDQ6VXNlcjczMjA1Ng==",
          "avatar_url": "https://avatars.githubusercontent.com/u/732056?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/destryteeter",
          "type": "User",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 1092985962,
          "node_id": "R_kgDOQSWkag",
          "name": "mcp-python-sdk",
          "full_name": "destryteeter/mcp-python-sdk",
          "private": false,
          "owner": {
            "login": "destryteeter",
            "id": 732056,
            "node_id": "MDQ6VXNlcjczMjA1Ng==",
            "avatar_url": "https://avatars.githubusercontent.com/u/732056?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/destryteeter",
            "type": "User",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": true,
          "url": "https://api.github.com/repos/destryteeter/mcp-python-sdk",
          "created_at": "2025-11-09T17:32:42Z",
          "updated_at": "2025-11-09T17:32:42Z",
          "pushed_at": "2025-11-09T23:37:34Z",
          "homepage": "https://modelcontextprotocol.github.io/python-sdk/",
          "size": 2157,
          "stargazers_count": 0,
          "watchers_count": 0,
          "language": null,
          "has_issues": false,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": false,
          "has_discussions": false,
          "forks_count": 0,
          "archived": false,
          "disabled": false,
          "open_issues_count": 0,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 0,
          "open_issues": 0,
          "watchers": 0,
          "default_branch": "main"
        }
      },
      "base": {
        "label": "modelcontextprotocol:main",
        "ref": "main",
        "sha": "da4fce21956cd2ce9e1e94e0bbb4eb2eca888c79",
        "user": {
          "login": "modelcontextprotocol",
          "id": 182288589,
          "node_id": "O_kgDOCt2AzQ",
          "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/modelcontextprotocol",
          "type": "Organization",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 862584018,
          "node_id": "R_kgDOM2n80g",
          "name": "python-sdk",
          "full_name": "modelcontextprotocol/python-sdk",
          "private": false,
          "owner": {
            "login": "modelcontextprotocol",
            "id": 182288589,
            "node_id": "O_kgDOCt2AzQ",
            "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/modelcontextprotocol",
            "type": "Organization",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": false,
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk",
          "created_at": "2024-09-24T21:01:35Z",
          "updated_at": "2025-12-06T05:02:17Z",
          "pushed_at": "2025-12-04T18:04:06Z",
          "homepage": "https://modelcontextprotocol.github.io/python-sdk/",
          "size": 4194,
          "stargazers_count": 20439,
          "watchers_count": 20439,
          "language": "Python",
          "has_issues": true,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": true,
          "has_discussions": false,
          "forks_count": 2843,
          "archived": false,
          "disabled": false,
          "open_issues_count": 345,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 2843,
          "open_issues": 345,
          "watchers": 20439,
          "default_branch": "main"
        }
      },
      "_links": {
        "self": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1599"
        },
        "html": {
          "href": "https://github.com/modelcontextprotocol/python-sdk/pull/1599"
        },
        "issue": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1599"
        },
        "comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1599/comments"
        },
        "review_comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1599/comments"
        },
        "review_comment": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/comments{/number}"
        },
        "commits": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1599/commits"
        },
        "statuses": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/statuses/12f1d94afcccedc87571b3c3bf22f9993e96a793"
        }
      },
      "author_association": "NONE",
      "auto_merge": null,
      "active_lock_reason": null,
      "linked_issues": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1597",
      "id": 2992582215,
      "node_id": "PR_kwDOM2n80s6yXy5H",
      "number": 1597,
      "state": "open",
      "locked": false,
      "title": "fix: validate PRM resource field per RFC 9728 Section 3.3",
      "user": {
        "login": "bjoaquinc",
        "id": 75667013,
        "node_id": "MDQ6VXNlcjc1NjY3MDEz",
        "avatar_url": "https://avatars.githubusercontent.com/u/75667013?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/bjoaquinc",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "body": "<!-- Provide a brief summary of your changes -->\r\n\r\n## Motivation and Context\r\n<!-- Why is this change needed? What problem does it solve? -->\r\nResolves #1581\r\n\r\nAdds RFC 9728 Section 3.3 validation to prevent metadata impersonation attacks during PRM discovery. Uses pre-existing `check_resource_allowed()` to validate origin and path hierarchy before storing metadata. Invalid metadata triggers SEP-985 fallback (already implemented).\r\n\r\n## How Has This Been Tested?\r\n<!-- Have you tested this in a real application? Which scenarios were tested? -->\r\nCreated the following tests:\r\n- `test_reject_metadata_with_mismatched_origin` - validates rejection of wrong scheme/host/port\r\n- `test_reject_metadata_with_invalid_path_hierarchy` - validates path parent/child relationships\r\n\r\nUpdated:\r\n- `Existing test test_auth_flow_with_no_tokens` updated to use valid resource field\r\n\r\nRan all tests in `tests/client/test_auth.py` to ensure they all pass.\r\nTested manually as well using `examples/clients/simple-auth-client/mcp_simple_auth_client` and `examples/servers/simple-auth/mcp_simple_auth`\r\n\r\n## Breaking Changes\r\n<!-- Will users need to update their code or configurations? -->\r\nNone.\r\n\r\n## Types of changes\r\n<!-- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->\r\n- [x] Bug fix (non-breaking change which fixes an issue)\r\n- [ ] New feature (non-breaking change which adds functionality)\r\n- [ ] Breaking change (fix or feature that would cause existing functionality to change)\r\n- [ ] Documentation update\r\n\r\n## Checklist\r\n<!-- Go over all the following points, and put an `x` in all the boxes that apply. -->\r\n- [x] I have read the [MCP Documentation](https://modelcontextprotocol.io)\r\n- [x] My code follows the repository's style guidelines\r\n- [x] New and existing tests pass locally\r\n- [x] I have added appropriate error handling\r\n- [ ] I have added or updated documentation as needed\r\n\r\n## Additional context\r\n<!-- Add any other context, implementation notes, or design decisions -->\r\n",
      "created_at": "2025-11-09T12:08:49Z",
      "updated_at": "2025-11-10T00:23:19Z",
      "closed_at": null,
      "merged_at": null,
      "merge_commit_sha": "5c3e9f5e69b906e5043eb62f45ae82b987b27164",
      "assignee": null,
      "assignees": {},
      "requested_reviewers": {},
      "requested_teams": {},
      "labels": {},
      "milestone": null,
      "draft": false,
      "head": {
        "label": "bjoaquinc:auth-prm-validation",
        "ref": "auth-prm-validation",
        "sha": "ee80dc7ecfb51198e2bf0b81b1c48f1b126e9a93",
        "user": {
          "login": "bjoaquinc",
          "id": 75667013,
          "node_id": "MDQ6VXNlcjc1NjY3MDEz",
          "avatar_url": "https://avatars.githubusercontent.com/u/75667013?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/bjoaquinc",
          "type": "User",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 1087944836,
          "node_id": "R_kgDOQNi4hA",
          "name": "python-sdk",
          "full_name": "bjoaquinc/python-sdk",
          "private": false,
          "owner": {
            "login": "bjoaquinc",
            "id": 75667013,
            "node_id": "MDQ6VXNlcjc1NjY3MDEz",
            "avatar_url": "https://avatars.githubusercontent.com/u/75667013?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/bjoaquinc",
            "type": "User",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": true,
          "url": "https://api.github.com/repos/bjoaquinc/python-sdk",
          "created_at": "2025-11-02T00:55:18Z",
          "updated_at": "2025-11-09T10:03:20Z",
          "pushed_at": "2025-11-09T23:59:38Z",
          "homepage": "https://modelcontextprotocol.github.io/python-sdk/",
          "size": 2197,
          "stargazers_count": 0,
          "watchers_count": 0,
          "language": "Python",
          "has_issues": false,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": false,
          "has_discussions": false,
          "forks_count": 0,
          "archived": false,
          "disabled": false,
          "open_issues_count": 0,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 0,
          "open_issues": 0,
          "watchers": 0,
          "default_branch": "main"
        }
      },
      "base": {
        "label": "modelcontextprotocol:main",
        "ref": "main",
        "sha": "9eae96a05e09fa3f35ea50f8b1c11b19c69f9597",
        "user": {
          "login": "modelcontextprotocol",
          "id": 182288589,
          "node_id": "O_kgDOCt2AzQ",
          "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/modelcontextprotocol",
          "type": "Organization",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 862584018,
          "node_id": "R_kgDOM2n80g",
          "name": "python-sdk",
          "full_name": "modelcontextprotocol/python-sdk",
          "private": false,
          "owner": {
            "login": "modelcontextprotocol",
            "id": 182288589,
            "node_id": "O_kgDOCt2AzQ",
            "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/modelcontextprotocol",
            "type": "Organization",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": false,
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk",
          "created_at": "2024-09-24T21:01:35Z",
          "updated_at": "2025-12-06T05:02:17Z",
          "pushed_at": "2025-12-04T18:04:06Z",
          "homepage": "https://modelcontextprotocol.github.io/python-sdk/",
          "size": 4194,
          "stargazers_count": 20439,
          "watchers_count": 20439,
          "language": "Python",
          "has_issues": true,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": true,
          "has_discussions": false,
          "forks_count": 2843,
          "archived": false,
          "disabled": false,
          "open_issues_count": 345,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 2843,
          "open_issues": 345,
          "watchers": 20439,
          "default_branch": "main"
        }
      },
      "_links": {
        "self": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1597"
        },
        "html": {
          "href": "https://github.com/modelcontextprotocol/python-sdk/pull/1597"
        },
        "issue": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1597"
        },
        "comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1597/comments"
        },
        "review_comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1597/comments"
        },
        "review_comment": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/comments{/number}"
        },
        "commits": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1597/commits"
        },
        "statuses": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/statuses/ee80dc7ecfb51198e2bf0b81b1c48f1b126e9a93"
        }
      },
      "author_association": "NONE",
      "auto_merge": null,
      "active_lock_reason": null,
      "linked_issues": [
        1,
        1581
      ]
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1595",
      "id": 2990567379,
      "node_id": "PR_kwDOM2n80s6yQG_T",
      "number": 1595,
      "state": "open",
      "locked": false,
      "title": "fix: Raise exceptions in default ClientSession message handler (#1401)",
      "user": {
        "login": "matthew-gries",
        "id": 46942482,
        "node_id": "MDQ6VXNlcjQ2OTQyNDgy",
        "avatar_url": "https://avatars.githubusercontent.com/u/46942482?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/matthew-gries",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "body": "<!-- Provide a brief summary of your changes -->\r\n\r\nFixes #1401.\r\n - Logs and raises exceptions in the default ClientSession message handler. Includes test that verifies exceptions passed to the default handler are properly raised.\r\n - Makes session more resilient to stale server responses by logging warnings (instead of raising exceptions) when responses with unknown request IDs are received. This handles the case where the client times out and cleans up a pending request, but the server responds late (see `test_notification_validation_error()`). Previously, a RuntimeError was raised for unknown IDs, but it was swallowed by the old default message handler. With the new exception-raising behavior, keeping the RuntimeError would crash the session on benign timeout scenarios.\r\n\r\n## Motivation and Context\r\nIt solves the issue described in #1401 where exceptions in the default message handler for the ClientSession were being swallowed, which leads to silent failures that are difficult to debug.\r\n\r\n## How Has This Been Tested?\r\n<!-- Have you tested this in a real application? Which scenarios were tested? -->\r\nAdded unit test for this, also `test_notification_validation_error()` in `test_88_random_error.py`\r\n\r\n## Breaking Changes\r\nTechnically yes because those who use the default message handler and were not receiving silent errors will now start seeing them. Those who override the message handler are not affected.\r\n\r\n## Types of changes\r\n<!-- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->\r\n- [ ] Bug fix (non-breaking change which fixes an issue)\r\n- [ ] New feature (non-breaking change which adds functionality)\r\n- [x] Breaking change (fix or feature that would cause existing functionality to change)\r\n- [ ] Documentation update\r\n\r\n## Checklist\r\n<!-- Go over all the following points, and put an `x` in all the boxes that apply. -->\r\n- [x] I have read the [MCP Documentation](https://modelcontextprotocol.io)\r\n- [x] My code follows the repository's style guidelines\r\n- [x] New and existing tests pass locally\r\n- [x] I have added appropriate error handling\r\n- [x] I have added or updated documentation as needed\r\n\r\n## Additional context\r\n<!-- Add any other context, implementation notes, or design decisions -->",
      "created_at": "2025-11-08T01:17:42Z",
      "updated_at": "2025-11-16T17:08:41Z",
      "closed_at": null,
      "merged_at": null,
      "merge_commit_sha": null,
      "assignee": null,
      "assignees": {},
      "requested_reviewers": {},
      "requested_teams": {},
      "labels": {},
      "milestone": null,
      "draft": false,
      "head": {
        "label": "matthew-gries:1401",
        "ref": "1401",
        "sha": "f951c078607fc7a80f89aca10e86d4829f742299",
        "user": {
          "login": "matthew-gries",
          "id": 46942482,
          "node_id": "MDQ6VXNlcjQ2OTQyNDgy",
          "avatar_url": "https://avatars.githubusercontent.com/u/46942482?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/matthew-gries",
          "type": "User",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 1083933936,
          "node_id": "R_kgDOQJuE8A",
          "name": "modelcontextprotocol-python-sdk",
          "full_name": "matthew-gries/modelcontextprotocol-python-sdk",
          "private": false,
          "owner": {
            "login": "matthew-gries",
            "id": 46942482,
            "node_id": "MDQ6VXNlcjQ2OTQyNDgy",
            "avatar_url": "https://avatars.githubusercontent.com/u/46942482?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/matthew-gries",
            "type": "User",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": true,
          "url": "https://api.github.com/repos/matthew-gries/modelcontextprotocol-python-sdk",
          "created_at": "2025-10-27T01:20:46Z",
          "updated_at": "2025-11-25T03:21:46Z",
          "pushed_at": "2025-11-25T03:22:59Z",
          "homepage": "https://modelcontextprotocol.github.io/python-sdk/",
          "size": 2457,
          "stargazers_count": 0,
          "watchers_count": 0,
          "language": "Python",
          "has_issues": false,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": false,
          "has_discussions": false,
          "forks_count": 0,
          "archived": false,
          "disabled": false,
          "open_issues_count": 0,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 0,
          "open_issues": 0,
          "watchers": 0,
          "default_branch": "main"
        }
      },
      "base": {
        "label": "modelcontextprotocol:main",
        "ref": "main",
        "sha": "a357380cfa9b8109520aaeba3b9ec9f36f26d4e3",
        "user": {
          "login": "modelcontextprotocol",
          "id": 182288589,
          "node_id": "O_kgDOCt2AzQ",
          "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/modelcontextprotocol",
          "type": "Organization",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 862584018,
          "node_id": "R_kgDOM2n80g",
          "name": "python-sdk",
          "full_name": "modelcontextprotocol/python-sdk",
          "private": false,
          "owner": {
            "login": "modelcontextprotocol",
            "id": 182288589,
            "node_id": "O_kgDOCt2AzQ",
            "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/modelcontextprotocol",
            "type": "Organization",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": false,
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk",
          "created_at": "2024-09-24T21:01:35Z",
          "updated_at": "2025-12-06T05:02:17Z",
          "pushed_at": "2025-12-04T18:04:06Z",
          "homepage": "https://modelcontextprotocol.github.io/python-sdk/",
          "size": 4194,
          "stargazers_count": 20439,
          "watchers_count": 20439,
          "language": "Python",
          "has_issues": true,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": true,
          "has_discussions": false,
          "forks_count": 2843,
          "archived": false,
          "disabled": false,
          "open_issues_count": 345,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 2843,
          "open_issues": 345,
          "watchers": 20439,
          "default_branch": "main"
        }
      },
      "_links": {
        "self": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1595"
        },
        "html": {
          "href": "https://github.com/modelcontextprotocol/python-sdk/pull/1595"
        },
        "issue": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1595"
        },
        "comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1595/comments"
        },
        "review_comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1595/comments"
        },
        "review_comment": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/comments{/number}"
        },
        "commits": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1595/commits"
        },
        "statuses": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/statuses/f951c078607fc7a80f89aca10e86d4829f742299"
        }
      },
      "author_association": "NONE",
      "auto_merge": null,
      "active_lock_reason": null,
      "linked_issues": [
        1,
        1401
      ]
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1592",
      "id": 2989007625,
      "node_id": "PR_kwDOM2n80s6yKKMJ",
      "number": 1592,
      "state": "open",
      "locked": false,
      "title": "Fix/issue_1574",
      "user": {
        "login": "jasiecky",
        "id": 78036965,
        "node_id": "MDQ6VXNlcjc4MDM2OTY1",
        "avatar_url": "https://avatars.githubusercontent.com/u/78036965?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/jasiecky",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "body": "Addresses [1574](https://github.com/modelcontextprotocol/python-sdk/issues/1574).",
      "created_at": "2025-11-07T15:08:33Z",
      "updated_at": "2025-11-07T16:16:34Z",
      "closed_at": null,
      "merged_at": null,
      "merge_commit_sha": null,
      "assignee": null,
      "assignees": {},
      "requested_reviewers": {},
      "requested_teams": {},
      "labels": {},
      "milestone": null,
      "draft": true,
      "head": {
        "label": "jasiecky:fix/issue_1574",
        "ref": "fix/issue_1574",
        "sha": "e04fbdfb9d82545085a95d85f6bbb35981d5c849",
        "user": {
          "login": "jasiecky",
          "id": 78036965,
          "node_id": "MDQ6VXNlcjc4MDM2OTY1",
          "avatar_url": "https://avatars.githubusercontent.com/u/78036965?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/jasiecky",
          "type": "User",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 1091818968,
          "node_id": "R_kgDOQRPV2A",
          "name": "python-sdk",
          "full_name": "jasiecky/python-sdk",
          "private": false,
          "owner": {
            "login": "jasiecky",
            "id": 78036965,
            "node_id": "MDQ6VXNlcjc4MDM2OTY1",
            "avatar_url": "https://avatars.githubusercontent.com/u/78036965?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/jasiecky",
            "type": "User",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": true,
          "url": "https://api.github.com/repos/jasiecky/python-sdk",
          "created_at": "2025-11-07T15:08:27Z",
          "updated_at": "2025-11-07T15:08:27Z",
          "pushed_at": "2025-11-07T15:41:41Z",
          "homepage": "https://modelcontextprotocol.github.io/python-sdk/",
          "size": 3878,
          "stargazers_count": 0,
          "watchers_count": 0,
          "language": null,
          "has_issues": false,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": false,
          "has_discussions": false,
          "forks_count": 0,
          "archived": false,
          "disabled": false,
          "open_issues_count": 0,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 0,
          "open_issues": 0,
          "watchers": 0,
          "default_branch": "main"
        }
      },
      "base": {
        "label": "modelcontextprotocol:main",
        "ref": "main",
        "sha": "9eae96a05e09fa3f35ea50f8b1c11b19c69f9597",
        "user": {
          "login": "modelcontextprotocol",
          "id": 182288589,
          "node_id": "O_kgDOCt2AzQ",
          "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/modelcontextprotocol",
          "type": "Organization",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 862584018,
          "node_id": "R_kgDOM2n80g",
          "name": "python-sdk",
          "full_name": "modelcontextprotocol/python-sdk",
          "private": false,
          "owner": {
            "login": "modelcontextprotocol",
            "id": 182288589,
            "node_id": "O_kgDOCt2AzQ",
            "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/modelcontextprotocol",
            "type": "Organization",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": false,
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk",
          "created_at": "2024-09-24T21:01:35Z",
          "updated_at": "2025-12-06T05:02:17Z",
          "pushed_at": "2025-12-04T18:04:06Z",
          "homepage": "https://modelcontextprotocol.github.io/python-sdk/",
          "size": 4194,
          "stargazers_count": 20439,
          "watchers_count": 20439,
          "language": "Python",
          "has_issues": true,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": true,
          "has_discussions": false,
          "forks_count": 2843,
          "archived": false,
          "disabled": false,
          "open_issues_count": 345,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 2843,
          "open_issues": 345,
          "watchers": 20439,
          "default_branch": "main"
        }
      },
      "_links": {
        "self": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1592"
        },
        "html": {
          "href": "https://github.com/modelcontextprotocol/python-sdk/pull/1592"
        },
        "issue": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1592"
        },
        "comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1592/comments"
        },
        "review_comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1592/comments"
        },
        "review_comment": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/comments{/number}"
        },
        "commits": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1592/commits"
        },
        "statuses": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/statuses/e04fbdfb9d82545085a95d85f6bbb35981d5c849"
        }
      },
      "author_association": "NONE",
      "auto_merge": null,
      "active_lock_reason": null,
      "linked_issues": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1591",
      "id": 2987875371,
      "node_id": "PR_kwDOM2n80s6yF1wr",
      "number": 1591,
      "state": "open",
      "locked": false,
      "title": "Pluggable Transport Abstractions",
      "user": {
        "login": "asheshvidyut",
        "id": 134911583,
        "node_id": "U_kgDOCAqWXw",
        "avatar_url": "https://avatars.githubusercontent.com/u/134911583?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/asheshvidyut",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "body": "## Motivation and Context\r\n\r\nAdd support for Pluggable Transport Abstractions in MCP Python SDK. \r\n\r\n### Add abstractions to support `Pluggable Transport`. \r\n\r\nThis PR majorly adds two abstract classes and APIs that every transport must implement. The abstract classes are \r\n\r\n* `src/mcp/client/transport_session.py` -> `ClientTransportSession`\r\n* `src/mcp/server/transport_session.py` -> `ServerTransportSession`\r\n\r\n**Both the above classes have minimal APIs that every transport must implement in order to achieve the features defined in [MCP Specification](https://modelcontextprotocol.io/specification/2025-06-18)** \r\n\r\nAdditionally existing transport classes which are based on `JSONRPC` inherits from these two new classes.\r\n\r\n`src/mcp/client/session.py` -> `ClientSession` -> inherits from `src/mcp/client/transport_session.py` -> `ClientTransportSession`\r\n`src/mcp/server/session.py` -> `ServerSession` -> inherits from `src/mcp/server/transport_session.py` -> `ServerTransportSession`\r\n\r\n### Type Hints Fixes\r\n\r\nSince `ClientSession` and `ServerSession` has a higher level abstraction so this PR also updates the type hints to the parent classes. Precisely - places where we use `ClientSession` are updated to use `ClientTransportSession` and similarly `ServerSession` type hints are updated to use `ServerTransportSession`.\r\n\r\n## How Has This Been Tested?\r\nTested using `pyright` and `uv run pytest`. Changes are also validated using `CI` runs.\r\n\r\n## Breaking Changes\r\nNo. \r\n\r\n## Types of changes\r\n<!-- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->\r\n- [ ] Bug fix (non-breaking change which fixes an issue)\r\n- [x] New feature (non-breaking change which adds functionality)\r\n- [ ] Breaking change (fix or feature that would cause existing functionality to change)\r\n- [ ] Documentation update\r\n\r\n## Checklist\r\n<!-- Go over all the following points, and put an `x` in all the boxes that apply. -->\r\n- [x] I have read the [MCP Documentation](https://modelcontextprotocol.io)\r\n- [x] My code follows the repository's style guidelines\r\n- [x] New and existing tests pass locally\r\n- [x] I have added appropriate error handling\r\n- [x] I have added or updated documentation as needed\r\n\r\n## Additional context\r\n\r\nIn future if we want to add more transports, those could implement abstract classes introduced in the PR which are - `ClientTransportSesssion` and `ServerTransportSession`.",
      "created_at": "2025-11-07T09:40:34Z",
      "updated_at": "2025-11-18T13:35:11Z",
      "closed_at": null,
      "merged_at": null,
      "merge_commit_sha": null,
      "assignee": null,
      "assignees": {},
      "requested_reviewers": {},
      "requested_teams": {},
      "labels": {
        "0": {
          "id": 9230424293,
          "node_id": "LA_kwDOM2n80s8AAAACJi0Y5Q",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/v2",
          "name": "v2",
          "color": "5d2a87",
          "default": false,
          "description": "Ideas, requests and plans for v2 of the SDK which will incorporate major changes and fixes"
        },
        "1": {
          "id": 9354757189,
          "node_id": "LA_kwDOM2n80s8AAAACLZZERQ",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/enhancement",
          "name": "enhancement",
          "color": "11b5cc",
          "default": true,
          "description": "Request for a new feature that's not currently supported"
        },
        "2": {
          "id": 9354772110,
          "node_id": "LA_kwDOM2n80s8AAAACLZZ-jg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P3",
          "name": "P3",
          "color": "c7df49",
          "default": false,
          "description": "Nice to haves, rare edge cases"
        }
      },
      "milestone": null,
      "draft": false,
      "head": {
        "label": "asheshvidyut:pluggable-transport",
        "ref": "pluggable-transport",
        "sha": "195bfe55bbc5488a6d2cf33e38c67ed3e5943eac",
        "user": {
          "login": "asheshvidyut",
          "id": 134911583,
          "node_id": "U_kgDOCAqWXw",
          "avatar_url": "https://avatars.githubusercontent.com/u/134911583?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/asheshvidyut",
          "type": "User",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 1028796215,
          "node_id": "R_kgDOPVIvNw",
          "name": "python-sdk",
          "full_name": "asheshvidyut/python-sdk",
          "private": false,
          "owner": {
            "login": "asheshvidyut",
            "id": 134911583,
            "node_id": "U_kgDOCAqWXw",
            "avatar_url": "https://avatars.githubusercontent.com/u/134911583?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/asheshvidyut",
            "type": "User",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": true,
          "url": "https://api.github.com/repos/asheshvidyut/python-sdk",
          "created_at": "2025-07-30T04:43:58Z",
          "updated_at": "2025-11-12T08:41:57Z",
          "pushed_at": "2025-11-22T06:32:32Z",
          "homepage": "https://modelcontextprotocol.io",
          "size": 2543,
          "stargazers_count": 0,
          "watchers_count": 0,
          "language": "Python",
          "has_issues": false,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": false,
          "has_discussions": false,
          "forks_count": 0,
          "archived": false,
          "disabled": false,
          "open_issues_count": 2,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 0,
          "open_issues": 2,
          "watchers": 0,
          "default_branch": "main"
        }
      },
      "base": {
        "label": "modelcontextprotocol:main",
        "ref": "main",
        "sha": "5489e8b6fb19ac32146eb633636df52b1dd049d5",
        "user": {
          "login": "modelcontextprotocol",
          "id": 182288589,
          "node_id": "O_kgDOCt2AzQ",
          "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/modelcontextprotocol",
          "type": "Organization",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 862584018,
          "node_id": "R_kgDOM2n80g",
          "name": "python-sdk",
          "full_name": "modelcontextprotocol/python-sdk",
          "private": false,
          "owner": {
            "login": "modelcontextprotocol",
            "id": 182288589,
            "node_id": "O_kgDOCt2AzQ",
            "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/modelcontextprotocol",
            "type": "Organization",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": false,
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk",
          "created_at": "2024-09-24T21:01:35Z",
          "updated_at": "2025-12-06T05:02:17Z",
          "pushed_at": "2025-12-04T18:04:06Z",
          "homepage": "https://modelcontextprotocol.github.io/python-sdk/",
          "size": 4194,
          "stargazers_count": 20439,
          "watchers_count": 20439,
          "language": "Python",
          "has_issues": true,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": true,
          "has_discussions": false,
          "forks_count": 2843,
          "archived": false,
          "disabled": false,
          "open_issues_count": 345,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 2843,
          "open_issues": 345,
          "watchers": 20439,
          "default_branch": "main"
        }
      },
      "_links": {
        "self": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1591"
        },
        "html": {
          "href": "https://github.com/modelcontextprotocol/python-sdk/pull/1591"
        },
        "issue": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1591"
        },
        "comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1591/comments"
        },
        "review_comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1591/comments"
        },
        "review_comment": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/comments{/number}"
        },
        "commits": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1591/commits"
        },
        "statuses": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/statuses/195bfe55bbc5488a6d2cf33e38c67ed3e5943eac"
        }
      },
      "author_association": "NONE",
      "auto_merge": null,
      "active_lock_reason": null,
      "linked_issues": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1584",
      "id": 2985236216,
      "node_id": "PR_kwDOM2n80s6x7xb4",
      "number": 1584,
      "state": "open",
      "locked": false,
      "title": "Replace integration test with proper unit tests for config generation",
      "user": {
        "login": "maxisbey",
        "id": 224885523,
        "node_id": "U_kgDODWd7Ew",
        "avatar_url": "https://avatars.githubusercontent.com/u/224885523?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/maxisbey",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "body": "Refactored `tests/client/test_config.py` to use proper unit testing practices instead of executing external commands.\n\n## Motivation and Context\n\nThe `test_command_execution` test was executing `uv run` via subprocess, which violated unit testing principles and caused several issues:\n- **Side effects**: Modified `uv.lock` file during test execution (without `--frozen` flag)\n- **External dependencies**: Required `uv` binary, network access, and package availability\n- **Wrong abstraction layer**: Tested `uv` CLI behavior rather than the config generation logic\n- **Slow and flaky**: Subject to network issues and environmental variations\n\nThe function under test (`update_claude_config`) is responsible for JSON file manipulation, not command execution. Tests should verify the generated config structure, not whether external tools work.\n\n## How Has This Been Tested?\n\nReplaced 1 integration test with 15 focused unit tests covering:\n- JSON structure and file creation\n- Argument array construction (`[\"run\", \"--with\", \"mcp[cli]\", ...]`)\n- Path resolution (relative → absolute)\n- Environment variable merging and preservation\n- Package deduplication\n- Multi-server configurations\n- Error handling (missing config directory)\n- Edge cases (file specs with/without `:object` suffix)\n\nAll tests pass in ~1.5s with no external dependencies or side effects.\n\n## Breaking Changes\n\nNone. This is purely a test refactor with no changes to production code.\n\n## Types of changes\n- [x] Bug fix (non-breaking change which fixes an issue)\n- [ ] New feature (non-breaking change which adds functionality)\n- [ ] Breaking change (fix or feature that would cause existing functionality to change)\n- [ ] Documentation update\n\n## Checklist\n- [x] I have read the [MCP Documentation](https://modelcontextprotocol.io)\n- [x] My code follows the repository's style guidelines\n- [x] New and existing tests pass locally\n- [x] I have added appropriate error handling\n- [x] I have added or updated documentation as needed\n\n## Additional context\n\nThe test suite now properly isolates the unit under test using mocked file system operations. Tests verify the actual contract of `update_claude_config()`:\n- Correct JSON structure generation\n- Proper command/args formatting\n- Path normalization\n- Configuration merging behavior\n\nIf end-to-end validation of the generated commands is needed, it should be in a separate integration test suite marked with `@pytest.mark.integration` and run independently from unit tests.",
      "created_at": "2025-11-06T15:58:22Z",
      "updated_at": "2025-11-12T18:28:47Z",
      "closed_at": null,
      "merged_at": null,
      "merge_commit_sha": null,
      "assignee": null,
      "assignees": {},
      "requested_reviewers": {},
      "requested_teams": {},
      "labels": {
        "0": {
          "id": 9354757189,
          "node_id": "LA_kwDOM2n80s8AAAACLZZERQ",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/enhancement",
          "name": "enhancement",
          "color": "11b5cc",
          "default": true,
          "description": "Request for a new feature that's not currently supported"
        },
        "1": {
          "id": 9354772110,
          "node_id": "LA_kwDOM2n80s8AAAACLZZ-jg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P3",
          "name": "P3",
          "color": "c7df49",
          "default": false,
          "description": "Nice to haves, rare edge cases"
        }
      },
      "milestone": null,
      "draft": false,
      "head": {
        "label": "modelcontextprotocol:fix-config-tests",
        "ref": "fix-config-tests",
        "sha": "9853ce73ce2477f982f251bb6af18d070ad4d365",
        "user": {
          "login": "modelcontextprotocol",
          "id": 182288589,
          "node_id": "O_kgDOCt2AzQ",
          "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/modelcontextprotocol",
          "type": "Organization",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 862584018,
          "node_id": "R_kgDOM2n80g",
          "name": "python-sdk",
          "full_name": "modelcontextprotocol/python-sdk",
          "private": false,
          "owner": {
            "login": "modelcontextprotocol",
            "id": 182288589,
            "node_id": "O_kgDOCt2AzQ",
            "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/modelcontextprotocol",
            "type": "Organization",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": false,
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk",
          "created_at": "2024-09-24T21:01:35Z",
          "updated_at": "2025-12-06T05:02:17Z",
          "pushed_at": "2025-12-04T18:04:06Z",
          "homepage": "https://modelcontextprotocol.github.io/python-sdk/",
          "size": 4194,
          "stargazers_count": 20439,
          "watchers_count": 20439,
          "language": "Python",
          "has_issues": true,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": true,
          "has_discussions": false,
          "forks_count": 2843,
          "archived": false,
          "disabled": false,
          "open_issues_count": 345,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 2843,
          "open_issues": 345,
          "watchers": 20439,
          "default_branch": "main"
        }
      },
      "base": {
        "label": "modelcontextprotocol:main",
        "ref": "main",
        "sha": "b7b0f8eebb59d8da87d6c8e80bf7abc5f809967f",
        "user": {
          "login": "modelcontextprotocol",
          "id": 182288589,
          "node_id": "O_kgDOCt2AzQ",
          "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/modelcontextprotocol",
          "type": "Organization",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 862584018,
          "node_id": "R_kgDOM2n80g",
          "name": "python-sdk",
          "full_name": "modelcontextprotocol/python-sdk",
          "private": false,
          "owner": {
            "login": "modelcontextprotocol",
            "id": 182288589,
            "node_id": "O_kgDOCt2AzQ",
            "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/modelcontextprotocol",
            "type": "Organization",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": false,
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk",
          "created_at": "2024-09-24T21:01:35Z",
          "updated_at": "2025-12-06T05:02:17Z",
          "pushed_at": "2025-12-04T18:04:06Z",
          "homepage": "https://modelcontextprotocol.github.io/python-sdk/",
          "size": 4194,
          "stargazers_count": 20439,
          "watchers_count": 20439,
          "language": "Python",
          "has_issues": true,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": true,
          "has_discussions": false,
          "forks_count": 2843,
          "archived": false,
          "disabled": false,
          "open_issues_count": 345,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 2843,
          "open_issues": 345,
          "watchers": 20439,
          "default_branch": "main"
        }
      },
      "_links": {
        "self": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1584"
        },
        "html": {
          "href": "https://github.com/modelcontextprotocol/python-sdk/pull/1584"
        },
        "issue": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1584"
        },
        "comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1584/comments"
        },
        "review_comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1584/comments"
        },
        "review_comment": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/comments{/number}"
        },
        "commits": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1584/commits"
        },
        "statuses": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/statuses/9853ce73ce2477f982f251bb6af18d070ad4d365"
        }
      },
      "author_association": "CONTRIBUTOR",
      "auto_merge": null,
      "active_lock_reason": null,
      "linked_issues": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1582",
      "id": 2982578955,
      "node_id": "PR_kwDOM2n80s6xxosL",
      "number": 1582,
      "state": "open",
      "locked": false,
      "title": "fix: Raise resource not found error",
      "user": {
        "login": "vincent0426",
        "id": 68840528,
        "node_id": "MDQ6VXNlcjY4ODQwNTI4",
        "avatar_url": "https://avatars.githubusercontent.com/u/68840528?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/vincent0426",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "body": "<!-- Provide a brief summary of your changes -->\r\n\r\nIntroduce resource not found error handling following the MCP specification.\r\n\r\nThis change ensures that when a resource is not found, the server returns error code `-32002` (RESOURCE_NOT_FOUND) as specified in the [Resources Error Handling](https://modelcontextprotocol.io/specification/2025-06-18/server/resources#error-handling).\r\n\r\n**Concern:**\r\nThere is currently no explicit error handling for FastMCP exceptions in the low-level server. I'm not sure if we want to wrap fastmcp exceptions under `McpError` to raise the correct error code which avoid changing the low-level server code, otherwise, sdk might need to create a new exception type to handle non-connection error?\r\n\r\n\r\n## Motivation and Context\r\n<!-- Why is this change needed? What problem does it solve? -->\r\nCloses https://github.com/modelcontextprotocol/python-sdk/issues/1579\r\n\r\nPreviously, when a resource was not found, the server returned error code `0` (generic error) instead of the spec-compliant `-32002` (RESOURCE_NOT_FOUND).\r\n\r\n**Root Cause:**\r\n- FastMCP raises `ValueError` when a resource is not found\r\n- low-level server's exception handler was not properly recognizing these exceptions\r\n- Exceptions without an `error` attribute were converted to `ErrorData(code=0, ...)`\r\n\r\nhttps://github.com/modelcontextprotocol/python-sdk/blob/3390e49c01e297d3cc8a4917c886d1009f279e45/src/mcp/server/lowlevel/server.py#L705-L708\r\n\r\n**Solution:**\r\n- Added `ResourceError` exception class with an `error` attribute containing `ErrorData` with the appropriate error code\r\n- Updated `ResourceManager` to raise `ResourceError` with `RESOURCE_NOT_FOUND` code for unknown resources\r\n\r\n## How Has This Been Tested?\r\n<!-- Have you tested this in a real application? Which scenarios were tested? -->\r\n\r\n- unit test\r\n- Reproduced and verified the fix for the original issue\r\n```\r\ndata: {\"jsonrpc\":\"2.0\",\"id\":7,\"error\":{\"code\":-32002,\"message\":\"Unknown resource: https://example.com/does-not-exist\"}} \r\n```\r\n\r\n## Breaking Changes\r\n<!-- Will users need to update their code or configurations? -->\r\n\r\n## Types of changes\r\n<!-- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->\r\n- [X] Bug fix (non-breaking change which fixes an issue)\r\n- [ ] New feature (non-breaking change which adds functionality)\r\n- [ ] Breaking change (fix or feature that would cause existing functionality to change)\r\n- [ ] Documentation update\r\n\r\n## Checklist\r\n<!-- Go over all the following points, and put an `x` in all the boxes that apply. -->\r\n- [X] I have read the [MCP Documentation](https://modelcontextprotocol.io)\r\n- [X] My code follows the repository's style guidelines\r\n- [X] New and existing tests pass locally\r\n- [X] I have added appropriate error handling\r\n- [X] I have added or updated documentation as needed\r\n\r\n## Additional context\r\n<!-- Add any other context, implementation notes, or design decisions -->\r\n",
      "created_at": "2025-11-06T01:02:03Z",
      "updated_at": "2025-11-16T05:55:29Z",
      "closed_at": null,
      "merged_at": null,
      "merge_commit_sha": null,
      "assignee": null,
      "assignees": {},
      "requested_reviewers": {},
      "requested_teams": {},
      "labels": {
        "0": {
          "id": 7511840554,
          "node_id": "LA_kwDOM2n80s8AAAABv72XKg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/bug",
          "name": "bug",
          "color": "d73a4a",
          "default": true,
          "description": "Something isn't working"
        },
        "1": {
          "id": 9230423596,
          "node_id": "LA_kwDOM2n80s8AAAACJi0WLA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/breaking%20change",
          "name": "breaking change",
          "color": "000000",
          "default": false,
          "description": "Will break existing deployments when updated without changes"
        },
        "2": {
          "id": 9354772110,
          "node_id": "LA_kwDOM2n80s8AAAACLZZ-jg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P3",
          "name": "P3",
          "color": "c7df49",
          "default": false,
          "description": "Nice to haves, rare edge cases"
        }
      },
      "milestone": null,
      "draft": false,
      "head": {
        "label": "vincent0426:fix/resource-not-found-error",
        "ref": "fix/resource-not-found-error",
        "sha": "8702bfbf5f754948eb0e3dbc3656649526f74126",
        "user": {
          "login": "vincent0426",
          "id": 68840528,
          "node_id": "MDQ6VXNlcjY4ODQwNTI4",
          "avatar_url": "https://avatars.githubusercontent.com/u/68840528?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/vincent0426",
          "type": "User",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 1060943626,
          "node_id": "R_kgDOPzy3Cg",
          "name": "python-sdk",
          "full_name": "vincent0426/python-sdk",
          "private": false,
          "owner": {
            "login": "vincent0426",
            "id": 68840528,
            "node_id": "MDQ6VXNlcjY4ODQwNTI4",
            "avatar_url": "https://avatars.githubusercontent.com/u/68840528?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/vincent0426",
            "type": "User",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": true,
          "url": "https://api.github.com/repos/vincent0426/python-sdk",
          "created_at": "2025-09-20T23:06:28Z",
          "updated_at": "2025-10-31T14:42:59Z",
          "pushed_at": "2025-11-14T18:11:50Z",
          "homepage": "https://modelcontextprotocol.io",
          "size": 2167,
          "stargazers_count": 0,
          "watchers_count": 0,
          "language": "Python",
          "has_issues": false,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": false,
          "has_discussions": false,
          "forks_count": 0,
          "archived": false,
          "disabled": false,
          "open_issues_count": 0,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 0,
          "open_issues": 0,
          "watchers": 0,
          "default_branch": "main"
        }
      },
      "base": {
        "label": "modelcontextprotocol:main",
        "ref": "main",
        "sha": "3390e49c01e297d3cc8a4917c886d1009f279e45",
        "user": {
          "login": "modelcontextprotocol",
          "id": 182288589,
          "node_id": "O_kgDOCt2AzQ",
          "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/modelcontextprotocol",
          "type": "Organization",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 862584018,
          "node_id": "R_kgDOM2n80g",
          "name": "python-sdk",
          "full_name": "modelcontextprotocol/python-sdk",
          "private": false,
          "owner": {
            "login": "modelcontextprotocol",
            "id": 182288589,
            "node_id": "O_kgDOCt2AzQ",
            "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/modelcontextprotocol",
            "type": "Organization",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": false,
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk",
          "created_at": "2024-09-24T21:01:35Z",
          "updated_at": "2025-12-06T05:02:17Z",
          "pushed_at": "2025-12-04T18:04:06Z",
          "homepage": "https://modelcontextprotocol.github.io/python-sdk/",
          "size": 4194,
          "stargazers_count": 20439,
          "watchers_count": 20439,
          "language": "Python",
          "has_issues": true,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": true,
          "has_discussions": false,
          "forks_count": 2843,
          "archived": false,
          "disabled": false,
          "open_issues_count": 345,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 2843,
          "open_issues": 345,
          "watchers": 20439,
          "default_branch": "main"
        }
      },
      "_links": {
        "self": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1582"
        },
        "html": {
          "href": "https://github.com/modelcontextprotocol/python-sdk/pull/1582"
        },
        "issue": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1582"
        },
        "comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1582/comments"
        },
        "review_comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1582/comments"
        },
        "review_comment": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/comments{/number}"
        },
        "commits": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1582/commits"
        },
        "statuses": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/statuses/8702bfbf5f754948eb0e3dbc3656649526f74126"
        }
      },
      "author_association": "NONE",
      "auto_merge": null,
      "active_lock_reason": null,
      "linked_issues": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1578",
      "id": 2978732418,
      "node_id": "PR_kwDOM2n80s6xi9mC",
      "number": 1578,
      "state": "open",
      "locked": false,
      "title": "Fix issue where client tool call hangs forever if server crashes or connection dies when using streamable-http",
      "user": {
        "login": "gyang-xai",
        "id": 236455930,
        "node_id": "U_kgDODhgH-g",
        "avatar_url": "https://avatars.githubusercontent.com/u/236455930?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/gyang-xai",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "body": "A fix for #1577 \r\n\r\n## Motivation and Context\r\nFixes issue where some errors are not propagated back to the tool call.\r\n\r\n## How Has This Been Tested?\r\nTested with the example in the issue.\r\n\r\n## Breaking Changes\r\nNo\r\n\r\n## Types of changes\r\n<!-- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->\r\n- [x] Bug fix (non-breaking change which fixes an issue)\r\n- [ ] New feature (non-breaking change which adds functionality)\r\n- [ ] Breaking change (fix or feature that would cause existing functionality to change)\r\n- [ ] Documentation update\r\n\r\n## Checklist\r\n<!-- Go over all the following points, and put an `x` in all the boxes that apply. -->\r\n- [x] I have read the [MCP Documentation](https://modelcontextprotocol.io)\r\n- [x] My code follows the repository's style guidelines\r\n- [x] New and existing tests pass locally\r\n- [x] I have added appropriate error handling\r\n- [x] I have added or updated documentation as needed\r\n\r\n## Additional context\r\nI have tested this with tool calls but unsure if this works for the other resource types.",
      "created_at": "2025-11-05T03:19:20Z",
      "updated_at": "2025-11-07T20:32:00Z",
      "closed_at": null,
      "merged_at": null,
      "merge_commit_sha": null,
      "assignee": null,
      "assignees": {},
      "requested_reviewers": {},
      "requested_teams": {},
      "labels": {
        "0": {
          "id": 7511840554,
          "node_id": "LA_kwDOM2n80s8AAAABv72XKg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/bug",
          "name": "bug",
          "color": "d73a4a",
          "default": true,
          "description": "Something isn't working"
        }
      },
      "milestone": null,
      "draft": false,
      "head": {
        "label": "gyang-xai:streamable_http_disconnection_fix",
        "ref": "streamable_http_disconnection_fix",
        "sha": "5e2aea49549cf3369ccbf47feaec632b44934734",
        "user": {
          "login": "gyang-xai",
          "id": 236455930,
          "node_id": "U_kgDODhgH-g",
          "avatar_url": "https://avatars.githubusercontent.com/u/236455930?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/gyang-xai",
          "type": "User",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 1089946744,
          "node_id": "R_kgDOQPdEeA",
          "name": "python-sdk",
          "full_name": "gyang-xai/python-sdk",
          "private": false,
          "owner": {
            "login": "gyang-xai",
            "id": 236455930,
            "node_id": "U_kgDODhgH-g",
            "avatar_url": "https://avatars.githubusercontent.com/u/236455930?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/gyang-xai",
            "type": "User",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": true,
          "url": "https://api.github.com/repos/gyang-xai/python-sdk",
          "created_at": "2025-11-05T02:58:52Z",
          "updated_at": "2025-11-05T02:58:52Z",
          "pushed_at": "2025-11-07T20:31:59Z",
          "homepage": "https://modelcontextprotocol.github.io/python-sdk/",
          "size": 2170,
          "stargazers_count": 0,
          "watchers_count": 0,
          "language": null,
          "has_issues": false,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": false,
          "has_discussions": false,
          "forks_count": 0,
          "archived": false,
          "disabled": false,
          "open_issues_count": 0,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 0,
          "open_issues": 0,
          "watchers": 0,
          "default_branch": "main"
        }
      },
      "base": {
        "label": "modelcontextprotocol:main",
        "ref": "main",
        "sha": "de2289dc93c2efb6d6b055eace20bcbfe61bce5c",
        "user": {
          "login": "modelcontextprotocol",
          "id": 182288589,
          "node_id": "O_kgDOCt2AzQ",
          "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/modelcontextprotocol",
          "type": "Organization",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 862584018,
          "node_id": "R_kgDOM2n80g",
          "name": "python-sdk",
          "full_name": "modelcontextprotocol/python-sdk",
          "private": false,
          "owner": {
            "login": "modelcontextprotocol",
            "id": 182288589,
            "node_id": "O_kgDOCt2AzQ",
            "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/modelcontextprotocol",
            "type": "Organization",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": false,
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk",
          "created_at": "2024-09-24T21:01:35Z",
          "updated_at": "2025-12-06T05:02:17Z",
          "pushed_at": "2025-12-04T18:04:06Z",
          "homepage": "https://modelcontextprotocol.github.io/python-sdk/",
          "size": 4194,
          "stargazers_count": 20439,
          "watchers_count": 20439,
          "language": "Python",
          "has_issues": true,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": true,
          "has_discussions": false,
          "forks_count": 2843,
          "archived": false,
          "disabled": false,
          "open_issues_count": 345,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 2843,
          "open_issues": 345,
          "watchers": 20439,
          "default_branch": "main"
        }
      },
      "_links": {
        "self": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1578"
        },
        "html": {
          "href": "https://github.com/modelcontextprotocol/python-sdk/pull/1578"
        },
        "issue": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1578"
        },
        "comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1578/comments"
        },
        "review_comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1578/comments"
        },
        "review_comment": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/comments{/number}"
        },
        "commits": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1578/commits"
        },
        "statuses": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/statuses/5e2aea49549cf3369ccbf47feaec632b44934734"
        }
      },
      "author_association": "NONE",
      "auto_merge": null,
      "active_lock_reason": null,
      "linked_issues": [
        1
      ]
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1570",
      "id": 2975892877,
      "node_id": "PR_kwDOM2n80s6xYIWN",
      "number": 1570,
      "state": "open",
      "locked": false,
      "title": "Disable logs reconfigure on startup",
      "user": {
        "login": "carlosemart",
        "id": 1837442,
        "node_id": "MDQ6VXNlcjE4Mzc0NDI=",
        "avatar_url": "https://avatars.githubusercontent.com/u/1837442?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/carlosemart",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "body": "Closes https://github.com/modelcontextprotocol/python-sdk/issues/420\r\n\r\n## Motivation and Context\r\nA mechanism is established to disable the FastMcp server log settings, allowing any previous settings made to the logging library to prevail.\r\n\r\n## How Has This Been Tested?\r\n\r\n## Breaking Changes\r\nNo, the default values have been retained, so the behaviour in that case remains the same.\r\n\r\n## Types of changes\r\n<!-- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->\r\n- [ ] Bug fix (non-breaking change which fixes an issue)\r\n- [X] New feature (non-breaking change which adds functionality)\r\n- [ ] Breaking change (fix or feature that would cause existing functionality to change)\r\n- [ ] Documentation update\r\n\r\n## Checklist\r\n<!-- Go over all the following points, and put an `x` in all the boxes that apply. -->\r\n- [X] I have read the [MCP Documentation](https://modelcontextprotocol.io)\r\n- [X] My code follows the repository's style guidelines\r\n- [X] New and existing tests pass locally\r\n- [X] I have added appropriate error handling\r\n- [ ] I have added or updated documentation as needed\r\n\r\n## Additional context\r\n<!-- Add any other context, implementation notes, or design decisions -->\r\n",
      "created_at": "2025-11-04T10:02:27Z",
      "updated_at": "2025-11-24T08:44:56Z",
      "closed_at": null,
      "merged_at": null,
      "merge_commit_sha": "ac396406889bd20c151c5dcf0755808f8bb7d83a",
      "assignee": null,
      "assignees": {},
      "requested_reviewers": {},
      "requested_teams": {},
      "labels": {
        "0": {
          "id": 9354757189,
          "node_id": "LA_kwDOM2n80s8AAAACLZZERQ",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/enhancement",
          "name": "enhancement",
          "color": "11b5cc",
          "default": true,
          "description": "Request for a new feature that's not currently supported"
        },
        "1": {
          "id": 9354772110,
          "node_id": "LA_kwDOM2n80s8AAAACLZZ-jg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P3",
          "name": "P3",
          "color": "c7df49",
          "default": false,
          "description": "Nice to haves, rare edge cases"
        }
      },
      "milestone": null,
      "draft": false,
      "head": {
        "label": "carlosemart:feature/optional-log",
        "ref": "feature/optional-log",
        "sha": "b2054332bf182162f72cd28f7efbce46a1a3a164",
        "user": {
          "login": "carlosemart",
          "id": 1837442,
          "node_id": "MDQ6VXNlcjE4Mzc0NDI=",
          "avatar_url": "https://avatars.githubusercontent.com/u/1837442?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/carlosemart",
          "type": "User",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 1088784165,
          "node_id": "R_kgDOQOWHJQ",
          "name": "python-sdk",
          "full_name": "carlosemart/python-sdk",
          "private": false,
          "owner": {
            "login": "carlosemart",
            "id": 1837442,
            "node_id": "MDQ6VXNlcjE4Mzc0NDI=",
            "avatar_url": "https://avatars.githubusercontent.com/u/1837442?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/carlosemart",
            "type": "User",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": true,
          "url": "https://api.github.com/repos/carlosemart/python-sdk",
          "created_at": "2025-11-03T13:02:29Z",
          "updated_at": "2025-11-03T13:02:29Z",
          "pushed_at": "2025-11-24T08:44:54Z",
          "homepage": "https://modelcontextprotocol.github.io/python-sdk/",
          "size": 2431,
          "stargazers_count": 0,
          "watchers_count": 0,
          "language": null,
          "has_issues": false,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": false,
          "has_discussions": false,
          "forks_count": 0,
          "archived": false,
          "disabled": false,
          "open_issues_count": 0,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 0,
          "open_issues": 0,
          "watchers": 0,
          "default_branch": "main"
        }
      },
      "base": {
        "label": "modelcontextprotocol:main",
        "ref": "main",
        "sha": "b19fa6f27952ee043a6a1ef127e0495b1359891d",
        "user": {
          "login": "modelcontextprotocol",
          "id": 182288589,
          "node_id": "O_kgDOCt2AzQ",
          "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/modelcontextprotocol",
          "type": "Organization",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 862584018,
          "node_id": "R_kgDOM2n80g",
          "name": "python-sdk",
          "full_name": "modelcontextprotocol/python-sdk",
          "private": false,
          "owner": {
            "login": "modelcontextprotocol",
            "id": 182288589,
            "node_id": "O_kgDOCt2AzQ",
            "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/modelcontextprotocol",
            "type": "Organization",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": false,
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk",
          "created_at": "2024-09-24T21:01:35Z",
          "updated_at": "2025-12-06T05:02:17Z",
          "pushed_at": "2025-12-04T18:04:06Z",
          "homepage": "https://modelcontextprotocol.github.io/python-sdk/",
          "size": 4194,
          "stargazers_count": 20439,
          "watchers_count": 20439,
          "language": "Python",
          "has_issues": true,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": true,
          "has_discussions": false,
          "forks_count": 2843,
          "archived": false,
          "disabled": false,
          "open_issues_count": 345,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 2843,
          "open_issues": 345,
          "watchers": 20439,
          "default_branch": "main"
        }
      },
      "_links": {
        "self": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1570"
        },
        "html": {
          "href": "https://github.com/modelcontextprotocol/python-sdk/pull/1570"
        },
        "issue": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1570"
        },
        "comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1570/comments"
        },
        "review_comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1570/comments"
        },
        "review_comment": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/comments{/number}"
        },
        "commits": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1570/commits"
        },
        "statuses": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/statuses/b2054332bf182162f72cd28f7efbce46a1a3a164"
        }
      },
      "author_association": "NONE",
      "auto_merge": null,
      "active_lock_reason": null,
      "linked_issues": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1566",
      "id": 2973673892,
      "node_id": "PR_kwDOM2n80s6xPqmk",
      "number": 1566,
      "state": "open",
      "locked": false,
      "title": "test: update SSE tests to use StreamingASGITransport instead of uvicorn for server testing",
      "user": {
        "login": "bjoaquinc",
        "id": 75667013,
        "node_id": "MDQ6VXNlcjc1NjY3MDEz",
        "avatar_url": "https://avatars.githubusercontent.com/u/75667013?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/bjoaquinc",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "body": "<!-- Provide a brief summary of your changes -->\r\nThis implements fixes to the `StreamingASGITransport` to properly handle SSE streaming and disconnect signaling. The key changes were:\r\n\r\n- Added disconnect signaling via `receive()` to fix SSE hanging\r\n- Fixed memory stream cleanup in `SseServerTransport` to eliminate ResourceWarnings\r\n- Handle duplicate `http.response.start` with NoopASGI\r\n- Fixed global sse-starlette quirk\r\n- Update all tests in `tests/server/test_sse_security.py` and `tests/shared/test_sse.py` to use transports instead of real servers with uvicorn\r\n\r\n## Motivation and Context\r\n<!-- Why is this change needed? What problem does it solve? -->\r\nPartially resolves #857 \r\n\r\n## How Has This Been Tested?\r\n<!-- Have you tested this in a real application? Which scenarios were tested? -->\r\nSince I updated the testing methodology I made sure to run the test in batches of 30 (to check for race conditions). Using the command:\r\n\r\n`passed=0; failed=0; for i in {1..30}; do echo \"=== Run $i/30 ===\" && uv run --resolution=\"$RESOLUTION\" pytest \"$FILE_PATH\" -q && passed=$((passed+1)) || failed=$((failed+1)); done; echo \"==== SUMMARY: $passed passed, $failed failed out of 30 runs ====\"`\r\n\r\nfor the following resolutions and files:\r\n\r\n- `tests/server/test_sse_security.py` for `lowest-direct` and `highest`\r\n- `tests/shared/test_sse.py` for `lowest-direct` and `highest`\r\n\r\nAll tests passed:\r\n\r\n<img width=\"466\" height=\"97\" alt=\"Screenshot 2025-11-08 at 6 41 36 PM\" src=\"https://github.com/user-attachments/assets/1a084948-60c3-4a37-aa1a-3c1f45e6cf54\" />\r\n\r\n## Breaking Changes\r\n<!-- Will users need to update their code or configurations? -->\r\nNone. `StreamingASGITransport` is only meant for testing. The only change I made to `SseServerTransport` was to properly clean up `sse_stream_reader` which is best practice and doesn't break functionality. The modified tests all function as expected.\r\n\r\n## Types of changes\r\n<!-- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->\r\n- [ ] Bug fix (non-breaking change which fixes an issue)\r\n- [x] New feature (non-breaking change which adds functionality)\r\n- [ ] Breaking change (fix or feature that would cause existing functionality to change)\r\n- [ ] Documentation update\r\n\r\n## Checklist\r\n<!-- Go over all the following points, and put an `x` in all the boxes that apply. -->\r\n- [x] I have read the [MCP Documentation](https://modelcontextprotocol.io)\r\n- [x] My code follows the repository's style guidelines\r\n- [x] New and existing tests pass locally\r\n- [x] I have added appropriate error handling\r\n- [x] I have added or updated documentation as needed\r\n\r\n## Additional context\r\n<!-- Add any other context, implementation notes, or design decisions -->\r\n",
      "created_at": "2025-11-03T18:04:46Z",
      "updated_at": "2025-11-08T17:45:56Z",
      "closed_at": null,
      "merged_at": null,
      "merge_commit_sha": null,
      "assignee": null,
      "assignees": {},
      "requested_reviewers": {},
      "requested_teams": {},
      "labels": {
        "0": {
          "id": 9230425628,
          "node_id": "LA_kwDOM2n80s8AAAACJi0eHA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/needs%20more%20work",
          "name": "needs more work",
          "color": "af3f39",
          "default": false,
          "description": "Not ready to be merged yet, needs additional follow-up from the author(s)."
        },
        "1": {
          "id": 9354772110,
          "node_id": "LA_kwDOM2n80s8AAAACLZZ-jg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P3",
          "name": "P3",
          "color": "c7df49",
          "default": false,
          "description": "Nice to haves, rare edge cases"
        }
      },
      "milestone": null,
      "draft": false,
      "head": {
        "label": "bjoaquinc:streaming-asgi-sse",
        "ref": "streaming-asgi-sse",
        "sha": "3d2fea9daf2cb452117ae90b236555d6c8850fb5",
        "user": {
          "login": "bjoaquinc",
          "id": 75667013,
          "node_id": "MDQ6VXNlcjc1NjY3MDEz",
          "avatar_url": "https://avatars.githubusercontent.com/u/75667013?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/bjoaquinc",
          "type": "User",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 1087944836,
          "node_id": "R_kgDOQNi4hA",
          "name": "python-sdk",
          "full_name": "bjoaquinc/python-sdk",
          "private": false,
          "owner": {
            "login": "bjoaquinc",
            "id": 75667013,
            "node_id": "MDQ6VXNlcjc1NjY3MDEz",
            "avatar_url": "https://avatars.githubusercontent.com/u/75667013?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/bjoaquinc",
            "type": "User",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": true,
          "url": "https://api.github.com/repos/bjoaquinc/python-sdk",
          "created_at": "2025-11-02T00:55:18Z",
          "updated_at": "2025-11-09T10:03:20Z",
          "pushed_at": "2025-11-09T23:59:38Z",
          "homepage": "https://modelcontextprotocol.github.io/python-sdk/",
          "size": 2197,
          "stargazers_count": 0,
          "watchers_count": 0,
          "language": "Python",
          "has_issues": false,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": false,
          "has_discussions": false,
          "forks_count": 0,
          "archived": false,
          "disabled": false,
          "open_issues_count": 0,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 0,
          "open_issues": 0,
          "watchers": 0,
          "default_branch": "main"
        }
      },
      "base": {
        "label": "modelcontextprotocol:main",
        "ref": "main",
        "sha": "9eae96a05e09fa3f35ea50f8b1c11b19c69f9597",
        "user": {
          "login": "modelcontextprotocol",
          "id": 182288589,
          "node_id": "O_kgDOCt2AzQ",
          "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/modelcontextprotocol",
          "type": "Organization",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 862584018,
          "node_id": "R_kgDOM2n80g",
          "name": "python-sdk",
          "full_name": "modelcontextprotocol/python-sdk",
          "private": false,
          "owner": {
            "login": "modelcontextprotocol",
            "id": 182288589,
            "node_id": "O_kgDOCt2AzQ",
            "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/modelcontextprotocol",
            "type": "Organization",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": false,
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk",
          "created_at": "2024-09-24T21:01:35Z",
          "updated_at": "2025-12-06T05:02:17Z",
          "pushed_at": "2025-12-04T18:04:06Z",
          "homepage": "https://modelcontextprotocol.github.io/python-sdk/",
          "size": 4194,
          "stargazers_count": 20439,
          "watchers_count": 20439,
          "language": "Python",
          "has_issues": true,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": true,
          "has_discussions": false,
          "forks_count": 2843,
          "archived": false,
          "disabled": false,
          "open_issues_count": 345,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 2843,
          "open_issues": 345,
          "watchers": 20439,
          "default_branch": "main"
        }
      },
      "_links": {
        "self": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1566"
        },
        "html": {
          "href": "https://github.com/modelcontextprotocol/python-sdk/pull/1566"
        },
        "issue": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1566"
        },
        "comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1566/comments"
        },
        "review_comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1566/comments"
        },
        "review_comment": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/comments{/number}"
        },
        "commits": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1566/commits"
        },
        "statuses": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/statuses/3d2fea9daf2cb452117ae90b236555d6c8850fb5"
        }
      },
      "author_association": "NONE",
      "auto_merge": null,
      "active_lock_reason": null,
      "linked_issues": [
        8,
        857
      ]
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1565",
      "id": 2971113211,
      "node_id": "PR_kwDOM2n80s6xF5b7",
      "number": 1565,
      "state": "open",
      "locked": false,
      "title": "feat(client): store serverInfo from initialization result",
      "user": {
        "login": "bjoaquinc",
        "id": 75667013,
        "node_id": "MDQ6VXNlcjc1NjY3MDEz",
        "avatar_url": "https://avatars.githubusercontent.com/u/75667013?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/bjoaquinc",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "body": "<!-- Provide a brief summary of your changes -->\r\nStore server information in ClientSession._client_info after initialization when using the default client info. This allows users to access server details without manually capturing them from the InitializeResult.\r\n\r\n## Motivation and Context\r\n<!-- Why is this change needed? What problem does it solve? -->\r\nResolves #1018 \r\n\r\n## How Has This Been Tested?\r\n<!-- Have you tested this in a real application? Which scenarios were tested? -->\r\nCreated and ran a live integration test that launches a real MCP server via stdio transport. The test verifies that session._client_info is correctly updated with server info after initialization when using default client info, and that custom client_info is preserved when explicitly provided. Normal server operations (like listing tools, etc...) continue to work correctly after initialization.\r\n\r\n<img width=\"516\" height=\"502\" alt=\"Screenshot 2025-11-03 at 1 50 50 AM\" src=\"https://github.com/user-attachments/assets/096457f8-a6bc-43ab-8cbd-3cf118bcbf89\" />\r\n\r\n\r\n## Breaking Changes\r\n<!-- Will users need to update their code or configurations? -->\r\nNone. This change only affects the internal `_client_info` field when using the default client info. Users who explicitly provide their own `client_info` will see no behavior change. The `_client_info` field is private and not part of the public API.\r\n\r\n## Types of changes\r\n<!-- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->\r\n- [ ] Bug fix (non-breaking change which fixes an issue)\r\n- [x] New feature (non-breaking change which adds functionality)\r\n- [ ] Breaking change (fix or feature that would cause existing functionality to change)\r\n- [ ] Documentation update\r\n\r\n## Checklist\r\n<!-- Go over all the following points, and put an `x` in all the boxes that apply. -->\r\n- [x] I have read the [MCP Documentation](https://modelcontextprotocol.io)\r\n- [x] My code follows the repository's style guidelines\r\n- [x] New and existing tests pass locally\r\n- [x] I have added appropriate error handling\r\n- [x] I have added or updated documentation as needed\r\n\r\n## Additional context\r\n<!-- Add any other context, implementation notes, or design decisions -->\r\n",
      "created_at": "2025-11-03T00:54:57Z",
      "updated_at": "2025-11-09T17:08:55Z",
      "closed_at": null,
      "merged_at": null,
      "merge_commit_sha": "9533502d5d64e892c741dfe7373e2f5f5bcc8dd7",
      "assignee": null,
      "assignees": {},
      "requested_reviewers": {
        "0": {
          "login": "maxisbey",
          "id": 224885523,
          "node_id": "U_kgDODWd7Ew",
          "avatar_url": "https://avatars.githubusercontent.com/u/224885523?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/maxisbey",
          "type": "User",
          "user_view_type": "public",
          "site_admin": false
        }
      },
      "requested_teams": {},
      "labels": {
        "0": {
          "id": 9082681979,
          "node_id": "LA_kwDOM2n80s8AAAACHV66ew",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/needs%20confirmation",
          "name": "needs confirmation",
          "color": "aaaaaa",
          "default": false,
          "description": "Needs confirmation that the PR is actually required or needed."
        },
        "1": {
          "id": 9354772110,
          "node_id": "LA_kwDOM2n80s8AAAACLZZ-jg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P3",
          "name": "P3",
          "color": "c7df49",
          "default": false,
          "description": "Nice to haves, rare edge cases"
        }
      },
      "milestone": null,
      "draft": false,
      "head": {
        "label": "bjoaquinc:client-info-from-server",
        "ref": "client-info-from-server",
        "sha": "bf821384fb398e01a941d0f60305993968ccf169",
        "user": {
          "login": "bjoaquinc",
          "id": 75667013,
          "node_id": "MDQ6VXNlcjc1NjY3MDEz",
          "avatar_url": "https://avatars.githubusercontent.com/u/75667013?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/bjoaquinc",
          "type": "User",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 1087944836,
          "node_id": "R_kgDOQNi4hA",
          "name": "python-sdk",
          "full_name": "bjoaquinc/python-sdk",
          "private": false,
          "owner": {
            "login": "bjoaquinc",
            "id": 75667013,
            "node_id": "MDQ6VXNlcjc1NjY3MDEz",
            "avatar_url": "https://avatars.githubusercontent.com/u/75667013?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/bjoaquinc",
            "type": "User",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": true,
          "url": "https://api.github.com/repos/bjoaquinc/python-sdk",
          "created_at": "2025-11-02T00:55:18Z",
          "updated_at": "2025-11-09T10:03:20Z",
          "pushed_at": "2025-11-09T23:59:38Z",
          "homepage": "https://modelcontextprotocol.github.io/python-sdk/",
          "size": 2197,
          "stargazers_count": 0,
          "watchers_count": 0,
          "language": "Python",
          "has_issues": false,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": false,
          "has_discussions": false,
          "forks_count": 0,
          "archived": false,
          "disabled": false,
          "open_issues_count": 0,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 0,
          "open_issues": 0,
          "watchers": 0,
          "default_branch": "main"
        }
      },
      "base": {
        "label": "modelcontextprotocol:main",
        "ref": "main",
        "sha": "da4fce21956cd2ce9e1e94e0bbb4eb2eca888c79",
        "user": {
          "login": "modelcontextprotocol",
          "id": 182288589,
          "node_id": "O_kgDOCt2AzQ",
          "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/modelcontextprotocol",
          "type": "Organization",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 862584018,
          "node_id": "R_kgDOM2n80g",
          "name": "python-sdk",
          "full_name": "modelcontextprotocol/python-sdk",
          "private": false,
          "owner": {
            "login": "modelcontextprotocol",
            "id": 182288589,
            "node_id": "O_kgDOCt2AzQ",
            "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/modelcontextprotocol",
            "type": "Organization",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": false,
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk",
          "created_at": "2024-09-24T21:01:35Z",
          "updated_at": "2025-12-06T05:02:17Z",
          "pushed_at": "2025-12-04T18:04:06Z",
          "homepage": "https://modelcontextprotocol.github.io/python-sdk/",
          "size": 4194,
          "stargazers_count": 20439,
          "watchers_count": 20439,
          "language": "Python",
          "has_issues": true,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": true,
          "has_discussions": false,
          "forks_count": 2843,
          "archived": false,
          "disabled": false,
          "open_issues_count": 345,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 2843,
          "open_issues": 345,
          "watchers": 20439,
          "default_branch": "main"
        }
      },
      "_links": {
        "self": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1565"
        },
        "html": {
          "href": "https://github.com/modelcontextprotocol/python-sdk/pull/1565"
        },
        "issue": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1565"
        },
        "comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1565/comments"
        },
        "review_comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1565/comments"
        },
        "review_comment": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/comments{/number}"
        },
        "commits": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1565/commits"
        },
        "statuses": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/statuses/bf821384fb398e01a941d0f60305993968ccf169"
        }
      },
      "author_association": "NONE",
      "auto_merge": null,
      "active_lock_reason": null,
      "linked_issues": [
        1,
        1018
      ]
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1563",
      "id": 2970164674,
      "node_id": "PR_kwDOM2n80s6xCR3C",
      "number": 1563,
      "state": "open",
      "locked": false,
      "title": "fix: Support string enum for elicitation",
      "user": {
        "login": "vincent0426",
        "id": 68840528,
        "node_id": "MDQ6VXNlcjY4ODQwNTI4",
        "avatar_url": "https://avatars.githubusercontent.com/u/68840528?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/vincent0426",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "body": "<!-- Provide a brief summary of your changes -->\r\n## Add support for string Enum types in elicitation schemas\r\n\r\nRelated PR: https://github.com/modelcontextprotocol/inspector/pull/902\r\n\r\nChanges Made\r\n- Added `StrEnum` to `_ELICITATION_PRIMITIVE_TYPES` tuple\r\n- Enhanced `_is_primitive_field()` to detect string enum types using `issubclass()` checks\r\n\r\n\r\n\r\n## Motivation and Context\r\n<!-- Why is this change needed? What problem does it solve? -->\r\nPer https://modelcontextprotocol.io/specification/2025-06-18/client/elicitation#supported-schema-types, elicitation schemas support enum types.\r\n\r\nCurrently, `python-sdk` only supported basic primitive types (`str`, `int`, `float`, `bool`) in elicitation schemas, but did not recognize Enum types.\r\n\r\n## How Has This Been Tested?\r\n<!-- Have you tested this in a real application? Which scenarios were tested? -->\r\n\r\n- Added test cases in `test_elicitation_schema_validation()` to verify enum schemas\r\n\r\n- Manual test with\r\n```python\r\nfrom enum import Enum, StrEnum\r\n\r\nfrom pydantic import BaseModel, Field\r\n\r\nfrom mcp.server.fastmcp import Context, FastMCP\r\nfrom mcp.server.session import ServerSession\r\n\r\nmcp = FastMCP(name=\"Elicitation Example\")\r\n\r\n\r\nclass FruitEnum(str, Enum):\r\n    pear = \"pear\"\r\n    apple = \"apple\"\r\n\r\n\r\nclass TestStrEnum(StrEnum):\r\n    one = \"1\"\r\n    two = \"2\"\r\n    three = \"3\"\r\n\r\n\r\nclass BookingPreferences(BaseModel):\r\n    \"\"\"Schema for collecting user preferences.\"\"\"\r\n\r\n    checkAlternative: bool = Field(description=\"Would you like to check another date?\")\r\n    alternativeDate: str = Field(\r\n        default=\"2024-12-26\",\r\n        description=\"Alternative date (YYYY-MM-DD)\",\r\n    )\r\n    fruit: FruitEnum = FruitEnum.pear\r\n    strenum: TestStrEnum = TestStrEnum.one\r\n\r\n\r\n@mcp.tool()\r\nasync def book_table(date: str, time: str, party_size: int, ctx: Context[ServerSession, None]) -> str:\r\n    \"\"\"Book a table with date availability check.\"\"\"\r\n    # Check if date is available\r\n    if date == \"2024-12-25\":\r\n        # Date unavailable - ask user for alternative\r\n        result = await ctx.elicit(\r\n            message=(f\"No tables available for {party_size} on {date}. Would you like to try another date?\"),\r\n            schema=BookingPreferences,\r\n        )\r\n        print(result)\r\n        if result.action == \"accept\" and result.data:\r\n            if result.data.checkAlternative:\r\n                return f\"[SUCCESS] Booked for {result.data.alternativeDate}\"\r\n            return \"[CANCELLED] No booking made\"\r\n        return \"[CANCELLED] Booking cancelled\"\r\n\r\n    # Date available\r\n    return f\"[SUCCESS] Booked for {date} at {time}\"\r\n\r\n\r\n@mcp.tool()\r\nasync def get_uuid(ctx: Context[ServerSession, None]) -> str:\r\n    \"\"\"Get a unique identifier.\"\"\"\r\n    result = await ctx.elicit(\r\n        message=\"Please enter a unique identifier\",\r\n        schema=InvalidFormatSchema,\r\n    )\r\n    if result.action == \"accept\" and result.data:\r\n        return f\"[SUCCESS] Unique identifier: {result.data.id}\"\r\n    return \"[CANCELLED] No unique identifier provided\"\r\n\r\n\r\nif __name__ == \"__main__\":\r\n    mcp.run(transport=\"streamable-http\")\r\n```\r\n\r\n### Results\r\n<img width=\"200\" height=\"359\" alt=\"Screenshot 2025-11-01 at 10 36 00 PM\" src=\"https://github.com/user-attachments/assets/b34dba88-fd64-4fa4-a38b-112871655078\" />\r\n<img width=\"200\" height=\"359\" alt=\"Screenshot 2025-11-01 at 10 36 02 PM\" src=\"https://github.com/user-attachments/assets/50adfdf0-dc31-43a4-84b4-d265b76d575f\" />\r\n\r\n\r\n## Breaking Changes\r\n<!-- Will users need to update their code or configurations? -->\r\n\r\n## Types of changes\r\n<!-- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->\r\n- [X] Bug fix (non-breaking change which fixes an issue)\r\n- [ ] New feature (non-breaking change which adds functionality)\r\n- [ ] Breaking change (fix or feature that would cause existing functionality to change)\r\n- [ ] Documentation update\r\n\r\n## Checklist\r\n<!-- Go over all the following points, and put an `x` in all the boxes that apply. -->\r\n- [X] I have read the [MCP Documentation](https://modelcontextprotocol.io)\r\n- [X] My code follows the repository's style guidelines\r\n- [X] New and existing tests pass locally\r\n- [X] I have added appropriate error handling\r\n- [X] I have added or updated documentation as needed\r\n\r\n## Additional context\r\n<!-- Add any other context, implementation notes, or design decisions -->\r\nThe documentation doesn't explicitly specify that enums must be string enums. Should we add that clarification since both the TypeScript and Rust SDKs only support string enums?\r\n\r\nhttps://github.com/modelcontextprotocol/typescript-sdk/blob/783d53be1049041cc1f0a23c070c3400208a94ff/src/types.ts#L1221-L1229\r\n\r\nhttps://github.com/modelcontextprotocol/rust-sdk/blob/04e0590652d029e2cdfadee6f4c7255280dfba0e/crates/rmcp/src/model/elicitation_schema.rs#L479-L481\r\n",
      "created_at": "2025-11-02T05:57:49Z",
      "updated_at": "2025-11-12T18:11:15Z",
      "closed_at": null,
      "merged_at": null,
      "merge_commit_sha": null,
      "assignee": null,
      "assignees": {},
      "requested_reviewers": {},
      "requested_teams": {},
      "labels": {
        "0": {
          "id": 7511840554,
          "node_id": "LA_kwDOM2n80s8AAAABv72XKg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/bug",
          "name": "bug",
          "color": "d73a4a",
          "default": true,
          "description": "Something isn't working"
        },
        "1": {
          "id": 9331338299,
          "node_id": "LA_kwDOM2n80s8AAAACLDDsOw",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/improves%20spec%20compliance",
          "name": "improves spec compliance",
          "color": "9FD9BD",
          "default": false,
          "description": "When a change improves ability of SDK users to comply with spec definition"
        },
        "2": {
          "id": 9354770246,
          "node_id": "LA_kwDOM2n80s8AAAACLZZ3Rg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P2",
          "name": "P2",
          "color": "d2b457",
          "default": false,
          "description": "Moderate issues affecting some users, edge cases, potentially valuable feature"
        }
      },
      "milestone": null,
      "draft": false,
      "head": {
        "label": "vincent0426:fix/elicitation-str-enum",
        "ref": "fix/elicitation-str-enum",
        "sha": "07bef73584d9eca07b2a8827d5c91ab71000f0d9",
        "user": {
          "login": "vincent0426",
          "id": 68840528,
          "node_id": "MDQ6VXNlcjY4ODQwNTI4",
          "avatar_url": "https://avatars.githubusercontent.com/u/68840528?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/vincent0426",
          "type": "User",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 1060943626,
          "node_id": "R_kgDOPzy3Cg",
          "name": "python-sdk",
          "full_name": "vincent0426/python-sdk",
          "private": false,
          "owner": {
            "login": "vincent0426",
            "id": 68840528,
            "node_id": "MDQ6VXNlcjY4ODQwNTI4",
            "avatar_url": "https://avatars.githubusercontent.com/u/68840528?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/vincent0426",
            "type": "User",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": true,
          "url": "https://api.github.com/repos/vincent0426/python-sdk",
          "created_at": "2025-09-20T23:06:28Z",
          "updated_at": "2025-10-31T14:42:59Z",
          "pushed_at": "2025-11-14T18:11:50Z",
          "homepage": "https://modelcontextprotocol.io",
          "size": 2167,
          "stargazers_count": 0,
          "watchers_count": 0,
          "language": "Python",
          "has_issues": false,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": false,
          "has_discussions": false,
          "forks_count": 0,
          "archived": false,
          "disabled": false,
          "open_issues_count": 0,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 0,
          "open_issues": 0,
          "watchers": 0,
          "default_branch": "main"
        }
      },
      "base": {
        "label": "modelcontextprotocol:main",
        "ref": "main",
        "sha": "202af49857e452cdb8b55aa23310df8154e5b292",
        "user": {
          "login": "modelcontextprotocol",
          "id": 182288589,
          "node_id": "O_kgDOCt2AzQ",
          "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/modelcontextprotocol",
          "type": "Organization",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 862584018,
          "node_id": "R_kgDOM2n80g",
          "name": "python-sdk",
          "full_name": "modelcontextprotocol/python-sdk",
          "private": false,
          "owner": {
            "login": "modelcontextprotocol",
            "id": 182288589,
            "node_id": "O_kgDOCt2AzQ",
            "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/modelcontextprotocol",
            "type": "Organization",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": false,
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk",
          "created_at": "2024-09-24T21:01:35Z",
          "updated_at": "2025-12-06T05:02:17Z",
          "pushed_at": "2025-12-04T18:04:06Z",
          "homepage": "https://modelcontextprotocol.github.io/python-sdk/",
          "size": 4194,
          "stargazers_count": 20439,
          "watchers_count": 20439,
          "language": "Python",
          "has_issues": true,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": true,
          "has_discussions": false,
          "forks_count": 2843,
          "archived": false,
          "disabled": false,
          "open_issues_count": 345,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 2843,
          "open_issues": 345,
          "watchers": 20439,
          "default_branch": "main"
        }
      },
      "_links": {
        "self": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1563"
        },
        "html": {
          "href": "https://github.com/modelcontextprotocol/python-sdk/pull/1563"
        },
        "issue": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1563"
        },
        "comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1563/comments"
        },
        "review_comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1563/comments"
        },
        "review_comment": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/comments{/number}"
        },
        "commits": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1563/commits"
        },
        "statuses": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/statuses/07bef73584d9eca07b2a8827d5c91ab71000f0d9"
        }
      },
      "author_association": "NONE",
      "auto_merge": null,
      "active_lock_reason": null,
      "linked_issues": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1562",
      "id": 2967323483,
      "node_id": "PR_kwDOM2n80s6w3cNb",
      "number": 1562,
      "state": "open",
      "locked": false,
      "title": "fall through if PRM endpoint is not implemented",
      "user": {
        "login": "dogacancolak",
        "id": 54953926,
        "node_id": "MDQ6VXNlcjU0OTUzOTI2",
        "avatar_url": "https://avatars.githubusercontent.com/u/54953926?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/dogacancolak",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "body": "<!-- Provide a brief summary of your changes -->\r\n\r\n## Motivation and Context\r\n<!-- Why is this change needed? What problem does it solve? -->\r\nAs raised in https://github.com/modelcontextprotocol/python-sdk/issues/1495, one of the changes in https://github.com/modelcontextprotocol/python-sdk/pull/1324 included raising an error if PRM endpoint request failed. This caused backwards compatibility issues with MCP servers that haven't yet added support for PRM\r\n\r\n## How Has This Been Tested?\r\n<!-- Have you tested this in a real application? Which scenarios were tested? -->\r\n\r\n## Breaking Changes\r\n<!-- Will users need to update their code or configurations? -->\r\n\r\n## Types of changes\r\n<!-- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->\r\n- [x] Bug fix (non-breaking change which fixes an issue)\r\n- [ ] New feature (non-breaking change which adds functionality)\r\n- [ ] Breaking change (fix or feature that would cause existing functionality to change)\r\n- [ ] Documentation update\r\n\r\n## Checklist\r\n<!-- Go over all the following points, and put an `x` in all the boxes that apply. -->\r\n- [x] I have read the [MCP Documentation](https://modelcontextprotocol.io)\r\n- [x] My code follows the repository's style guidelines\r\n- [x] New and existing tests pass locally\r\n- [x] I have added appropriate error handling\r\n- [x] I have added or updated documentation as needed\r\n\r\n## Additional context\r\n<!-- Add any other context, implementation notes, or design decisions -->\r\n",
      "created_at": "2025-10-31T16:17:25Z",
      "updated_at": "2025-11-13T14:45:08Z",
      "closed_at": null,
      "merged_at": null,
      "merge_commit_sha": "cad242a1eb917a8ccabeaf9a37a027df82bc414a",
      "assignee": null,
      "assignees": {},
      "requested_reviewers": {
        "0": {
          "login": "maxisbey",
          "id": 224885523,
          "node_id": "U_kgDODWd7Ew",
          "avatar_url": "https://avatars.githubusercontent.com/u/224885523?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/maxisbey",
          "type": "User",
          "user_view_type": "public",
          "site_admin": false
        }
      },
      "requested_teams": {},
      "labels": {
        "0": {
          "id": 9301360597,
          "node_id": "LA_kwDOM2n80s8AAAACKmd_1Q",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/auth",
          "name": "auth",
          "color": "92ad2d",
          "default": false,
          "description": "Issues and PRs related to Authentication / OAuth"
        },
        "1": {
          "id": 9354767859,
          "node_id": "LA_kwDOM2n80s8AAAACLZZt8w",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P1",
          "name": "P1",
          "color": "895d17",
          "default": false,
          "description": "Significant bug affecting many users, highly requested feature"
        }
      },
      "milestone": null,
      "draft": false,
      "head": {
        "label": "dogacancolak:dc/fall-through-if-no-prm",
        "ref": "dc/fall-through-if-no-prm",
        "sha": "ce6cec23cbb50b32b64dbabbf70ac4f6893e312e",
        "user": {
          "login": "dogacancolak",
          "id": 54953926,
          "node_id": "MDQ6VXNlcjU0OTUzOTI2",
          "avatar_url": "https://avatars.githubusercontent.com/u/54953926?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/dogacancolak",
          "type": "User",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 1047198865,
          "node_id": "R_kgDOPmr8kQ",
          "name": "mcp-python-sdk",
          "full_name": "dogacancolak/mcp-python-sdk",
          "private": false,
          "owner": {
            "login": "dogacancolak",
            "id": 54953926,
            "node_id": "MDQ6VXNlcjU0OTUzOTI2",
            "avatar_url": "https://avatars.githubusercontent.com/u/54953926?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/dogacancolak",
            "type": "User",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": true,
          "url": "https://api.github.com/repos/dogacancolak/mcp-python-sdk",
          "created_at": "2025-08-29T23:02:18Z",
          "updated_at": "2025-10-31T16:07:29Z",
          "pushed_at": "2025-11-13T11:21:26Z",
          "homepage": "https://modelcontextprotocol.io",
          "size": 2277,
          "stargazers_count": 0,
          "watchers_count": 0,
          "language": "Python",
          "has_issues": false,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": false,
          "has_discussions": false,
          "forks_count": 0,
          "archived": false,
          "disabled": false,
          "open_issues_count": 0,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 0,
          "open_issues": 0,
          "watchers": 0,
          "default_branch": "main"
        }
      },
      "base": {
        "label": "modelcontextprotocol:main",
        "ref": "main",
        "sha": "be730674adae118ad89806cd3011dc699fef8801",
        "user": {
          "login": "modelcontextprotocol",
          "id": 182288589,
          "node_id": "O_kgDOCt2AzQ",
          "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/modelcontextprotocol",
          "type": "Organization",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 862584018,
          "node_id": "R_kgDOM2n80g",
          "name": "python-sdk",
          "full_name": "modelcontextprotocol/python-sdk",
          "private": false,
          "owner": {
            "login": "modelcontextprotocol",
            "id": 182288589,
            "node_id": "O_kgDOCt2AzQ",
            "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/modelcontextprotocol",
            "type": "Organization",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": false,
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk",
          "created_at": "2024-09-24T21:01:35Z",
          "updated_at": "2025-12-06T05:02:17Z",
          "pushed_at": "2025-12-04T18:04:06Z",
          "homepage": "https://modelcontextprotocol.github.io/python-sdk/",
          "size": 4194,
          "stargazers_count": 20439,
          "watchers_count": 20439,
          "language": "Python",
          "has_issues": true,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": true,
          "has_discussions": false,
          "forks_count": 2843,
          "archived": false,
          "disabled": false,
          "open_issues_count": 345,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 2843,
          "open_issues": 345,
          "watchers": 20439,
          "default_branch": "main"
        }
      },
      "_links": {
        "self": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1562"
        },
        "html": {
          "href": "https://github.com/modelcontextprotocol/python-sdk/pull/1562"
        },
        "issue": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1562"
        },
        "comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1562/comments"
        },
        "review_comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1562/comments"
        },
        "review_comment": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/comments{/number}"
        },
        "commits": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1562/commits"
        },
        "statuses": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/statuses/ce6cec23cbb50b32b64dbabbf70ac4f6893e312e"
        }
      },
      "author_association": "CONTRIBUTOR",
      "auto_merge": null,
      "active_lock_reason": null,
      "linked_issues": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1551",
      "id": 2964453057,
      "node_id": "PR_kwDOM2n80s6wsfbB",
      "number": 1551,
      "state": "open",
      "locked": false,
      "title": "Make test dependencies required instead of optional",
      "user": {
        "login": "maxisbey",
        "id": 224885523,
        "node_id": "U_kgDODWd7Ew",
        "avatar_url": "https://avatars.githubusercontent.com/u/224885523?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/maxisbey",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "body": "## Summary\n\nThis PR adds `rich`, `typer`, `python-dotenv`, and `websockets` to the required dev dependencies.\n\n## Motivation and Context\n\nPreviously, these dependencies were only available when specific optional features were enabled (e.g., `[cli]`, `[sse]`). This meant running `uv sync` without `--all-extras` wouldn't install them, which was problematic because:\n\n1. Test suites that import these libraries would fail when developers ran `uv sync` without `--all-extras`\n2. The `--all-extras` flag had to be remembered and used consistently across development workflows\n3. CI workflows required `--all-extras` to function properly\n\nThis change makes development more ergonomic by ensuring all dependencies needed for testing are always present.\n\n## How Has This Been Tested?\n\n- Verified that `uv sync` now includes rich, typer, python-dotenv, and websockets\n- Confirmed CI workflow changes (removed `--all-extras`) still work correctly\n\n## Breaking Changes\n\nNone - this only affects development workflow, not the published package.\n\n## Types of changes\n\n- [ ] Bug fix (non-breaking change which fixes an issue)\n- [x] New feature (non-breaking change which adds functionality)\n- [ ] Breaking change (fix or feature that would cause existing functionality to change)\n- [ ] Documentation update\n\n## Checklist\n\n- [x] I have read the [MCP Documentation](https://modelcontextprotocol.io)\n- [x] My code follows the repository's style guidelines\n- [x] New and existing tests pass locally\n- [x] I have added appropriate error handling\n- [x] I have added or updated documentation as needed\n\n## Additional context\n\nThe main benefit is that `uv sync` now \"just works\" without needing to remember `--all-extras`. The CI workflow has been updated to remove the `--all-extras` flag since it's no longer needed.",
      "created_at": "2025-10-30T19:41:09Z",
      "updated_at": "2025-10-31T07:55:27Z",
      "closed_at": null,
      "merged_at": null,
      "merge_commit_sha": null,
      "assignee": null,
      "assignees": {},
      "requested_reviewers": {},
      "requested_teams": {},
      "labels": {},
      "milestone": null,
      "draft": true,
      "head": {
        "label": "modelcontextprotocol:make-test-deps-required",
        "ref": "make-test-deps-required",
        "sha": "74cebc716f7d368aae714a886ec2c3ec83c330bb",
        "user": {
          "login": "modelcontextprotocol",
          "id": 182288589,
          "node_id": "O_kgDOCt2AzQ",
          "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/modelcontextprotocol",
          "type": "Organization",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 862584018,
          "node_id": "R_kgDOM2n80g",
          "name": "python-sdk",
          "full_name": "modelcontextprotocol/python-sdk",
          "private": false,
          "owner": {
            "login": "modelcontextprotocol",
            "id": 182288589,
            "node_id": "O_kgDOCt2AzQ",
            "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/modelcontextprotocol",
            "type": "Organization",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": false,
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk",
          "created_at": "2024-09-24T21:01:35Z",
          "updated_at": "2025-12-06T05:02:17Z",
          "pushed_at": "2025-12-04T18:04:06Z",
          "homepage": "https://modelcontextprotocol.github.io/python-sdk/",
          "size": 4194,
          "stargazers_count": 20439,
          "watchers_count": 20439,
          "language": "Python",
          "has_issues": true,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": true,
          "has_discussions": false,
          "forks_count": 2843,
          "archived": false,
          "disabled": false,
          "open_issues_count": 345,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 2843,
          "open_issues": 345,
          "watchers": 20439,
          "default_branch": "main"
        }
      },
      "base": {
        "label": "modelcontextprotocol:main",
        "ref": "main",
        "sha": "6f2cd0cef0e2db72b1f4e04bdb545782214c6244",
        "user": {
          "login": "modelcontextprotocol",
          "id": 182288589,
          "node_id": "O_kgDOCt2AzQ",
          "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/modelcontextprotocol",
          "type": "Organization",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 862584018,
          "node_id": "R_kgDOM2n80g",
          "name": "python-sdk",
          "full_name": "modelcontextprotocol/python-sdk",
          "private": false,
          "owner": {
            "login": "modelcontextprotocol",
            "id": 182288589,
            "node_id": "O_kgDOCt2AzQ",
            "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/modelcontextprotocol",
            "type": "Organization",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": false,
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk",
          "created_at": "2024-09-24T21:01:35Z",
          "updated_at": "2025-12-06T05:02:17Z",
          "pushed_at": "2025-12-04T18:04:06Z",
          "homepage": "https://modelcontextprotocol.github.io/python-sdk/",
          "size": 4194,
          "stargazers_count": 20439,
          "watchers_count": 20439,
          "language": "Python",
          "has_issues": true,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": true,
          "has_discussions": false,
          "forks_count": 2843,
          "archived": false,
          "disabled": false,
          "open_issues_count": 345,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 2843,
          "open_issues": 345,
          "watchers": 20439,
          "default_branch": "main"
        }
      },
      "_links": {
        "self": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1551"
        },
        "html": {
          "href": "https://github.com/modelcontextprotocol/python-sdk/pull/1551"
        },
        "issue": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1551"
        },
        "comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1551/comments"
        },
        "review_comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1551/comments"
        },
        "review_comment": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/comments{/number}"
        },
        "commits": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1551/commits"
        },
        "statuses": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/statuses/74cebc716f7d368aae714a886ec2c3ec83c330bb"
        }
      },
      "author_association": "CONTRIBUTOR",
      "auto_merge": null,
      "active_lock_reason": null,
      "linked_issues": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1550",
      "id": 2964138529,
      "node_id": "PR_kwDOM2n80s6wrSoh",
      "number": 1550,
      "state": "open",
      "locked": false,
      "title": "feat: Implement SEP-986: Tool Name Guidance",
      "user": {
        "login": "vincent0426",
        "id": 68840528,
        "node_id": "MDQ6VXNlcjY4ODQwNTI4",
        "avatar_url": "https://avatars.githubusercontent.com/u/68840528?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/vincent0426",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "body": "## Implement SEP-986: Tool Name Guidance for Tool Type\r\n\r\n### Changes\r\n- Added a length check that raises an error when the tool name is not within the allowed range:\r\n  ```python\r\n  raise ValueError(f\"Invalid tool name length: {len(value)}. Tool name must be between 1 and 128 characters.\")\r\n  ```\r\n- Added a regex validation using `re.compile(r\"^[A-Za-z0-9_.-]+$\")` that raises an error for invalid characters:\r\n  ```python\r\n  raise ValueError(\"Invalid tool name characters. Allowed: A-Z, a-z, 0-9, underscore (_), dash (-), dot (.).\")\r\n  ```\r\n\r\n## Motivation and Context\r\n<!-- Why is this change needed? What problem does it solve? -->\r\nRelated issues: SEP-986 https://github.com/modelcontextprotocol/python-sdk/issues/1537\r\n\r\nImplements the guidance from https://github.com/modelcontextprotocol/modelcontextprotocol/issues/986\r\n```\r\n- Tool names SHOULD be between 1 and 128 characters in length (inclusive).\r\n- Tool names SHOULD be considered case-sensitive.\r\n- The following SHOULD be the only allowed characters: uppercase and lowercase ASCII letters (A-Z, a-z), digits\r\n  (0-9), underscore (\\_), dash (-), and dot (.)\r\n- Tool names SHOULD NOT contain spaces, commas, or other special characters.\r\n- Tool names SHOULD be unique within a server.\r\n- Example valid tool names:\r\n  - getUser\r\n  - DATA_EXPORT_v2\r\n  - admin.tools.list\r\n```\r\n\r\n\r\n## How Has This Been Tested?\r\n<!-- Have you tested this in a real application? Which scenarios were tested? -->\r\n## Unit Tests\r\n\r\n### Valid Values\r\n- `getUser`\r\n- `DATA_EXPORT_v2`\r\n- `admin.tools.list`\r\n- `a`\r\n- `Z9_.-`\r\n- `\"x\" * 128`  (max length)\r\n\r\n### Invalid Values\r\n- `\"\"`  (empty string)\r\n- `\"x\" * 129`  (exceeds max length)\r\n- `has space`\r\n- `comma,name`\r\n- `not/allowed`\r\n- `name@`\r\n- `name#`\r\n- `name$`\r\n\r\n## Breaking Changes\r\n<!-- Will users need to update their code or configurations? -->\r\n\r\n## Types of changes\r\n<!-- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->\r\n- [ ] Bug fix (non-breaking change which fixes an issue)\r\n- [X] New feature (non-breaking change which adds functionality)\r\n- [ ] Breaking change (fix or feature that would cause existing functionality to change)\r\n- [ ] Documentation update\r\n\r\n## Checklist\r\n<!-- Go over all the following points, and put an `x` in all the boxes that apply. -->\r\n- [X] I have read the [MCP Documentation](https://modelcontextprotocol.io)\r\n- [X] My code follows the repository's style guidelines\r\n- [X] New and existing tests pass locally\r\n- [X] I have added appropriate error handling\r\n- [X] I have added or updated documentation as needed\r\n\r\n## Additional context\r\n<!-- Add any other context, implementation notes, or design decisions -->\r\n",
      "created_at": "2025-10-30T17:50:55Z",
      "updated_at": "2025-11-14T18:11:52Z",
      "closed_at": null,
      "merged_at": null,
      "merge_commit_sha": null,
      "assignee": null,
      "assignees": {},
      "requested_reviewers": {},
      "requested_teams": {},
      "labels": {
        "0": {
          "id": 9331338299,
          "node_id": "LA_kwDOM2n80s8AAAACLDDsOw",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/improves%20spec%20compliance",
          "name": "improves spec compliance",
          "color": "9FD9BD",
          "default": false,
          "description": "When a change improves ability of SDK users to comply with spec definition"
        },
        "1": {
          "id": 9354770246,
          "node_id": "LA_kwDOM2n80s8AAAACLZZ3Rg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P2",
          "name": "P2",
          "color": "d2b457",
          "default": false,
          "description": "Moderate issues affecting some users, edge cases, potentially valuable feature"
        }
      },
      "milestone": null,
      "draft": false,
      "head": {
        "label": "vincent0426:feat/sep-986",
        "ref": "feat/sep-986",
        "sha": "1e77892cba617238aa31af89a0a7005bdcc43d78",
        "user": {
          "login": "vincent0426",
          "id": 68840528,
          "node_id": "MDQ6VXNlcjY4ODQwNTI4",
          "avatar_url": "https://avatars.githubusercontent.com/u/68840528?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/vincent0426",
          "type": "User",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 1060943626,
          "node_id": "R_kgDOPzy3Cg",
          "name": "python-sdk",
          "full_name": "vincent0426/python-sdk",
          "private": false,
          "owner": {
            "login": "vincent0426",
            "id": 68840528,
            "node_id": "MDQ6VXNlcjY4ODQwNTI4",
            "avatar_url": "https://avatars.githubusercontent.com/u/68840528?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/vincent0426",
            "type": "User",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": true,
          "url": "https://api.github.com/repos/vincent0426/python-sdk",
          "created_at": "2025-09-20T23:06:28Z",
          "updated_at": "2025-10-31T14:42:59Z",
          "pushed_at": "2025-11-14T18:11:50Z",
          "homepage": "https://modelcontextprotocol.io",
          "size": 2167,
          "stargazers_count": 0,
          "watchers_count": 0,
          "language": "Python",
          "has_issues": false,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": false,
          "has_discussions": false,
          "forks_count": 0,
          "archived": false,
          "disabled": false,
          "open_issues_count": 0,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 0,
          "open_issues": 0,
          "watchers": 0,
          "default_branch": "main"
        }
      },
      "base": {
        "label": "modelcontextprotocol:main",
        "ref": "main",
        "sha": "9724ad1ce66c2a4f18c7539ef589d4d3b9aebd82",
        "user": {
          "login": "modelcontextprotocol",
          "id": 182288589,
          "node_id": "O_kgDOCt2AzQ",
          "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/modelcontextprotocol",
          "type": "Organization",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 862584018,
          "node_id": "R_kgDOM2n80g",
          "name": "python-sdk",
          "full_name": "modelcontextprotocol/python-sdk",
          "private": false,
          "owner": {
            "login": "modelcontextprotocol",
            "id": 182288589,
            "node_id": "O_kgDOCt2AzQ",
            "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/modelcontextprotocol",
            "type": "Organization",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": false,
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk",
          "created_at": "2024-09-24T21:01:35Z",
          "updated_at": "2025-12-06T05:02:17Z",
          "pushed_at": "2025-12-04T18:04:06Z",
          "homepage": "https://modelcontextprotocol.github.io/python-sdk/",
          "size": 4194,
          "stargazers_count": 20439,
          "watchers_count": 20439,
          "language": "Python",
          "has_issues": true,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": true,
          "has_discussions": false,
          "forks_count": 2843,
          "archived": false,
          "disabled": false,
          "open_issues_count": 345,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 2843,
          "open_issues": 345,
          "watchers": 20439,
          "default_branch": "main"
        }
      },
      "_links": {
        "self": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1550"
        },
        "html": {
          "href": "https://github.com/modelcontextprotocol/python-sdk/pull/1550"
        },
        "issue": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1550"
        },
        "comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1550/comments"
        },
        "review_comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1550/comments"
        },
        "review_comment": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/comments{/number}"
        },
        "commits": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1550/commits"
        },
        "statuses": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/statuses/1e77892cba617238aa31af89a0a7005bdcc43d78"
        }
      },
      "author_association": "NONE",
      "auto_merge": null,
      "active_lock_reason": null,
      "linked_issues": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1535",
      "id": 2961665236,
      "node_id": "PR_kwDOM2n80s6wh2zU",
      "number": 1535,
      "state": "open",
      "locked": false,
      "title": "fix: Include extra field for context log",
      "user": {
        "login": "vincent0426",
        "id": 68840528,
        "node_id": "MDQ6VXNlcjY4ODQwNTI4",
        "avatar_url": "https://avatars.githubusercontent.com/u/68840528?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/vincent0426",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "body": "<!-- Provide a brief summary of your changes -->\r\nAllow extra field within context log\r\n\r\nwithout extra:\r\n```sh\r\n{\r\n  \"method\": \"notifications/message\",\r\n  \"params\": {\r\n    \"level\": \"info\",\r\n    \"data\": \"test message\"\r\n  }\r\n}\r\n```\r\n\r\nwith extra:\r\n```sh\r\n{\r\n  \"method\": \"notifications/message\",\r\n  \"params\": {\r\n    \"level\": \"info\",\r\n    \"data\": {\r\n      \"message\": \"test message\",\r\n      \"additional_string\": \"example\",\r\n      \"additional_number\": 123,\r\n      \"additional_boolean\": true,\r\n      \"additional_list\": [\r\n        \"a\",\r\n        \"b\",\r\n        \"c\"\r\n      ],\r\n      \"additional_dict\": {\r\n        \"a\": 1,\r\n        \"b\": 2,\r\n        \"c\": 3\r\n      },\r\n      \"additional_null\": null\r\n    }\r\n  }\r\n}\r\n```\r\n\r\n\r\n## Motivation and Context\r\n<!-- Why is this change needed? What problem does it solve? -->\r\nCloses https://github.com/modelcontextprotocol/python-sdk/issues/565\r\n\r\n## How Has This Been Tested?\r\n<!-- Have you tested this in a real application? Which scenarios were tested? -->\r\n\r\nUnit test, manual test with inspector\r\n\r\n## Breaking Changes\r\n<!-- Will users need to update their code or configurations? -->\r\n\r\n## Types of changes\r\n<!-- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->\r\n- [X] Bug fix (non-breaking change which fixes an issue)\r\n- [ ] New feature (non-breaking change which adds functionality)\r\n- [ ] Breaking change (fix or feature that would cause existing functionality to change)\r\n- [ ] Documentation update\r\n\r\n## Checklist\r\n<!-- Go over all the following points, and put an `x` in all the boxes that apply. -->\r\n- [X] I have read the [MCP Documentation](https://modelcontextprotocol.io)\r\n- [X] My code follows the repository's style guidelines\r\n- [X] New and existing tests pass locally\r\n- [X] I have added appropriate error handling\r\n- [X] I have added or updated documentation as needed\r\n\r\n## Additional context\r\n<!-- Add any other context, implementation notes, or design decisions -->\r\n",
      "created_at": "2025-10-30T05:14:51Z",
      "updated_at": "2025-11-12T18:28:52Z",
      "closed_at": null,
      "merged_at": null,
      "merge_commit_sha": "52849e9842c8e0c7b12c35f0846059db07e5c852",
      "assignee": null,
      "assignees": {},
      "requested_reviewers": {
        "0": {
          "login": "Kludex",
          "id": 7353520,
          "node_id": "MDQ6VXNlcjczNTM1MjA=",
          "avatar_url": "https://avatars.githubusercontent.com/u/7353520?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/Kludex",
          "type": "User",
          "user_view_type": "public",
          "site_admin": false
        }
      },
      "requested_teams": {},
      "labels": {
        "0": {
          "id": 9354757189,
          "node_id": "LA_kwDOM2n80s8AAAACLZZERQ",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/enhancement",
          "name": "enhancement",
          "color": "11b5cc",
          "default": true,
          "description": "Request for a new feature that's not currently supported"
        },
        "1": {
          "id": 9354772110,
          "node_id": "LA_kwDOM2n80s8AAAACLZZ-jg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P3",
          "name": "P3",
          "color": "c7df49",
          "default": false,
          "description": "Nice to haves, rare edge cases"
        }
      },
      "milestone": null,
      "draft": false,
      "head": {
        "label": "vincent0426:log-with-extra",
        "ref": "log-with-extra",
        "sha": "e0006bbead1401040988f4275caa658d1489c240",
        "user": {
          "login": "vincent0426",
          "id": 68840528,
          "node_id": "MDQ6VXNlcjY4ODQwNTI4",
          "avatar_url": "https://avatars.githubusercontent.com/u/68840528?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/vincent0426",
          "type": "User",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 1060943626,
          "node_id": "R_kgDOPzy3Cg",
          "name": "python-sdk",
          "full_name": "vincent0426/python-sdk",
          "private": false,
          "owner": {
            "login": "vincent0426",
            "id": 68840528,
            "node_id": "MDQ6VXNlcjY4ODQwNTI4",
            "avatar_url": "https://avatars.githubusercontent.com/u/68840528?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/vincent0426",
            "type": "User",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": true,
          "url": "https://api.github.com/repos/vincent0426/python-sdk",
          "created_at": "2025-09-20T23:06:28Z",
          "updated_at": "2025-10-31T14:42:59Z",
          "pushed_at": "2025-11-14T18:11:50Z",
          "homepage": "https://modelcontextprotocol.io",
          "size": 2167,
          "stargazers_count": 0,
          "watchers_count": 0,
          "language": "Python",
          "has_issues": false,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": false,
          "has_discussions": false,
          "forks_count": 0,
          "archived": false,
          "disabled": false,
          "open_issues_count": 0,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 0,
          "open_issues": 0,
          "watchers": 0,
          "default_branch": "main"
        }
      },
      "base": {
        "label": "modelcontextprotocol:main",
        "ref": "main",
        "sha": "202af49857e452cdb8b55aa23310df8154e5b292",
        "user": {
          "login": "modelcontextprotocol",
          "id": 182288589,
          "node_id": "O_kgDOCt2AzQ",
          "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/modelcontextprotocol",
          "type": "Organization",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 862584018,
          "node_id": "R_kgDOM2n80g",
          "name": "python-sdk",
          "full_name": "modelcontextprotocol/python-sdk",
          "private": false,
          "owner": {
            "login": "modelcontextprotocol",
            "id": 182288589,
            "node_id": "O_kgDOCt2AzQ",
            "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/modelcontextprotocol",
            "type": "Organization",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": false,
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk",
          "created_at": "2024-09-24T21:01:35Z",
          "updated_at": "2025-12-06T05:02:17Z",
          "pushed_at": "2025-12-04T18:04:06Z",
          "homepage": "https://modelcontextprotocol.github.io/python-sdk/",
          "size": 4194,
          "stargazers_count": 20439,
          "watchers_count": 20439,
          "language": "Python",
          "has_issues": true,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": true,
          "has_discussions": false,
          "forks_count": 2843,
          "archived": false,
          "disabled": false,
          "open_issues_count": 345,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 2843,
          "open_issues": 345,
          "watchers": 20439,
          "default_branch": "main"
        }
      },
      "_links": {
        "self": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1535"
        },
        "html": {
          "href": "https://github.com/modelcontextprotocol/python-sdk/pull/1535"
        },
        "issue": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1535"
        },
        "comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1535/comments"
        },
        "review_comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1535/comments"
        },
        "review_comment": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/comments{/number}"
        },
        "commits": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1535/commits"
        },
        "statuses": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/statuses/e0006bbead1401040988f4275caa658d1489c240"
        }
      },
      "author_association": "NONE",
      "auto_merge": null,
      "active_lock_reason": null,
      "linked_issues": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1534",
      "id": 2960765276,
      "node_id": "PR_kwDOM2n80s6webFc",
      "number": 1534,
      "state": "open",
      "locked": false,
      "title": "fix: Lifespan pr cleanup/Extending ASGI lifespan examples",
      "user": {
        "login": "FloorIsGround",
        "id": 112002787,
        "node_id": "U_kgDOBq0G4w",
        "avatar_url": "https://avatars.githubusercontent.com/u/112002787?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/FloorIsGround",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "body": "Removed the stateless http additions by @ranjitodedra as they weren't necessary for the issue and may add confusion as stateless_http isn't necessary for a streamable http mcp service.\r\n\r\n## Motivation and Context\r\nFixing #1494 and also added an example with more detailed explanation of attaching ASGI services through lifespan.\r\n\r\n## How Has This Been Tested?\r\nI tested the new example with information from #1484. The main issue was attempting to run two separate ASGI services at the same time rather than mounting them to a main one to call other ASGI services.\r\n\r\n## Breaking Changes\r\nNo there are no breaking changes just documentation and examples.\r\n\r\n## Types of changes\r\n<!-- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->\r\n- [ ] Bug fix (non-breaking change which fixes an issue)\r\n- [ ] New feature (non-breaking change which adds functionality)\r\n- [ ] Breaking change (fix or feature that would cause existing functionality to change)\r\n- [x] Documentation update\r\n\r\n## Checklist\r\n<!-- Go over all the following points, and put an `x` in all the boxes that apply. -->\r\n- [x] I have read the [MCP Documentation](https://modelcontextprotocol.io)\r\n- [x] My code follows the repository's style guidelines\r\n- [x] New and existing tests pass locally\r\n- [x] I have added appropriate error handling\r\n- [x] I have added or updated documentation as needed\r\n\r\n## Additional context\r\nAs was said in Issue #1494 they found they could mount existing server routes onto an mcp server but were struggling on the configuration to run multiple services asynchronously. It is possible to do so with Starlette examples, the mcp service, as well as other asynchronous services can be started and stopped by a context manager lifespan function, on a Starlette app call.\r\n\r\nThe confusion with stateless_http is probably that a streamable_http mcp server requires stateless_http due to its name, unless you look deeper you won't find that it is only tied to if requests track sessions or carry persistence between requests. I removed the added stateless_http since it wasn't necessary for the examples in question.\r\n",
      "created_at": "2025-10-29T21:19:55Z",
      "updated_at": "2025-10-29T21:19:55Z",
      "closed_at": null,
      "merged_at": null,
      "merge_commit_sha": null,
      "assignee": null,
      "assignees": {},
      "requested_reviewers": {},
      "requested_teams": {},
      "labels": {},
      "milestone": null,
      "draft": false,
      "head": {
        "label": "FloorIsGround:examples-docs",
        "ref": "examples-docs",
        "sha": "364074e2cbf962a817630534251afe9e846688ff",
        "user": {
          "login": "FloorIsGround",
          "id": 112002787,
          "node_id": "U_kgDOBq0G4w",
          "avatar_url": "https://avatars.githubusercontent.com/u/112002787?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/FloorIsGround",
          "type": "User",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 1085442129,
          "node_id": "R_kgDOQLKIUQ",
          "name": "python-sdk",
          "full_name": "FloorIsGround/python-sdk",
          "private": false,
          "owner": {
            "login": "FloorIsGround",
            "id": 112002787,
            "node_id": "U_kgDOBq0G4w",
            "avatar_url": "https://avatars.githubusercontent.com/u/112002787?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/FloorIsGround",
            "type": "User",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": true,
          "url": "https://api.github.com/repos/FloorIsGround/python-sdk",
          "created_at": "2025-10-29T03:37:16Z",
          "updated_at": "2025-10-29T20:50:51Z",
          "pushed_at": "2025-10-29T21:01:54Z",
          "homepage": "https://modelcontextprotocol.github.io/python-sdk/",
          "size": 2168,
          "stargazers_count": 0,
          "watchers_count": 0,
          "language": "Python",
          "has_issues": false,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": false,
          "has_discussions": false,
          "forks_count": 0,
          "archived": false,
          "disabled": false,
          "open_issues_count": 0,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 0,
          "open_issues": 0,
          "watchers": 0,
          "default_branch": "main"
        }
      },
      "base": {
        "label": "modelcontextprotocol:main",
        "ref": "main",
        "sha": "8cdac3d2f8edfeef25a70abfea16b512a3243c52",
        "user": {
          "login": "modelcontextprotocol",
          "id": 182288589,
          "node_id": "O_kgDOCt2AzQ",
          "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/modelcontextprotocol",
          "type": "Organization",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 862584018,
          "node_id": "R_kgDOM2n80g",
          "name": "python-sdk",
          "full_name": "modelcontextprotocol/python-sdk",
          "private": false,
          "owner": {
            "login": "modelcontextprotocol",
            "id": 182288589,
            "node_id": "O_kgDOCt2AzQ",
            "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/modelcontextprotocol",
            "type": "Organization",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": false,
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk",
          "created_at": "2024-09-24T21:01:35Z",
          "updated_at": "2025-12-06T05:02:17Z",
          "pushed_at": "2025-12-04T18:04:06Z",
          "homepage": "https://modelcontextprotocol.github.io/python-sdk/",
          "size": 4194,
          "stargazers_count": 20439,
          "watchers_count": 20439,
          "language": "Python",
          "has_issues": true,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": true,
          "has_discussions": false,
          "forks_count": 2843,
          "archived": false,
          "disabled": false,
          "open_issues_count": 345,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 2843,
          "open_issues": 345,
          "watchers": 20439,
          "default_branch": "main"
        }
      },
      "_links": {
        "self": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1534"
        },
        "html": {
          "href": "https://github.com/modelcontextprotocol/python-sdk/pull/1534"
        },
        "issue": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1534"
        },
        "comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1534/comments"
        },
        "review_comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1534/comments"
        },
        "review_comment": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/comments{/number}"
        },
        "commits": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1534/commits"
        },
        "statuses": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/statuses/364074e2cbf962a817630534251afe9e846688ff"
        }
      },
      "author_association": "NONE",
      "auto_merge": null,
      "active_lock_reason": null,
      "linked_issues": [
        1
      ]
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1531",
      "id": 2957756943,
      "node_id": "PR_kwDOM2n80s6wS8oP",
      "number": 1531,
      "state": "open",
      "locked": false,
      "title": "fix: Add accept json headers for token request",
      "user": {
        "login": "vincent0426",
        "id": 68840528,
        "node_id": "MDQ6VXNlcjY4ODQwNTI4",
        "avatar_url": "https://avatars.githubusercontent.com/u/68840528?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/vincent0426",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "body": "<!-- Provide a brief summary of your changes -->\r\nInclude `\"Accept\": \"application/json\"` for exchange token and refresh token to avoid exception \r\n \r\nhttps://github.com/modelcontextprotocol/python-sdk/blob/673423da0d6511127608df3d75360e47e99cb1f1/src/mcp/client/auth.py#L437\r\n\r\nhttps://github.com/modelcontextprotocol/python-sdk/blob/673423da0d6511127608df3d75360e47e99cb1f1/src/mcp/client/auth.py#L493\r\n\r\n## Motivation and Context\r\n<!-- Why is this change needed? What problem does it solve? -->\r\nCloses https://github.com/modelcontextprotocol/python-sdk/issues/1523\r\n\r\n## How Has This Been Tested?\r\n<!-- Have you tested this in a real application? Which scenarios were tested? -->\r\nadded unit test for headers\r\n\r\n## Breaking Changes\r\n<!-- Will users need to update their code or configurations? -->\r\n\r\n## Types of changes\r\n<!-- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->\r\n- [X] Bug fix (non-breaking change which fixes an issue)\r\n- [ ] New feature (non-breaking change which adds functionality)\r\n- [ ] Breaking change (fix or feature that would cause existing functionality to change)\r\n- [ ] Documentation update\r\n\r\n## Checklist\r\n<!-- Go over all the following points, and put an `x` in all the boxes that apply. -->\r\n- [X] I have read the [MCP Documentation](https://modelcontextprotocol.io)\r\n- [X] My code follows the repository's style guidelines\r\n- [X] New and existing tests pass locally\r\n- [X] I have added appropriate error handling\r\n- [X] I have added or updated documentation as needed\r\n\r\n## Additional context\r\n<!-- Add any other context, implementation notes, or design decisions -->\r\n",
      "created_at": "2025-10-29T06:25:35Z",
      "updated_at": "2025-10-29T12:05:02Z",
      "closed_at": null,
      "merged_at": null,
      "merge_commit_sha": null,
      "assignee": null,
      "assignees": {},
      "requested_reviewers": {
        "0": {
          "login": "pcarleton",
          "id": 704663,
          "node_id": "MDQ6VXNlcjcwNDY2Mw==",
          "avatar_url": "https://avatars.githubusercontent.com/u/704663?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/pcarleton",
          "type": "User",
          "user_view_type": "public",
          "site_admin": false
        }
      },
      "requested_teams": {},
      "labels": {
        "0": {
          "id": 7511840554,
          "node_id": "LA_kwDOM2n80s8AAAABv72XKg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/bug",
          "name": "bug",
          "color": "d73a4a",
          "default": true,
          "description": "Something isn't working"
        },
        "1": {
          "id": 9301360597,
          "node_id": "LA_kwDOM2n80s8AAAACKmd_1Q",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/auth",
          "name": "auth",
          "color": "92ad2d",
          "default": false,
          "description": "Issues and PRs related to Authentication / OAuth"
        }
      },
      "milestone": null,
      "draft": false,
      "head": {
        "label": "vincent0426:headers-accept-json",
        "ref": "headers-accept-json",
        "sha": "1fa835fe5a8e13769458c0aa0688ddd7dc54b6f4",
        "user": {
          "login": "vincent0426",
          "id": 68840528,
          "node_id": "MDQ6VXNlcjY4ODQwNTI4",
          "avatar_url": "https://avatars.githubusercontent.com/u/68840528?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/vincent0426",
          "type": "User",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 1060943626,
          "node_id": "R_kgDOPzy3Cg",
          "name": "python-sdk",
          "full_name": "vincent0426/python-sdk",
          "private": false,
          "owner": {
            "login": "vincent0426",
            "id": 68840528,
            "node_id": "MDQ6VXNlcjY4ODQwNTI4",
            "avatar_url": "https://avatars.githubusercontent.com/u/68840528?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/vincent0426",
            "type": "User",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": true,
          "url": "https://api.github.com/repos/vincent0426/python-sdk",
          "created_at": "2025-09-20T23:06:28Z",
          "updated_at": "2025-10-31T14:42:59Z",
          "pushed_at": "2025-11-14T18:11:50Z",
          "homepage": "https://modelcontextprotocol.io",
          "size": 2167,
          "stargazers_count": 0,
          "watchers_count": 0,
          "language": "Python",
          "has_issues": false,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": false,
          "has_discussions": false,
          "forks_count": 0,
          "archived": false,
          "disabled": false,
          "open_issues_count": 0,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 0,
          "open_issues": 0,
          "watchers": 0,
          "default_branch": "main"
        }
      },
      "base": {
        "label": "modelcontextprotocol:main",
        "ref": "main",
        "sha": "c44e68f766bb9780bd09bde8605fa7b2d1a462e9",
        "user": {
          "login": "modelcontextprotocol",
          "id": 182288589,
          "node_id": "O_kgDOCt2AzQ",
          "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/modelcontextprotocol",
          "type": "Organization",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 862584018,
          "node_id": "R_kgDOM2n80g",
          "name": "python-sdk",
          "full_name": "modelcontextprotocol/python-sdk",
          "private": false,
          "owner": {
            "login": "modelcontextprotocol",
            "id": 182288589,
            "node_id": "O_kgDOCt2AzQ",
            "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/modelcontextprotocol",
            "type": "Organization",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": false,
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk",
          "created_at": "2024-09-24T21:01:35Z",
          "updated_at": "2025-12-06T05:02:17Z",
          "pushed_at": "2025-12-04T18:04:06Z",
          "homepage": "https://modelcontextprotocol.github.io/python-sdk/",
          "size": 4194,
          "stargazers_count": 20439,
          "watchers_count": 20439,
          "language": "Python",
          "has_issues": true,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": true,
          "has_discussions": false,
          "forks_count": 2843,
          "archived": false,
          "disabled": false,
          "open_issues_count": 345,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 2843,
          "open_issues": 345,
          "watchers": 20439,
          "default_branch": "main"
        }
      },
      "_links": {
        "self": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1531"
        },
        "html": {
          "href": "https://github.com/modelcontextprotocol/python-sdk/pull/1531"
        },
        "issue": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1531"
        },
        "comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1531/comments"
        },
        "review_comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1531/comments"
        },
        "review_comment": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/comments{/number}"
        },
        "commits": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1531/commits"
        },
        "statuses": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/statuses/1fa835fe5a8e13769458c0aa0688ddd7dc54b6f4"
        }
      },
      "author_association": "NONE",
      "auto_merge": null,
      "active_lock_reason": null,
      "linked_issues": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1528",
      "id": 2957049075,
      "node_id": "PR_kwDOM2n80s6wQPzz",
      "number": 1528,
      "state": "open",
      "locked": false,
      "title": "fix: Eliminate port allocation race condition in all affected test files",
      "user": {
        "login": "maxisbey",
        "id": 224885523,
        "node_id": "U_kgDODWd7Ew",
        "avatar_url": "https://avatars.githubusercontent.com/u/224885523?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/maxisbey",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "body": "This PR extends the port allocation race condition fix to all test files affected by the same TOCTOU issue, eliminating intermittent test failures when running with pytest-xdist parallel workers.\n\n## Motivation and Context\n\nWhen running tests with pytest-xdist parallel workers, multiple workers would receive the same \"free\" port from `socket.bind((\"127.0.0.1\", 0))`, causing a TOCTOU (Time-of-Check-Time-of-Use) race condition. This manifested as:\n- **\"address already in use\"** errors when multiple workers tried to bind the same port\n- **Tests connecting to wrong servers** (e.g., expecting one server but getting another)\n- **Flaky tests in CI** that would pass locally but fail intermittently in parallel runs\n\nThis builds on the initial fix in tests/server/fastmcp/test_integration.py by applying the same solution to 7 additional test files that had the identical issue.\n\n## How Has This Been Tested?\n\n- ✅ Ran full test suite with 14 parallel workers: `PYTEST_DISABLE_PLUGIN_AUTOLOAD=\"\" uv run --frozen pytest tests/ -v`\n- ✅ All 703 tests pass consistently\n- ✅ Verified no \"address already in use\" errors occur\n- ✅ Confirmed no test cross-contamination between workers\n- ✅ Tested multiple consecutive runs to ensure stability\n\nEach pytest-xdist worker now receives an exclusive port range from 40000-59999 based on its worker ID, eliminating port conflicts entirely.\n\n## Breaking Changes\n\nNone. This is an internal test infrastructure change with no impact on the public API or user-facing functionality.\n\n## Types of changes\n\n- [x] Bug fix (non-breaking change which fixes an issue)\n- [ ] New feature (non-breaking change which adds functionality)\n- [ ] Breaking change (fix or feature that would cause existing functionality to change)\n- [ ] Documentation update\n\n## Checklist\n\n- [x] I have read the [MCP Documentation](https://modelcontextprotocol.io)\n- [x] My code follows the repository's style guidelines\n- [x] New and existing tests pass locally\n- [x] I have added appropriate error handling\n- [x] I have added or updated documentation as needed\n\n## Additional context\n\n**Files modified:**\n- `tests/server/test_streamable_http_security.py` - Updated `server_port` fixture\n- `tests/server/test_sse_security.py` - Updated `server_port` fixture\n- `tests/shared/test_streamable_http.py` - Updated 3 port fixtures (basic, json, event server)\n- `tests/shared/test_sse.py` - Updated `server_port` fixture\n- `tests/shared/test_ws.py` - Updated `server_port` fixture\n- `tests/client/test_http_unicode.py` - Updated `unicode_server_port` fixture\n- `tests/client/test_notification_response.py` - Updated `non_sdk_server_port` fixture\n- `tests/test_test_helpers.py` - Fixed socket cleanup to prevent ResourceWarning\n\n**Implementation details:**\nAll affected fixtures now use `get_worker_specific_port(worker_id)` instead of the race-prone `socket.bind((\"127.0.0.1\", 0))` pattern. The helper function allocates worker-specific port ranges ensuring no overlap between parallel test workers.",
      "created_at": "2025-10-28T22:54:33Z",
      "updated_at": "2025-11-12T17:42:22Z",
      "closed_at": null,
      "merged_at": null,
      "merge_commit_sha": null,
      "assignee": null,
      "assignees": {},
      "requested_reviewers": {},
      "requested_teams": {},
      "labels": {
        "0": {
          "id": 7511840554,
          "node_id": "LA_kwDOM2n80s8AAAABv72XKg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/bug",
          "name": "bug",
          "color": "d73a4a",
          "default": true,
          "description": "Something isn't working"
        },
        "1": {
          "id": 9354770246,
          "node_id": "LA_kwDOM2n80s8AAAACLZZ3Rg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P2",
          "name": "P2",
          "color": "d2b457",
          "default": false,
          "description": "Moderate issues affecting some users, edge cases, potentially valuable feature"
        }
      },
      "milestone": null,
      "draft": true,
      "head": {
        "label": "modelcontextprotocol:fix-flaky-port-allocation-race-condition",
        "ref": "fix-flaky-port-allocation-race-condition",
        "sha": "a09d0b11bbc02663608178176fbd9f898235e4d0",
        "user": {
          "login": "modelcontextprotocol",
          "id": 182288589,
          "node_id": "O_kgDOCt2AzQ",
          "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/modelcontextprotocol",
          "type": "Organization",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 862584018,
          "node_id": "R_kgDOM2n80g",
          "name": "python-sdk",
          "full_name": "modelcontextprotocol/python-sdk",
          "private": false,
          "owner": {
            "login": "modelcontextprotocol",
            "id": 182288589,
            "node_id": "O_kgDOCt2AzQ",
            "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/modelcontextprotocol",
            "type": "Organization",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": false,
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk",
          "created_at": "2024-09-24T21:01:35Z",
          "updated_at": "2025-12-06T05:02:17Z",
          "pushed_at": "2025-12-04T18:04:06Z",
          "homepage": "https://modelcontextprotocol.github.io/python-sdk/",
          "size": 4194,
          "stargazers_count": 20439,
          "watchers_count": 20439,
          "language": "Python",
          "has_issues": true,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": true,
          "has_discussions": false,
          "forks_count": 2843,
          "archived": false,
          "disabled": false,
          "open_issues_count": 345,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 2843,
          "open_issues": 345,
          "watchers": 20439,
          "default_branch": "main"
        }
      },
      "base": {
        "label": "modelcontextprotocol:main",
        "ref": "main",
        "sha": "c44e68f766bb9780bd09bde8605fa7b2d1a462e9",
        "user": {
          "login": "modelcontextprotocol",
          "id": 182288589,
          "node_id": "O_kgDOCt2AzQ",
          "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/modelcontextprotocol",
          "type": "Organization",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 862584018,
          "node_id": "R_kgDOM2n80g",
          "name": "python-sdk",
          "full_name": "modelcontextprotocol/python-sdk",
          "private": false,
          "owner": {
            "login": "modelcontextprotocol",
            "id": 182288589,
            "node_id": "O_kgDOCt2AzQ",
            "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/modelcontextprotocol",
            "type": "Organization",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": false,
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk",
          "created_at": "2024-09-24T21:01:35Z",
          "updated_at": "2025-12-06T05:02:17Z",
          "pushed_at": "2025-12-04T18:04:06Z",
          "homepage": "https://modelcontextprotocol.github.io/python-sdk/",
          "size": 4194,
          "stargazers_count": 20439,
          "watchers_count": 20439,
          "language": "Python",
          "has_issues": true,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": true,
          "has_discussions": false,
          "forks_count": 2843,
          "archived": false,
          "disabled": false,
          "open_issues_count": 345,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 2843,
          "open_issues": 345,
          "watchers": 20439,
          "default_branch": "main"
        }
      },
      "_links": {
        "self": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1528"
        },
        "html": {
          "href": "https://github.com/modelcontextprotocol/python-sdk/pull/1528"
        },
        "issue": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1528"
        },
        "comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1528/comments"
        },
        "review_comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1528/comments"
        },
        "review_comment": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/comments{/number}"
        },
        "commits": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1528/commits"
        },
        "statuses": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/statuses/a09d0b11bbc02663608178176fbd9f898235e4d0"
        }
      },
      "author_association": "CONTRIBUTOR",
      "auto_merge": null,
      "active_lock_reason": null,
      "linked_issues": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1519",
      "id": 2950652435,
      "node_id": "PR_kwDOM2n80s6v32IT",
      "number": 1519,
      "state": "open",
      "locked": false,
      "title": "Enable session roaming across multiple server instances",
      "user": {
        "login": "davidroberts-merlyn",
        "id": 121063480,
        "node_id": "U_kgDOBzdIOA",
        "avatar_url": "https://avatars.githubusercontent.com/u/121063480?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/davidroberts-merlyn",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "body": "# Motivation and Context\r\n\r\n## Problem\r\n\r\nWhen deploying MCP servers across multiple instances (Kubernetes pods, Docker containers, worker processes), sessions are tied to the specific instance that created them. This requires sticky sessions at the load balancer level and prevents true horizontal scaling. Users are currently forced to choose between:\r\n\r\n1. **Sticky sessions** - Suboptimal load distribution, sessions lost on pod failure\r\n2. **Single worker** - Wastes resources, limits throughput\r\n3. **Stateless mode** - Loses session continuity and event replay\r\n\r\nThis limitation is documented in multiple issues: #520 (multi-worker sessions), #692 (session reuse across instances), #880 (horizontal scalability), and #1350 (sticky session problems).\r\n\r\n### Solution\r\n\r\nThis PR enables **session roaming** - allowing sessions to seamlessly move between server instances without requiring sticky sessions. The key insight is that **EventStore already serves as proof of session existence**.\r\n\r\nWhen a request arrives with a session ID that's not in an instance's local memory, if an EventStore is configured, the instance can safely:\r\n1. Create a transport for that session ID (session roaming)\r\n2. Let EventStore replay any missed events (continuity)\r\n3. Handle the request seamlessly\r\n\r\n#### What Changed\r\n\r\n**Modified `streamable_http_manager.py` (~50 lines):**\r\n- Added session roaming logic in `_handle_stateful_request()`\r\n- When unknown session ID + EventStore exists → create transport (roaming!)\r\n- Extracted duplicate server task code into reusable methods\r\n- Updated docstrings to document session roaming capability\r\n\r\n**Added comprehensive tests (`test_session_roaming.py`, 510 lines):**\r\n- Session roaming with EventStore\r\n- Rejection without EventStore\r\n- Concurrent request handling\r\n- Exception cleanup behavior\r\n- Fast path verification\r\n- Logging verification\r\n\r\n**Added production-ready example (`simple-streamablehttp-roaming/`, 13 files):**\r\n- Complete working example with Redis EventStore\r\n- Multi-instance deployment support\r\n- Docker Compose configuration (3 instances + Redis + NGINX)\r\n- Kubernetes deployment example\r\n- Automated test script demonstrating roaming\r\n- Comprehensive documentation (README, QUICKSTART, implementation details)\r\n\r\n### Why This Approach\r\n\r\n#### Previous Attempts\r\n\r\nEplored two other approaches before arriving at this solution:\r\n\r\n1. **Custom Session Store (outside SDK)** - Created own session validation in the application layer, but this didn't solve the core problem and required every user to implement their own solution, it also meant that as the dict that contained session in the sdk was unchanged it still required sticky sessions.\r\n\r\n2. **SessionStore ABC (in SDK)** - Added a new `SessionStore` interface requiring both `EventStore` + `SessionStore` parameters. While functional, this approach required two separate storage backends and was more complex than necessary.  It also meant that if you did not supply one of the stores it was not really stateful.\r\n\r\n#### Current Approach: EventStore-Only\r\n\r\nThe key insight: **EventStore already proves sessions existed**. If events exist for a session ID, that session must have existed to create those events. No separate SessionStore needed.\r\n\r\n**Benefits:**\r\n- ✅ One store instead of two (simpler)\r\n- ✅ Reuses existing EventStore interface (no new APIs)\r\n- ✅ Impossible to misconfigure (EventStore = both events + proof)\r\n- ✅ Aligns with SEP-1359 (sessions are conversation context, not auth)\r\n- ✅ Minimal code changes (~50 lines)\r\n- ✅ 100% backward compatible (behavior enhancement only)\r\n\r\n### Usage\r\n\r\n#### Before (Requires Sticky Sessions)\r\n```python\r\n# Without EventStore - sessions in memory only\r\nmanager = StreamableHTTPSessionManager(app=app)\r\n# Deployment: requires sticky sessions for multi-instance\r\n```\r\n\r\n#### After (No Sticky Sessions Needed)\r\n```python\r\n# With EventStore - sessions roam freely\r\nevent_store = RedisEventStore(redis_url=\"redis://redis:6379\")\r\nmanager = StreamableHTTPSessionManager(\r\n    app=app,\r\n    event_store=event_store  # Enables session roaming!\r\n)\r\n# Deployment: load balancer can route freely, no sticky sessions\r\n```\r\n\r\n### How It Works\r\n\r\n```\r\nClient → Instance 1 (creates session \"abc123\", stores events in Redis)\r\nClient → Instance 2 (with session \"abc123\")\r\n  ↓\r\nInstance 2 checks memory → not found\r\nInstance 2 sees EventStore exists\r\nInstance 2 creates transport for \"abc123\" (roaming!)\r\nEventStore replays events from Redis\r\nSession continues seamlessly ✅\r\n```\r\n\r\n## How Has This Been Tested?\r\n- ✅ Existing test suite (no regressions)\r\n- ✅ 8 new tests for session roaming\r\n- ✅ Automated roaming test script in example\r\n- ✅ Testing within our existing infrastructure\r\n\r\nThe included example also demonstrates:\r\n- Multi-instance deployment with Docker Compose\r\n- Kubernetes manifests (3 replicas, no sessionAffinity needed)\r\n- NGINX load balancing without sticky sessions\r\n- Redis EventStore for shared state\r\n- Automated testing and verification with provided test script\r\n\r\n## Breaking Changes\r\n\r\nNone. This is a pure behavior enhancement:\r\n- ✅ Existing code works unchanged\r\n- ✅ No API changes\r\n- ✅ No new required parameters\r\n- ✅ Backward compatible\r\n\r\n## Types of changes\r\n- [ ] Bug fix (non-breaking change which fixes an issue)\r\n- [x] New feature (non-breaking change which adds functionality)\r\n- [ ] Breaking change (fix or feature that would cause existing functionality to change)\r\n- [ ] Documentation update\r\n\r\n## Checklist\r\n - [x] I have read the [MCP Documentation](https://modelcontextprotocol.io/)\r\n - [x] My code follows the repository's style guidelines\r\n - [x] New and existing tests pass locally\r\n - [x] I have added appropriate error handling\r\n - [ ] I have added or updated documentation as needed\r\n\r\n## Additional context\r\n\r\n### Related Issues\r\n\r\nCloses #520, #692, #880, #1350\r\n\r\nThis implementation addresses the core limitation described in all these issues: the inability to run stateful MCP servers across multiple instances without sticky sessions.\r\n",
      "created_at": "2025-10-27T11:52:22Z",
      "updated_at": "2025-11-12T17:42:23Z",
      "closed_at": null,
      "merged_at": null,
      "merge_commit_sha": null,
      "assignee": null,
      "assignees": {},
      "requested_reviewers": {},
      "requested_teams": {},
      "labels": {},
      "milestone": null,
      "draft": true,
      "head": {
        "label": "davidroberts-merlyn:session-roaming",
        "ref": "session-roaming",
        "sha": "64d7f4e40a234ac2db01a80e8845eeb808826310",
        "user": {
          "login": "davidroberts-merlyn",
          "id": 121063480,
          "node_id": "U_kgDOBzdIOA",
          "avatar_url": "https://avatars.githubusercontent.com/u/121063480?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/davidroberts-merlyn",
          "type": "User",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 1082829116,
          "node_id": "R_kgDOQIqpPA",
          "name": "python-sdk",
          "full_name": "davidroberts-merlyn/python-sdk",
          "private": false,
          "owner": {
            "login": "davidroberts-merlyn",
            "id": 121063480,
            "node_id": "U_kgDOBzdIOA",
            "avatar_url": "https://avatars.githubusercontent.com/u/121063480?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/davidroberts-merlyn",
            "type": "User",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": true,
          "url": "https://api.github.com/repos/davidroberts-merlyn/python-sdk",
          "created_at": "2025-10-24T20:47:33Z",
          "updated_at": "2025-10-27T18:22:32Z",
          "pushed_at": "2025-10-28T15:02:00Z",
          "homepage": "https://modelcontextprotocol.github.io/python-sdk/",
          "size": 2185,
          "stargazers_count": 0,
          "watchers_count": 0,
          "language": "Python",
          "has_issues": false,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": false,
          "has_discussions": false,
          "forks_count": 0,
          "archived": false,
          "disabled": false,
          "open_issues_count": 1,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 0,
          "open_issues": 1,
          "watchers": 0,
          "default_branch": "main"
        }
      },
      "base": {
        "label": "modelcontextprotocol:main",
        "ref": "main",
        "sha": "673423da0d6511127608df3d75360e47e99cb1f1",
        "user": {
          "login": "modelcontextprotocol",
          "id": 182288589,
          "node_id": "O_kgDOCt2AzQ",
          "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/modelcontextprotocol",
          "type": "Organization",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 862584018,
          "node_id": "R_kgDOM2n80g",
          "name": "python-sdk",
          "full_name": "modelcontextprotocol/python-sdk",
          "private": false,
          "owner": {
            "login": "modelcontextprotocol",
            "id": 182288589,
            "node_id": "O_kgDOCt2AzQ",
            "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/modelcontextprotocol",
            "type": "Organization",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": false,
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk",
          "created_at": "2024-09-24T21:01:35Z",
          "updated_at": "2025-12-06T05:02:17Z",
          "pushed_at": "2025-12-04T18:04:06Z",
          "homepage": "https://modelcontextprotocol.github.io/python-sdk/",
          "size": 4194,
          "stargazers_count": 20439,
          "watchers_count": 20439,
          "language": "Python",
          "has_issues": true,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": true,
          "has_discussions": false,
          "forks_count": 2843,
          "archived": false,
          "disabled": false,
          "open_issues_count": 345,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 2843,
          "open_issues": 345,
          "watchers": 20439,
          "default_branch": "main"
        }
      },
      "_links": {
        "self": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1519"
        },
        "html": {
          "href": "https://github.com/modelcontextprotocol/python-sdk/pull/1519"
        },
        "issue": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1519"
        },
        "comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1519/comments"
        },
        "review_comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1519/comments"
        },
        "review_comment": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/comments{/number}"
        },
        "commits": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1519/commits"
        },
        "statuses": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/statuses/64d7f4e40a234ac2db01a80e8845eeb808826310"
        }
      },
      "author_association": "NONE",
      "auto_merge": null,
      "active_lock_reason": null,
      "linked_issues": [
        5,
        6,
        8,
        1,
        520
      ]
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1517",
      "id": 2949966779,
      "node_id": "PR_kwDOM2n80s6v1Ou7",
      "number": 1517,
      "state": "open",
      "locked": false,
      "title": "Add resource_owner field to AuthorizationCode and AccessToken classes",
      "user": {
        "login": "yukuanj",
        "id": 234094463,
        "node_id": "U_kgDODfP_fw",
        "avatar_url": "https://avatars.githubusercontent.com/u/234094463?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/yukuanj",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "body": "<!-- Provide a brief summary of your changes -->\r\n## Summary\r\nThis PR adds a `resource_owner` field to both `AuthorizationCode` and `AccessToken` classes, bonding the identity of the resource owner to the issued access tokens through the authorization flow.\r\n\r\n## Motivation and Context\r\n<!-- Why is this change needed? What problem does it solve? -->\r\n\r\nThis PR solves #1038 (request to add a `subject` to `AccessToken`)\r\n\r\nOAuth 2.1 §7.4 (https://datatracker.ietf.org/doc/html/draft-ietf-oauth-v2-1-14) notes that resource servers may make access control decisions based on the identity of the resource owner (for user-delegated flows) or the client (for client credentials flows). In other words, tool calls and resource fetches often need to depend on who the token is on behalf of, not just its scopes.\r\n> Resource servers may make access control decisions based on the identity of a resource owner for which an access token was issued, or based on the identity of a client in the client credentials grant.\r\n\r\nTherefore, it is likely that the behavior of calling a tool / fetching a resource needs to depend on the identity of the resource owner. \r\n\r\nThere was an initial attempt to solve this (#1165), but it has been closed for inactivity. That thread mentioned there was no JWT payload to build from; this change avoids that dependency entirely. The feature is token-format agnostic: it does not require JWTs and works equally with *opaque* tokens.\r\n\r\n## What Has Been Changed?\r\n- `AuthorizationCode` class: add `resource_owner`.\r\n- `AccessToken` class : add `resource_owner`.\r\n\r\nToken Issuance & Introspection Path (in the `simple-auth` example):\r\n- When generating an authorization code, the AS stores the corresponding resource_owner.\r\n- When exchanging the code for an access token, the AS binds the resulting token to that resource_owner.\r\n- When the RS introspects the access token, the AS includes the resource_owner in the introspection result.\r\n\r\n## How Has This Been Tested?\r\n<!-- Have you tested this in a real application? Which scenarios were tested? -->\r\nTested with the `simple-auth` example to issue codes, tokens and introspect with `resource_owner`.\r\n\r\n## Breaking Changes\r\n<!-- Will users need to update their code or configurations? -->\r\nNo breaking changes.\r\n\r\n## Types of changes\r\n<!-- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->\r\n- [ ] Bug fix (non-breaking change which fixes an issue)\r\n- [x] New feature (non-breaking change which adds functionality)\r\n- [ ] Breaking change (fix or feature that would cause existing functionality to change)\r\n- [ ] Documentation update\r\n\r\n## Checklist\r\n<!-- Go over all the following points, and put an `x` in all the boxes that apply. -->\r\n- [x] I have read the [MCP Documentation](https://modelcontextprotocol.io)\r\n- [x] My code follows the repository's style guidelines\r\n- [x] New and existing tests pass locally\r\n- [ ] I have added appropriate error handling\r\n- [ ] I have added or updated documentation as needed\r\n\r\n## Additional context\r\n<!-- Add any other context, implementation notes, or design decisions -->\r\n### Naming alternatives\r\nIssue #1038 asked for `subject`. In JWT ecosystems, subject (sub) is commonly the canonical identifier. This PR uses resource_owner to mirror OAuth terminology in user-delegated flows. If maintainers prefer `subject`, this can be trivially renamed.",
      "created_at": "2025-10-27T08:33:27Z",
      "updated_at": "2025-11-27T18:13:29Z",
      "closed_at": null,
      "merged_at": null,
      "merge_commit_sha": "44d6915a9ce8131e718379faa6e08b3bb50c3848",
      "assignee": null,
      "assignees": {},
      "requested_reviewers": {
        "0": {
          "login": "pcarleton",
          "id": 704663,
          "node_id": "MDQ6VXNlcjcwNDY2Mw==",
          "avatar_url": "https://avatars.githubusercontent.com/u/704663?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/pcarleton",
          "type": "User",
          "user_view_type": "public",
          "site_admin": false
        }
      },
      "requested_teams": {},
      "labels": {
        "0": {
          "id": 9301360597,
          "node_id": "LA_kwDOM2n80s8AAAACKmd_1Q",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/auth",
          "name": "auth",
          "color": "92ad2d",
          "default": false,
          "description": "Issues and PRs related to Authentication / OAuth"
        },
        "1": {
          "id": 9354757189,
          "node_id": "LA_kwDOM2n80s8AAAACLZZERQ",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/enhancement",
          "name": "enhancement",
          "color": "11b5cc",
          "default": true,
          "description": "Request for a new feature that's not currently supported"
        }
      },
      "milestone": null,
      "draft": false,
      "head": {
        "label": "yukuanj:main",
        "ref": "main",
        "sha": "8840ae12f2f9b48eec00f2b93d2b6129c440b8a7",
        "user": {
          "login": "yukuanj",
          "id": 234094463,
          "node_id": "U_kgDODfP_fw",
          "avatar_url": "https://avatars.githubusercontent.com/u/234094463?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/yukuanj",
          "type": "User",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 1063013224,
          "node_id": "R_kgDOP1xLaA",
          "name": "python-sdk",
          "full_name": "yukuanj/python-sdk",
          "private": false,
          "owner": {
            "login": "yukuanj",
            "id": 234094463,
            "node_id": "U_kgDODfP_fw",
            "avatar_url": "https://avatars.githubusercontent.com/u/234094463?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/yukuanj",
            "type": "User",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": true,
          "url": "https://api.github.com/repos/yukuanj/python-sdk",
          "created_at": "2025-09-24T03:46:57Z",
          "updated_at": "2025-10-30T08:56:44Z",
          "pushed_at": "2025-11-26T08:03:11Z",
          "homepage": "https://modelcontextprotocol.io",
          "size": 2471,
          "stargazers_count": 0,
          "watchers_count": 0,
          "language": "Python",
          "has_issues": false,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": false,
          "has_discussions": false,
          "forks_count": 0,
          "archived": false,
          "disabled": false,
          "open_issues_count": 0,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 0,
          "open_issues": 0,
          "watchers": 0,
          "default_branch": "main"
        }
      },
      "base": {
        "label": "modelcontextprotocol:main",
        "ref": "main",
        "sha": "8cdac3d2f8edfeef25a70abfea16b512a3243c52",
        "user": {
          "login": "modelcontextprotocol",
          "id": 182288589,
          "node_id": "O_kgDOCt2AzQ",
          "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/modelcontextprotocol",
          "type": "Organization",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 862584018,
          "node_id": "R_kgDOM2n80g",
          "name": "python-sdk",
          "full_name": "modelcontextprotocol/python-sdk",
          "private": false,
          "owner": {
            "login": "modelcontextprotocol",
            "id": 182288589,
            "node_id": "O_kgDOCt2AzQ",
            "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/modelcontextprotocol",
            "type": "Organization",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": false,
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk",
          "created_at": "2024-09-24T21:01:35Z",
          "updated_at": "2025-12-06T05:02:17Z",
          "pushed_at": "2025-12-04T18:04:06Z",
          "homepage": "https://modelcontextprotocol.github.io/python-sdk/",
          "size": 4194,
          "stargazers_count": 20439,
          "watchers_count": 20439,
          "language": "Python",
          "has_issues": true,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": true,
          "has_discussions": false,
          "forks_count": 2843,
          "archived": false,
          "disabled": false,
          "open_issues_count": 345,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 2843,
          "open_issues": 345,
          "watchers": 20439,
          "default_branch": "main"
        }
      },
      "_links": {
        "self": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1517"
        },
        "html": {
          "href": "https://github.com/modelcontextprotocol/python-sdk/pull/1517"
        },
        "issue": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1517"
        },
        "comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1517/comments"
        },
        "review_comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1517/comments"
        },
        "review_comment": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/comments{/number}"
        },
        "commits": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1517/commits"
        },
        "statuses": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/statuses/8840ae12f2f9b48eec00f2b93d2b6129c440b8a7"
        }
      },
      "author_association": "CONTRIBUTOR",
      "auto_merge": null,
      "active_lock_reason": null,
      "linked_issues": [
        1
      ]
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1516",
      "id": 2948833825,
      "node_id": "PR_kwDOM2n80s6vw6Ih",
      "number": 1516,
      "state": "open",
      "locked": false,
      "title": "docs(instructions): ",
      "user": {
        "login": "stvnksslr",
        "id": 9701252,
        "node_id": "MDQ6VXNlcjk3MDEyNTI=",
        "avatar_url": "https://avatars.githubusercontent.com/u/9701252?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/stvnksslr",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "body": "<!-- Provide a brief summary of your changes -->\r\ncontributes examples to some of the questions in issue #1464, main contribution is starting the ball rolling with some simple docs and use cases for instructions that are inline with existing documentation\r\n\r\n## Motivation and Context\r\nCurrently there are not examples are test for this\r\n\r\n## How Has This Been Tested?\r\nDocumentation changes mainly but the example code stub was tested.\r\n\r\n## Breaking Changes\r\nno\r\n\r\n## Types of changes\r\n- [ ] Bug fix (non-breaking change which fixes an issue)\r\n- [ ] New feature (non-breaking change which adds functionality)\r\n- [ ] Breaking change (fix or feature that would cause existing functionality to change)\r\n- [x] Documentation update\r\n\r\n## Checklist\r\n- [x] I have read the [MCP Documentation](https://modelcontextprotocol.io)\r\n- [x] My code follows the repository's style guidelines\r\n- [x] New and existing tests pass locally\r\n- [ ] I have added appropriate error handling\r\n- [x] I have added or updated documentation as needed\r\n\r\n## Additional context\r\nHappy to make any changes to the examples or wording structure as they are fairly simple",
      "created_at": "2025-10-26T19:14:34Z",
      "updated_at": "2025-11-04T19:27:07Z",
      "closed_at": null,
      "merged_at": null,
      "merge_commit_sha": "d077ae234f81137b67f97fa1ace06e76c2d1c7c1",
      "assignee": null,
      "assignees": {},
      "requested_reviewers": {
        "0": {
          "login": "maxisbey",
          "id": 224885523,
          "node_id": "U_kgDODWd7Ew",
          "avatar_url": "https://avatars.githubusercontent.com/u/224885523?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/maxisbey",
          "type": "User",
          "user_view_type": "public",
          "site_admin": false
        }
      },
      "requested_teams": {},
      "labels": {
        "0": {
          "id": 7511840560,
          "node_id": "LA_kwDOM2n80s8AAAABv72XMA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/documentation",
          "name": "documentation",
          "color": "0075ca",
          "default": true,
          "description": "Improvements or additions to documentation"
        },
        "1": {
          "id": 9354772110,
          "node_id": "LA_kwDOM2n80s8AAAACLZZ-jg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P3",
          "name": "P3",
          "color": "c7df49",
          "default": false,
          "description": "Nice to haves, rare edge cases"
        }
      },
      "milestone": null,
      "draft": false,
      "head": {
        "label": "stvnksslr:feat/instructions-docs",
        "ref": "feat/instructions-docs",
        "sha": "fee2fd10ec5dfa8c6adb6fd99f6a81503fc827a9",
        "user": {
          "login": "stvnksslr",
          "id": 9701252,
          "node_id": "MDQ6VXNlcjk3MDEyNTI=",
          "avatar_url": "https://avatars.githubusercontent.com/u/9701252?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/stvnksslr",
          "type": "User",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 1083701288,
          "node_id": "R_kgDOQJf4KA",
          "name": "python-sdk",
          "full_name": "stvnksslr/python-sdk",
          "private": false,
          "owner": {
            "login": "stvnksslr",
            "id": 9701252,
            "node_id": "MDQ6VXNlcjk3MDEyNTI=",
            "avatar_url": "https://avatars.githubusercontent.com/u/9701252?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/stvnksslr",
            "type": "User",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": true,
          "url": "https://api.github.com/repos/stvnksslr/python-sdk",
          "created_at": "2025-10-26T14:57:07Z",
          "updated_at": "2025-10-26T14:57:07Z",
          "pushed_at": "2025-11-04T14:52:07Z",
          "homepage": "https://modelcontextprotocol.github.io/python-sdk/",
          "size": 2169,
          "stargazers_count": 0,
          "watchers_count": 0,
          "language": null,
          "has_issues": false,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": false,
          "has_discussions": false,
          "forks_count": 0,
          "archived": false,
          "disabled": false,
          "open_issues_count": 0,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 0,
          "open_issues": 0,
          "watchers": 0,
          "default_branch": "main"
        }
      },
      "base": {
        "label": "modelcontextprotocol:main",
        "ref": "main",
        "sha": "202af49857e452cdb8b55aa23310df8154e5b292",
        "user": {
          "login": "modelcontextprotocol",
          "id": 182288589,
          "node_id": "O_kgDOCt2AzQ",
          "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/modelcontextprotocol",
          "type": "Organization",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 862584018,
          "node_id": "R_kgDOM2n80g",
          "name": "python-sdk",
          "full_name": "modelcontextprotocol/python-sdk",
          "private": false,
          "owner": {
            "login": "modelcontextprotocol",
            "id": 182288589,
            "node_id": "O_kgDOCt2AzQ",
            "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/modelcontextprotocol",
            "type": "Organization",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": false,
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk",
          "created_at": "2024-09-24T21:01:35Z",
          "updated_at": "2025-12-06T05:02:17Z",
          "pushed_at": "2025-12-04T18:04:06Z",
          "homepage": "https://modelcontextprotocol.github.io/python-sdk/",
          "size": 4194,
          "stargazers_count": 20439,
          "watchers_count": 20439,
          "language": "Python",
          "has_issues": true,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": true,
          "has_discussions": false,
          "forks_count": 2843,
          "archived": false,
          "disabled": false,
          "open_issues_count": 345,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 2843,
          "open_issues": 345,
          "watchers": 20439,
          "default_branch": "main"
        }
      },
      "_links": {
        "self": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1516"
        },
        "html": {
          "href": "https://github.com/modelcontextprotocol/python-sdk/pull/1516"
        },
        "issue": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1516"
        },
        "comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1516/comments"
        },
        "review_comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1516/comments"
        },
        "review_comment": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/comments{/number}"
        },
        "commits": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1516/commits"
        },
        "statuses": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/statuses/fee2fd10ec5dfa8c6adb6fd99f6a81503fc827a9"
        }
      },
      "author_association": "NONE",
      "auto_merge": null,
      "active_lock_reason": null,
      "linked_issues": [
        1
      ]
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1515",
      "id": 2948315735,
      "node_id": "PR_kwDOM2n80s6vu7pX",
      "number": 1515,
      "state": "open",
      "locked": false,
      "title": "feat: add per-request HTTP headers support for client session methods",
      "user": {
        "login": "damianoneill",
        "id": 15426674,
        "node_id": "MDQ6VXNlcjE1NDI2Njc0",
        "avatar_url": "https://avatars.githubusercontent.com/u/15426674?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/damianoneill",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "body": "Implements per-request headers functionality to enable various use cases such as multi-tenant authentication, request tracing, A/B testing, and debugging while maintaining a single persistent connection.\r\n\r\nChanges:\r\n- Add extra_headers parameter to ClientSession.call_tool()\r\n- Extend ClientMessageMetadata to support extra_headers\r\n- Update StreamableHTTPTransport to merge per-request headers\r\n- Add tests\r\n- Include usage examples and documentation\r\n- Maintain full backward compatibility\r\n\r\nThis addresses GitHub issues modelcontextprotocol/python-sdk#1509 and supports multi-tenant scenarios where different requests require different authentication tokens or contextual headers.\r\n\r\nFuture work (**as part of this PR**) will extend extra_headers support to other ClientSession methods (get_prompt, read_resource, etc.) based on maintainer feedback.\r\n\r\n## Motivation and Context\r\nDisscussed in issue #1509 \r\n\r\n## How Has This Been Tested?\r\nUTs, commit provided for review, is approach is agreed will proceed with extensive real world testing before finalising this PR.\r\n\r\n## Breaking Changes\r\nN/A\r\n\r\n## Types of changes\r\n<!-- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->\r\n- [ ] Bug fix (non-breaking change which fixes an issue)\r\n- [x] New feature (non-breaking change which adds functionality)\r\n- [ ] Breaking change (fix or feature that would cause existing functionality to change)\r\n- [ ] Documentation update\r\n\r\n## Checklist\r\n<!-- Go over all the following points, and put an `x` in all the boxes that apply. -->\r\n- [x] I have read the [MCP Documentation](https://modelcontextprotocol.io)\r\n- [x] My code follows the repository's style guidelines\r\n- [x] New and existing tests pass locally\r\n- [x] I have added appropriate error handling\r\n- [x] I have added or updated documentation as needed\r\n\r\n## Additional context\r\n<!-- Add any other context, implementation notes, or design decisions -->\r\n",
      "created_at": "2025-10-26T10:22:33Z",
      "updated_at": "2025-11-29T19:53:01Z",
      "closed_at": null,
      "merged_at": null,
      "merge_commit_sha": "fec13df7978ddc601df1c5300fb90f97ab955366",
      "assignee": null,
      "assignees": {},
      "requested_reviewers": {},
      "requested_teams": {},
      "labels": {},
      "milestone": null,
      "draft": false,
      "head": {
        "label": "damianoneill:feature/per-request-headers",
        "ref": "feature/per-request-headers",
        "sha": "c17841e76752bfa989c7e22a304cf6125204bdc9",
        "user": {
          "login": "damianoneill",
          "id": 15426674,
          "node_id": "MDQ6VXNlcjE1NDI2Njc0",
          "avatar_url": "https://avatars.githubusercontent.com/u/15426674?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/damianoneill",
          "type": "User",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 1083566601,
          "node_id": "R_kgDOQJXqCQ",
          "name": "python-sdk",
          "full_name": "damianoneill/python-sdk",
          "private": false,
          "owner": {
            "login": "damianoneill",
            "id": 15426674,
            "node_id": "MDQ6VXNlcjE1NDI2Njc0",
            "avatar_url": "https://avatars.githubusercontent.com/u/15426674?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/damianoneill",
            "type": "User",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": true,
          "url": "https://api.github.com/repos/damianoneill/python-sdk",
          "created_at": "2025-10-26T09:40:01Z",
          "updated_at": "2025-11-29T18:00:27Z",
          "pushed_at": "2025-11-29T19:09:49Z",
          "homepage": "https://modelcontextprotocol.github.io/python-sdk/",
          "size": 2560,
          "stargazers_count": 0,
          "watchers_count": 0,
          "language": "Python",
          "has_issues": false,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": false,
          "has_discussions": false,
          "forks_count": 0,
          "archived": false,
          "disabled": false,
          "open_issues_count": 0,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 0,
          "open_issues": 0,
          "watchers": 0,
          "default_branch": "main"
        }
      },
      "base": {
        "label": "modelcontextprotocol:main",
        "ref": "main",
        "sha": "c92bb2f7ffaa61813d7cc350887f4ece38307769",
        "user": {
          "login": "modelcontextprotocol",
          "id": 182288589,
          "node_id": "O_kgDOCt2AzQ",
          "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/modelcontextprotocol",
          "type": "Organization",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 862584018,
          "node_id": "R_kgDOM2n80g",
          "name": "python-sdk",
          "full_name": "modelcontextprotocol/python-sdk",
          "private": false,
          "owner": {
            "login": "modelcontextprotocol",
            "id": 182288589,
            "node_id": "O_kgDOCt2AzQ",
            "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/modelcontextprotocol",
            "type": "Organization",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": false,
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk",
          "created_at": "2024-09-24T21:01:35Z",
          "updated_at": "2025-12-06T05:02:17Z",
          "pushed_at": "2025-12-04T18:04:06Z",
          "homepage": "https://modelcontextprotocol.github.io/python-sdk/",
          "size": 4194,
          "stargazers_count": 20439,
          "watchers_count": 20439,
          "language": "Python",
          "has_issues": true,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": true,
          "has_discussions": false,
          "forks_count": 2843,
          "archived": false,
          "disabled": false,
          "open_issues_count": 345,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 2843,
          "open_issues": 345,
          "watchers": 20439,
          "default_branch": "main"
        }
      },
      "_links": {
        "self": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1515"
        },
        "html": {
          "href": "https://github.com/modelcontextprotocol/python-sdk/pull/1515"
        },
        "issue": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1515"
        },
        "comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1515/comments"
        },
        "review_comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1515/comments"
        },
        "review_comment": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/comments{/number}"
        },
        "commits": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1515/commits"
        },
        "statuses": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/statuses/c17841e76752bfa989c7e22a304cf6125204bdc9"
        }
      },
      "author_association": "NONE",
      "auto_merge": null,
      "active_lock_reason": null,
      "linked_issues": [
        1
      ]
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1511",
      "id": 2944067800,
      "node_id": "PR_kwDOM2n80s6veujY",
      "number": 1511,
      "state": "open",
      "locked": false,
      "title": "Url encoded token response",
      "user": {
        "login": "sebastian-velten",
        "id": 157357540,
        "node_id": "U_kgDOCWEV5A",
        "avatar_url": "https://avatars.githubusercontent.com/u/157357540?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/sebastian-velten",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "body": "<!-- Provide a brief summary of your changes -->\r\nParsing the token response now depends on the received Content-Type.\r\nThis allows the MCP Client to deal with a application/x-www-form-urlencoded token response.\r\n\r\n## Motivation and Context\r\n<!-- Why is this change needed? What problem does it solve? -->\r\nI played around with some example OAuth secured MCP servers and I noticed, that not all authorization servers are willing to return the token response as **application/json**, for instance the [Github MCP Server](https://github.com/github/github-mcp-server) auth server. As a a consequence the auth flow crashed at this point, because the response could not be parsed as OAuthToken from JSON.\r\n\r\n## How Has This Been Tested?\r\n<!-- Have you tested this in a real application? Which scenarios were tested? -->\r\nI ran an MCP Client (also built with this Python SDK) and tried to connect to OAuth secured MCP Servers.\r\nWhen I tested the [Github MCP Server](https://github.com/github/github-mcp-server), I was unhappy to see the auth flow crashes. With my suggested code changes, I tested again and authorization went fine this time.\r\n\r\n## Breaking Changes\r\n<!-- Will users need to update their code or configurations? -->\r\nNo code or configurations need to be updated.\r\n\r\n## Types of changes\r\n<!-- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->\r\n- [ ] Bug fix (non-breaking change which fixes an issue)\r\n- [x] New feature (non-breaking change which adds functionality)\r\n- [ ] Breaking change (fix or feature that would cause existing functionality to change)\r\n- [ ] Documentation update\r\n\r\n## Checklist\r\n<!-- Go over all the following points, and put an `x` in all the boxes that apply. -->\r\n- [x] I have read the [MCP Documentation](https://modelcontextprotocol.io)\r\n- [x] My code follows the repository's style guidelines\r\n- [x] New and existing tests pass locally\r\n- [x] I have added appropriate error handling\r\n- [x] I have added or updated documentation as needed\r\n\r\n## Additional context\r\n<!-- Add any other context, implementation notes, or design decisions -->\r\n",
      "created_at": "2025-10-24T10:37:34Z",
      "updated_at": "2025-10-24T19:55:09Z",
      "closed_at": null,
      "merged_at": null,
      "merge_commit_sha": null,
      "assignee": null,
      "assignees": {},
      "requested_reviewers": {
        "0": {
          "login": "pcarleton",
          "id": 704663,
          "node_id": "MDQ6VXNlcjcwNDY2Mw==",
          "avatar_url": "https://avatars.githubusercontent.com/u/704663?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/pcarleton",
          "type": "User",
          "user_view_type": "public",
          "site_admin": false
        }
      },
      "requested_teams": {},
      "labels": {
        "0": {
          "id": 9301360597,
          "node_id": "LA_kwDOM2n80s8AAAACKmd_1Q",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/auth",
          "name": "auth",
          "color": "92ad2d",
          "default": false,
          "description": "Issues and PRs related to Authentication / OAuth"
        }
      },
      "milestone": null,
      "draft": false,
      "head": {
        "label": "sebastian-velten:url-encoded-token-response",
        "ref": "url-encoded-token-response",
        "sha": "71f7e39b1b78779fec4e0b6eb1c0a7b308d4dd9f",
        "user": {
          "login": "sebastian-velten",
          "id": 157357540,
          "node_id": "U_kgDOCWEV5A",
          "avatar_url": "https://avatars.githubusercontent.com/u/157357540?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/sebastian-velten",
          "type": "User",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 1082480215,
          "node_id": "R_kgDOQIVWVw",
          "name": "python-sdk",
          "full_name": "sebastian-velten/python-sdk",
          "private": false,
          "owner": {
            "login": "sebastian-velten",
            "id": 157357540,
            "node_id": "U_kgDOCWEV5A",
            "avatar_url": "https://avatars.githubusercontent.com/u/157357540?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/sebastian-velten",
            "type": "User",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": true,
          "url": "https://api.github.com/repos/sebastian-velten/python-sdk",
          "created_at": "2025-10-24T09:54:55Z",
          "updated_at": "2025-10-24T10:54:06Z",
          "pushed_at": "2025-10-24T10:44:17Z",
          "homepage": "https://modelcontextprotocol.github.io/python-sdk/",
          "size": 2136,
          "stargazers_count": 1,
          "watchers_count": 1,
          "language": null,
          "has_issues": false,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": false,
          "has_discussions": false,
          "forks_count": 0,
          "archived": false,
          "disabled": false,
          "open_issues_count": 0,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 0,
          "open_issues": 0,
          "watchers": 1,
          "default_branch": "main"
        }
      },
      "base": {
        "label": "modelcontextprotocol:main",
        "ref": "main",
        "sha": "6c26d087df3406c7da1f85b8ae3c3caeabf7b002",
        "user": {
          "login": "modelcontextprotocol",
          "id": 182288589,
          "node_id": "O_kgDOCt2AzQ",
          "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/modelcontextprotocol",
          "type": "Organization",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 862584018,
          "node_id": "R_kgDOM2n80g",
          "name": "python-sdk",
          "full_name": "modelcontextprotocol/python-sdk",
          "private": false,
          "owner": {
            "login": "modelcontextprotocol",
            "id": 182288589,
            "node_id": "O_kgDOCt2AzQ",
            "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/modelcontextprotocol",
            "type": "Organization",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": false,
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk",
          "created_at": "2024-09-24T21:01:35Z",
          "updated_at": "2025-12-06T05:02:17Z",
          "pushed_at": "2025-12-04T18:04:06Z",
          "homepage": "https://modelcontextprotocol.github.io/python-sdk/",
          "size": 4194,
          "stargazers_count": 20439,
          "watchers_count": 20439,
          "language": "Python",
          "has_issues": true,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": true,
          "has_discussions": false,
          "forks_count": 2843,
          "archived": false,
          "disabled": false,
          "open_issues_count": 345,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 2843,
          "open_issues": 345,
          "watchers": 20439,
          "default_branch": "main"
        }
      },
      "_links": {
        "self": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1511"
        },
        "html": {
          "href": "https://github.com/modelcontextprotocol/python-sdk/pull/1511"
        },
        "issue": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1511"
        },
        "comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1511/comments"
        },
        "review_comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1511/comments"
        },
        "review_comment": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/comments{/number}"
        },
        "commits": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1511/commits"
        },
        "statuses": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/statuses/71f7e39b1b78779fec4e0b6eb1c0a7b308d4dd9f"
        }
      },
      "author_association": "NONE",
      "auto_merge": null,
      "active_lock_reason": null,
      "linked_issues": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1506",
      "id": 2936873017,
      "node_id": "PR_kwDOM2n80s6vDSA5",
      "number": 1506,
      "state": "open",
      "locked": false,
      "title": "fix:streamablehttp_client to raise McpError when receiving unexpected content types instead of just printing error messages.#1382",
      "user": {
        "login": "Wyn1996",
        "id": 39845300,
        "node_id": "MDQ6VXNlcjM5ODQ1MzAw",
        "avatar_url": "https://avatars.githubusercontent.com/u/39845300?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/Wyn1996",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "body": "<!-- Provide a brief summary of your changes -->\r\nFix streamablehttp_client to raise McpError when receiving unexpected content types instead of just printing error messages.#1382\r\nhttps://github.com/modelcontextprotocol/python-sdk/issues/1382\r\n## Motivation and Context\r\n<!-- Why is this change needed? What problem does it solve? -->\r\nPreviously, when connecting to a server that doesn't respond with the expected MCP JSON stream (e.g., HTML error pages, misconfigured endpoints), the streamablehttp_client would only print an \"Unexpected content type\" error message without raising an exception. This made it difficult for applications to handle cases where the server is not reachable or not serving MCP correctly, as no exception was raised for proper error handling.\r\n## How Has This Been Tested?\r\n<!-- Have you tested this in a real application? Which scenarios were tested? -->\r\nAdded a comprehensive test case test_client_unexpected_content_type_raises_mcp_error that simulates a server returning HTML content\r\nVerified that the client now properly raises McpError wrapped in ExceptionGroup when encountering unexpected content types\r\nAll existing tests continue to pass\r\nLinting and formatting checks pass\r\n## Breaking Changes\r\n<!-- Will users need to update their code or configurations? -->\r\nThis is a breaking change for applications that were relying on the previous behavior where no exception was raised for unexpected content types. Applications will now need to handle McpError exceptions when connecting to non-MCP servers.\r\n## Types of changes\r\n<!-- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->\r\n- [x] Bug fix (non-breaking change which fixes an issue)\r\n- [ ] New feature (non-breaking change which adds functionality)\r\n- [x] Breaking change (fix or feature that would cause existing functionality to change)\r\n- [ ] Documentation update\r\n\r\n## Checklist\r\n<!-- Go over all the following points, and put an `x` in all the boxes that apply. -->\r\n- [x] I have read the [MCP Documentation](https://modelcontextprotocol.io)\r\n- [x] My code follows the repository's style guidelines\r\n- [x] New and existing tests pass locally\r\n- [x] I have added appropriate error handling\r\n- [x] I have added or updated documentation as needed\r\n\r\n## Additional context\r\n<!-- Add any other context, implementation notes, or design decisions -->\r\nTechnical Implementation:\r\nModified _handle_unexpected_content_type method in src/mcp/client/streamable_http.py to construct and send a JSONRPCError with error code 32600\r\nThe error is properly associated with the originating request ID when available\r\nAdded proper ExceptionGroup import with fallback for Python version compatibility\r\nThe fix ensures that ClientSession.initialize() can catch and handle these errors appropriately\r\nTest Coverage:\r\nCreated a realistic test scenario using a Starlette server that returns HTML instead of MCP JSON\r\nTest verifies that the client raises McpError containing the unexpected content type information\r\nHandles the nested ExceptionGroup structure that occurs due to anyio's task group error handling\r\nError Handling:\r\nWhen a request ID is available, sends a proper JSON-RPC error response\r\nWhen no request ID is available, sends a generic ValueError\r\nMaintains backward compatibility for the error message format while adding proper exception handling",
      "created_at": "2025-10-22T11:49:44Z",
      "updated_at": "2025-10-23T04:38:18Z",
      "closed_at": null,
      "merged_at": null,
      "merge_commit_sha": null,
      "assignee": null,
      "assignees": {},
      "requested_reviewers": {},
      "requested_teams": {},
      "labels": {
        "0": {
          "id": 7511840554,
          "node_id": "LA_kwDOM2n80s8AAAABv72XKg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/bug",
          "name": "bug",
          "color": "d73a4a",
          "default": true,
          "description": "Something isn't working"
        },
        "1": {
          "id": 9287728201,
          "node_id": "LA_kwDOM2n80s8AAAACKZd8SQ",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/needs%20maintainer%20action",
          "name": "needs maintainer action",
          "color": "d33428",
          "default": false,
          "description": "Potentially serious issue - needs proactive fix and maintainer attention"
        }
      },
      "milestone": null,
      "draft": false,
      "head": {
        "label": "Wyn1996:feat/wyn",
        "ref": "feat/wyn",
        "sha": "a4c28096563f996d0694413f517efc2f59472d8e",
        "user": {
          "login": "Wyn1996",
          "id": 39845300,
          "node_id": "MDQ6VXNlcjM5ODQ1MzAw",
          "avatar_url": "https://avatars.githubusercontent.com/u/39845300?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/Wyn1996",
          "type": "User",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 1079840302,
          "node_id": "R_kgDOQF0OLg",
          "name": "python-sdk",
          "full_name": "Wyn1996/python-sdk",
          "private": false,
          "owner": {
            "login": "Wyn1996",
            "id": 39845300,
            "node_id": "MDQ6VXNlcjM5ODQ1MzAw",
            "avatar_url": "https://avatars.githubusercontent.com/u/39845300?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/Wyn1996",
            "type": "User",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": true,
          "url": "https://api.github.com/repos/Wyn1996/python-sdk",
          "created_at": "2025-10-20T13:18:51Z",
          "updated_at": "2025-10-26T04:29:18Z",
          "pushed_at": "2025-10-26T04:29:13Z",
          "homepage": "https://modelcontextprotocol.github.io/python-sdk/",
          "size": 3505,
          "stargazers_count": 0,
          "watchers_count": 0,
          "language": "Python",
          "has_issues": false,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": false,
          "has_discussions": false,
          "forks_count": 0,
          "archived": false,
          "disabled": false,
          "open_issues_count": 0,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 0,
          "open_issues": 0,
          "watchers": 0,
          "default_branch": "main"
        }
      },
      "base": {
        "label": "modelcontextprotocol:main",
        "ref": "main",
        "sha": "1200ba0082e05daf81ff77f36d24afb5b1b2a424",
        "user": {
          "login": "modelcontextprotocol",
          "id": 182288589,
          "node_id": "O_kgDOCt2AzQ",
          "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/modelcontextprotocol",
          "type": "Organization",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 862584018,
          "node_id": "R_kgDOM2n80g",
          "name": "python-sdk",
          "full_name": "modelcontextprotocol/python-sdk",
          "private": false,
          "owner": {
            "login": "modelcontextprotocol",
            "id": 182288589,
            "node_id": "O_kgDOCt2AzQ",
            "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/modelcontextprotocol",
            "type": "Organization",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": false,
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk",
          "created_at": "2024-09-24T21:01:35Z",
          "updated_at": "2025-12-06T05:02:17Z",
          "pushed_at": "2025-12-04T18:04:06Z",
          "homepage": "https://modelcontextprotocol.github.io/python-sdk/",
          "size": 4194,
          "stargazers_count": 20439,
          "watchers_count": 20439,
          "language": "Python",
          "has_issues": true,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": true,
          "has_discussions": false,
          "forks_count": 2843,
          "archived": false,
          "disabled": false,
          "open_issues_count": 345,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 2843,
          "open_issues": 345,
          "watchers": 20439,
          "default_branch": "main"
        }
      },
      "_links": {
        "self": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1506"
        },
        "html": {
          "href": "https://github.com/modelcontextprotocol/python-sdk/pull/1506"
        },
        "issue": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1506"
        },
        "comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1506/comments"
        },
        "review_comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1506/comments"
        },
        "review_comment": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/comments{/number}"
        },
        "commits": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1506/commits"
        },
        "statuses": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/statuses/a4c28096563f996d0694413f517efc2f59472d8e"
        }
      },
      "author_association": "NONE",
      "auto_merge": null,
      "active_lock_reason": null,
      "linked_issues": [
        1
      ]
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1503",
      "id": 2934525667,
      "node_id": "PR_kwDOM2n80s6u6U7j",
      "number": 1503,
      "state": "open",
      "locked": false,
      "title": "fix: accept HTTP 201 status code in token exchange",
      "user": {
        "login": "jnjpng",
        "id": 13899997,
        "node_id": "MDQ6VXNlcjEzODk5OTk3",
        "avatar_url": "https://avatars.githubusercontent.com/u/13899997?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/jnjpng",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "body": "<!-- Provide a brief summary of your changes -->\r\nAccept HTTP 201 status code in addition to 200 for successful OAuth token exchanges.\r\n## Motivation and Context\r\n\r\n<!-- Why is this change needed? What problem does it solve? -->\r\nFixes #1502, some OAuth servers (like Supabase) return 201 Created instead of 200 OK for successful token exchanges. The OAuth 2.0 spec doesn't mandate a specific success status code, so we should accept both 200 and 201.\r\n\r\n## How Has This Been Tested?\r\n<!-- Have you tested this in a real application? Which scenarios were tested? -->\r\nTested locally against remote MCP servers that return this status code, and ran the tests specified in the contribution guide.\r\n<img width=\"1054\" height=\"562\" alt=\"image\" src=\"https://github.com/user-attachments/assets/b4f42abb-24f9-44cb-9953-2801e39441bf\" />\r\n\r\n## Breaking Changes\r\n<!-- Will users need to update their code or configurations? -->\r\nNo.\r\n\r\n## Types of changes\r\n<!-- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->\r\n- [x] Bug fix (non-breaking change which fixes an issue)\r\n- [ ] New feature (non-breaking change which adds functionality)\r\n- [ ] Breaking change (fix or feature that would cause existing functionality to change)\r\n- [ ] Documentation update\r\n\r\n## Checklist\r\n<!-- Go over all the following points, and put an `x` in all the boxes that apply. -->\r\n- [x] I have read the [MCP Documentation](https://modelcontextprotocol.io)\r\n- [x] My code follows the repository's style guidelines\r\n- [x] New and existing tests pass locally\r\n- [x] I have added appropriate error handling\r\n- [ ] I have added or updated documentation as needed\r\n\r\n## Additional context\r\n<!-- Add any other context, implementation notes, or design decisions -->\r\n",
      "created_at": "2025-10-21T19:05:45Z",
      "updated_at": "2025-11-12T18:28:56Z",
      "closed_at": null,
      "merged_at": null,
      "merge_commit_sha": null,
      "assignee": null,
      "assignees": {},
      "requested_reviewers": {
        "0": {
          "login": "pcarleton",
          "id": 704663,
          "node_id": "MDQ6VXNlcjcwNDY2Mw==",
          "avatar_url": "https://avatars.githubusercontent.com/u/704663?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/pcarleton",
          "type": "User",
          "user_view_type": "public",
          "site_admin": false
        }
      },
      "requested_teams": {},
      "labels": {
        "0": {
          "id": 9230425628,
          "node_id": "LA_kwDOM2n80s8AAAACJi0eHA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/needs%20more%20work",
          "name": "needs more work",
          "color": "af3f39",
          "default": false,
          "description": "Not ready to be merged yet, needs additional follow-up from the author(s)."
        },
        "1": {
          "id": 9301360597,
          "node_id": "LA_kwDOM2n80s8AAAACKmd_1Q",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/auth",
          "name": "auth",
          "color": "92ad2d",
          "default": false,
          "description": "Issues and PRs related to Authentication / OAuth"
        },
        "2": {
          "id": 9354757189,
          "node_id": "LA_kwDOM2n80s8AAAACLZZERQ",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/enhancement",
          "name": "enhancement",
          "color": "11b5cc",
          "default": true,
          "description": "Request for a new feature that's not currently supported"
        }
      },
      "milestone": null,
      "draft": false,
      "head": {
        "label": "jnjpng:fix-oauth-token-status-codes",
        "ref": "fix-oauth-token-status-codes",
        "sha": "d2ed7e42ef03e871465e10131332da1fd600161c",
        "user": {
          "login": "jnjpng",
          "id": 13899997,
          "node_id": "MDQ6VXNlcjEzODk5OTk3",
          "avatar_url": "https://avatars.githubusercontent.com/u/13899997?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/jnjpng",
          "type": "User",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 1080713907,
          "node_id": "R_kgDOQGpisw",
          "name": "python-sdk",
          "full_name": "jnjpng/python-sdk",
          "private": false,
          "owner": {
            "login": "jnjpng",
            "id": 13899997,
            "node_id": "MDQ6VXNlcjEzODk5OTk3",
            "avatar_url": "https://avatars.githubusercontent.com/u/13899997?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/jnjpng",
            "type": "User",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": true,
          "url": "https://api.github.com/repos/jnjpng/python-sdk",
          "created_at": "2025-10-21T19:01:53Z",
          "updated_at": "2025-11-03T21:53:57Z",
          "pushed_at": "2025-11-03T22:20:32Z",
          "homepage": "https://modelcontextprotocol.github.io/python-sdk/",
          "size": 2162,
          "stargazers_count": 0,
          "watchers_count": 0,
          "language": "Python",
          "has_issues": false,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": false,
          "has_discussions": false,
          "forks_count": 0,
          "archived": false,
          "disabled": false,
          "open_issues_count": 0,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 0,
          "open_issues": 0,
          "watchers": 0,
          "default_branch": "main"
        }
      },
      "base": {
        "label": "modelcontextprotocol:main",
        "ref": "main",
        "sha": "3a9f118e348466f284f16517a3d57f7951b4e6ef",
        "user": {
          "login": "modelcontextprotocol",
          "id": 182288589,
          "node_id": "O_kgDOCt2AzQ",
          "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/modelcontextprotocol",
          "type": "Organization",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 862584018,
          "node_id": "R_kgDOM2n80g",
          "name": "python-sdk",
          "full_name": "modelcontextprotocol/python-sdk",
          "private": false,
          "owner": {
            "login": "modelcontextprotocol",
            "id": 182288589,
            "node_id": "O_kgDOCt2AzQ",
            "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/modelcontextprotocol",
            "type": "Organization",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": false,
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk",
          "created_at": "2024-09-24T21:01:35Z",
          "updated_at": "2025-12-06T05:02:17Z",
          "pushed_at": "2025-12-04T18:04:06Z",
          "homepage": "https://modelcontextprotocol.github.io/python-sdk/",
          "size": 4194,
          "stargazers_count": 20439,
          "watchers_count": 20439,
          "language": "Python",
          "has_issues": true,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": true,
          "has_discussions": false,
          "forks_count": 2843,
          "archived": false,
          "disabled": false,
          "open_issues_count": 345,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 2843,
          "open_issues": 345,
          "watchers": 20439,
          "default_branch": "main"
        }
      },
      "_links": {
        "self": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1503"
        },
        "html": {
          "href": "https://github.com/modelcontextprotocol/python-sdk/pull/1503"
        },
        "issue": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1503"
        },
        "comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1503/comments"
        },
        "review_comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1503/comments"
        },
        "review_comment": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/comments{/number}"
        },
        "commits": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1503/commits"
        },
        "statuses": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/statuses/d2ed7e42ef03e871465e10131332da1fd600161c"
        }
      },
      "author_association": "NONE",
      "auto_merge": null,
      "active_lock_reason": null,
      "linked_issues": [
        1,
        1502
      ]
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1494",
      "id": 2926185287,
      "node_id": "PR_kwDOM2n80s6uagtH",
      "number": 1494,
      "state": "open",
      "locked": false,
      "title": "Fix: Add missing lifespan parameter to StreamableHTTP mounting examples",
      "user": {
        "login": "ranjitodedra",
        "id": 78635944,
        "node_id": "MDQ6VXNlcjc4NjM1OTQ0",
        "avatar_url": "https://avatars.githubusercontent.com/u/78635944?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/ranjitodedra",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "body": "Fixes #1484\r\n<!-- Provide a brief summary of your changes -->\r\nFixes the RuntimeError that occurs when mounting StreamableHTTP servers to existing ASGI applications. The error \"Task group is not initialized. Make sure to use run()\" was caused by missing session manager initialization.\r\n\r\n## Motivation and Context\r\n<!-- Why is this change needed? What problem does it solve? -->\r\n`RuntimeError: Task group is not initialized. Make sure to use run().` when trying to mount StreamableHTTP servers to existing ASGI applications (like Starlette). This was caused by missing session manager initialization. The documentation examples were incomplete and didn't show the required `lifespan` parameter needed to properly initialize the session manager.\r\n\r\n## How Has This Been Tested?\r\n<!-- Have you tested this in a real application? Which scenarios were tested? -->\r\n- ✅ Tested all 4 mounting examples individually\r\n- ✅ Verified HTTP 200 responses instead of RuntimeError\r\n- ✅ Tested with PowerShell Invoke-WebRequest on Windows\r\n\r\n## Breaking Changes\r\n<!-- Will users need to update their code or configurations? -->\r\nNo breaking changes. This is a documentation fix that provides the correct implementation pattern.\r\n\r\n## Types of changes\r\n<!-- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->\r\n- [ x] Bug fix (non-breaking change which fixes an issue)\r\n- [ ] New feature (non-breaking change which adds functionality)\r\n- [ ] Breaking change (fix or feature that would cause existing functionality to change)\r\n- [ x] Documentation update\r\n\r\n## Checklist\r\n<!-- Go over all the following points, and put an `x` in all the boxes that apply. -->\r\n- [x] I have read the [MCP Documentation](https://modelcontextprotocol.io)\r\n- [x] My code follows the repository's style guidelines\r\n- [x] New and existing tests pass locally\r\n- [x] I have added appropriate error handling\r\n- [x] I have added or updated documentation as needed\r\n\r\n## Additional context\r\n<!-- Add any other context, implementation notes, or design decisions -->\r\nN/A\r\n",
      "created_at": "2025-10-18T05:12:06Z",
      "updated_at": "2025-10-24T00:23:29Z",
      "closed_at": null,
      "merged_at": null,
      "merge_commit_sha": null,
      "assignee": null,
      "assignees": {},
      "requested_reviewers": {},
      "requested_teams": {},
      "labels": {
        "0": {
          "id": 7511840560,
          "node_id": "LA_kwDOM2n80s8AAAABv72XMA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/documentation",
          "name": "documentation",
          "color": "0075ca",
          "default": true,
          "description": "Improvements or additions to documentation"
        },
        "1": {
          "id": 9230425628,
          "node_id": "LA_kwDOM2n80s8AAAACJi0eHA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/needs%20more%20work",
          "name": "needs more work",
          "color": "af3f39",
          "default": false,
          "description": "Not ready to be merged yet, needs additional follow-up from the author(s)."
        }
      },
      "milestone": null,
      "draft": false,
      "head": {
        "label": "ranjitodedra:fix/streamable-http-mounting-lifespan",
        "ref": "fix/streamable-http-mounting-lifespan",
        "sha": "0d138175fe0b333ddd481dd55419ef5ae225b42b",
        "user": {
          "login": "ranjitodedra",
          "id": 78635944,
          "node_id": "MDQ6VXNlcjc4NjM1OTQ0",
          "avatar_url": "https://avatars.githubusercontent.com/u/78635944?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/ranjitodedra",
          "type": "User",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 1078530642,
          "node_id": "R_kgDOQEkSUg",
          "name": "python-sdk",
          "full_name": "ranjitodedra/python-sdk",
          "private": false,
          "owner": {
            "login": "ranjitodedra",
            "id": 78635944,
            "node_id": "MDQ6VXNlcjc4NjM1OTQ0",
            "avatar_url": "https://avatars.githubusercontent.com/u/78635944?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/ranjitodedra",
            "type": "User",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": true,
          "url": "https://api.github.com/repos/ranjitodedra/python-sdk",
          "created_at": "2025-10-17T22:18:33Z",
          "updated_at": "2025-10-17T22:18:33Z",
          "pushed_at": "2025-10-21T19:20:05Z",
          "homepage": "https://modelcontextprotocol.github.io/python-sdk/",
          "size": 2179,
          "stargazers_count": 0,
          "watchers_count": 0,
          "language": null,
          "has_issues": false,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": false,
          "has_discussions": false,
          "forks_count": 0,
          "archived": false,
          "disabled": false,
          "open_issues_count": 0,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 0,
          "open_issues": 0,
          "watchers": 0,
          "default_branch": "main"
        }
      },
      "base": {
        "label": "modelcontextprotocol:main",
        "ref": "main",
        "sha": "1200ba0082e05daf81ff77f36d24afb5b1b2a424",
        "user": {
          "login": "modelcontextprotocol",
          "id": 182288589,
          "node_id": "O_kgDOCt2AzQ",
          "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/modelcontextprotocol",
          "type": "Organization",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 862584018,
          "node_id": "R_kgDOM2n80g",
          "name": "python-sdk",
          "full_name": "modelcontextprotocol/python-sdk",
          "private": false,
          "owner": {
            "login": "modelcontextprotocol",
            "id": 182288589,
            "node_id": "O_kgDOCt2AzQ",
            "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/modelcontextprotocol",
            "type": "Organization",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": false,
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk",
          "created_at": "2024-09-24T21:01:35Z",
          "updated_at": "2025-12-06T05:02:17Z",
          "pushed_at": "2025-12-04T18:04:06Z",
          "homepage": "https://modelcontextprotocol.github.io/python-sdk/",
          "size": 4194,
          "stargazers_count": 20439,
          "watchers_count": 20439,
          "language": "Python",
          "has_issues": true,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": true,
          "has_discussions": false,
          "forks_count": 2843,
          "archived": false,
          "disabled": false,
          "open_issues_count": 345,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 2843,
          "open_issues": 345,
          "watchers": 20439,
          "default_branch": "main"
        }
      },
      "_links": {
        "self": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1494"
        },
        "html": {
          "href": "https://github.com/modelcontextprotocol/python-sdk/pull/1494"
        },
        "issue": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1494"
        },
        "comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1494/comments"
        },
        "review_comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1494/comments"
        },
        "review_comment": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/comments{/number}"
        },
        "commits": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1494/commits"
        },
        "statuses": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/statuses/0d138175fe0b333ddd481dd55419ef5ae225b42b"
        }
      },
      "author_association": "NONE",
      "auto_merge": null,
      "active_lock_reason": null,
      "linked_issues": [
        1,
        1484
      ]
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1493",
      "id": 2925968863,
      "node_id": "PR_kwDOM2n80s6uZr3f",
      "number": 1493,
      "state": "open",
      "locked": false,
      "title": "[WIP] fix(sse): Remove manual cancel_scope.cancel() to prevent task lifecycle violation",
      "user": {
        "login": "ryanbaumann",
        "id": 4342845,
        "node_id": "MDQ6VXNlcjQzNDI4NDU=",
        "avatar_url": "https://avatars.githubusercontent.com/u/4342845?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/ryanbaumann",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "body": "[Work in progress, still evaluating root cause and test cases]\r\n\r\n## Summary\r\nFixes critical bug causing `RuntimeError: Attempted to exit cancel scope in a different task` when making sequential SSE requests in production (GCP Agent Engine). First request succeeds, subsequent requests fail with 75% failure rate.\r\n\r\n## Root Cause\r\nManual `cancel_scope.cancel()` at line 145 violates anyio task lifecycle. In production environments with concurrent request handling, cleanup executes in different task context than setup.\r\n\r\n## Solution\r\nRemove manual cancel - let anyio's TaskGroup.__aexit__ handle cleanup automatically. This follows anyio best practices and prevents the lifecycle violation.\r\n\r\n## Testing\r\n- **Production:** Reproduced on GCP Agent Engine (75% failure rate)\r\n- **Local:** Attempted to add a test case but difficult since couldn't reproduce the error locally.\r\n- **Note:** Bug is environment-dependent - manifests in production concurrent environments but dormant in simple local tests\r\n\r\n## Changes\r\n- Removed `tg.cancel_scope.cancel()` from `src/mcp/client/sse.py:145`\r\n- No API changes, fully backward compatible\r\n\r\nComplete investigation: https://github.com/chalosalvador/google-adk-mcp-tools cc/ @chalosalvador",
      "created_at": "2025-10-17T23:57:07Z",
      "updated_at": "2025-10-25T23:07:40Z",
      "closed_at": null,
      "merged_at": null,
      "merge_commit_sha": null,
      "assignee": null,
      "assignees": {},
      "requested_reviewers": {},
      "requested_teams": {},
      "labels": {},
      "milestone": null,
      "draft": true,
      "head": {
        "label": "ryanbaumann:fix/sse-cancel-scope-bug",
        "ref": "fix/sse-cancel-scope-bug",
        "sha": "78ce3c7a5fd04f56fcde536759e2d4dae387ebc0",
        "user": {
          "login": "ryanbaumann",
          "id": 4342845,
          "node_id": "MDQ6VXNlcjQzNDI4NDU=",
          "avatar_url": "https://avatars.githubusercontent.com/u/4342845?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/ryanbaumann",
          "type": "User",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 1078552617,
          "node_id": "R_kgDOQEloKQ",
          "name": "python-sdk",
          "full_name": "ryanbaumann/python-sdk",
          "private": false,
          "owner": {
            "login": "ryanbaumann",
            "id": 4342845,
            "node_id": "MDQ6VXNlcjQzNDI4NDU=",
            "avatar_url": "https://avatars.githubusercontent.com/u/4342845?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/ryanbaumann",
            "type": "User",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": true,
          "url": "https://api.github.com/repos/ryanbaumann/python-sdk",
          "created_at": "2025-10-17T23:40:30Z",
          "updated_at": "2025-10-17T23:40:30Z",
          "pushed_at": "2025-10-18T00:16:44Z",
          "homepage": "https://modelcontextprotocol.github.io/python-sdk/",
          "size": 3492,
          "stargazers_count": 0,
          "watchers_count": 0,
          "language": null,
          "has_issues": false,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": false,
          "has_discussions": false,
          "forks_count": 0,
          "archived": false,
          "disabled": false,
          "open_issues_count": 0,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 0,
          "open_issues": 0,
          "watchers": 0,
          "default_branch": "main"
        }
      },
      "base": {
        "label": "modelcontextprotocol:main",
        "ref": "main",
        "sha": "40acbc596c727e8ccc58c69df8e93e9cf6e56a4e",
        "user": {
          "login": "modelcontextprotocol",
          "id": 182288589,
          "node_id": "O_kgDOCt2AzQ",
          "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/modelcontextprotocol",
          "type": "Organization",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 862584018,
          "node_id": "R_kgDOM2n80g",
          "name": "python-sdk",
          "full_name": "modelcontextprotocol/python-sdk",
          "private": false,
          "owner": {
            "login": "modelcontextprotocol",
            "id": 182288589,
            "node_id": "O_kgDOCt2AzQ",
            "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/modelcontextprotocol",
            "type": "Organization",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": false,
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk",
          "created_at": "2024-09-24T21:01:35Z",
          "updated_at": "2025-12-06T05:02:17Z",
          "pushed_at": "2025-12-04T18:04:06Z",
          "homepage": "https://modelcontextprotocol.github.io/python-sdk/",
          "size": 4194,
          "stargazers_count": 20439,
          "watchers_count": 20439,
          "language": "Python",
          "has_issues": true,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": true,
          "has_discussions": false,
          "forks_count": 2843,
          "archived": false,
          "disabled": false,
          "open_issues_count": 345,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 2843,
          "open_issues": 345,
          "watchers": 20439,
          "default_branch": "main"
        }
      },
      "_links": {
        "self": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1493"
        },
        "html": {
          "href": "https://github.com/modelcontextprotocol/python-sdk/pull/1493"
        },
        "issue": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1493"
        },
        "comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1493/comments"
        },
        "review_comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1493/comments"
        },
        "review_comment": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/comments{/number}"
        },
        "commits": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1493/commits"
        },
        "statuses": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/statuses/78ce3c7a5fd04f56fcde536759e2d4dae387ebc0"
        }
      },
      "author_association": "NONE",
      "auto_merge": null,
      "active_lock_reason": null,
      "linked_issues": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1492",
      "id": 2925830569,
      "node_id": "PR_kwDOM2n80s6uZKGp",
      "number": 1492,
      "state": "open",
      "locked": false,
      "title": "feat: Set notification options method to configure broadcasted notifications",
      "user": {
        "login": "joshuazhou744",
        "id": 128266380,
        "node_id": "U_kgDOB6UwjA",
        "avatar_url": "https://avatars.githubusercontent.com/u/128266380?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/joshuazhou744",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "body": "Method in FastMCP to configure which change notifications (prompts, resources, tools) the server advertises and broadcasts. Allows developers to selectively enable or disable server-side change notifications announced to clients.\r\n\r\n## Motivation and Context\r\nHopefully this change fulfills Issue #1126 with a higher level solution for better user interface.\r\n\r\n## How Has This Been Tested?\r\nUnit tests added in `/tests/server/test_notification_options_propagation.py`.\r\n\r\nThe tests confirm that:\r\n- `set_notification_options()` correctly sets internal NotificationOptions.\r\n- The configured options propagate to the `StreamableHTTPSessionManager` and underlying MCP server initialization.\r\n- The configured options propagate through `run_stdio_async()` to the low-level server's `InitializationOptions`.\r\n\r\n## Breaking Changes\r\nNone. Existing FastMCP servers will continue to default to no notifications unless explicitly configured.\r\n\r\n## Types of changes\r\n<!-- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->\r\n- [ ] Bug fix (non-breaking change which fixes an issue)\r\n- [x] New feature (non-breaking change which adds functionality)\r\n- [ ] Breaking change (fix or feature that would cause existing functionality to change)\r\n- [ ] Documentation update\r\n\r\n## Checklist\r\n<!-- Go over all the following points, and put an `x` in all the boxes that apply. -->\r\n- [x] I have read the [MCP Documentation](https://modelcontextprotocol.io)\r\n- [x] My code follows the repository's style guidelines\r\n- [x] New and existing tests pass locally\r\n- [x] I have added appropriate error handling\r\n- [ ] I have added or updated documentation as needed\r\n\r\n## Additional context\r\nDocumentation needs to be updated, I am unsure where to update because the `docs` directory is pretty empty. Maybe a new section in the `README`?",
      "created_at": "2025-10-17T21:55:49Z",
      "updated_at": "2025-11-12T18:29:02Z",
      "closed_at": null,
      "merged_at": null,
      "merge_commit_sha": null,
      "assignee": {
        "login": "felixweinberger",
        "id": 3823880,
        "node_id": "MDQ6VXNlcjM4MjM4ODA=",
        "avatar_url": "https://avatars.githubusercontent.com/u/3823880?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/felixweinberger",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "assignees": {
        "0": {
          "login": "felixweinberger",
          "id": 3823880,
          "node_id": "MDQ6VXNlcjM4MjM4ODA=",
          "avatar_url": "https://avatars.githubusercontent.com/u/3823880?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/felixweinberger",
          "type": "User",
          "user_view_type": "public",
          "site_admin": false
        }
      },
      "requested_reviewers": {},
      "requested_teams": {},
      "labels": {
        "0": {
          "id": 9287728201,
          "node_id": "LA_kwDOM2n80s8AAAACKZd8SQ",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/needs%20maintainer%20action",
          "name": "needs maintainer action",
          "color": "d33428",
          "default": false,
          "description": "Potentially serious issue - needs proactive fix and maintainer attention"
        },
        "1": {
          "id": 9354757189,
          "node_id": "LA_kwDOM2n80s8AAAACLZZERQ",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/enhancement",
          "name": "enhancement",
          "color": "11b5cc",
          "default": true,
          "description": "Request for a new feature that's not currently supported"
        }
      },
      "milestone": null,
      "draft": false,
      "head": {
        "label": "joshuazhou744:joshuaz/fastmcp-specify-capabilities",
        "ref": "joshuaz/fastmcp-specify-capabilities",
        "sha": "f3afb9d1eb665bf09def7a8a98c6f01b00998d28",
        "user": {
          "login": "joshuazhou744",
          "id": 128266380,
          "node_id": "U_kgDOB6UwjA",
          "avatar_url": "https://avatars.githubusercontent.com/u/128266380?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/joshuazhou744",
          "type": "User",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 1078454685,
          "node_id": "R_kgDOQEfpnQ",
          "name": "python-sdk",
          "full_name": "joshuazhou744/python-sdk",
          "private": false,
          "owner": {
            "login": "joshuazhou744",
            "id": 128266380,
            "node_id": "U_kgDOB6UwjA",
            "avatar_url": "https://avatars.githubusercontent.com/u/128266380?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/joshuazhou744",
            "type": "User",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": true,
          "url": "https://api.github.com/repos/joshuazhou744/python-sdk",
          "created_at": "2025-10-17T19:00:35Z",
          "updated_at": "2025-10-17T19:00:35Z",
          "pushed_at": "2025-10-20T20:21:08Z",
          "homepage": "https://modelcontextprotocol.github.io/python-sdk/",
          "size": 2125,
          "stargazers_count": 0,
          "watchers_count": 0,
          "language": null,
          "has_issues": false,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": false,
          "has_discussions": false,
          "forks_count": 0,
          "archived": false,
          "disabled": false,
          "open_issues_count": 0,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 0,
          "open_issues": 0,
          "watchers": 0,
          "default_branch": "main"
        }
      },
      "base": {
        "label": "modelcontextprotocol:main",
        "ref": "main",
        "sha": "40acbc596c727e8ccc58c69df8e93e9cf6e56a4e",
        "user": {
          "login": "modelcontextprotocol",
          "id": 182288589,
          "node_id": "O_kgDOCt2AzQ",
          "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/modelcontextprotocol",
          "type": "Organization",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 862584018,
          "node_id": "R_kgDOM2n80g",
          "name": "python-sdk",
          "full_name": "modelcontextprotocol/python-sdk",
          "private": false,
          "owner": {
            "login": "modelcontextprotocol",
            "id": 182288589,
            "node_id": "O_kgDOCt2AzQ",
            "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/modelcontextprotocol",
            "type": "Organization",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": false,
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk",
          "created_at": "2024-09-24T21:01:35Z",
          "updated_at": "2025-12-06T05:02:17Z",
          "pushed_at": "2025-12-04T18:04:06Z",
          "homepage": "https://modelcontextprotocol.github.io/python-sdk/",
          "size": 4194,
          "stargazers_count": 20439,
          "watchers_count": 20439,
          "language": "Python",
          "has_issues": true,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": true,
          "has_discussions": false,
          "forks_count": 2843,
          "archived": false,
          "disabled": false,
          "open_issues_count": 345,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 2843,
          "open_issues": 345,
          "watchers": 20439,
          "default_branch": "main"
        }
      },
      "_links": {
        "self": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1492"
        },
        "html": {
          "href": "https://github.com/modelcontextprotocol/python-sdk/pull/1492"
        },
        "issue": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1492"
        },
        "comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1492/comments"
        },
        "review_comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1492/comments"
        },
        "review_comment": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/comments{/number}"
        },
        "commits": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1492/commits"
        },
        "statuses": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/statuses/f3afb9d1eb665bf09def7a8a98c6f01b00998d28"
        }
      },
      "author_association": "NONE",
      "auto_merge": null,
      "active_lock_reason": null,
      "linked_issues": [
        1
      ]
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1490",
      "id": 2923431467,
      "node_id": "PR_kwDOM2n80s6uQAYr",
      "number": 1490,
      "state": "open",
      "locked": false,
      "title": "Add tests for resource leak in streamable_http SSE handlers",
      "user": {
        "login": "certainly-param",
        "id": 206301545,
        "node_id": "U_kgDODEvpaQ",
        "avatar_url": "https://avatars.githubusercontent.com/u/206301545?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/certainly-param",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "body": "Fixes #1450\r\n\r\nI found that HTTP responses don't get closed properly when SSE streaming fails with exceptions in the streamable HTTP client.\r\n\r\nThe Problem:\r\nWhen the async for loop in `_handle_sse_response` and `_handle_resumption_request` throws an exception (malformed JSON, network error, etc.), the response is never closed because `response.aclose()` is only called in the success path.\r\n\r\nImpact:\r\nThis can cause connection pool exhaustion in long-running clients, eventually causing new requests to hang or fail.\r\n\r\nWhat I Added:\r\n- `test_resource_leak_reproduction.py` - Standalone script that demonstrates the issue\r\n- `tests/client/test_streamable_http_resource_leak.py` - Pytest tests that verify the resource leak and show how the fix should work\r\n\r\nBoth test files show that when SSE parsing fails, the response doesn't get closed, confirming the resource leak.\r\n\r\nThe Fix:\r\nThe methods need `finally` blocks to ensure `response.aclose()` is always called:\r\n\r\n```python\r\ntry:\r\n    # ... existing code ...\r\nexcept Exception as e:\r\n    # ... existing exception handling ...\r\nfinally:\r\n    await response.aclose()\r\n```\r\n\r\nThis ensures resources are properly cleaned up regardless of whether exceptions occur.",
      "created_at": "2025-10-17T08:04:37Z",
      "updated_at": "2025-10-27T17:51:59Z",
      "closed_at": null,
      "merged_at": null,
      "merge_commit_sha": "043dd446707aefe54a679bedb6892eb3091a8485",
      "assignee": null,
      "assignees": {},
      "requested_reviewers": {},
      "requested_teams": {},
      "labels": {
        "0": {
          "id": 7511840554,
          "node_id": "LA_kwDOM2n80s8AAAABv72XKg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/bug",
          "name": "bug",
          "color": "d73a4a",
          "default": true,
          "description": "Something isn't working"
        },
        "1": {
          "id": 9287728201,
          "node_id": "LA_kwDOM2n80s8AAAACKZd8SQ",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/needs%20maintainer%20action",
          "name": "needs maintainer action",
          "color": "d33428",
          "default": false,
          "description": "Potentially serious issue - needs proactive fix and maintainer attention"
        },
        "2": {
          "id": 9354765360,
          "node_id": "LA_kwDOM2n80s8AAAACLZZkMA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P0",
          "name": "P0",
          "color": "a81d34",
          "default": false,
          "description": "Broken core functionality, security issues, critical missing feature"
        }
      },
      "milestone": null,
      "draft": true,
      "head": {
        "label": "certainly-param:fix-streamable-http-resource-leak",
        "ref": "fix-streamable-http-resource-leak",
        "sha": "d2f7de8d28d6a68aaf511e86a0f7e3f6317cd482",
        "user": {
          "login": "certainly-param",
          "id": 206301545,
          "node_id": "U_kgDODEvpaQ",
          "avatar_url": "https://avatars.githubusercontent.com/u/206301545?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/certainly-param",
          "type": "User",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 1078090712,
          "node_id": "R_kgDOQEJb2A",
          "name": "python-sdk",
          "full_name": "certainly-param/python-sdk",
          "private": false,
          "owner": {
            "login": "certainly-param",
            "id": 206301545,
            "node_id": "U_kgDODEvpaQ",
            "avatar_url": "https://avatars.githubusercontent.com/u/206301545?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/certainly-param",
            "type": "User",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": true,
          "url": "https://api.github.com/repos/certainly-param/python-sdk",
          "created_at": "2025-10-17T07:38:08Z",
          "updated_at": "2025-10-17T07:38:09Z",
          "pushed_at": "2025-10-17T15:57:54Z",
          "homepage": "https://modelcontextprotocol.github.io/python-sdk/",
          "size": 2108,
          "stargazers_count": 0,
          "watchers_count": 0,
          "language": null,
          "has_issues": false,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": false,
          "has_discussions": false,
          "forks_count": 0,
          "archived": false,
          "disabled": false,
          "open_issues_count": 0,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 0,
          "open_issues": 0,
          "watchers": 0,
          "default_branch": "main"
        }
      },
      "base": {
        "label": "modelcontextprotocol:main",
        "ref": "main",
        "sha": "98f82485bdbc463d40725e9ead4e39ac08facaac",
        "user": {
          "login": "modelcontextprotocol",
          "id": 182288589,
          "node_id": "O_kgDOCt2AzQ",
          "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/modelcontextprotocol",
          "type": "Organization",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 862584018,
          "node_id": "R_kgDOM2n80g",
          "name": "python-sdk",
          "full_name": "modelcontextprotocol/python-sdk",
          "private": false,
          "owner": {
            "login": "modelcontextprotocol",
            "id": 182288589,
            "node_id": "O_kgDOCt2AzQ",
            "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/modelcontextprotocol",
            "type": "Organization",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": false,
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk",
          "created_at": "2024-09-24T21:01:35Z",
          "updated_at": "2025-12-06T05:02:17Z",
          "pushed_at": "2025-12-04T18:04:06Z",
          "homepage": "https://modelcontextprotocol.github.io/python-sdk/",
          "size": 4194,
          "stargazers_count": 20439,
          "watchers_count": 20439,
          "language": "Python",
          "has_issues": true,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": true,
          "has_discussions": false,
          "forks_count": 2843,
          "archived": false,
          "disabled": false,
          "open_issues_count": 345,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 2843,
          "open_issues": 345,
          "watchers": 20439,
          "default_branch": "main"
        }
      },
      "_links": {
        "self": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1490"
        },
        "html": {
          "href": "https://github.com/modelcontextprotocol/python-sdk/pull/1490"
        },
        "issue": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1490"
        },
        "comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1490/comments"
        },
        "review_comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1490/comments"
        },
        "review_comment": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/comments{/number}"
        },
        "commits": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1490/commits"
        },
        "statuses": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/statuses/d2f7de8d28d6a68aaf511e86a0f7e3f6317cd482"
        }
      },
      "author_association": "NONE",
      "auto_merge": null,
      "active_lock_reason": null,
      "linked_issues": [
        1,
        1450
      ]
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1489",
      "id": 2922926462,
      "node_id": "PR_kwDOM2n80s6uOFF-",
      "number": 1489,
      "state": "open",
      "locked": false,
      "title": "feat: Dependency injection for MCP Tools",
      "user": {
        "login": "jamesev15",
        "id": 84110446,
        "node_id": "MDQ6VXNlcjg0MTEwNDQ2",
        "avatar_url": "https://avatars.githubusercontent.com/u/84110446?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/jamesev15",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "body": "# Add Dependency Injection Support for MCP Tools\r\n\r\n<!-- Provide a brief summary of your changes -->\r\nThis PR introduces a comprehensive dependency injection system for MCP tools, enabling automatic resolution of function dependencies with support for sync/async functions, generators, and proper resource cleanup.\r\n\r\n## Motivation and Context\r\n<!-- Why is this change needed? What problem does it solve? -->\r\nCurrently, MCP tools have limited support for managing external dependencies like database connections, configuration objects, or shared resources. This leads to:\r\n\r\n- *Tight coupling*: Tools directly instantiate their dependencies, making them hard to test and modify\r\n- *Poor testability*: Difficult to mock dependencies for unit testing\r\n- *Code duplication*: Similar dependency setup repeated across multiple tools\r\n\r\nThis change introduces a FastAPI-inspired dependency injection system that solves these problems by providing:\r\n- Automatic dependency discovery and resolution\r\n- Type-safe dependency injection\r\n- Proper resource lifecycle management\r\n- Improved testability and maintainability\r\n\r\n## How Has This Been Tested?\r\n<!-- Have you tested this in a real application? Which scenarios were tested? -->\r\n- [x] Unit tests for dependency resolution with various function types\r\n- [x] Unit tests with sync/async functions, generators, and async generators\r\n- [x] Error handling tests to ensure proper cleanup on failures\r\n\r\n## Breaking Changes\r\n<!-- Will users need to update their code or configurations? -->\r\n*None.* This is a fully backward-compatible addition. Existing tools will continue to work without any modifications. The dependency injection system is opt-in and only activates when dependencies are explicitly declared using the Depends class.\r\n\r\n## Types of changes\r\n<!-- What types of changes does your code introduce? Put an x in all the boxes that apply: -->\r\n- [ ] Bug fix (non-breaking change which fixes an issue)\r\n- [x] New feature (non-breaking change which adds functionality)\r\n- [ ] Breaking change (fix or feature that would cause existing functionality to change)\r\n- [ ] Documentation update\r\n\r\n## Checklist\r\n<!-- Go over all the following points, and put an x in all the boxes that apply. -->\r\n- [x] I have read the [MCP Documentation](https://modelcontextprotocol.io)\r\n- [x] My code follows the repository's style guidelines\r\n- [x] New and existing tests pass locally\r\n- [x] I have added appropriate error handling\r\n\r\n## Additional context\r\n<!-- Add any other context, implementation notes, or design decisions -->\r\n\r\n### Implementation Details\r\n\r\n*Key Components:*\r\n1. *Depends class*: Simple wrapper for dependency functions\r\n2. *find_dependencies()*: Automatically discovers dependencies in function signatures using type hints and parameter defaults\r\n3. *DependencyResolver*: Manages the lifecycle of dependencies with proper cleanup\r\n\r\n*Design Decisions:*\r\n- *FastAPI-inspired API*: Uses familiar patterns for developers already using FastAPI\r\n- *Type safety*: Full support for Annotated types and type hints\r\n- *Resource safety*: Automatic cleanup of generator-based dependencies\r\n- *Error resilience*: If any dependency fails to resolve, all previously created resources are properly cleaned up\r\n\r\n```python\r\nfrom mcp.server.fastmcp import FastMCP\r\nfrom mcp.types import Depends\r\nfrom typing import Annotated\r\nfrom collections.abc import Generator, AsyncGenerator\r\nfrom random import randint\r\nimport asyncio\r\n\r\nmcp = FastMCP(\"Demo\")\r\n\r\ndef load_resource() -> int:\r\n    return randint(1, 10)\r\n\r\n\r\nasync def load_async_resource() -> str:\r\n    await asyncio.sleep(0.1)\r\n    return f\"async_data_{randint(100, 999)}\"\r\n\r\n\r\ndef database_connection() -> Generator[str, None, None]:\r\n    connection_id = f\"db_conn_{randint(1000, 9999)}\"\r\n    try:\r\n        yield connection_id\r\n    finally:\r\n        pass\r\n\r\n\r\nasync def async_file_handler() -> AsyncGenerator[str, None]:\r\n    file_id = f\"file_{randint(1000, 9999)}\"\r\n    try:\r\n        yield file_id\r\n    finally:\r\n        await asyncio.sleep(0.05)\r\n        pass\r\n\r\n# Tool 1: Regular function dependency\r\n@mcp.tool()\r\ndef add_with_regular_dep(a: int, b: int, c: Annotated[int, Depends(dependency=load_resource)]) -> int:\r\n    return a + b + c\r\n\r\n\r\n# Tool 2: Async function dependency\r\n@mcp.tool()\r\nasync def process_with_async_dep(text: str, async_data: Annotated[str, Depends(dependency=load_async_resource)]) -> str:\r\n    return f\"Processed '{text}' with {async_data}\"\r\n\r\n\r\n# Tool 3: Generator dependency (with cleanup)\r\n@mcp.tool()\r\ndef query_database(query: str, db_conn: Annotated[str, Depends(dependency=database_connection)]) -> str:\r\n    return f\"Executed '{query}' on connection {db_conn}\"\r\n\r\n\r\n# Tool 4: Async generator dependency (with async cleanup)\r\n@mcp.tool()\r\nasync def process_file(content: str, file_handler: Annotated[str, Depends(dependency=async_file_handler)]) -> str:\r\n    await asyncio.sleep(0.1)\r\n    return f\"Processed content '{content}' with handler {file_handler}\"\r\n\r\n\r\n# Tool 5: Multiple dependencies\r\n@mcp.tool()\r\nasync def complex_operation(\r\n    data: str,\r\n    regular_dep: Annotated[int, Depends(dependency=load_resource)],\r\n    async_dep: Annotated[str, Depends(dependency=load_async_resource)],\r\n    db_conn: Annotated[str, Depends(dependency=database_connection)],\r\n    file_handler: Annotated[str, Depends(dependency=async_file_handler)],\r\n) -> str:\r\n    result = (\r\n        f\"Complex operation on '{data}' using:\\n\"\r\n        f\"- Regular resource: {regular_dep}\\n\"\r\n        f\"- Async resource: {async_dep}\\n\"\r\n        f\"- DB connection: {db_conn}\\n\"\r\n        f\"- File handler: {file_handler}\"\r\n    )\r\n    return result\r\n\r\n```",
      "created_at": "2025-10-17T04:00:05Z",
      "updated_at": "2025-11-13T05:29:04Z",
      "closed_at": null,
      "merged_at": null,
      "merge_commit_sha": null,
      "assignee": null,
      "assignees": {},
      "requested_reviewers": {},
      "requested_teams": {},
      "labels": {
        "0": {
          "id": 9287728201,
          "node_id": "LA_kwDOM2n80s8AAAACKZd8SQ",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/needs%20maintainer%20action",
          "name": "needs maintainer action",
          "color": "d33428",
          "default": false,
          "description": "Potentially serious issue - needs proactive fix and maintainer attention"
        },
        "1": {
          "id": 9354757189,
          "node_id": "LA_kwDOM2n80s8AAAACLZZERQ",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/enhancement",
          "name": "enhancement",
          "color": "11b5cc",
          "default": true,
          "description": "Request for a new feature that's not currently supported"
        }
      },
      "milestone": null,
      "draft": false,
      "head": {
        "label": "jamesev15:main",
        "ref": "main",
        "sha": "33c8981f20b23210fe7655f3030bc3d074bfac81",
        "user": {
          "login": "jamesev15",
          "id": 84110446,
          "node_id": "MDQ6VXNlcjg0MTEwNDQ2",
          "avatar_url": "https://avatars.githubusercontent.com/u/84110446?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/jamesev15",
          "type": "User",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 1077991436,
          "node_id": "R_kgDOQEDYDA",
          "name": "python-sdk",
          "full_name": "jamesev15/python-sdk",
          "private": false,
          "owner": {
            "login": "jamesev15",
            "id": 84110446,
            "node_id": "MDQ6VXNlcjg0MTEwNDQ2",
            "avatar_url": "https://avatars.githubusercontent.com/u/84110446?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/jamesev15",
            "type": "User",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": true,
          "url": "https://api.github.com/repos/jamesev15/python-sdk",
          "created_at": "2025-10-17T03:40:25Z",
          "updated_at": "2025-10-17T04:09:01Z",
          "pushed_at": "2025-10-22T00:19:06Z",
          "homepage": "https://modelcontextprotocol.github.io/python-sdk/",
          "size": 2174,
          "stargazers_count": 0,
          "watchers_count": 0,
          "language": "Python",
          "has_issues": false,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": false,
          "has_discussions": false,
          "forks_count": 0,
          "archived": false,
          "disabled": false,
          "open_issues_count": 0,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 0,
          "open_issues": 0,
          "watchers": 0,
          "default_branch": "main"
        }
      },
      "base": {
        "label": "modelcontextprotocol:main",
        "ref": "main",
        "sha": "dcc68ce56bfa3fd0d9b66452149d4578312f1f41",
        "user": {
          "login": "modelcontextprotocol",
          "id": 182288589,
          "node_id": "O_kgDOCt2AzQ",
          "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/modelcontextprotocol",
          "type": "Organization",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 862584018,
          "node_id": "R_kgDOM2n80g",
          "name": "python-sdk",
          "full_name": "modelcontextprotocol/python-sdk",
          "private": false,
          "owner": {
            "login": "modelcontextprotocol",
            "id": 182288589,
            "node_id": "O_kgDOCt2AzQ",
            "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/modelcontextprotocol",
            "type": "Organization",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": false,
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk",
          "created_at": "2024-09-24T21:01:35Z",
          "updated_at": "2025-12-06T05:02:17Z",
          "pushed_at": "2025-12-04T18:04:06Z",
          "homepage": "https://modelcontextprotocol.github.io/python-sdk/",
          "size": 4194,
          "stargazers_count": 20439,
          "watchers_count": 20439,
          "language": "Python",
          "has_issues": true,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": true,
          "has_discussions": false,
          "forks_count": 2843,
          "archived": false,
          "disabled": false,
          "open_issues_count": 345,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 2843,
          "open_issues": 345,
          "watchers": 20439,
          "default_branch": "main"
        }
      },
      "_links": {
        "self": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1489"
        },
        "html": {
          "href": "https://github.com/modelcontextprotocol/python-sdk/pull/1489"
        },
        "issue": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1489"
        },
        "comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1489/comments"
        },
        "review_comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1489/comments"
        },
        "review_comment": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/comments{/number}"
        },
        "commits": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1489/commits"
        },
        "statuses": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/statuses/33c8981f20b23210fe7655f3030bc3d074bfac81"
        }
      },
      "author_association": "NONE",
      "auto_merge": null,
      "active_lock_reason": null,
      "linked_issues": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1486",
      "id": 2919391203,
      "node_id": "PR_kwDOM2n80s6uAl_j",
      "number": 1486,
      "state": "open",
      "locked": false,
      "title": "feat: Add support for specifying NotificationOptions ",
      "user": {
        "login": "daamitt",
        "id": 147169947,
        "node_id": "U_kgDOCMWimw",
        "avatar_url": "https://avatars.githubusercontent.com/u/147169947?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/daamitt",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "body": "Add support for specifying NotificationOptions in FastMCP and lowlevel Server creation\r\n\r\n## Motivation and Context\r\nCurrently there is no straightforward way to specify FastMCP server notification capabilities. Some clients do not respect notifications if server does not disclose support in the initliazation phase. eg: \"notifications/resources/list_changed\"\r\n\r\n\r\n\r\n## How Has This Been Tested?\r\nuv run pytest: \r\nResults (18.39s):\r\n       653 passed\r\n         2 skipped\r\n         1 xfailed\r\n\r\n## Breaking Changes\r\nNo\r\n\r\n## Types of changes\r\n- [ ] Bug fix (non-breaking change which fixes an issue)\r\n- [ *] New feature (non-breaking change which adds functionality)\r\n- [ ] Breaking change (fix or feature that would cause existing functionality to change)\r\n- [ ] Documentation update\r\n\r\n## Checklist\r\n- [x ] I have read the [MCP Documentation](https://modelcontextprotocol.io)\r\n- [ x] My code follows the repository's style guidelines\r\n- [ x] New and existing tests pass locally\r\n- [ x] I have added appropriate error handling\r\n- [ x] I have added or updated documentation as needed\r\n\r\n## Additional context\r\nHave updated notification snippet and snippet readme\r\n```\r\nuv run server notifications streamable-http  \r\n```\r\n",
      "created_at": "2025-10-16T05:47:13Z",
      "updated_at": "2025-11-16T05:56:44Z",
      "closed_at": null,
      "merged_at": null,
      "merge_commit_sha": "594dd0ad9d32aa6ce277cc51bd44781eea95fda4",
      "assignee": {
        "login": "maxisbey",
        "id": 224885523,
        "node_id": "U_kgDODWd7Ew",
        "avatar_url": "https://avatars.githubusercontent.com/u/224885523?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/maxisbey",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "assignees": {
        "0": {
          "login": "maxisbey",
          "id": 224885523,
          "node_id": "U_kgDODWd7Ew",
          "avatar_url": "https://avatars.githubusercontent.com/u/224885523?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/maxisbey",
          "type": "User",
          "user_view_type": "public",
          "site_admin": false
        }
      },
      "requested_reviewers": {},
      "requested_teams": {},
      "labels": {
        "0": {
          "id": 9354757189,
          "node_id": "LA_kwDOM2n80s8AAAACLZZERQ",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/enhancement",
          "name": "enhancement",
          "color": "11b5cc",
          "default": true,
          "description": "Request for a new feature that's not currently supported"
        }
      },
      "milestone": null,
      "draft": false,
      "head": {
        "label": "daamitt:noti-feat",
        "ref": "noti-feat",
        "sha": "9d3d18efeba6113264af0e2b4a5109c3f4ac96cc",
        "user": {
          "login": "daamitt",
          "id": 147169947,
          "node_id": "U_kgDOCMWimw",
          "avatar_url": "https://avatars.githubusercontent.com/u/147169947?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/daamitt",
          "type": "User",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 1075869946,
          "node_id": "R_kgDOQCB4-g",
          "name": "mcp-python-sdk",
          "full_name": "daamitt/mcp-python-sdk",
          "private": false,
          "owner": {
            "login": "daamitt",
            "id": 147169947,
            "node_id": "U_kgDOCMWimw",
            "avatar_url": "https://avatars.githubusercontent.com/u/147169947?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/daamitt",
            "type": "User",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": true,
          "url": "https://api.github.com/repos/daamitt/mcp-python-sdk",
          "created_at": "2025-10-14T05:22:12Z",
          "updated_at": "2025-12-04T06:43:46Z",
          "pushed_at": "2025-12-04T06:43:36Z",
          "homepage": "https://modelcontextprotocol.github.io/python-sdk/",
          "size": 2540,
          "stargazers_count": 0,
          "watchers_count": 0,
          "language": "Python",
          "has_issues": false,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": false,
          "has_discussions": false,
          "forks_count": 0,
          "archived": false,
          "disabled": false,
          "open_issues_count": 0,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 0,
          "open_issues": 0,
          "watchers": 0,
          "default_branch": "main"
        }
      },
      "base": {
        "label": "modelcontextprotocol:main",
        "ref": "main",
        "sha": "9724ad1ce66c2a4f18c7539ef589d4d3b9aebd82",
        "user": {
          "login": "modelcontextprotocol",
          "id": 182288589,
          "node_id": "O_kgDOCt2AzQ",
          "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/modelcontextprotocol",
          "type": "Organization",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 862584018,
          "node_id": "R_kgDOM2n80g",
          "name": "python-sdk",
          "full_name": "modelcontextprotocol/python-sdk",
          "private": false,
          "owner": {
            "login": "modelcontextprotocol",
            "id": 182288589,
            "node_id": "O_kgDOCt2AzQ",
            "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/modelcontextprotocol",
            "type": "Organization",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": false,
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk",
          "created_at": "2024-09-24T21:01:35Z",
          "updated_at": "2025-12-06T05:02:17Z",
          "pushed_at": "2025-12-04T18:04:06Z",
          "homepage": "https://modelcontextprotocol.github.io/python-sdk/",
          "size": 4194,
          "stargazers_count": 20439,
          "watchers_count": 20439,
          "language": "Python",
          "has_issues": true,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": true,
          "has_discussions": false,
          "forks_count": 2843,
          "archived": false,
          "disabled": false,
          "open_issues_count": 345,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 2843,
          "open_issues": 345,
          "watchers": 20439,
          "default_branch": "main"
        }
      },
      "_links": {
        "self": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1486"
        },
        "html": {
          "href": "https://github.com/modelcontextprotocol/python-sdk/pull/1486"
        },
        "issue": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1486"
        },
        "comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1486/comments"
        },
        "review_comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1486/comments"
        },
        "review_comment": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/comments{/number}"
        },
        "commits": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1486/commits"
        },
        "statuses": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/statuses/9d3d18efeba6113264af0e2b4a5109c3f4ac96cc"
        }
      },
      "author_association": "CONTRIBUTOR",
      "auto_merge": null,
      "active_lock_reason": null,
      "linked_issues": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1481",
      "id": 2914619910,
      "node_id": "PR_kwDOM2n80s6tuZIG",
      "number": 1481,
      "state": "open",
      "locked": false,
      "title": "fix: Token endpoint response for invalid_client",
      "user": {
        "login": "AnkeshThakur",
        "id": 1591848,
        "node_id": "MDQ6VXNlcjE1OTE4NDg=",
        "avatar_url": "https://avatars.githubusercontent.com/u/1591848?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/AnkeshThakur",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "body": "Fix RFC 6749 compliance: return `invalid_client` error for client authentication failures instead of `unauthorized_client`.\r\n\r\nThis fixes #1480 \r\n\r\n## Motivation and Context\r\n  The token endpoint returns incorrect error code when client authentication fails (wrong credentials, unknown client_id). Per [RFC 6749 Section 5.2](https://datatracker.ietf.org/doc/html/rfc6749#section-5.2):\r\n\r\n  - `invalid_client` = Client **authentication failed**\r\n  - `unauthorized_client` = Client authenticated successfully but **not authorized** for grant type\r\n\r\n  Current code incorrectly returns `unauthorized_client` when catching `AuthenticationError`, which represents authentication failure, not authorization failure.\r\n\r\n## How Has This Been Tested?\r\n  - All existing auth integration tests pass (33 tests)\r\n  - Used forked repo to test the behavior with fastmcp\r\n\r\n## Breaking Changes\r\nClient would receive `invalid_client` instead of `unauthorized_client` with same http status code. Scenarios where client is changing its behavior based on `error_code` then breaking change is expected. If the client is already following RFC 6749 then it should not impact. \r\n\r\n## Types of changes\r\n- [ ] Bug fix (non-breaking change which fixes an issue)\r\n- [ ] New feature (non-breaking change which adds functionality)\r\n- [x] Breaking change (fix or feature that would cause existing functionality to change)\r\n- [ ] Documentation update\r\n\r\n  ## Checklist\r\n  - [x] I have read the [MCP Documentation](https://modelcontextprotocol.io)\r\n  - [x] My code follows the repository's style guidelines\r\n  - [x] New and existing tests pass locally\r\n  - [x] I have added appropriate error handling\r\n  - [ ] I have added or updated documentation as needed\r\n\r\n## Additional context\r\n<!-- Add any other context, implementation notes, or design decisions -->\r\n\r\nThe implementation advertises: `token_endpoint_auth_methods_supported=[\"client_secret_post\"]`\r\n\r\nThis means clients authenticate by including credentials in the request body (form parameters), not via HTTP Basic Authentication.\r\n\r\nThe RFC states:\r\n\r\n > The authorization server responds with an HTTP 400 (Bad Request) status code (unless specified otherwise) and includes the following parameters with the response... If the client attempted to authenticate via the \"Authorization\"\r\n  request header field, the authorization server MUST respond with an HTTP 401 (Unauthorized) status code and include the \"WWW-Authenticate\" response header field.\r\n\r\nSince only form-based authentication (client_secret_post) is supported and no Authorization headers are processed, the HTTP 400 status code for the token endpoint should be acceptable.\r\n",
      "created_at": "2025-10-14T18:18:04Z",
      "updated_at": "2025-10-23T22:57:36Z",
      "closed_at": null,
      "merged_at": null,
      "merge_commit_sha": null,
      "assignee": null,
      "assignees": {},
      "requested_reviewers": {},
      "requested_teams": {},
      "labels": {
        "0": {
          "id": 7511840554,
          "node_id": "LA_kwDOM2n80s8AAAABv72XKg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/bug",
          "name": "bug",
          "color": "d73a4a",
          "default": true,
          "description": "Something isn't working"
        },
        "1": {
          "id": 9287728201,
          "node_id": "LA_kwDOM2n80s8AAAACKZd8SQ",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/needs%20maintainer%20action",
          "name": "needs maintainer action",
          "color": "d33428",
          "default": false,
          "description": "Potentially serious issue - needs proactive fix and maintainer attention"
        },
        "2": {
          "id": 9301360597,
          "node_id": "LA_kwDOM2n80s8AAAACKmd_1Q",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/auth",
          "name": "auth",
          "color": "92ad2d",
          "default": false,
          "description": "Issues and PRs related to Authentication / OAuth"
        }
      },
      "milestone": null,
      "draft": false,
      "head": {
        "label": "AnkeshThakur:fix/token-invalid-client-response",
        "ref": "fix/token-invalid-client-response",
        "sha": "fcddae559b92f6e64f87bd1768baae8265758f94",
        "user": {
          "login": "AnkeshThakur",
          "id": 1591848,
          "node_id": "MDQ6VXNlcjE1OTE4NDg=",
          "avatar_url": "https://avatars.githubusercontent.com/u/1591848?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/AnkeshThakur",
          "type": "User",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 1076086261,
          "node_id": "R_kgDOQCPF9Q",
          "name": "python-sdk",
          "full_name": "AnkeshThakur/python-sdk",
          "private": false,
          "owner": {
            "login": "AnkeshThakur",
            "id": 1591848,
            "node_id": "MDQ6VXNlcjE1OTE4NDg=",
            "avatar_url": "https://avatars.githubusercontent.com/u/1591848?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/AnkeshThakur",
            "type": "User",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": true,
          "url": "https://api.github.com/repos/AnkeshThakur/python-sdk",
          "created_at": "2025-10-14T11:39:09Z",
          "updated_at": "2025-10-14T11:39:09Z",
          "pushed_at": "2025-10-14T18:07:42Z",
          "homepage": "https://modelcontextprotocol.github.io/python-sdk/",
          "size": 2102,
          "stargazers_count": 0,
          "watchers_count": 0,
          "language": null,
          "has_issues": false,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": false,
          "has_discussions": false,
          "forks_count": 0,
          "archived": false,
          "disabled": false,
          "open_issues_count": 0,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 0,
          "open_issues": 0,
          "watchers": 0,
          "default_branch": "main"
        }
      },
      "base": {
        "label": "modelcontextprotocol:main",
        "ref": "main",
        "sha": "de894576838a8b13817742d8b548e1df95f43e90",
        "user": {
          "login": "modelcontextprotocol",
          "id": 182288589,
          "node_id": "O_kgDOCt2AzQ",
          "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/modelcontextprotocol",
          "type": "Organization",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 862584018,
          "node_id": "R_kgDOM2n80g",
          "name": "python-sdk",
          "full_name": "modelcontextprotocol/python-sdk",
          "private": false,
          "owner": {
            "login": "modelcontextprotocol",
            "id": 182288589,
            "node_id": "O_kgDOCt2AzQ",
            "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/modelcontextprotocol",
            "type": "Organization",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": false,
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk",
          "created_at": "2024-09-24T21:01:35Z",
          "updated_at": "2025-12-06T05:02:17Z",
          "pushed_at": "2025-12-04T18:04:06Z",
          "homepage": "https://modelcontextprotocol.github.io/python-sdk/",
          "size": 4194,
          "stargazers_count": 20439,
          "watchers_count": 20439,
          "language": "Python",
          "has_issues": true,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": true,
          "has_discussions": false,
          "forks_count": 2843,
          "archived": false,
          "disabled": false,
          "open_issues_count": 345,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 2843,
          "open_issues": 345,
          "watchers": 20439,
          "default_branch": "main"
        }
      },
      "_links": {
        "self": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1481"
        },
        "html": {
          "href": "https://github.com/modelcontextprotocol/python-sdk/pull/1481"
        },
        "issue": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1481"
        },
        "comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1481/comments"
        },
        "review_comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1481/comments"
        },
        "review_comment": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/comments{/number}"
        },
        "commits": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1481/commits"
        },
        "statuses": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/statuses/fcddae559b92f6e64f87bd1768baae8265758f94"
        }
      },
      "author_association": "NONE",
      "auto_merge": null,
      "active_lock_reason": null,
      "linked_issues": [
        1,
        1480
      ]
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1479",
      "id": 2914084646,
      "node_id": "PR_kwDOM2n80s6tsWcm",
      "number": 1479,
      "state": "open",
      "locked": false,
      "title": "Add support to custom extensions in streamable http client",
      "user": {
        "login": "OS-anasantos",
        "id": 103270586,
        "node_id": "U_kgDOBifIug",
        "avatar_url": "https://avatars.githubusercontent.com/u/103270586?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/OS-anasantos",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "body": "<!-- Provide a brief summary of your changes -->\r\n\r\n## Motivation and Context\r\n<!-- Why is this change needed? What problem does it solve? -->\r\n\r\nAt the moment when using a private gateway, streamablehttp_client will return error `ConnectError('[SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:1000)')`. This is because it needs sni_hostname. According to this [httpx documentation](https://www.python-httpx.org/advanced/extensions/), not only \"headers\" must have the hostname value, but custom extensions must be sent `(extensions = {\"sni_hostname\": \"www.encode.io\"})`\r\n\r\nUnfortunately, streamable_http client does not allow sending custom extensions.\r\n\r\n## How Has This Been Tested?\r\n<!-- Have you tested this in a real application? Which scenarios were tested? -->\r\n- Added unit tests\r\n- Added a small client example, tested it with MCP_SERVER_HOSTNAME = mcp.deepwiki.com (to setup the private gateway I used chisel)\r\n\r\n<img width=\"1348\" height=\"757\" alt=\"image\" src=\"https://github.com/user-attachments/assets/fc40aa8f-379f-44cc-a79e-7c5b0ecfda89\" />\r\n\r\n## Breaking Changes\r\n<!-- Will users need to update their code or configurations? -->\r\n\r\n## Types of changes\r\n<!-- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->\r\n- [ ] Bug fix (non-breaking change which fixes an issue)\r\n- [x] New feature (non-breaking change which adds functionality)\r\n- [ ] Breaking change (fix or feature that would cause existing functionality to change)\r\n- [ ] Documentation update\r\n\r\n## Checklist\r\n<!-- Go over all the following points, and put an `x` in all the boxes that apply. -->\r\n- [x] I have read the [MCP Documentation](https://modelcontextprotocol.io)\r\n- [x] My code follows the repository's style guidelines\r\n- [x] New and existing tests pass locally\r\n- [ ] I have added appropriate error handling\r\n- [ ] I have added or updated documentation as needed\r\n\r\n## Additional context\r\n<!-- Add any other context, implementation notes, or design decisions -->\r\n",
      "created_at": "2025-10-14T15:15:51Z",
      "updated_at": "2025-11-12T18:29:08Z",
      "closed_at": null,
      "merged_at": null,
      "merge_commit_sha": null,
      "assignee": null,
      "assignees": {},
      "requested_reviewers": {},
      "requested_teams": {},
      "labels": {
        "0": {
          "id": 9287728201,
          "node_id": "LA_kwDOM2n80s8AAAACKZd8SQ",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/needs%20maintainer%20action",
          "name": "needs maintainer action",
          "color": "d33428",
          "default": false,
          "description": "Potentially serious issue - needs proactive fix and maintainer attention"
        },
        "1": {
          "id": 9354757189,
          "node_id": "LA_kwDOM2n80s8AAAACLZZERQ",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/enhancement",
          "name": "enhancement",
          "color": "11b5cc",
          "default": true,
          "description": "Request for a new feature that's not currently supported"
        }
      },
      "milestone": null,
      "draft": false,
      "head": {
        "label": "OS-anasantos:feature/streamable_http_extensions",
        "ref": "feature/streamable_http_extensions",
        "sha": "188f81f4167971001bec45eee90f61fb36d0e3aa",
        "user": {
          "login": "OS-anasantos",
          "id": 103270586,
          "node_id": "U_kgDOBifIug",
          "avatar_url": "https://avatars.githubusercontent.com/u/103270586?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/OS-anasantos",
          "type": "User",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 1075330900,
          "node_id": "R_kgDOQBg_VA",
          "name": "python-sdk",
          "full_name": "OS-anasantos/python-sdk",
          "private": false,
          "owner": {
            "login": "OS-anasantos",
            "id": 103270586,
            "node_id": "U_kgDOBifIug",
            "avatar_url": "https://avatars.githubusercontent.com/u/103270586?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/OS-anasantos",
            "type": "User",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": true,
          "url": "https://api.github.com/repos/OS-anasantos/python-sdk",
          "created_at": "2025-10-13T10:59:54Z",
          "updated_at": "2025-10-31T12:10:26Z",
          "pushed_at": "2025-10-31T12:13:14Z",
          "homepage": "https://modelcontextprotocol.github.io/python-sdk/",
          "size": 2272,
          "stargazers_count": 0,
          "watchers_count": 0,
          "language": "Python",
          "has_issues": false,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": false,
          "has_discussions": false,
          "forks_count": 0,
          "archived": false,
          "disabled": false,
          "open_issues_count": 0,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 0,
          "open_issues": 0,
          "watchers": 0,
          "default_branch": "main"
        }
      },
      "base": {
        "label": "modelcontextprotocol:main",
        "ref": "main",
        "sha": "202af49857e452cdb8b55aa23310df8154e5b292",
        "user": {
          "login": "modelcontextprotocol",
          "id": 182288589,
          "node_id": "O_kgDOCt2AzQ",
          "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/modelcontextprotocol",
          "type": "Organization",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 862584018,
          "node_id": "R_kgDOM2n80g",
          "name": "python-sdk",
          "full_name": "modelcontextprotocol/python-sdk",
          "private": false,
          "owner": {
            "login": "modelcontextprotocol",
            "id": 182288589,
            "node_id": "O_kgDOCt2AzQ",
            "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/modelcontextprotocol",
            "type": "Organization",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": false,
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk",
          "created_at": "2024-09-24T21:01:35Z",
          "updated_at": "2025-12-06T05:02:17Z",
          "pushed_at": "2025-12-04T18:04:06Z",
          "homepage": "https://modelcontextprotocol.github.io/python-sdk/",
          "size": 4194,
          "stargazers_count": 20439,
          "watchers_count": 20439,
          "language": "Python",
          "has_issues": true,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": true,
          "has_discussions": false,
          "forks_count": 2843,
          "archived": false,
          "disabled": false,
          "open_issues_count": 345,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 2843,
          "open_issues": 345,
          "watchers": 20439,
          "default_branch": "main"
        }
      },
      "_links": {
        "self": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1479"
        },
        "html": {
          "href": "https://github.com/modelcontextprotocol/python-sdk/pull/1479"
        },
        "issue": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1479"
        },
        "comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1479/comments"
        },
        "review_comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1479/comments"
        },
        "review_comment": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/comments{/number}"
        },
        "commits": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1479/commits"
        },
        "statuses": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/statuses/188f81f4167971001bec45eee90f61fb36d0e3aa"
        }
      },
      "author_association": "NONE",
      "auto_merge": null,
      "active_lock_reason": null,
      "linked_issues": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1476",
      "id": 2911778246,
      "node_id": "PR_kwDOM2n80s6tjjXG",
      "number": 1476,
      "state": "open",
      "locked": false,
      "title": "feat: Allow ResourceContents objects to be returned directly from read_resource handlers",
      "user": {
        "login": "alexanderreiff",
        "id": 1593375,
        "node_id": "MDQ6VXNlcjE1OTMzNzU=",
        "avatar_url": "https://avatars.githubusercontent.com/u/1593375?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/alexanderreiff",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "body": "This PR allows resources to directly return `TextResourceContents` or `BlobResourceContents` instead of having it cast automatically by the lowlevel server.\r\n\r\nInspired by #1459, but for resources.\r\n\r\n## Motivation and Context\r\n[OpenAI's Apps SDK](https://developers.openai.com/apps-sdk/reference) uses the `_meta` field of a read resource result representing a \"widget\" to configure Content Security Policy and other behaviors.\r\n\r\nThis use of `_meta` is supported by the [protocol](https://modelcontextprotocol.io/specification/2025-06-18/basic#meta), but isn't implemented in the SDK.\r\n\r\nIn order to maximize discoverability and future change-abililty, I added the ability to directly return the two `ResourceContents` classes, which already supports the `_meta` field, rather than add additional tuple fields.\r\n\r\n## How Has This Been Tested?\r\nTest suite additions and example snippets are provided. Running the example shows `_meta` in the response.\r\n```\r\nnpx @modelcontextprotocol/inspector uv run examples/snippets/servers/resource_contents_direct.py\r\n```\r\n<img width=\"361\" height=\"481\" alt=\"image\" src=\"https://github.com/user-attachments/assets/3bd85a29-0c4d-4d1e-be2c-1b1ccb49f24e\" />\r\n\r\n<img width=\"366\" height=\"502\" alt=\"image\" src=\"https://github.com/user-attachments/assets/333578c4-3ea1-47e0-90a4-10c1434fe29f\" />\r\n\r\n## Breaking Changes\r\nN/A\r\n\r\n## Types of changes\r\n- [ ] Bug fix (non-breaking change which fixes an issue)\r\n- [x] New feature (non-breaking change which adds functionality)\r\n- [ ] Breaking change (fix or feature that would cause existing functionality to change)\r\n- [ ] Documentation update\r\n\r\n## Checklist\r\n<!-- Go over all the following points, and put an `x` in all the boxes that apply. -->\r\n- [x] I have read the [MCP Documentation](https://modelcontextprotocol.io)\r\n- [x] My code follows the repository's style guidelines\r\n- [x] New and existing tests pass locally\r\n- [x] I have added appropriate error handling\r\n- [ ] I have added or updated documentation as needed\r\n\r\n## Additional context\r\nN/A\r\n",
      "created_at": "2025-10-13T23:26:37Z",
      "updated_at": "2025-10-27T17:57:11Z",
      "closed_at": null,
      "merged_at": null,
      "merge_commit_sha": null,
      "assignee": null,
      "assignees": {},
      "requested_reviewers": {},
      "requested_teams": {},
      "labels": {
        "0": {
          "id": 9287728201,
          "node_id": "LA_kwDOM2n80s8AAAACKZd8SQ",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/needs%20maintainer%20action",
          "name": "needs maintainer action",
          "color": "d33428",
          "default": false,
          "description": "Potentially serious issue - needs proactive fix and maintainer attention"
        }
      },
      "milestone": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/milestones/16",
        "id": 13789844,
        "node_id": "MI_kwDOM2n80s4A0mqU",
        "number": 16,
        "title": "META Improvements",
        "description": "",
        "creator": {
          "login": "felixweinberger",
          "id": 3823880,
          "node_id": "MDQ6VXNlcjM4MjM4ODA=",
          "avatar_url": "https://avatars.githubusercontent.com/u/3823880?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/felixweinberger",
          "type": "User",
          "user_view_type": "public",
          "site_admin": false
        },
        "open_issues": 2,
        "closed_issues": 4,
        "state": "open",
        "created_at": "2025-09-30T11:36:20Z",
        "updated_at": "2025-10-21T18:52:09Z",
        "due_on": null,
        "closed_at": null
      },
      "draft": false,
      "head": {
        "label": "alexanderreiff:return-resource-directly",
        "ref": "return-resource-directly",
        "sha": "dbd3c9dec2fd0355fc50419e4c7deba2c412ff9d",
        "user": {
          "login": "alexanderreiff",
          "id": 1593375,
          "node_id": "MDQ6VXNlcjE1OTMzNzU=",
          "avatar_url": "https://avatars.githubusercontent.com/u/1593375?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/alexanderreiff",
          "type": "User",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 1075682007,
          "node_id": "R_kgDOQB2a1w",
          "name": "mcp-python-sdk",
          "full_name": "alexanderreiff/mcp-python-sdk",
          "private": false,
          "owner": {
            "login": "alexanderreiff",
            "id": 1593375,
            "node_id": "MDQ6VXNlcjE1OTMzNzU=",
            "avatar_url": "https://avatars.githubusercontent.com/u/1593375?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/alexanderreiff",
            "type": "User",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": true,
          "url": "https://api.github.com/repos/alexanderreiff/mcp-python-sdk",
          "created_at": "2025-10-13T20:54:04Z",
          "updated_at": "2025-10-27T17:53:48Z",
          "pushed_at": "2025-10-27T17:57:10Z",
          "homepage": "https://modelcontextprotocol.github.io/python-sdk/",
          "size": 2186,
          "stargazers_count": 0,
          "watchers_count": 0,
          "language": "Python",
          "has_issues": false,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": false,
          "has_discussions": false,
          "forks_count": 0,
          "archived": false,
          "disabled": false,
          "open_issues_count": 0,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 0,
          "open_issues": 0,
          "watchers": 0,
          "default_branch": "main"
        }
      },
      "base": {
        "label": "modelcontextprotocol:main",
        "ref": "main",
        "sha": "31ae5f4dc4b6572c18fa425c53f83e411d176155",
        "user": {
          "login": "modelcontextprotocol",
          "id": 182288589,
          "node_id": "O_kgDOCt2AzQ",
          "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/modelcontextprotocol",
          "type": "Organization",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 862584018,
          "node_id": "R_kgDOM2n80g",
          "name": "python-sdk",
          "full_name": "modelcontextprotocol/python-sdk",
          "private": false,
          "owner": {
            "login": "modelcontextprotocol",
            "id": 182288589,
            "node_id": "O_kgDOCt2AzQ",
            "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/modelcontextprotocol",
            "type": "Organization",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": false,
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk",
          "created_at": "2024-09-24T21:01:35Z",
          "updated_at": "2025-12-06T05:02:17Z",
          "pushed_at": "2025-12-04T18:04:06Z",
          "homepage": "https://modelcontextprotocol.github.io/python-sdk/",
          "size": 4194,
          "stargazers_count": 20439,
          "watchers_count": 20439,
          "language": "Python",
          "has_issues": true,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": true,
          "has_discussions": false,
          "forks_count": 2843,
          "archived": false,
          "disabled": false,
          "open_issues_count": 345,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 2843,
          "open_issues": 345,
          "watchers": 20439,
          "default_branch": "main"
        }
      },
      "_links": {
        "self": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1476"
        },
        "html": {
          "href": "https://github.com/modelcontextprotocol/python-sdk/pull/1476"
        },
        "issue": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1476"
        },
        "comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1476/comments"
        },
        "review_comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1476/comments"
        },
        "review_comment": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/comments{/number}"
        },
        "commits": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1476/commits"
        },
        "statuses": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/statuses/dbd3c9dec2fd0355fc50419e4c7deba2c412ff9d"
        }
      },
      "author_association": "NONE",
      "auto_merge": null,
      "active_lock_reason": null,
      "linked_issues": [
        1
      ]
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1447",
      "id": 2897743611,
      "node_id": "PR_kwDOM2n80s6suA77",
      "number": 1447,
      "state": "open",
      "locked": false,
      "title": "fix(auth): add token issuer validation for MCP spec compliance",
      "user": {
        "login": "Ujjwal-Bajpayee",
        "id": 145164357,
        "node_id": "U_kgDOCKcIRQ",
        "avatar_url": "https://avatars.githubusercontent.com/u/145164357?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/Ujjwal-Bajpayee",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "body": "\r\n##  Summary\r\n\r\nThis PR implements token issuer validation in the MCP Python SDK client to ensure compliance with the MCP specification requirement:\r\n\r\n> \"MCP clients MUST NOT send tokens to the MCP server other than ones issued by the MCP server's authorization server.\"\r\n\r\nPreviously, the SDK only checked for token existence and expiration.  \r\nThis change adds verification that tokens were issued by the expected authorization server before they are used.\r\n\r\n---\r\n\r\n##  What I Changed\r\n\r\n###  `auth.py`\r\n- Added an optional field `expected_issuer: str | None = None` to `OAuthContext`.\r\n- Updated `is_token_valid()` to:\r\n  - Keep the original token existence and expiration checks.\r\n  - If `expected_issuer` is **not set**, preserve the original behavior.\r\n  - If `expected_issuer` is **set**, decode the access token (assuming JWT format), extract the `iss` claim, and verify that it matches `self.expected_issuer`.\r\n  - Return `False` for missing/mismatched issuers or parsing errors.\r\n- Added a private helper method:\r\n---\r\n\r\n##  Why This Is Safe and Backward-Compatible\r\n\r\n- If `expected_issuer` is **not provided**, behavior is identical to previous versions.\r\n- No function signatures or external APIs were changed.\r\n- Only `is_token_valid` and one private helper were modified.\r\n- Errors or malformed tokens default to a safe `False` return value (fail closed).\r\n- The update adds a security and compliance improvement without introducing breaking changes.\r\n\r\n---\r\n\r\n##  Validation Performed\r\n\r\n- Verified local compilation — no syntax or import errors.\r\n- Checked runtime behavior for valid/invalid/missing `iss` claims.\r\n- Confirmed `is_token_valid()` correctly respects token expiry and issuer matching.\r\n- Ensured all existing authentication flows remain functional.\r\n\r\n---\r\n\r\n\r\n\r\n## 🔗 Related Issue\r\n\r\nCloses #1442\r\n\r\n---\r\n\r\n###  Type of Change\r\n\r\n- [x]  Bug fix (non-breaking change that fixes a compliance/security issue)\r\n- [ ]   New feature\r\n- [ ]   Refactor\r\n- [ ]   Test update only\r\n- [ ]    Documentation update\r\n",
      "created_at": "2025-10-08T14:45:10Z",
      "updated_at": "2025-11-05T05:26:15Z",
      "closed_at": null,
      "merged_at": null,
      "merge_commit_sha": null,
      "assignee": {
        "login": "Ujjwal-Bajpayee",
        "id": 145164357,
        "node_id": "U_kgDOCKcIRQ",
        "avatar_url": "https://avatars.githubusercontent.com/u/145164357?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/Ujjwal-Bajpayee",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "assignees": {
        "0": {
          "login": "Ujjwal-Bajpayee",
          "id": 145164357,
          "node_id": "U_kgDOCKcIRQ",
          "avatar_url": "https://avatars.githubusercontent.com/u/145164357?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/Ujjwal-Bajpayee",
          "type": "User",
          "user_view_type": "public",
          "site_admin": false
        }
      },
      "requested_reviewers": {},
      "requested_teams": {},
      "labels": {
        "0": {
          "id": 9230425628,
          "node_id": "LA_kwDOM2n80s8AAAACJi0eHA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/needs%20more%20work",
          "name": "needs more work",
          "color": "af3f39",
          "default": false,
          "description": "Not ready to be merged yet, needs additional follow-up from the author(s)."
        },
        "1": {
          "id": 9301360597,
          "node_id": "LA_kwDOM2n80s8AAAACKmd_1Q",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/auth",
          "name": "auth",
          "color": "92ad2d",
          "default": false,
          "description": "Issues and PRs related to Authentication / OAuth"
        },
        "2": {
          "id": 9331338299,
          "node_id": "LA_kwDOM2n80s8AAAACLDDsOw",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/improves%20spec%20compliance",
          "name": "improves spec compliance",
          "color": "9FD9BD",
          "default": false,
          "description": "When a change improves ability of SDK users to comply with spec definition"
        }
      },
      "milestone": null,
      "draft": true,
      "head": {
        "label": "Ujjwal-Bajpayee:main",
        "ref": "main",
        "sha": "d6fee4a62ad75aa633073422070a1d4265127d6b",
        "user": {
          "login": "Ujjwal-Bajpayee",
          "id": 145164357,
          "node_id": "U_kgDOCKcIRQ",
          "avatar_url": "https://avatars.githubusercontent.com/u/145164357?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/Ujjwal-Bajpayee",
          "type": "User",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 1072299407,
          "node_id": "R_kgDOP-n9jw",
          "name": "python-sdk",
          "full_name": "Ujjwal-Bajpayee/python-sdk",
          "private": false,
          "owner": {
            "login": "Ujjwal-Bajpayee",
            "id": 145164357,
            "node_id": "U_kgDOCKcIRQ",
            "avatar_url": "https://avatars.githubusercontent.com/u/145164357?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/Ujjwal-Bajpayee",
            "type": "User",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": true,
          "url": "https://api.github.com/repos/Ujjwal-Bajpayee/python-sdk",
          "created_at": "2025-10-08T14:27:08Z",
          "updated_at": "2025-11-05T05:26:23Z",
          "pushed_at": "2025-11-05T05:26:14Z",
          "homepage": "https://modelcontextprotocol.github.io/python-sdk/",
          "size": 2094,
          "stargazers_count": 0,
          "watchers_count": 0,
          "language": "Python",
          "has_issues": false,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": false,
          "has_discussions": false,
          "forks_count": 0,
          "archived": false,
          "disabled": false,
          "open_issues_count": 0,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 0,
          "open_issues": 0,
          "watchers": 0,
          "default_branch": "main"
        }
      },
      "base": {
        "label": "modelcontextprotocol:main",
        "ref": "main",
        "sha": "61399b386c19af9b9c9277727990a6b3c6a95d83",
        "user": {
          "login": "modelcontextprotocol",
          "id": 182288589,
          "node_id": "O_kgDOCt2AzQ",
          "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/modelcontextprotocol",
          "type": "Organization",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 862584018,
          "node_id": "R_kgDOM2n80g",
          "name": "python-sdk",
          "full_name": "modelcontextprotocol/python-sdk",
          "private": false,
          "owner": {
            "login": "modelcontextprotocol",
            "id": 182288589,
            "node_id": "O_kgDOCt2AzQ",
            "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/modelcontextprotocol",
            "type": "Organization",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": false,
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk",
          "created_at": "2024-09-24T21:01:35Z",
          "updated_at": "2025-12-06T05:02:17Z",
          "pushed_at": "2025-12-04T18:04:06Z",
          "homepage": "https://modelcontextprotocol.github.io/python-sdk/",
          "size": 4194,
          "stargazers_count": 20439,
          "watchers_count": 20439,
          "language": "Python",
          "has_issues": true,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": true,
          "has_discussions": false,
          "forks_count": 2843,
          "archived": false,
          "disabled": false,
          "open_issues_count": 345,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 2843,
          "open_issues": 345,
          "watchers": 20439,
          "default_branch": "main"
        }
      },
      "_links": {
        "self": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1447"
        },
        "html": {
          "href": "https://github.com/modelcontextprotocol/python-sdk/pull/1447"
        },
        "issue": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1447"
        },
        "comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1447/comments"
        },
        "review_comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1447/comments"
        },
        "review_comment": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/comments{/number}"
        },
        "commits": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1447/commits"
        },
        "statuses": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/statuses/d6fee4a62ad75aa633073422070a1d4265127d6b"
        }
      },
      "author_association": "NONE",
      "auto_merge": null,
      "active_lock_reason": null,
      "linked_issues": [
        1,
        1442
      ]
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1440",
      "id": 2894491140,
      "node_id": "PR_kwDOM2n80s6shm4E",
      "number": 1440,
      "state": "open",
      "locked": false,
      "title": "Fixes protocol compliance gap described in issue #1419",
      "user": {
        "login": "ChenyangLi4288",
        "id": 113459182,
        "node_id": "U_kgDOBsM_7g",
        "avatar_url": "https://avatars.githubusercontent.com/u/113459182?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/ChenyangLi4288",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "body": "### Brief summary of changes\r\n- Add `RequestResponder.mark_cancelled_without_response()` to support silent cancellation.\r\n- Use silent cancellation in `BaseSession._receive_loop()` when handling `CancelledNotification`.\r\n- When emitting a `CancelledNotification`, proactively cancel the local pending request so `send_request()` unblocks with `McpError(\"Request cancelled\")`.\r\n\r\n## Motivation and Context\r\n- Aligns with MCP spec guidance: receivers of cancellation notifications SHOULD not send a response.\r\n- Fixes protocol compliance gap described in issue `#1419` ([link](https://github.com/modelcontextprotocol/python-sdk/issues/1419)).\r\n\r\n## How Has This Been Tested?\r\n- Ran `tests/shared/test_session.py::test_request_cancellation` to confirm the client’s in-flight request is cancelled promptly without waiting for a peer response.\r\n- Sanity-checked other session paths to ensure no regressions; linter clean.\r\n\r\n## Breaking Changes\r\n- None. Behavior change only affects cancellation-notification flows and makes them spec-compliant.\r\n\r\n## Types of changes\r\n- [x] Bug fix (non-breaking change which fixes an issue)\r\n- [ ] New feature (non-breaking change which adds functionality)\r\n- [ ] Breaking change (fix or feature that would cause existing functionality to change)\r\n- [ ] Documentation update\r\n\r\n## Checklist\r\n- [x] I have read the [MCP Documentation](https://modelcontextprotocol.io)\r\n- [x] My code follows the repository's style guidelines\r\n- [x] New and existing tests pass locally\r\n- [x] I have added appropriate error handling\r\n- [ ] I have added or updated documentation as needed\r\n\r\n## Additional context\r\n- Implements silent cancellation per spec and avoids emitting JSON-RPC error responses upon receiving `CancelledNotification`, improving interoperability and reducing unnecessary traffic.",
      "created_at": "2025-10-07T15:50:41Z",
      "updated_at": "2025-11-25T00:58:58Z",
      "closed_at": null,
      "merged_at": null,
      "merge_commit_sha": null,
      "assignee": null,
      "assignees": {},
      "requested_reviewers": {
        "0": {
          "login": "pcarleton",
          "id": 704663,
          "node_id": "MDQ6VXNlcjcwNDY2Mw==",
          "avatar_url": "https://avatars.githubusercontent.com/u/704663?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/pcarleton",
          "type": "User",
          "user_view_type": "public",
          "site_admin": false
        }
      },
      "requested_teams": {},
      "labels": {
        "0": {
          "id": 9287728201,
          "node_id": "LA_kwDOM2n80s8AAAACKZd8SQ",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/needs%20maintainer%20action",
          "name": "needs maintainer action",
          "color": "d33428",
          "default": false,
          "description": "Potentially serious issue - needs proactive fix and maintainer attention"
        }
      },
      "milestone": null,
      "draft": false,
      "head": {
        "label": "ChenyangLi4288:main",
        "ref": "main",
        "sha": "5aa5de8007ac8603bf2440962e34a763703974ba",
        "user": {
          "login": "ChenyangLi4288",
          "id": 113459182,
          "node_id": "U_kgDOBsM_7g",
          "avatar_url": "https://avatars.githubusercontent.com/u/113459182?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/ChenyangLi4288",
          "type": "User",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 1045834307,
          "node_id": "R_kgDOPlYqQw",
          "name": "python-sdk",
          "full_name": "ChenyangLi4288/python-sdk",
          "private": false,
          "owner": {
            "login": "ChenyangLi4288",
            "id": 113459182,
            "node_id": "U_kgDOBsM_7g",
            "avatar_url": "https://avatars.githubusercontent.com/u/113459182?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/ChenyangLi4288",
            "type": "User",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": true,
          "url": "https://api.github.com/repos/ChenyangLi4288/python-sdk",
          "created_at": "2025-08-27T19:26:39Z",
          "updated_at": "2025-10-07T15:44:25Z",
          "pushed_at": "2025-10-07T15:44:20Z",
          "homepage": "https://modelcontextprotocol.io",
          "size": 2087,
          "stargazers_count": 0,
          "watchers_count": 0,
          "language": "Python",
          "has_issues": false,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": false,
          "has_discussions": false,
          "forks_count": 0,
          "archived": false,
          "disabled": false,
          "open_issues_count": 0,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 0,
          "open_issues": 0,
          "watchers": 0,
          "default_branch": "main"
        }
      },
      "base": {
        "label": "modelcontextprotocol:main",
        "ref": "main",
        "sha": "61399b386c19af9b9c9277727990a6b3c6a95d83",
        "user": {
          "login": "modelcontextprotocol",
          "id": 182288589,
          "node_id": "O_kgDOCt2AzQ",
          "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/modelcontextprotocol",
          "type": "Organization",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 862584018,
          "node_id": "R_kgDOM2n80g",
          "name": "python-sdk",
          "full_name": "modelcontextprotocol/python-sdk",
          "private": false,
          "owner": {
            "login": "modelcontextprotocol",
            "id": 182288589,
            "node_id": "O_kgDOCt2AzQ",
            "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/modelcontextprotocol",
            "type": "Organization",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": false,
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk",
          "created_at": "2024-09-24T21:01:35Z",
          "updated_at": "2025-12-06T05:02:17Z",
          "pushed_at": "2025-12-04T18:04:06Z",
          "homepage": "https://modelcontextprotocol.github.io/python-sdk/",
          "size": 4194,
          "stargazers_count": 20439,
          "watchers_count": 20439,
          "language": "Python",
          "has_issues": true,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": true,
          "has_discussions": false,
          "forks_count": 2843,
          "archived": false,
          "disabled": false,
          "open_issues_count": 345,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 2843,
          "open_issues": 345,
          "watchers": 20439,
          "default_branch": "main"
        }
      },
      "_links": {
        "self": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1440"
        },
        "html": {
          "href": "https://github.com/modelcontextprotocol/python-sdk/pull/1440"
        },
        "issue": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1440"
        },
        "comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1440/comments"
        },
        "review_comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1440/comments"
        },
        "review_comment": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/comments{/number}"
        },
        "commits": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1440/commits"
        },
        "statuses": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/statuses/5aa5de8007ac8603bf2440962e34a763703974ba"
        }
      },
      "author_association": "NONE",
      "auto_merge": null,
      "active_lock_reason": null,
      "linked_issues": [
        1
      ]
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1439",
      "id": 2892693267,
      "node_id": "PR_kwDOM2n80s6sav8T",
      "number": 1439,
      "state": "open",
      "locked": false,
      "title": "Enhanced ResourceTemplate URI matching and type handling logic.",
      "user": {
        "login": "beaterblank",
        "id": 68276845,
        "node_id": "MDQ6VXNlcjY4Mjc2ODQ1",
        "avatar_url": "https://avatars.githubusercontent.com/u/68276845?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/beaterblank",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "body": "<!-- Provide a brief summary of your changes -->\r\n\r\n**Feature Added:**\r\nEnhanced `ResourceTemplate` URI matching and type handling logic.\r\n\r\n## Motivation and Context\r\n\r\nThis change introduces a typed-aware URI parsing mechanism similar to FastAPI’s path parameter system.\r\nIt resolves issue **#220** by adding a more flexible and self-contained approach for handling resource URIs with type annotations.\r\n\r\n## How Has This Been Tested?\r\n\r\n* Verified functionality through new and existing unit tests for:\r\n\r\n  * Typed placeholders (`{name:str}`, `{id:int}`, `{value:float}`, `{uuid:UUID}`, `{path:path}`)\r\n  * Automatic type conversion and validation\r\n  \r\n* Confirmed correct parameter extraction and type enforcement in all matching scenarios.\r\n\r\n## Breaking Changes\r\n\r\n* None expected, but users relying on untyped string-only behaviour may observe typed conversions.\r\n\r\n## Types of changes\r\n\r\n* [x] New feature (non-breaking change which adds functionality)\r\n\r\n\r\n## Checklist\r\n\r\n* [x] I have read the [[MCP Documentation](https://modelcontextprotocol.io/)](https://modelcontextprotocol.io)\r\n* [x] My code follows the repository's style guidelines\r\n* [x] New and existing tests pass locally\r\n* [x] I have added appropriate error handling\r\n* [x] I have added or updated documentation as needed\r\n\r\n## Additional context\r\n\r\nThe implementation assumes URI templates follow a strict pattern and defaults to `str` when no type is provided.\r\nOptional parameters and wildcard matching beyond `{path: path}` are not supported / cannot be supported.\r\n\r\n\r\n",
      "created_at": "2025-10-07T05:32:59Z",
      "updated_at": "2025-10-25T00:43:29Z",
      "closed_at": null,
      "merged_at": null,
      "merge_commit_sha": null,
      "assignee": {
        "login": "felixweinberger",
        "id": 3823880,
        "node_id": "MDQ6VXNlcjM4MjM4ODA=",
        "avatar_url": "https://avatars.githubusercontent.com/u/3823880?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/felixweinberger",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "assignees": {
        "0": {
          "login": "felixweinberger",
          "id": 3823880,
          "node_id": "MDQ6VXNlcjM4MjM4ODA=",
          "avatar_url": "https://avatars.githubusercontent.com/u/3823880?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/felixweinberger",
          "type": "User",
          "user_view_type": "public",
          "site_admin": false
        }
      },
      "requested_reviewers": {},
      "requested_teams": {},
      "labels": {
        "0": {
          "id": 9287728201,
          "node_id": "LA_kwDOM2n80s8AAAACKZd8SQ",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/needs%20maintainer%20action",
          "name": "needs maintainer action",
          "color": "d33428",
          "default": false,
          "description": "Potentially serious issue - needs proactive fix and maintainer attention"
        }
      },
      "milestone": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/milestones/25",
        "id": 13919974,
        "node_id": "MI_kwDOM2n80s4A1Gbm",
        "number": 25,
        "title": "Resource URI changes",
        "description": null,
        "creator": {
          "login": "felixweinberger",
          "id": 3823880,
          "node_id": "MDQ6VXNlcjM4MjM4ODA=",
          "avatar_url": "https://avatars.githubusercontent.com/u/3823880?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/felixweinberger",
          "type": "User",
          "user_view_type": "public",
          "site_admin": false
        },
        "open_issues": 1,
        "closed_issues": 1,
        "state": "open",
        "created_at": "2025-10-17T14:30:34Z",
        "updated_at": "2025-10-21T16:40:49Z",
        "due_on": null,
        "closed_at": null
      },
      "draft": false,
      "head": {
        "label": "beaterblank:main",
        "ref": "main",
        "sha": "0953fcb9db25f5c88e81d9164bb47850870a9fa7",
        "user": {
          "login": "beaterblank",
          "id": 68276845,
          "node_id": "MDQ6VXNlcjY4Mjc2ODQ1",
          "avatar_url": "https://avatars.githubusercontent.com/u/68276845?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/beaterblank",
          "type": "User",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 1071135091,
          "node_id": "R_kgDOP9g5cw",
          "name": "python-sdk",
          "full_name": "beaterblank/python-sdk",
          "private": false,
          "owner": {
            "login": "beaterblank",
            "id": 68276845,
            "node_id": "MDQ6VXNlcjY4Mjc2ODQ1",
            "avatar_url": "https://avatars.githubusercontent.com/u/68276845?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/beaterblank",
            "type": "User",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": true,
          "url": "https://api.github.com/repos/beaterblank/python-sdk",
          "created_at": "2025-10-06T23:09:30Z",
          "updated_at": "2025-10-25T00:43:34Z",
          "pushed_at": "2025-10-25T00:43:28Z",
          "homepage": "https://modelcontextprotocol.github.io/python-sdk/",
          "size": 2252,
          "stargazers_count": 0,
          "watchers_count": 0,
          "language": "Python",
          "has_issues": false,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": false,
          "has_discussions": false,
          "forks_count": 0,
          "archived": false,
          "disabled": false,
          "open_issues_count": 0,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 0,
          "open_issues": 0,
          "watchers": 0,
          "default_branch": "main"
        }
      },
      "base": {
        "label": "modelcontextprotocol:main",
        "ref": "main",
        "sha": "6c26d087df3406c7da1f85b8ae3c3caeabf7b002",
        "user": {
          "login": "modelcontextprotocol",
          "id": 182288589,
          "node_id": "O_kgDOCt2AzQ",
          "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/modelcontextprotocol",
          "type": "Organization",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 862584018,
          "node_id": "R_kgDOM2n80g",
          "name": "python-sdk",
          "full_name": "modelcontextprotocol/python-sdk",
          "private": false,
          "owner": {
            "login": "modelcontextprotocol",
            "id": 182288589,
            "node_id": "O_kgDOCt2AzQ",
            "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/modelcontextprotocol",
            "type": "Organization",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": false,
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk",
          "created_at": "2024-09-24T21:01:35Z",
          "updated_at": "2025-12-06T05:02:17Z",
          "pushed_at": "2025-12-04T18:04:06Z",
          "homepage": "https://modelcontextprotocol.github.io/python-sdk/",
          "size": 4194,
          "stargazers_count": 20439,
          "watchers_count": 20439,
          "language": "Python",
          "has_issues": true,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": true,
          "has_discussions": false,
          "forks_count": 2843,
          "archived": false,
          "disabled": false,
          "open_issues_count": 345,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 2843,
          "open_issues": 345,
          "watchers": 20439,
          "default_branch": "main"
        }
      },
      "_links": {
        "self": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1439"
        },
        "html": {
          "href": "https://github.com/modelcontextprotocol/python-sdk/pull/1439"
        },
        "issue": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1439"
        },
        "comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1439/comments"
        },
        "review_comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1439/comments"
        },
        "review_comment": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/comments{/number}"
        },
        "commits": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1439/commits"
        },
        "statuses": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/statuses/0953fcb9db25f5c88e81d9164bb47850870a9fa7"
        }
      },
      "author_association": "NONE",
      "auto_merge": null,
      "active_lock_reason": null,
      "linked_issues": [
        2
      ]
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1436",
      "id": 2891277477,
      "node_id": "PR_kwDOM2n80s6sVWSl",
      "number": 1436,
      "state": "open",
      "locked": false,
      "title": "[DOC] simple mcp client with sampling capability",
      "user": {
        "login": "yarnabrina",
        "id": 39331844,
        "node_id": "MDQ6VXNlcjM5MzMxODQ0",
        "avatar_url": "https://avatars.githubusercontent.com/u/39331844?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/yarnabrina",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "body": "<!-- Provide a brief summary of your changes -->\r\n\r\n## Motivation and Context\r\n<!-- Why is this change needed? What problem does it solve? -->\r\nThe is no documented MCP client example how to support MCP servers using sampling capability. This PR attempts to add a basic example.\r\n\r\n## How Has This Been Tested?\r\n<!-- Have you tested this in a real application? Which scenarios were tested? -->\r\nThis changes are subset of [my personal repository](https://github.com/yarnabrina/learn-model-context-protocol). It is not tested in a production system, but thoroughly tested locally.\r\n\r\n## Breaking Changes\r\n<!-- Will users need to update their code or configurations? -->\r\nNo\r\n\r\n## Types of changes\r\n<!-- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->\r\n- [ ] Bug fix (non-breaking change which fixes an issue)\r\n- [ ] New feature (non-breaking change which adds functionality)\r\n- [ ] Breaking change (fix or feature that would cause existing functionality to change)\r\n- [x] Documentation update\r\n\r\n## Checklist\r\n<!-- Go over all the following points, and put an `x` in all the boxes that apply. -->\r\n- [x] I have read the [MCP Documentation](https://modelcontextprotocol.io)\r\n- [x] My code follows the repository's style guidelines\r\n- [ ] New and existing tests pass locally\r\n- [ ] I have added appropriate error handling\r\n- [x] I have added or updated documentation as needed\r\n\r\n## Additional context\r\n<!-- Add any other context, implementation notes, or design decisions -->\r\nRelated #1205 \r\nCloses #539 ",
      "created_at": "2025-10-06T18:00:08Z",
      "updated_at": "2025-11-12T02:28:57Z",
      "closed_at": null,
      "merged_at": null,
      "merge_commit_sha": "e5e2d51b1d2ee8f8eff705a5e7d64d7d38b382ca",
      "assignee": null,
      "assignees": {},
      "requested_reviewers": {
        "0": {
          "login": "maxisbey",
          "id": 224885523,
          "node_id": "U_kgDODWd7Ew",
          "avatar_url": "https://avatars.githubusercontent.com/u/224885523?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/maxisbey",
          "type": "User",
          "user_view_type": "public",
          "site_admin": false
        },
        "1": {
          "login": "felixweinberger",
          "id": 3823880,
          "node_id": "MDQ6VXNlcjM4MjM4ODA=",
          "avatar_url": "https://avatars.githubusercontent.com/u/3823880?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/felixweinberger",
          "type": "User",
          "user_view_type": "public",
          "site_admin": false
        }
      },
      "requested_teams": {},
      "labels": {
        "0": {
          "id": 7511840560,
          "node_id": "LA_kwDOM2n80s8AAAABv72XMA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/documentation",
          "name": "documentation",
          "color": "0075ca",
          "default": true,
          "description": "Improvements or additions to documentation"
        },
        "1": {
          "id": 9230425628,
          "node_id": "LA_kwDOM2n80s8AAAACJi0eHA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/needs%20more%20work",
          "name": "needs more work",
          "color": "af3f39",
          "default": false,
          "description": "Not ready to be merged yet, needs additional follow-up from the author(s)."
        },
        "2": {
          "id": 9354772110,
          "node_id": "LA_kwDOM2n80s8AAAACLZZ-jg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/P3",
          "name": "P3",
          "color": "c7df49",
          "default": false,
          "description": "Nice to haves, rare edge cases"
        }
      },
      "milestone": null,
      "draft": false,
      "head": {
        "label": "yarnabrina:document-sampling",
        "ref": "document-sampling",
        "sha": "a7dcda1bd687b680318c2d506cb2472d83d7d59b",
        "user": {
          "login": "yarnabrina",
          "id": 39331844,
          "node_id": "MDQ6VXNlcjM5MzMxODQ0",
          "avatar_url": "https://avatars.githubusercontent.com/u/39331844?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/yarnabrina",
          "type": "User",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 1070827974,
          "node_id": "R_kgDOP9OJxg",
          "name": "mcp-python-sdk-fork",
          "full_name": "yarnabrina/mcp-python-sdk-fork",
          "private": false,
          "owner": {
            "login": "yarnabrina",
            "id": 39331844,
            "node_id": "MDQ6VXNlcjM5MzMxODQ0",
            "avatar_url": "https://avatars.githubusercontent.com/u/39331844?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/yarnabrina",
            "type": "User",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": true,
          "url": "https://api.github.com/repos/yarnabrina/mcp-python-sdk-fork",
          "created_at": "2025-10-06T13:44:18Z",
          "updated_at": "2025-12-05T19:15:55Z",
          "pushed_at": "2025-12-05T19:15:35Z",
          "homepage": "https://modelcontextprotocol.github.io/python-sdk/",
          "size": 2543,
          "stargazers_count": 0,
          "watchers_count": 0,
          "language": "Python",
          "has_issues": false,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": false,
          "has_discussions": false,
          "forks_count": 0,
          "archived": false,
          "disabled": false,
          "open_issues_count": 0,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 0,
          "open_issues": 0,
          "watchers": 0,
          "default_branch": "main"
        }
      },
      "base": {
        "label": "modelcontextprotocol:main",
        "ref": "main",
        "sha": "be730674adae118ad89806cd3011dc699fef8801",
        "user": {
          "login": "modelcontextprotocol",
          "id": 182288589,
          "node_id": "O_kgDOCt2AzQ",
          "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/modelcontextprotocol",
          "type": "Organization",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 862584018,
          "node_id": "R_kgDOM2n80g",
          "name": "python-sdk",
          "full_name": "modelcontextprotocol/python-sdk",
          "private": false,
          "owner": {
            "login": "modelcontextprotocol",
            "id": 182288589,
            "node_id": "O_kgDOCt2AzQ",
            "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/modelcontextprotocol",
            "type": "Organization",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": false,
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk",
          "created_at": "2024-09-24T21:01:35Z",
          "updated_at": "2025-12-06T05:02:17Z",
          "pushed_at": "2025-12-04T18:04:06Z",
          "homepage": "https://modelcontextprotocol.github.io/python-sdk/",
          "size": 4194,
          "stargazers_count": 20439,
          "watchers_count": 20439,
          "language": "Python",
          "has_issues": true,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": true,
          "has_discussions": false,
          "forks_count": 2843,
          "archived": false,
          "disabled": false,
          "open_issues_count": 345,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 2843,
          "open_issues": 345,
          "watchers": 20439,
          "default_branch": "main"
        }
      },
      "_links": {
        "self": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1436"
        },
        "html": {
          "href": "https://github.com/modelcontextprotocol/python-sdk/pull/1436"
        },
        "issue": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1436"
        },
        "comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1436/comments"
        },
        "review_comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1436/comments"
        },
        "review_comment": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/comments{/number}"
        },
        "commits": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1436/commits"
        },
        "statuses": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/statuses/a7dcda1bd687b680318c2d506cb2472d83d7d59b"
        }
      },
      "author_association": "NONE",
      "auto_merge": null,
      "active_lock_reason": null,
      "linked_issues": [
        1,
        5,
        539
      ]
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1432",
      "id": 2890349027,
      "node_id": "PR_kwDOM2n80s6sRznj",
      "number": 1432,
      "state": "open",
      "locked": false,
      "title": "Update bug.yaml w/ fully-self-contained client+server example",
      "user": {
        "login": "ochafik",
        "id": 273860,
        "node_id": "MDQ6VXNlcjI3Mzg2MA==",
        "avatar_url": "https://avatars.githubusercontent.com/u/273860?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/ochafik",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "body": "We chatted about updating the bug template to get users to provide full repro test cases.\r\n\r\nThis might be a bit too much but shows a single-file, no-dep (besides uv) client+server example as an easy starting point.\r\n\r\n@felixweinberger @maxisbey @Kludex wdyt?\r\n\r\n(alternatively, could create a lil markdown we'd point to instead of https://stackoverflow.com/help/minimal-reproducible-example, which would include this example and maybe more)",
      "created_at": "2025-10-06T13:51:06Z",
      "updated_at": "2025-10-06T14:14:33Z",
      "closed_at": null,
      "merged_at": null,
      "merge_commit_sha": "c3c386849fc42c6029760823990da54892ecc445",
      "assignee": null,
      "assignees": {},
      "requested_reviewers": {},
      "requested_teams": {},
      "labels": {},
      "milestone": null,
      "draft": true,
      "head": {
        "label": "modelcontextprotocol:ochafik/bug-template-self-contained",
        "ref": "ochafik/bug-template-self-contained",
        "sha": "e627122d1d5c2208db35a5da15e0c770e84f9627",
        "user": {
          "login": "modelcontextprotocol",
          "id": 182288589,
          "node_id": "O_kgDOCt2AzQ",
          "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/modelcontextprotocol",
          "type": "Organization",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 862584018,
          "node_id": "R_kgDOM2n80g",
          "name": "python-sdk",
          "full_name": "modelcontextprotocol/python-sdk",
          "private": false,
          "owner": {
            "login": "modelcontextprotocol",
            "id": 182288589,
            "node_id": "O_kgDOCt2AzQ",
            "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/modelcontextprotocol",
            "type": "Organization",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": false,
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk",
          "created_at": "2024-09-24T21:01:35Z",
          "updated_at": "2025-12-06T05:02:17Z",
          "pushed_at": "2025-12-04T18:04:06Z",
          "homepage": "https://modelcontextprotocol.github.io/python-sdk/",
          "size": 4194,
          "stargazers_count": 20439,
          "watchers_count": 20439,
          "language": "Python",
          "has_issues": true,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": true,
          "has_discussions": false,
          "forks_count": 2843,
          "archived": false,
          "disabled": false,
          "open_issues_count": 345,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 2843,
          "open_issues": 345,
          "watchers": 20439,
          "default_branch": "main"
        }
      },
      "base": {
        "label": "modelcontextprotocol:main",
        "ref": "main",
        "sha": "7d335efd82b2bdc80158f6538b9532763b3c2e4e",
        "user": {
          "login": "modelcontextprotocol",
          "id": 182288589,
          "node_id": "O_kgDOCt2AzQ",
          "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/modelcontextprotocol",
          "type": "Organization",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 862584018,
          "node_id": "R_kgDOM2n80g",
          "name": "python-sdk",
          "full_name": "modelcontextprotocol/python-sdk",
          "private": false,
          "owner": {
            "login": "modelcontextprotocol",
            "id": 182288589,
            "node_id": "O_kgDOCt2AzQ",
            "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/modelcontextprotocol",
            "type": "Organization",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": false,
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk",
          "created_at": "2024-09-24T21:01:35Z",
          "updated_at": "2025-12-06T05:02:17Z",
          "pushed_at": "2025-12-04T18:04:06Z",
          "homepage": "https://modelcontextprotocol.github.io/python-sdk/",
          "size": 4194,
          "stargazers_count": 20439,
          "watchers_count": 20439,
          "language": "Python",
          "has_issues": true,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": true,
          "has_discussions": false,
          "forks_count": 2843,
          "archived": false,
          "disabled": false,
          "open_issues_count": 345,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 2843,
          "open_issues": 345,
          "watchers": 20439,
          "default_branch": "main"
        }
      },
      "_links": {
        "self": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1432"
        },
        "html": {
          "href": "https://github.com/modelcontextprotocol/python-sdk/pull/1432"
        },
        "issue": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1432"
        },
        "comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1432/comments"
        },
        "review_comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1432/comments"
        },
        "review_comment": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/comments{/number}"
        },
        "commits": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1432/commits"
        },
        "statuses": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/statuses/e627122d1d5c2208db35a5da15e0c770e84f9627"
        }
      },
      "author_association": "CONTRIBUTOR",
      "auto_merge": null,
      "active_lock_reason": null,
      "linked_issues": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1427",
      "id": 2885481892,
      "node_id": "PR_kwDOM2n80s6r_PWk",
      "number": 1427,
      "state": "open",
      "locked": false,
      "title": "[SEP-1575] Changes to introduce Tool Versions ",
      "user": {
        "login": "malaykurwa",
        "id": 2974051,
        "node_id": "MDQ6VXNlcjI5NzQwNTE=",
        "avatar_url": "https://avatars.githubusercontent.com/u/2974051?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/malaykurwa",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "body": "<!-- Provide a brief summary of your changes -->\r\n  This PR implements [SEP-1575](https://github.com/modelcontextprotocol/modelcontextprotocol/issues/1575) Tool Versioning support, enabling MCP servers to declare semantic versions for their tools\r\n  and allowing clients to specify version constraints when making tool calls.\r\n  ## Motivation and Context\r\n  <!-- Why is this change needed? What problem does it solve? -->\r\n  Currently, MCP tools lack versioning support, which can lead to breaking changes when tools are updated. This creates instability for clients that depend on specific tool behaviors. The tool\r\n  versioning feature addresses this by:\r\n  - **Preventing Breaking Changes**: Clients can specify version constraints to ensure compatibility\r\n  - **Semantic Versioning**: Tools can declare versions following SemVer 2.0.0 standard\r\n  - **Backwards Compatibility**: Existing un-versioned tools continue to work normally\r\n  - **Clear Error Handling**: Provides meaningful error messages when version requirements cannot be satisfied\r\n  ## How Has This Been Tested?\r\n  <!-- Have you tested this in a real application? Which scenarios were tested? -->\r\n  The implementation includes comprehensive testing:\r\n  - **Unit Tests**: Version parsing, constraint satisfaction, and version selection algorithms\r\n  - **Error Scenarios**: Testing version conflicts and unsatisfied requirements\r\n  Test files:\r\n  - `examples/test_versioning.py` - Comprehensive test suite covering all versioning functionality\r\n  - `examples/tool_versioning_example.py` - Interactive demonstration of versioning features\r\n  ## Breaking Changes\r\n  <!-- Will users need to update their code or configurations? -->\r\n  **No breaking changes** - This implementation is fully backwards compatible:\r\n  - Existing un-versioned tools continue to work without modification\r\n  - Legacy clients without version requirements use the latest stable version\r\n  - All existing APIs remain unchanged\r\n  - New functionality is purely additive\r\n  ## Types of changes\r\n  <!-- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->\r\n  - [ ] Bug fix (non-breaking change which fixes an issue)\r\n  - [x] New feature (non-breaking change which adds functionality)\r\n  - [ ] Breaking change (fix or feature that would cause existing functionality to change)\r\n  - [ ] Documentation update\r\n  ## Checklist\r\n  <!-- Go over all the following points, and put an `x` in all the boxes that apply. -->\r\n  - [x] I have read the [MCP Documentation](https://modelcontextprotocol.io)\r\n  - [x] My code follows the repository's style guidelines\r\n  - [x] New and existing tests pass locally\r\n  - [x] I have added appropriate error handling\r\n  - [x] I have added or updated documentation as needed\r\n  ## Additional context\r\n  <!-- Add any other context, implementation notes, or design decisions -->\r\n  ### Key Implementation Details\r\n  **Schema Updates:**\r\n  - Added optional `version` field to tool definitions\r\n  - Added optional `tool_requirements` field to tool call requests\r\n  - Added `UNSATISFIED_TOOL_VERSION` error code\r\n  **Version Constraint Syntax:**\r\n  - **Caret (`^`)**: Allows non-breaking updates (`^1.2.3` ≡ `>=1.2.3 <2.0.0`)\r\n  - **Tilde (`~`)**: Allows patch-level updates (`~1.2.3` ≡ `>=1.2.3 <1.3.0`)\r\n  - **Comparison Operators**: `>`, `>=`, `<`, `<=`\r\n  - **Exact Version**: `\"1.2.3\"` (no operator)\r\n  **New Files:**\r\n  - `src/mcp/server/fastmcp/utilities/versioning.py` - Core versioning utilities\r\n  - `examples/test_versioning.py` - Comprehensive test suite\r\n  - `examples/tool_versioning_example.py` - Interactive examples\r\n  - `TOOL_VERSIONING.md` - Complete implementation documentation\r\n  **Modified Files:**\r\n  - `src/mcp/types.py` - Added version fields and error codes\r\n  - `src/mcp/server/fastmcp/tools/base.py` - Updated Tool class with version support\r\n  - `src/mcp/server/fastmcp/tools/tool_manager.py` - Enhanced tool management with versioning\r\n  - `src/mcp/server/fastmcp/server.py` - Updated FastMCP API with version parameters\r\n  - `src/mcp/server/lowlevel/server.py` - Low-level server versioning support\r\n  ### Usage Examples\r\n  **Server-side (creating versioned tools):**\r\n```\r\n  @server.tool(version=\"1.0.0\")\r\n  def get_weather_v1(location: str) -> str:\r\n      return f\"Weather in {location}: Sunny, 72°F\"\r\n  server.add_tool(get_weather_v2, version=\"2.0.0\")\r\n```\r\n  **Client-side (using version constraints):**\r\n```\r\n  result = await server.call_tool(\r\n      \"get_weather\",\r\n      {\"location\": \"New York\"},\r\n      tool_requirements={\"get_weather\": \"^1.0.0\"}\r\n  )\r\n```\r\n  This implementation provides a solid foundation for tool versioning while maintaining full backwards compatibility with existing MCP deployments.\r\n\r\n  This PR description provides a comprehensive overview of your tool versioning implementation, highlighting the key features, testing approach, backwards compatibility, and technical details that\r\n  reviewers will need to understand the changes.",
      "created_at": "2025-10-03T16:17:28Z",
      "updated_at": "2025-11-28T10:19:14Z",
      "closed_at": null,
      "merged_at": null,
      "merge_commit_sha": null,
      "assignee": null,
      "assignees": {},
      "requested_reviewers": {},
      "requested_teams": {},
      "labels": {},
      "milestone": null,
      "draft": true,
      "head": {
        "label": "malaykurwa:main",
        "ref": "main",
        "sha": "02c863ea2ea6e481646558d9c18efbfbd614cc26",
        "user": {
          "login": "malaykurwa",
          "id": 2974051,
          "node_id": "MDQ6VXNlcjI5NzQwNTE=",
          "avatar_url": "https://avatars.githubusercontent.com/u/2974051?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/malaykurwa",
          "type": "User",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 1068852177,
          "node_id": "R_kgDOP7Vj0Q",
          "name": "python-sdk",
          "full_name": "malaykurwa/python-sdk",
          "private": false,
          "owner": {
            "login": "malaykurwa",
            "id": 2974051,
            "node_id": "MDQ6VXNlcjI5NzQwNTE=",
            "avatar_url": "https://avatars.githubusercontent.com/u/2974051?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/malaykurwa",
            "type": "User",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": true,
          "url": "https://api.github.com/repos/malaykurwa/python-sdk",
          "created_at": "2025-10-03T02:25:05Z",
          "updated_at": "2025-10-03T16:11:15Z",
          "pushed_at": "2025-10-03T16:11:11Z",
          "homepage": "https://modelcontextprotocol.io",
          "size": 2085,
          "stargazers_count": 0,
          "watchers_count": 0,
          "language": "Python",
          "has_issues": false,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": false,
          "has_discussions": false,
          "forks_count": 0,
          "archived": false,
          "disabled": false,
          "open_issues_count": 0,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 0,
          "open_issues": 0,
          "watchers": 0,
          "default_branch": "main"
        }
      },
      "base": {
        "label": "modelcontextprotocol:main",
        "ref": "main",
        "sha": "814c9c024a86fa0f608e87b15b21a0a16a926d61",
        "user": {
          "login": "modelcontextprotocol",
          "id": 182288589,
          "node_id": "O_kgDOCt2AzQ",
          "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/modelcontextprotocol",
          "type": "Organization",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 862584018,
          "node_id": "R_kgDOM2n80g",
          "name": "python-sdk",
          "full_name": "modelcontextprotocol/python-sdk",
          "private": false,
          "owner": {
            "login": "modelcontextprotocol",
            "id": 182288589,
            "node_id": "O_kgDOCt2AzQ",
            "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/modelcontextprotocol",
            "type": "Organization",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": false,
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk",
          "created_at": "2024-09-24T21:01:35Z",
          "updated_at": "2025-12-06T05:02:17Z",
          "pushed_at": "2025-12-04T18:04:06Z",
          "homepage": "https://modelcontextprotocol.github.io/python-sdk/",
          "size": 4194,
          "stargazers_count": 20439,
          "watchers_count": 20439,
          "language": "Python",
          "has_issues": true,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": true,
          "has_discussions": false,
          "forks_count": 2843,
          "archived": false,
          "disabled": false,
          "open_issues_count": 345,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 2843,
          "open_issues": 345,
          "watchers": 20439,
          "default_branch": "main"
        }
      },
      "_links": {
        "self": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1427"
        },
        "html": {
          "href": "https://github.com/modelcontextprotocol/python-sdk/pull/1427"
        },
        "issue": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1427"
        },
        "comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1427/comments"
        },
        "review_comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1427/comments"
        },
        "review_comment": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/comments{/number}"
        },
        "commits": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1427/commits"
        },
        "statuses": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/statuses/02c863ea2ea6e481646558d9c18efbfbd614cc26"
        }
      },
      "author_association": "NONE",
      "auto_merge": null,
      "active_lock_reason": null,
      "linked_issues": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1417",
      "id": 2878282398,
      "node_id": "PR_kwDOM2n80s6rjxqe",
      "number": 1417,
      "state": "open",
      "locked": false,
      "title": "Stateful Streamable-HTTP: send 404 Not Found on unknown Mcp-Session-Id",
      "user": {
        "login": "Zalewa",
        "id": 563785,
        "node_id": "MDQ6VXNlcjU2Mzc4NQ==",
        "avatar_url": "https://avatars.githubusercontent.com/u/563785?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/Zalewa",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "body": "## Motivation and Context\r\nFixes #1004\r\n\r\nMCP protocol spec states that when Mcp-Session-Id arrives for a session that has been removed, the server **MUST** reply with a \"404 Not Found\" HTTP status code. It was replying with a \"400 Bad Request\" instead. The relevant part of the spec is here in point 2.5.3: https://modelcontextprotocol.io/specification/2025-06-18/basic/transports#session-management\r\n\r\n> The server MAY terminate the session at any time, after which it MUST respond to requests containing that session ID with HTTP 404 Not Found.\r\n\r\n## How Has This Been Tested?\r\nI wrote a unit test.\r\n\r\n## Breaking Changes\r\nUser apps may be relying on the incorrect behavior of sending \"400 Bad Request\".\r\nhttps://xkcd.com/927/\r\n\r\n## Types of changes\r\n- [x] Bug fix (~non-~potentially-breaking change which fixes an issue)\r\n- [ ] New feature (non-breaking change which adds functionality)\r\n- [x] Breaking change (fix or feature that would cause existing functionality to change)\r\n- [ ] Documentation update\r\n\r\n## Checklist\r\n- [x] I have read the [MCP Documentation](https://modelcontextprotocol.io)\r\n- [x] My code follows the repository's style guidelines\r\n- [x] New and existing tests pass locally\r\n- [ ] I have added appropriate error handling\r\n- [ ] I have added or updated documentation as needed\r\n\r\n## Additional context\r\nhttps://github.com/modelcontextprotocol/python-sdk/pull/641/files#r2394152091\r\n",
      "created_at": "2025-10-01T13:34:12Z",
      "updated_at": "2025-10-13T13:31:48Z",
      "closed_at": null,
      "merged_at": null,
      "merge_commit_sha": "facf072ef03b28664cc142a2c523300621e8e915",
      "assignee": null,
      "assignees": {},
      "requested_reviewers": {},
      "requested_teams": {},
      "labels": {
        "0": {
          "id": 9230423596,
          "node_id": "LA_kwDOM2n80s8AAAACJi0WLA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/breaking%20change",
          "name": "breaking change",
          "color": "000000",
          "default": false,
          "description": "Will break existing deployments when updated without changes"
        },
        "1": {
          "id": 9287728201,
          "node_id": "LA_kwDOM2n80s8AAAACKZd8SQ",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/needs%20maintainer%20action",
          "name": "needs maintainer action",
          "color": "d33428",
          "default": false,
          "description": "Potentially serious issue - needs proactive fix and maintainer attention"
        }
      },
      "milestone": null,
      "draft": false,
      "head": {
        "label": "Zalewa:fix/streamable-http-sending-bad-request",
        "ref": "fix/streamable-http-sending-bad-request",
        "sha": "8676c9f837365601f5eada557c7911b9698d16ff",
        "user": {
          "login": "Zalewa",
          "id": 563785,
          "node_id": "MDQ6VXNlcjU2Mzc4NQ==",
          "avatar_url": "https://avatars.githubusercontent.com/u/563785?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/Zalewa",
          "type": "User",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 1067832757,
          "node_id": "R_kgDOP6XVtQ",
          "name": "modelcontextprotocol-python-sdk",
          "full_name": "Zalewa/modelcontextprotocol-python-sdk",
          "private": false,
          "owner": {
            "login": "Zalewa",
            "id": 563785,
            "node_id": "MDQ6VXNlcjU2Mzc4NQ==",
            "avatar_url": "https://avatars.githubusercontent.com/u/563785?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/Zalewa",
            "type": "User",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "Fork of the official Python SDK for Model Context Protocol servers and clients",
          "fork": true,
          "url": "https://api.github.com/repos/Zalewa/modelcontextprotocol-python-sdk",
          "created_at": "2025-10-01T13:05:46Z",
          "updated_at": "2025-10-01T13:05:46Z",
          "pushed_at": "2025-10-01T13:29:47Z",
          "homepage": "https://modelcontextprotocol.io",
          "size": 1639,
          "stargazers_count": 0,
          "watchers_count": 0,
          "language": null,
          "has_issues": false,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": false,
          "has_discussions": false,
          "forks_count": 0,
          "archived": false,
          "disabled": false,
          "open_issues_count": 0,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 0,
          "open_issues": 0,
          "watchers": 0,
          "default_branch": "main"
        }
      },
      "base": {
        "label": "modelcontextprotocol:main",
        "ref": "main",
        "sha": "3e798bfc01856df711b921f7f3b55379fbd087e4",
        "user": {
          "login": "modelcontextprotocol",
          "id": 182288589,
          "node_id": "O_kgDOCt2AzQ",
          "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/modelcontextprotocol",
          "type": "Organization",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 862584018,
          "node_id": "R_kgDOM2n80g",
          "name": "python-sdk",
          "full_name": "modelcontextprotocol/python-sdk",
          "private": false,
          "owner": {
            "login": "modelcontextprotocol",
            "id": 182288589,
            "node_id": "O_kgDOCt2AzQ",
            "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/modelcontextprotocol",
            "type": "Organization",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": false,
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk",
          "created_at": "2024-09-24T21:01:35Z",
          "updated_at": "2025-12-06T05:02:17Z",
          "pushed_at": "2025-12-04T18:04:06Z",
          "homepage": "https://modelcontextprotocol.github.io/python-sdk/",
          "size": 4194,
          "stargazers_count": 20439,
          "watchers_count": 20439,
          "language": "Python",
          "has_issues": true,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": true,
          "has_discussions": false,
          "forks_count": 2843,
          "archived": false,
          "disabled": false,
          "open_issues_count": 345,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 2843,
          "open_issues": 345,
          "watchers": 20439,
          "default_branch": "main"
        }
      },
      "_links": {
        "self": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1417"
        },
        "html": {
          "href": "https://github.com/modelcontextprotocol/python-sdk/pull/1417"
        },
        "issue": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1417"
        },
        "comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1417/comments"
        },
        "review_comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1417/comments"
        },
        "review_comment": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/comments{/number}"
        },
        "commits": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1417/commits"
        },
        "statuses": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/statuses/8676c9f837365601f5eada557c7911b9698d16ff"
        }
      },
      "author_association": "NONE",
      "auto_merge": null,
      "active_lock_reason": null,
      "linked_issues": [
        1,
        1004
      ]
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1406",
      "id": 2864190201,
      "node_id": "PR_kwDOM2n80s6quBL5",
      "number": 1406,
      "state": "open",
      "locked": false,
      "title": "Add support for context-only resources (#1405)",
      "user": {
        "login": "0Delta",
        "id": 12265602,
        "node_id": "MDQ6VXNlcjEyMjY1NjAy",
        "avatar_url": "https://avatars.githubusercontent.com/u/12265602?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/0Delta",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "body": "Add support for context-only resources \r\n\r\n## Motivation and Context\r\n#1405\r\n\r\nCurrently, it is not possible to define a Resource that takes only the Context parameter as an argument. When attempting to create such a resource, the registration logic incorrectly classifies it as a template resource instead of a regular resource.\r\n\r\nThis limitation prevents developers from creating resources that need access to server session context but don't require dynamic URI components, reducing flexibility in resource design.\r\n\r\n## How Has This Been Tested?\r\n\r\n- [x] Added comprehensive unit tests for context-only resource functionality\r\n- [x] Added integration tests to verify correct resource registration\r\n- [x] All existing resource tests continue to pass (22/22 tests passed)\r\n- [x] Tested with example context-only resource implementation\r\n- [x] Verified backward compatibility with existing resource definitions\r\n\r\n## Breaking Changes\r\n\r\nNo breaking changes. The `context` parameter in `Resource.read()` method is optional with default `None`. All existing resource implementations continue to work unchanged.\r\n\r\n## Types of changes\r\n<!-- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->\r\n- [x] Bug fix (non-breaking change which fixes an issue)\r\n- [ ] New feature (non-breaking change which adds functionality)\r\n- [ ] Breaking change (fix or feature that would cause existing functionality to change)\r\n- [ ] Documentation update\r\n\r\n## Checklist\r\n<!-- Go over all the following points, and put an `x` in all the boxes that apply. -->\r\n- [x] I have read the [MCP Documentation](https://modelcontextprotocol.io)\r\n- [x] My code follows the repository's style guidelines\r\n- [x] New and existing tests pass locally\r\n- [x] I have added appropriate error handling\r\n- [x] I have added or updated documentation as needed\r\n\r\n## Additional context\r\n\r\n",
      "created_at": "2025-09-26T13:18:00Z",
      "updated_at": "2025-11-27T17:32:20Z",
      "closed_at": null,
      "merged_at": null,
      "merge_commit_sha": "ce0ed57639b5dc875eec27a2865d81beb2eda873",
      "assignee": {
        "login": "felixweinberger",
        "id": 3823880,
        "node_id": "MDQ6VXNlcjM4MjM4ODA=",
        "avatar_url": "https://avatars.githubusercontent.com/u/3823880?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/felixweinberger",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "assignees": {
        "0": {
          "login": "felixweinberger",
          "id": 3823880,
          "node_id": "MDQ6VXNlcjM4MjM4ODA=",
          "avatar_url": "https://avatars.githubusercontent.com/u/3823880?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/felixweinberger",
          "type": "User",
          "user_view_type": "public",
          "site_admin": false
        }
      },
      "requested_reviewers": {
        "0": {
          "login": "ochafik",
          "id": 273860,
          "node_id": "MDQ6VXNlcjI3Mzg2MA==",
          "avatar_url": "https://avatars.githubusercontent.com/u/273860?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/ochafik",
          "type": "User",
          "user_view_type": "public",
          "site_admin": false
        },
        "1": {
          "login": "felixweinberger",
          "id": 3823880,
          "node_id": "MDQ6VXNlcjM4MjM4ODA=",
          "avatar_url": "https://avatars.githubusercontent.com/u/3823880?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/felixweinberger",
          "type": "User",
          "user_view_type": "public",
          "site_admin": false
        }
      },
      "requested_teams": {},
      "labels": {
        "0": {
          "id": 9287728201,
          "node_id": "LA_kwDOM2n80s8AAAACKZd8SQ",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/needs%20maintainer%20action",
          "name": "needs maintainer action",
          "color": "d33428",
          "default": false,
          "description": "Potentially serious issue - needs proactive fix and maintainer attention"
        },
        "1": {
          "id": 9331338299,
          "node_id": "LA_kwDOM2n80s8AAAACLDDsOw",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/improves%20spec%20compliance",
          "name": "improves spec compliance",
          "color": "9FD9BD",
          "default": false,
          "description": "When a change improves ability of SDK users to comply with spec definition"
        }
      },
      "milestone": null,
      "draft": false,
      "head": {
        "label": "0Delta:context_only_resource_fn",
        "ref": "context_only_resource_fn",
        "sha": "2a09a78a614966fc988689f0bb75f8ab9f8401e0",
        "user": {
          "login": "0Delta",
          "id": 12265602,
          "node_id": "MDQ6VXNlcjEyMjY1NjAy",
          "avatar_url": "https://avatars.githubusercontent.com/u/12265602?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/0Delta",
          "type": "User",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 1064716953,
          "node_id": "R_kgDOP3ZKmQ",
          "name": "python-sdk",
          "full_name": "0Delta/python-sdk",
          "private": false,
          "owner": {
            "login": "0Delta",
            "id": 12265602,
            "node_id": "MDQ6VXNlcjEyMjY1NjAy",
            "avatar_url": "https://avatars.githubusercontent.com/u/12265602?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/0Delta",
            "type": "User",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": true,
          "url": "https://api.github.com/repos/0Delta/python-sdk",
          "created_at": "2025-09-26T12:56:36Z",
          "updated_at": "2025-09-26T12:56:37Z",
          "pushed_at": "2025-11-27T17:32:19Z",
          "homepage": "https://modelcontextprotocol.io",
          "size": 2460,
          "stargazers_count": 0,
          "watchers_count": 0,
          "language": null,
          "has_issues": false,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": false,
          "has_discussions": false,
          "forks_count": 0,
          "archived": false,
          "disabled": false,
          "open_issues_count": 0,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 0,
          "open_issues": 0,
          "watchers": 0,
          "default_branch": "main"
        }
      },
      "base": {
        "label": "modelcontextprotocol:main",
        "ref": "main",
        "sha": "5983a650cc07d2dc6c6ba098e99d3545889157a9",
        "user": {
          "login": "modelcontextprotocol",
          "id": 182288589,
          "node_id": "O_kgDOCt2AzQ",
          "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/modelcontextprotocol",
          "type": "Organization",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 862584018,
          "node_id": "R_kgDOM2n80g",
          "name": "python-sdk",
          "full_name": "modelcontextprotocol/python-sdk",
          "private": false,
          "owner": {
            "login": "modelcontextprotocol",
            "id": 182288589,
            "node_id": "O_kgDOCt2AzQ",
            "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/modelcontextprotocol",
            "type": "Organization",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": false,
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk",
          "created_at": "2024-09-24T21:01:35Z",
          "updated_at": "2025-12-06T05:02:17Z",
          "pushed_at": "2025-12-04T18:04:06Z",
          "homepage": "https://modelcontextprotocol.github.io/python-sdk/",
          "size": 4194,
          "stargazers_count": 20439,
          "watchers_count": 20439,
          "language": "Python",
          "has_issues": true,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": true,
          "has_discussions": false,
          "forks_count": 2843,
          "archived": false,
          "disabled": false,
          "open_issues_count": 345,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 2843,
          "open_issues": 345,
          "watchers": 20439,
          "default_branch": "main"
        }
      },
      "_links": {
        "self": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1406"
        },
        "html": {
          "href": "https://github.com/modelcontextprotocol/python-sdk/pull/1406"
        },
        "issue": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1406"
        },
        "comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1406/comments"
        },
        "review_comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1406/comments"
        },
        "review_comment": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/comments{/number}"
        },
        "commits": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1406/commits"
        },
        "statuses": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/statuses/2a09a78a614966fc988689f0bb75f8ab9f8401e0"
        }
      },
      "author_association": "NONE",
      "auto_merge": null,
      "active_lock_reason": null,
      "linked_issues": [
        1
      ]
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1397",
      "id": 2857643392,
      "node_id": "PR_kwDOM2n80s6qVC2A",
      "number": 1397,
      "state": "open",
      "locked": false,
      "title": "Validate metadata keys",
      "user": {
        "login": "samchenatti",
        "id": 11946232,
        "node_id": "MDQ6VXNlcjExOTQ2MjMy",
        "avatar_url": "https://avatars.githubusercontent.com/u/11946232?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/samchenatti",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "body": "This PR validates `types.RequestParams.Meta` to enforce the [MCP specification](https://modelcontextprotocol.io/specification/2025-06-18/basic/index#meta) for the `_meta` field.\r\n\r\n## Motivation and Context\r\nThis change ensures that users won't rely on invalid `key` names when using the `_meta` field.\r\n\r\n## How Has This Been Tested?\r\nIt was tested in a local client/server setup.\r\n\r\nUnit-tests were also added to ensure the correct behavior.\r\n\r\n## Breaking Changes\r\nThere are breaking changes in the case some users are already using invalid `_meta` keys.\r\n\r\n## Types of changes\r\n<!-- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->\r\n- [ ] Bug fix (non-breaking change which fixes an issue)\r\n- [ ] New feature (non-breaking change which adds functionality)\r\n- [x] Breaking change (fix or feature that would cause existing functionality to change)\r\n- [ ] Documentation update\r\n\r\n## Checklist\r\n<!-- Go over all the following points, and put an `x` in all the boxes that apply. -->\r\n- [x] I have read the [MCP Documentation](https://modelcontextprotocol.io)\r\n- [x] My code follows the repository's style guidelines\r\n- [x] New and existing tests pass locally\r\n- [x] I have added appropriate error handling\r\n- [ ] I have added or updated documentation as needed\r\n\r\n## Additional context\r\nIt is the result of discussion in https://github.com/modelcontextprotocol/python-sdk/pull/1231\r\n\r\nAlthough **I'm not entirely sure we should enforce this validation through the SDK**, I'm offering this approach as a possible option.\r\n",
      "created_at": "2025-09-24T16:53:11Z",
      "updated_at": "2025-10-23T22:56:21Z",
      "closed_at": null,
      "merged_at": null,
      "merge_commit_sha": null,
      "assignee": null,
      "assignees": {},
      "requested_reviewers": {
        "0": {
          "login": "ihrpr",
          "id": 21148364,
          "node_id": "MDQ6VXNlcjIxMTQ4MzY0",
          "avatar_url": "https://avatars.githubusercontent.com/u/21148364?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/ihrpr",
          "type": "User",
          "user_view_type": "public",
          "site_admin": false
        },
        "1": {
          "login": "maxisbey",
          "id": 224885523,
          "node_id": "U_kgDODWd7Ew",
          "avatar_url": "https://avatars.githubusercontent.com/u/224885523?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/maxisbey",
          "type": "User",
          "user_view_type": "public",
          "site_admin": false
        }
      },
      "requested_teams": {},
      "labels": {
        "0": {
          "id": 9230423596,
          "node_id": "LA_kwDOM2n80s8AAAACJi0WLA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/breaking%20change",
          "name": "breaking change",
          "color": "000000",
          "default": false,
          "description": "Will break existing deployments when updated without changes"
        },
        "1": {
          "id": 9230424293,
          "node_id": "LA_kwDOM2n80s8AAAACJi0Y5Q",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/v2",
          "name": "v2",
          "color": "5d2a87",
          "default": false,
          "description": "Ideas, requests and plans for v2 of the SDK which will incorporate major changes and fixes"
        }
      },
      "milestone": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/milestones/3",
        "id": 12112132,
        "node_id": "MI_kwDOM2n80s4AuNEE",
        "number": 3,
        "title": "Python SDK v2.0",
        "description": "",
        "creator": {
          "login": "dsp-ant",
          "id": 167242713,
          "node_id": "U_kgDOCffr2Q",
          "avatar_url": "https://avatars.githubusercontent.com/u/167242713?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/dsp-ant",
          "type": "User",
          "user_view_type": "public",
          "site_admin": false
        },
        "open_issues": 12,
        "closed_issues": 2,
        "state": "open",
        "created_at": "2025-01-02T09:08:45Z",
        "updated_at": "2025-10-07T17:22:59Z",
        "due_on": null,
        "closed_at": null
      },
      "draft": false,
      "head": {
        "label": "samchenatti:validate_metadata_keys",
        "ref": "validate_metadata_keys",
        "sha": "5aea389bfc74c2397ea56876fd3f3c0fce3e6efd",
        "user": {
          "login": "samchenatti",
          "id": 11946232,
          "node_id": "MDQ6VXNlcjExOTQ2MjMy",
          "avatar_url": "https://avatars.githubusercontent.com/u/11946232?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/samchenatti",
          "type": "User",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 1031433759,
          "node_id": "R_kgDOPXpuHw",
          "name": "mcp-python-sdk",
          "full_name": "samchenatti/mcp-python-sdk",
          "private": false,
          "owner": {
            "login": "samchenatti",
            "id": 11946232,
            "node_id": "MDQ6VXNlcjExOTQ2MjMy",
            "avatar_url": "https://avatars.githubusercontent.com/u/11946232?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/samchenatti",
            "type": "User",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "Fork of MCP python-sdk",
          "fork": true,
          "url": "https://api.github.com/repos/samchenatti/mcp-python-sdk",
          "created_at": "2025-08-03T18:20:00Z",
          "updated_at": "2025-08-03T18:20:00Z",
          "pushed_at": "2025-10-17T16:27:48Z",
          "homepage": "https://modelcontextprotocol.io",
          "size": 2129,
          "stargazers_count": 0,
          "watchers_count": 0,
          "language": null,
          "has_issues": false,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": false,
          "has_discussions": false,
          "forks_count": 0,
          "archived": false,
          "disabled": false,
          "open_issues_count": 0,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 0,
          "open_issues": 0,
          "watchers": 0,
          "default_branch": "main"
        }
      },
      "base": {
        "label": "modelcontextprotocol:main",
        "ref": "main",
        "sha": "b85e7bd1a9387391def7a4d437e34eadbd31a3c9",
        "user": {
          "login": "modelcontextprotocol",
          "id": 182288589,
          "node_id": "O_kgDOCt2AzQ",
          "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/modelcontextprotocol",
          "type": "Organization",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 862584018,
          "node_id": "R_kgDOM2n80g",
          "name": "python-sdk",
          "full_name": "modelcontextprotocol/python-sdk",
          "private": false,
          "owner": {
            "login": "modelcontextprotocol",
            "id": 182288589,
            "node_id": "O_kgDOCt2AzQ",
            "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/modelcontextprotocol",
            "type": "Organization",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": false,
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk",
          "created_at": "2024-09-24T21:01:35Z",
          "updated_at": "2025-12-06T05:02:17Z",
          "pushed_at": "2025-12-04T18:04:06Z",
          "homepage": "https://modelcontextprotocol.github.io/python-sdk/",
          "size": 4194,
          "stargazers_count": 20439,
          "watchers_count": 20439,
          "language": "Python",
          "has_issues": true,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": true,
          "has_discussions": false,
          "forks_count": 2843,
          "archived": false,
          "disabled": false,
          "open_issues_count": 345,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 2843,
          "open_issues": 345,
          "watchers": 20439,
          "default_branch": "main"
        }
      },
      "_links": {
        "self": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1397"
        },
        "html": {
          "href": "https://github.com/modelcontextprotocol/python-sdk/pull/1397"
        },
        "issue": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1397"
        },
        "comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1397/comments"
        },
        "review_comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1397/comments"
        },
        "review_comment": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/comments{/number}"
        },
        "commits": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1397/commits"
        },
        "statuses": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/statuses/5aea389bfc74c2397ea56876fd3f3c0fce3e6efd"
        }
      },
      "author_association": "CONTRIBUTOR",
      "auto_merge": null,
      "active_lock_reason": null,
      "linked_issues": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1395",
      "id": 2856978685,
      "node_id": "PR_kwDOM2n80s6qSgj9",
      "number": 1395,
      "state": "open",
      "locked": false,
      "title": "fix: update response status code for invalid session ID in HTTPSessionManger",
      "user": {
        "login": "Bumshakalaka",
        "id": 32959680,
        "node_id": "MDQ6VXNlcjMyOTU5Njgw",
        "avatar_url": "https://avatars.githubusercontent.com/u/32959680?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/Bumshakalaka",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "body": "\r\nChanged the status code from BAD_REQUEST to NOT_FOUND and added MCP_SESSION_ID_HEADER with `Mcp-Session-Id`\r\n\r\n<!-- Provide a brief summary of your changes -->\r\n\r\n## Motivation and Context\r\nCurrent  behavior of HTTP Session Manager is not align with MCP specification.\r\nhttps://modelcontextprotocol.io/specification/2025-06-18/basic/transports#session-management\r\n\r\n4. The server MAY terminate the session at any time, **after which it MUST respond to requests containing that session ID with HTTP 404 Not Found.**\r\n\r\nIn my opinion the `else` case, in the StreamableHTTP Session Manager for stateful events, handles request with old/invalid `Mcp-Session-Id`after unintentional session terminate (server restart). In that case NOT_FOUND status MUST be returned, not BAD_REQUEST.\r\n\r\n## How Has This Been Tested?\r\nLocally with Cursor AI.\r\nCurrently Cursor 1.6.x does not start new session after such response, see: https://forum.cursor.com/t/mcp-client-wrong-handling-of-http-not-found-in-session-management-stateful-mcp-server/134781\r\n\r\n## Breaking Changes\r\nProbably, depends on MCP client logic implementation.\r\n\r\n## Types of changes\r\n<!-- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->\r\n- [x] Bug fix (non-breaking change which fixes an issue)\r\n- [ ] New feature (non-breaking change which adds functionality)\r\n- [x] Breaking change (fix or feature that would cause existing functionality to change)\r\n- [ ] Documentation update\r\n\r\n## Checklist\r\n<!-- Go over all the following points, and put an `x` in all the boxes that apply. -->\r\n- [x] I have read the [MCP Documentation](https://modelcontextprotocol.io)\r\n- [x] My code follows the repository's style guidelines\r\n- [x] New and existing tests pass locally\r\n- [x] I have added appropriate error handling\r\n- [x] I have added or updated documentation as needed\r\n\r\n## Additional context\r\n<!-- Add any other context, implementation notes, or design decisions -->\r\n",
      "created_at": "2025-09-24T13:27:27Z",
      "updated_at": "2025-10-03T21:33:43Z",
      "closed_at": null,
      "merged_at": null,
      "merge_commit_sha": "cdec824630b1dea3d2cd28d48457e33fa171eed5",
      "assignee": null,
      "assignees": {},
      "requested_reviewers": {
        "0": {
          "login": "Kludex",
          "id": 7353520,
          "node_id": "MDQ6VXNlcjczNTM1MjA=",
          "avatar_url": "https://avatars.githubusercontent.com/u/7353520?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/Kludex",
          "type": "User",
          "user_view_type": "public",
          "site_admin": false
        }
      },
      "requested_teams": {},
      "labels": {
        "0": {
          "id": 7511840554,
          "node_id": "LA_kwDOM2n80s8AAAABv72XKg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/bug",
          "name": "bug",
          "color": "d73a4a",
          "default": true,
          "description": "Something isn't working"
        },
        "1": {
          "id": 9230423596,
          "node_id": "LA_kwDOM2n80s8AAAACJi0WLA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/breaking%20change",
          "name": "breaking change",
          "color": "000000",
          "default": false,
          "description": "Will break existing deployments when updated without changes"
        },
        "2": {
          "id": 9230424293,
          "node_id": "LA_kwDOM2n80s8AAAACJi0Y5Q",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/v2",
          "name": "v2",
          "color": "5d2a87",
          "default": false,
          "description": "Ideas, requests and plans for v2 of the SDK which will incorporate major changes and fixes"
        },
        "3": {
          "id": 9331338299,
          "node_id": "LA_kwDOM2n80s8AAAACLDDsOw",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/improves%20spec%20compliance",
          "name": "improves spec compliance",
          "color": "9FD9BD",
          "default": false,
          "description": "When a change improves ability of SDK users to comply with spec definition"
        }
      },
      "milestone": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/milestones/3",
        "id": 12112132,
        "node_id": "MI_kwDOM2n80s4AuNEE",
        "number": 3,
        "title": "Python SDK v2.0",
        "description": "",
        "creator": {
          "login": "dsp-ant",
          "id": 167242713,
          "node_id": "U_kgDOCffr2Q",
          "avatar_url": "https://avatars.githubusercontent.com/u/167242713?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/dsp-ant",
          "type": "User",
          "user_view_type": "public",
          "site_admin": false
        },
        "open_issues": 12,
        "closed_issues": 2,
        "state": "open",
        "created_at": "2025-01-02T09:08:45Z",
        "updated_at": "2025-10-07T17:22:59Z",
        "due_on": null,
        "closed_at": null
      },
      "draft": true,
      "head": {
        "label": "Bumshakalaka:pr_session_mgmt",
        "ref": "pr_session_mgmt",
        "sha": "52c63c53e2232c8126883ed27dd2736286c10636",
        "user": {
          "login": "Bumshakalaka",
          "id": 32959680,
          "node_id": "MDQ6VXNlcjMyOTU5Njgw",
          "avatar_url": "https://avatars.githubusercontent.com/u/32959680?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/Bumshakalaka",
          "type": "User",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 1063298159,
          "node_id": "R_kgDOP2Ckbw",
          "name": "python-sdk",
          "full_name": "Bumshakalaka/python-sdk",
          "private": false,
          "owner": {
            "login": "Bumshakalaka",
            "id": 32959680,
            "node_id": "MDQ6VXNlcjMyOTU5Njgw",
            "avatar_url": "https://avatars.githubusercontent.com/u/32959680?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/Bumshakalaka",
            "type": "User",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": true,
          "url": "https://api.github.com/repos/Bumshakalaka/python-sdk",
          "created_at": "2025-09-24T12:40:40Z",
          "updated_at": "2025-09-24T12:40:40Z",
          "pushed_at": "2025-09-24T13:13:44Z",
          "homepage": "https://modelcontextprotocol.io",
          "size": 1597,
          "stargazers_count": 0,
          "watchers_count": 0,
          "language": null,
          "has_issues": false,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": false,
          "has_discussions": false,
          "forks_count": 0,
          "archived": false,
          "disabled": false,
          "open_issues_count": 0,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 0,
          "open_issues": 0,
          "watchers": 0,
          "default_branch": "main"
        }
      },
      "base": {
        "label": "modelcontextprotocol:main",
        "ref": "main",
        "sha": "c0f165776d291cd0ada29f349bc0006e0a81d917",
        "user": {
          "login": "modelcontextprotocol",
          "id": 182288589,
          "node_id": "O_kgDOCt2AzQ",
          "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/modelcontextprotocol",
          "type": "Organization",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 862584018,
          "node_id": "R_kgDOM2n80g",
          "name": "python-sdk",
          "full_name": "modelcontextprotocol/python-sdk",
          "private": false,
          "owner": {
            "login": "modelcontextprotocol",
            "id": 182288589,
            "node_id": "O_kgDOCt2AzQ",
            "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/modelcontextprotocol",
            "type": "Organization",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": false,
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk",
          "created_at": "2024-09-24T21:01:35Z",
          "updated_at": "2025-12-06T05:02:17Z",
          "pushed_at": "2025-12-04T18:04:06Z",
          "homepage": "https://modelcontextprotocol.github.io/python-sdk/",
          "size": 4194,
          "stargazers_count": 20439,
          "watchers_count": 20439,
          "language": "Python",
          "has_issues": true,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": true,
          "has_discussions": false,
          "forks_count": 2843,
          "archived": false,
          "disabled": false,
          "open_issues_count": 345,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 2843,
          "open_issues": 345,
          "watchers": 20439,
          "default_branch": "main"
        }
      },
      "_links": {
        "self": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1395"
        },
        "html": {
          "href": "https://github.com/modelcontextprotocol/python-sdk/pull/1395"
        },
        "issue": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1395"
        },
        "comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1395/comments"
        },
        "review_comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1395/comments"
        },
        "review_comment": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/comments{/number}"
        },
        "commits": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1395/commits"
        },
        "statuses": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/statuses/52c63c53e2232c8126883ed27dd2736286c10636"
        }
      },
      "author_association": "NONE",
      "auto_merge": null,
      "active_lock_reason": null,
      "linked_issues": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1392",
      "id": 2854837636,
      "node_id": "PR_kwDOM2n80s6qKV2E",
      "number": 1392,
      "state": "open",
      "locked": false,
      "title": "fix: wrapped annotations handling in func_metadata",
      "user": {
        "login": "stevenh",
        "id": 104239,
        "node_id": "MDQ6VXNlcjEwNDIzOQ==",
        "avatar_url": "https://avatars.githubusercontent.com/u/104239?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/stevenh",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "body": "Use the original function's __globals__ for type hint resolution when dealing with wrapped functions. This ensures that any type hints defined in the original function's module are correctly resolved.\r\n\r\nThis also includes adding common typing names for resiliency.\r\n\r\nFixes #1391\r\n\r\n<!-- Provide a brief summary of your changes -->\r\n\r\n## Motivation and Context\r\nFixes tool handling for wrapped methods that use annotations.\r\n\r\n## How Has This Been Tested?\r\nTest is included.\r\n\r\n## Breaking Changes\r\nThis should be fully backwards compatible.\r\n\r\n## Types of changes\r\n<!-- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->\r\n- [x] Bug fix (non-breaking change which fixes an issue)\r\n- [ ] New feature (non-breaking change which adds functionality)\r\n- [ ] Breaking change (fix or feature that would cause existing functionality to change)\r\n- [ ] Documentation update\r\n\r\n## Checklist\r\n<!-- Go over all the following points, and put an `x` in all the boxes that apply. -->\r\n- [x] I have read the [MCP Documentation](https://modelcontextprotocol.io)\r\n- [x] My code follows the repository's style guidelines\r\n- [x] New and existing tests pass locally\r\n- [x] I have added appropriate error handling\r\n- [x] I have added or updated documentation as needed\r\n\r\n## Additional context\r\n<!-- Add any other context, implementation notes, or design decisions -->\r\nTries to ensure success even if standard typing types are missing.",
      "created_at": "2025-09-24T00:01:59Z",
      "updated_at": "2025-10-06T12:00:02Z",
      "closed_at": null,
      "merged_at": null,
      "merge_commit_sha": null,
      "assignee": null,
      "assignees": {},
      "requested_reviewers": {
        "0": {
          "login": "ochafik",
          "id": 273860,
          "node_id": "MDQ6VXNlcjI3Mzg2MA==",
          "avatar_url": "https://avatars.githubusercontent.com/u/273860?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/ochafik",
          "type": "User",
          "user_view_type": "public",
          "site_admin": false
        }
      },
      "requested_teams": {},
      "labels": {
        "0": {
          "id": 9230425628,
          "node_id": "LA_kwDOM2n80s8AAAACJi0eHA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/needs%20more%20work",
          "name": "needs more work",
          "color": "af3f39",
          "default": false,
          "description": "Not ready to be merged yet, needs additional follow-up from the author(s)."
        }
      },
      "milestone": null,
      "draft": false,
      "head": {
        "label": "stevenh:fix/wrapped_annotations",
        "ref": "fix/wrapped_annotations",
        "sha": "57fe5ba74aec45619ca87729d65907f45d7a3f2f",
        "user": {
          "login": "stevenh",
          "id": 104239,
          "node_id": "MDQ6VXNlcjEwNDIzOQ==",
          "avatar_url": "https://avatars.githubusercontent.com/u/104239?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/stevenh",
          "type": "User",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 1003351020,
          "node_id": "R_kgDOO83r7A",
          "name": "python-sdk",
          "full_name": "stevenh/python-sdk",
          "private": false,
          "owner": {
            "login": "stevenh",
            "id": 104239,
            "node_id": "MDQ6VXNlcjEwNDIzOQ==",
            "avatar_url": "https://avatars.githubusercontent.com/u/104239?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/stevenh",
            "type": "User",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": true,
          "url": "https://api.github.com/repos/stevenh/python-sdk",
          "created_at": "2025-06-17T02:46:48Z",
          "updated_at": "2025-06-17T02:46:48Z",
          "pushed_at": "2025-10-03T21:50:40Z",
          "homepage": "https://modelcontextprotocol.io",
          "size": 2075,
          "stargazers_count": 0,
          "watchers_count": 0,
          "language": null,
          "has_issues": false,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": false,
          "has_discussions": false,
          "forks_count": 0,
          "archived": false,
          "disabled": false,
          "open_issues_count": 0,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 0,
          "open_issues": 0,
          "watchers": 0,
          "default_branch": "main"
        }
      },
      "base": {
        "label": "modelcontextprotocol:main",
        "ref": "main",
        "sha": "814c9c024a86fa0f608e87b15b21a0a16a926d61",
        "user": {
          "login": "modelcontextprotocol",
          "id": 182288589,
          "node_id": "O_kgDOCt2AzQ",
          "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/modelcontextprotocol",
          "type": "Organization",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 862584018,
          "node_id": "R_kgDOM2n80g",
          "name": "python-sdk",
          "full_name": "modelcontextprotocol/python-sdk",
          "private": false,
          "owner": {
            "login": "modelcontextprotocol",
            "id": 182288589,
            "node_id": "O_kgDOCt2AzQ",
            "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/modelcontextprotocol",
            "type": "Organization",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": false,
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk",
          "created_at": "2024-09-24T21:01:35Z",
          "updated_at": "2025-12-06T05:02:17Z",
          "pushed_at": "2025-12-04T18:04:06Z",
          "homepage": "https://modelcontextprotocol.github.io/python-sdk/",
          "size": 4194,
          "stargazers_count": 20439,
          "watchers_count": 20439,
          "language": "Python",
          "has_issues": true,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": true,
          "has_discussions": false,
          "forks_count": 2843,
          "archived": false,
          "disabled": false,
          "open_issues_count": 345,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 2843,
          "open_issues": 345,
          "watchers": 20439,
          "default_branch": "main"
        }
      },
      "_links": {
        "self": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1392"
        },
        "html": {
          "href": "https://github.com/modelcontextprotocol/python-sdk/pull/1392"
        },
        "issue": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1392"
        },
        "comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1392/comments"
        },
        "review_comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1392/comments"
        },
        "review_comment": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/comments{/number}"
        },
        "commits": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1392/commits"
        },
        "statuses": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/statuses/57fe5ba74aec45619ca87729d65907f45d7a3f2f"
        }
      },
      "author_association": "NONE",
      "auto_merge": null,
      "active_lock_reason": null,
      "linked_issues": [
        1,
        1391
      ]
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1390",
      "id": 2854760119,
      "node_id": "PR_kwDOM2n80s6qKC63",
      "number": 1390,
      "state": "open",
      "locked": false,
      "title": "SEP: Allow non-file URI schemes for Roots",
      "user": {
        "login": "chughtapan",
        "id": 3305567,
        "node_id": "MDQ6VXNlcjMzMDU1Njc=",
        "avatar_url": "https://avatars.githubusercontent.com/u/3305567?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/chughtapan",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "body": "<!-- Provide a brief summary of your changes -->\r\n\r\n## Motivation and Context\r\nThis showcases the sdk changes for [SEP-1573](https://github.com/modelcontextprotocol/modelcontextprotocol/issues/1573)\r\n\r\n## How Has This Been Tested?\r\nall new and existing tests pass\r\n\r\n## Breaking Changes\r\nno\r\n\r\n## Types of changes\r\n<!-- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->\r\n- [ ] Bug fix (non-breaking change which fixes an issue)\r\n- [X] New feature (non-breaking change which adds functionality)\r\n- [ ] Breaking change (fix or feature that would cause existing functionality to change)\r\n- [ ] Documentation update\r\n\r\n## Checklist\r\n<!-- Go over all the following points, and put an `x` in all the boxes that apply. -->\r\n- [X] I have read the [MCP Documentation](https://modelcontextprotocol.io)\r\n- [X] My code follows the repository's style guidelines\r\n- [X] New and existing tests pass locally\r\n- [X] I have added appropriate error handling\r\n- [X] I have added or updated documentation as needed\r\n\r\n## Additional context\r\n",
      "created_at": "2025-09-23T23:09:45Z",
      "updated_at": "2025-11-12T17:42:24Z",
      "closed_at": null,
      "merged_at": null,
      "merge_commit_sha": "49e493f875729c2494c10ccf56a52d9409008350",
      "assignee": null,
      "assignees": {},
      "requested_reviewers": {},
      "requested_teams": {},
      "labels": {},
      "milestone": null,
      "draft": true,
      "head": {
        "label": "chughtapan:non_file_roots",
        "ref": "non_file_roots",
        "sha": "fc36f387a7e101e486f4927328bc6f5aa1d35d90",
        "user": {
          "login": "chughtapan",
          "id": 3305567,
          "node_id": "MDQ6VXNlcjMzMDU1Njc=",
          "avatar_url": "https://avatars.githubusercontent.com/u/3305567?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/chughtapan",
          "type": "User",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 1030012511,
          "node_id": "R_kgDOPWS-Xw",
          "name": "python-sdk",
          "full_name": "chughtapan/python-sdk",
          "private": false,
          "owner": {
            "login": "chughtapan",
            "id": 3305567,
            "node_id": "MDQ6VXNlcjMzMDU1Njc=",
            "avatar_url": "https://avatars.githubusercontent.com/u/3305567?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/chughtapan",
            "type": "User",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": true,
          "url": "https://api.github.com/repos/chughtapan/python-sdk",
          "created_at": "2025-08-01T00:27:29Z",
          "updated_at": "2025-11-06T00:47:32Z",
          "pushed_at": "2025-11-23T22:51:51Z",
          "homepage": "https://modelcontextprotocol.io",
          "size": 2573,
          "stargazers_count": 0,
          "watchers_count": 0,
          "language": "Python",
          "has_issues": false,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": false,
          "has_discussions": false,
          "forks_count": 0,
          "archived": false,
          "disabled": false,
          "open_issues_count": 1,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 0,
          "open_issues": 1,
          "watchers": 0,
          "default_branch": "main"
        }
      },
      "base": {
        "label": "modelcontextprotocol:main",
        "ref": "main",
        "sha": "3e798bfc01856df711b921f7f3b55379fbd087e4",
        "user": {
          "login": "modelcontextprotocol",
          "id": 182288589,
          "node_id": "O_kgDOCt2AzQ",
          "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/modelcontextprotocol",
          "type": "Organization",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 862584018,
          "node_id": "R_kgDOM2n80g",
          "name": "python-sdk",
          "full_name": "modelcontextprotocol/python-sdk",
          "private": false,
          "owner": {
            "login": "modelcontextprotocol",
            "id": 182288589,
            "node_id": "O_kgDOCt2AzQ",
            "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/modelcontextprotocol",
            "type": "Organization",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": false,
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk",
          "created_at": "2024-09-24T21:01:35Z",
          "updated_at": "2025-12-06T05:02:17Z",
          "pushed_at": "2025-12-04T18:04:06Z",
          "homepage": "https://modelcontextprotocol.github.io/python-sdk/",
          "size": 4194,
          "stargazers_count": 20439,
          "watchers_count": 20439,
          "language": "Python",
          "has_issues": true,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": true,
          "has_discussions": false,
          "forks_count": 2843,
          "archived": false,
          "disabled": false,
          "open_issues_count": 345,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 2843,
          "open_issues": 345,
          "watchers": 20439,
          "default_branch": "main"
        }
      },
      "_links": {
        "self": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1390"
        },
        "html": {
          "href": "https://github.com/modelcontextprotocol/python-sdk/pull/1390"
        },
        "issue": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1390"
        },
        "comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1390/comments"
        },
        "review_comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1390/comments"
        },
        "review_comment": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/comments{/number}"
        },
        "commits": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1390/commits"
        },
        "statuses": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/statuses/fc36f387a7e101e486f4927328bc6f5aa1d35d90"
        }
      },
      "author_association": "CONTRIBUTOR",
      "auto_merge": null,
      "active_lock_reason": null,
      "linked_issues": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1376",
      "id": 2837884518,
      "node_id": "PR_kwDOM2n80s6pJq5m",
      "number": 1376,
      "state": "open",
      "locked": false,
      "title": "Adds meta parameter and method for LLM hidden info",
      "user": {
        "login": "ishan121028",
        "id": 96590593,
        "node_id": "U_kgDOBcHbAQ",
        "avatar_url": "https://avatars.githubusercontent.com/u/96590593?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/ishan121028",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "body": "This is a fix for the bug [1224](https://github.com/modelcontextprotocol/python-sdk/issues/1224) and implements the parameter and method for the metadata that is passed for cases when the info is to be hidden from LLMs.\r\n\r\n## Motivation and Context\r\n[1224](https://github.com/modelcontextprotocol/python-sdk/issues/1224)\r\n\r\n## How Has This Been Tested?\r\nYes I have tested with \r\n\r\n## Breaking Changes\r\n<!-- Will users need to update their code or configurations? -->\r\n\r\n## Types of changes\r\n<!-- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->\r\n- [x] Bug fix (non-breaking change which fixes an issue)\r\n- [ ] New feature (non-breaking change which adds functionality)\r\n- [ ] Breaking change (fix or feature that would cause existing functionality to change)\r\n- [ ] Documentation update\r\n\r\n## Checklist\r\n<!-- Go over all the following points, and put an `x` in all the boxes that apply. -->\r\n- [x] I have read the [MCP Documentation](https://modelcontextprotocol.io)\r\n- [x] My code follows the repository's style guidelines\r\n- [x] New and existing tests pass locally\r\n- [x] I have added appropriate error handling\r\n- [ ] I have added or updated documentation as needed\r\n\r\n## Additional context\r\n<!-- Add any other context, implementation notes, or design decisions -->\r\n",
      "created_at": "2025-09-17T20:28:38Z",
      "updated_at": "2025-10-10T10:01:23Z",
      "closed_at": null,
      "merged_at": null,
      "merge_commit_sha": null,
      "assignee": null,
      "assignees": {},
      "requested_reviewers": {
        "0": {
          "login": "dsp-ant",
          "id": 167242713,
          "node_id": "U_kgDOCffr2Q",
          "avatar_url": "https://avatars.githubusercontent.com/u/167242713?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/dsp-ant",
          "type": "User",
          "user_view_type": "public",
          "site_admin": false
        },
        "1": {
          "login": "LucaButBoring",
          "id": 131398524,
          "node_id": "U_kgDOB9T7fA",
          "avatar_url": "https://avatars.githubusercontent.com/u/131398524?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/LucaButBoring",
          "type": "User",
          "user_view_type": "public",
          "site_admin": false
        }
      },
      "requested_teams": {},
      "labels": {
        "0": {
          "id": 9287728201,
          "node_id": "LA_kwDOM2n80s8AAAACKZd8SQ",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/needs%20maintainer%20action",
          "name": "needs maintainer action",
          "color": "d33428",
          "default": false,
          "description": "Potentially serious issue - needs proactive fix and maintainer attention"
        }
      },
      "milestone": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/milestones/16",
        "id": 13789844,
        "node_id": "MI_kwDOM2n80s4A0mqU",
        "number": 16,
        "title": "META Improvements",
        "description": "",
        "creator": {
          "login": "felixweinberger",
          "id": 3823880,
          "node_id": "MDQ6VXNlcjM4MjM4ODA=",
          "avatar_url": "https://avatars.githubusercontent.com/u/3823880?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/felixweinberger",
          "type": "User",
          "user_view_type": "public",
          "site_admin": false
        },
        "open_issues": 2,
        "closed_issues": 4,
        "state": "open",
        "created_at": "2025-09-30T11:36:20Z",
        "updated_at": "2025-10-21T18:52:09Z",
        "due_on": null,
        "closed_at": null
      },
      "draft": false,
      "head": {
        "label": "ishan121028:ishan121028/issue-1224",
        "ref": "ishan121028/issue-1224",
        "sha": "c199d93db50133a019b4796032a877d5191e95e6",
        "user": {
          "login": "ishan121028",
          "id": 96590593,
          "node_id": "U_kgDOBcHbAQ",
          "avatar_url": "https://avatars.githubusercontent.com/u/96590593?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/ishan121028",
          "type": "User",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 1058968697,
          "node_id": "R_kgDOPx6UeQ",
          "name": "python-sdk",
          "full_name": "ishan121028/python-sdk",
          "private": false,
          "owner": {
            "login": "ishan121028",
            "id": 96590593,
            "node_id": "U_kgDOBcHbAQ",
            "avatar_url": "https://avatars.githubusercontent.com/u/96590593?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/ishan121028",
            "type": "User",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": true,
          "url": "https://api.github.com/repos/ishan121028/python-sdk",
          "created_at": "2025-09-17T19:54:58Z",
          "updated_at": "2025-09-17T19:54:58Z",
          "pushed_at": "2025-09-17T21:03:22Z",
          "homepage": "https://modelcontextprotocol.io",
          "size": 1588,
          "stargazers_count": 0,
          "watchers_count": 0,
          "language": null,
          "has_issues": false,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": false,
          "has_discussions": false,
          "forks_count": 0,
          "archived": false,
          "disabled": false,
          "open_issues_count": 0,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 0,
          "open_issues": 0,
          "watchers": 0,
          "default_branch": "main"
        }
      },
      "base": {
        "label": "modelcontextprotocol:main",
        "ref": "main",
        "sha": "ca3466666310dbcb5c45690ac2571c574759984f",
        "user": {
          "login": "modelcontextprotocol",
          "id": 182288589,
          "node_id": "O_kgDOCt2AzQ",
          "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/modelcontextprotocol",
          "type": "Organization",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 862584018,
          "node_id": "R_kgDOM2n80g",
          "name": "python-sdk",
          "full_name": "modelcontextprotocol/python-sdk",
          "private": false,
          "owner": {
            "login": "modelcontextprotocol",
            "id": 182288589,
            "node_id": "O_kgDOCt2AzQ",
            "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/modelcontextprotocol",
            "type": "Organization",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": false,
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk",
          "created_at": "2024-09-24T21:01:35Z",
          "updated_at": "2025-12-06T05:02:17Z",
          "pushed_at": "2025-12-04T18:04:06Z",
          "homepage": "https://modelcontextprotocol.github.io/python-sdk/",
          "size": 4194,
          "stargazers_count": 20439,
          "watchers_count": 20439,
          "language": "Python",
          "has_issues": true,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": true,
          "has_discussions": false,
          "forks_count": 2843,
          "archived": false,
          "disabled": false,
          "open_issues_count": 345,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 2843,
          "open_issues": 345,
          "watchers": 20439,
          "default_branch": "main"
        }
      },
      "_links": {
        "self": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1376"
        },
        "html": {
          "href": "https://github.com/modelcontextprotocol/python-sdk/pull/1376"
        },
        "issue": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1376"
        },
        "comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1376/comments"
        },
        "review_comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1376/comments"
        },
        "review_comment": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/comments{/number}"
        },
        "commits": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1376/commits"
        },
        "statuses": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/statuses/c199d93db50133a019b4796032a877d5191e95e6"
        }
      },
      "author_association": "NONE",
      "auto_merge": null,
      "active_lock_reason": null,
      "linked_issues": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1359",
      "id": 2815617683,
      "node_id": "PR_kwDOM2n80s6n0uqT",
      "number": 1359,
      "state": "open",
      "locked": false,
      "title": "Issue 1356 - Fix SSE unicode line separator handling",
      "user": {
        "login": "pja-ant",
        "id": 227474472,
        "node_id": "U_kgDODY78KA",
        "avatar_url": "https://avatars.githubusercontent.com/u/227474472?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/pja-ant",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "body": "\r\n\r\n## Motivation and Context\r\n`httpx-sse` has incorrect handling of newlines in its parsing, particularly around Unicode newline characters that are incorrectly treated as newlines. See https://github.com/florimondmanca/httpx-sse/issues/34 for details.\r\n\r\nOur bug, https://github.com/modelcontextprotocol/python-sdk/issues/1356, explains that this causes incorrect output and also just hangs the stream processing entirely (due to latent exception handling issues, which also need fixing).\r\n\r\nI'm fixing the SSE parsing on our side, but will also look into fixing at the source. Not sure how long that will take to get pushed through.\r\n\r\n## How Has This Been Tested?\r\nTwo unit tests added.\r\n\r\n## Breaking Changes\r\nNone\r\n\r\n## Types of changes\r\n- [x] Bug fix (non-breaking change which fixes an issue)\r\n- [ ] New feature (non-breaking change which adds functionality)\r\n- [ ] Breaking change (fix or feature that would cause existing functionality to change)\r\n- [ ] Documentation update\r\n\r\n## Checklist\r\n- [x] I have read the [MCP Documentation](https://modelcontextprotocol.io)\r\n- [x] My code follows the repository's style guidelines\r\n- [x] New and existing tests pass locally\r\n- [x] I have added appropriate error handling\r\n- [ ] I have added or updated documentation as needed\r\n",
      "created_at": "2025-09-10T13:52:06Z",
      "updated_at": "2025-11-12T17:43:25Z",
      "closed_at": null,
      "merged_at": null,
      "merge_commit_sha": "16696b64950eccdd07f18e7999b2c4e7995d2ef5",
      "assignee": null,
      "assignees": {},
      "requested_reviewers": {
        "0": {
          "login": "dsp-ant",
          "id": 167242713,
          "node_id": "U_kgDOCffr2Q",
          "avatar_url": "https://avatars.githubusercontent.com/u/167242713?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/dsp-ant",
          "type": "User",
          "user_view_type": "public",
          "site_admin": false
        }
      },
      "requested_teams": {},
      "labels": {
        "0": {
          "id": 9230425628,
          "node_id": "LA_kwDOM2n80s8AAAACJi0eHA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/needs%20more%20work",
          "name": "needs more work",
          "color": "af3f39",
          "default": false,
          "description": "Not ready to be merged yet, needs additional follow-up from the author(s)."
        }
      },
      "milestone": null,
      "draft": true,
      "head": {
        "label": "modelcontextprotocol:fix/sse-unicode-line-separator",
        "ref": "fix/sse-unicode-line-separator",
        "sha": "98ce8a2eabdd505cc5fc95c10621f97c20090ae6",
        "user": {
          "login": "modelcontextprotocol",
          "id": 182288589,
          "node_id": "O_kgDOCt2AzQ",
          "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/modelcontextprotocol",
          "type": "Organization",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 862584018,
          "node_id": "R_kgDOM2n80g",
          "name": "python-sdk",
          "full_name": "modelcontextprotocol/python-sdk",
          "private": false,
          "owner": {
            "login": "modelcontextprotocol",
            "id": 182288589,
            "node_id": "O_kgDOCt2AzQ",
            "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/modelcontextprotocol",
            "type": "Organization",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": false,
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk",
          "created_at": "2024-09-24T21:01:35Z",
          "updated_at": "2025-12-06T05:02:17Z",
          "pushed_at": "2025-12-04T18:04:06Z",
          "homepage": "https://modelcontextprotocol.github.io/python-sdk/",
          "size": 4194,
          "stargazers_count": 20439,
          "watchers_count": 20439,
          "language": "Python",
          "has_issues": true,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": true,
          "has_discussions": false,
          "forks_count": 2843,
          "archived": false,
          "disabled": false,
          "open_issues_count": 345,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 2843,
          "open_issues": 345,
          "watchers": 20439,
          "default_branch": "main"
        }
      },
      "base": {
        "label": "modelcontextprotocol:main",
        "ref": "main",
        "sha": "61399b386c19af9b9c9277727990a6b3c6a95d83",
        "user": {
          "login": "modelcontextprotocol",
          "id": 182288589,
          "node_id": "O_kgDOCt2AzQ",
          "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/modelcontextprotocol",
          "type": "Organization",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 862584018,
          "node_id": "R_kgDOM2n80g",
          "name": "python-sdk",
          "full_name": "modelcontextprotocol/python-sdk",
          "private": false,
          "owner": {
            "login": "modelcontextprotocol",
            "id": 182288589,
            "node_id": "O_kgDOCt2AzQ",
            "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/modelcontextprotocol",
            "type": "Organization",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": false,
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk",
          "created_at": "2024-09-24T21:01:35Z",
          "updated_at": "2025-12-06T05:02:17Z",
          "pushed_at": "2025-12-04T18:04:06Z",
          "homepage": "https://modelcontextprotocol.github.io/python-sdk/",
          "size": 4194,
          "stargazers_count": 20439,
          "watchers_count": 20439,
          "language": "Python",
          "has_issues": true,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": true,
          "has_discussions": false,
          "forks_count": 2843,
          "archived": false,
          "disabled": false,
          "open_issues_count": 345,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 2843,
          "open_issues": 345,
          "watchers": 20439,
          "default_branch": "main"
        }
      },
      "_links": {
        "self": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1359"
        },
        "html": {
          "href": "https://github.com/modelcontextprotocol/python-sdk/pull/1359"
        },
        "issue": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1359"
        },
        "comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1359/comments"
        },
        "review_comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1359/comments"
        },
        "review_comment": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/comments{/number}"
        },
        "commits": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1359/commits"
        },
        "statuses": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/statuses/98ce8a2eabdd505cc5fc95c10621f97c20090ae6"
        }
      },
      "author_association": "CONTRIBUTOR",
      "auto_merge": null,
      "active_lock_reason": null,
      "linked_issues": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1354",
      "id": 2812215753,
      "node_id": "PR_kwDOM2n80s6nnwHJ",
      "number": 1354,
      "state": "open",
      "locked": false,
      "title": "Add 100% clean coverage",
      "user": {
        "login": "Kludex",
        "id": 7353520,
        "node_id": "MDQ6VXNlcjczNTM1MjA=",
        "avatar_url": "https://avatars.githubusercontent.com/u/7353520?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/Kludex",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "body": null,
      "created_at": "2025-09-09T14:18:38Z",
      "updated_at": "2025-11-12T17:46:39Z",
      "closed_at": null,
      "merged_at": null,
      "merge_commit_sha": null,
      "assignee": {
        "login": "felixweinberger",
        "id": 3823880,
        "node_id": "MDQ6VXNlcjM4MjM4ODA=",
        "avatar_url": "https://avatars.githubusercontent.com/u/3823880?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/felixweinberger",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "assignees": {
        "0": {
          "login": "felixweinberger",
          "id": 3823880,
          "node_id": "MDQ6VXNlcjM4MjM4ODA=",
          "avatar_url": "https://avatars.githubusercontent.com/u/3823880?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/felixweinberger",
          "type": "User",
          "user_view_type": "public",
          "site_admin": false
        }
      },
      "requested_reviewers": {},
      "requested_teams": {},
      "labels": {
        "0": {
          "id": 9287728201,
          "node_id": "LA_kwDOM2n80s8AAAACKZd8SQ",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/needs%20maintainer%20action",
          "name": "needs maintainer action",
          "color": "d33428",
          "default": false,
          "description": "Potentially serious issue - needs proactive fix and maintainer attention"
        }
      },
      "milestone": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/milestones/17",
        "id": 13789857,
        "node_id": "MI_kwDOM2n80s4A0mqh",
        "number": 17,
        "title": "CI & Testing",
        "description": "",
        "creator": {
          "login": "felixweinberger",
          "id": 3823880,
          "node_id": "MDQ6VXNlcjM4MjM4ODA=",
          "avatar_url": "https://avatars.githubusercontent.com/u/3823880?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/felixweinberger",
          "type": "User",
          "user_view_type": "public",
          "site_admin": false
        },
        "open_issues": 1,
        "closed_issues": 2,
        "state": "open",
        "created_at": "2025-09-30T11:38:24Z",
        "updated_at": "2025-10-23T17:26:05Z",
        "due_on": null,
        "closed_at": null
      },
      "draft": true,
      "head": {
        "label": "modelcontextprotocol:100-coverage",
        "ref": "100-coverage",
        "sha": "5443008634a924924d2710228dc7034c39a809d4",
        "user": {
          "login": "modelcontextprotocol",
          "id": 182288589,
          "node_id": "O_kgDOCt2AzQ",
          "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/modelcontextprotocol",
          "type": "Organization",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 862584018,
          "node_id": "R_kgDOM2n80g",
          "name": "python-sdk",
          "full_name": "modelcontextprotocol/python-sdk",
          "private": false,
          "owner": {
            "login": "modelcontextprotocol",
            "id": 182288589,
            "node_id": "O_kgDOCt2AzQ",
            "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/modelcontextprotocol",
            "type": "Organization",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": false,
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk",
          "created_at": "2024-09-24T21:01:35Z",
          "updated_at": "2025-12-06T05:02:17Z",
          "pushed_at": "2025-12-04T18:04:06Z",
          "homepage": "https://modelcontextprotocol.github.io/python-sdk/",
          "size": 4194,
          "stargazers_count": 20439,
          "watchers_count": 20439,
          "language": "Python",
          "has_issues": true,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": true,
          "has_discussions": false,
          "forks_count": 2843,
          "archived": false,
          "disabled": false,
          "open_issues_count": 345,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 2843,
          "open_issues": 345,
          "watchers": 20439,
          "default_branch": "main"
        }
      },
      "base": {
        "label": "modelcontextprotocol:main",
        "ref": "main",
        "sha": "1940040ac3c96118f07a718cc04a3e19ce1b27af",
        "user": {
          "login": "modelcontextprotocol",
          "id": 182288589,
          "node_id": "O_kgDOCt2AzQ",
          "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/modelcontextprotocol",
          "type": "Organization",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 862584018,
          "node_id": "R_kgDOM2n80g",
          "name": "python-sdk",
          "full_name": "modelcontextprotocol/python-sdk",
          "private": false,
          "owner": {
            "login": "modelcontextprotocol",
            "id": 182288589,
            "node_id": "O_kgDOCt2AzQ",
            "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/modelcontextprotocol",
            "type": "Organization",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": false,
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk",
          "created_at": "2024-09-24T21:01:35Z",
          "updated_at": "2025-12-06T05:02:17Z",
          "pushed_at": "2025-12-04T18:04:06Z",
          "homepage": "https://modelcontextprotocol.github.io/python-sdk/",
          "size": 4194,
          "stargazers_count": 20439,
          "watchers_count": 20439,
          "language": "Python",
          "has_issues": true,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": true,
          "has_discussions": false,
          "forks_count": 2843,
          "archived": false,
          "disabled": false,
          "open_issues_count": 345,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 2843,
          "open_issues": 345,
          "watchers": 20439,
          "default_branch": "main"
        }
      },
      "_links": {
        "self": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1354"
        },
        "html": {
          "href": "https://github.com/modelcontextprotocol/python-sdk/pull/1354"
        },
        "issue": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1354"
        },
        "comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1354/comments"
        },
        "review_comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1354/comments"
        },
        "review_comment": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/comments{/number}"
        },
        "commits": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1354/commits"
        },
        "statuses": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/statuses/5443008634a924924d2710228dc7034c39a809d4"
        }
      },
      "author_association": "MEMBER",
      "auto_merge": null,
      "active_lock_reason": null,
      "linked_issues": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1343",
      "id": 2801066639,
      "node_id": "PR_kwDOM2n80s6m9OKP",
      "number": 1343,
      "state": "open",
      "locked": false,
      "title": "Add idle session cleanup to prevent unbounded session accumulation",
      "user": {
        "login": "ddworken",
        "id": 5304541,
        "node_id": "MDQ6VXNlcjUzMDQ1NDE=",
        "avatar_url": "https://avatars.githubusercontent.com/u/5304541?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/ddworken",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "body": "## Summary\n- Added automatic cleanup of idle sessions when session count exceeds threshold\n- Sessions inactive longer than idle timeout are terminated to free resources\n- Prevents memory exhaustion from clients that create sessions but never terminate them\n\n## Changes\n- Added configurable session idle timeout (default 30 minutes)\n- Added background cleanup task that activates when session count > 10k\n- Track last activity time for each session\n- Double-check idle status before cleanup to prevent race conditions\n\n## Testing\n- Added tests for idle session cleanup behavior\n- Added tests for threshold-based activation\n- Added tests for session activity tracking\n- All existing tests continue to pass\n\nThis ensures the server remains stable even when clients don't properly close their sessions.",
      "created_at": "2025-09-04T23:05:04Z",
      "updated_at": "2025-10-10T10:01:31Z",
      "closed_at": null,
      "merged_at": null,
      "merge_commit_sha": null,
      "assignee": null,
      "assignees": {},
      "requested_reviewers": {},
      "requested_teams": {},
      "labels": {
        "0": {
          "id": 9230423596,
          "node_id": "LA_kwDOM2n80s8AAAACJi0WLA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/breaking%20change",
          "name": "breaking change",
          "color": "000000",
          "default": false,
          "description": "Will break existing deployments when updated without changes"
        },
        "1": {
          "id": 9230425628,
          "node_id": "LA_kwDOM2n80s8AAAACJi0eHA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/needs%20more%20work",
          "name": "needs more work",
          "color": "af3f39",
          "default": false,
          "description": "Not ready to be merged yet, needs additional follow-up from the author(s)."
        },
        "2": {
          "id": 9287728201,
          "node_id": "LA_kwDOM2n80s8AAAACKZd8SQ",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/needs%20maintainer%20action",
          "name": "needs maintainer action",
          "color": "d33428",
          "default": false,
          "description": "Potentially serious issue - needs proactive fix and maintainer attention"
        }
      },
      "milestone": null,
      "draft": false,
      "head": {
        "label": "ddworken:dworken/session-timeout",
        "ref": "dworken/session-timeout",
        "sha": "d2ef92ca62071a7985a37e9b9699d01c9f06401e",
        "user": {
          "login": "ddworken",
          "id": 5304541,
          "node_id": "MDQ6VXNlcjUzMDQ1NDE=",
          "avatar_url": "https://avatars.githubusercontent.com/u/5304541?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/ddworken",
          "type": "User",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 991564951,
          "node_id": "R_kgDOOxoUlw",
          "name": "python-sdk",
          "full_name": "ddworken/python-sdk",
          "private": false,
          "owner": {
            "login": "ddworken",
            "id": 5304541,
            "node_id": "MDQ6VXNlcjUzMDQ1NDE=",
            "avatar_url": "https://avatars.githubusercontent.com/u/5304541?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/ddworken",
            "type": "User",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": true,
          "url": "https://api.github.com/repos/ddworken/python-sdk",
          "created_at": "2025-05-27T20:23:07Z",
          "updated_at": "2025-09-04T22:50:05Z",
          "pushed_at": "2025-09-04T23:31:46Z",
          "homepage": "https://modelcontextprotocol.io",
          "size": 1822,
          "stargazers_count": 0,
          "watchers_count": 0,
          "language": "Python",
          "has_issues": false,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": false,
          "has_discussions": false,
          "forks_count": 0,
          "archived": false,
          "disabled": false,
          "open_issues_count": 0,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 0,
          "open_issues": 0,
          "watchers": 0,
          "default_branch": "main"
        }
      },
      "base": {
        "label": "modelcontextprotocol:main",
        "ref": "main",
        "sha": "47d35f0b3ca2e59ddc26ddc0f2a816ac3dc8df9b",
        "user": {
          "login": "modelcontextprotocol",
          "id": 182288589,
          "node_id": "O_kgDOCt2AzQ",
          "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/modelcontextprotocol",
          "type": "Organization",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 862584018,
          "node_id": "R_kgDOM2n80g",
          "name": "python-sdk",
          "full_name": "modelcontextprotocol/python-sdk",
          "private": false,
          "owner": {
            "login": "modelcontextprotocol",
            "id": 182288589,
            "node_id": "O_kgDOCt2AzQ",
            "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/modelcontextprotocol",
            "type": "Organization",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": false,
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk",
          "created_at": "2024-09-24T21:01:35Z",
          "updated_at": "2025-12-06T05:02:17Z",
          "pushed_at": "2025-12-04T18:04:06Z",
          "homepage": "https://modelcontextprotocol.github.io/python-sdk/",
          "size": 4194,
          "stargazers_count": 20439,
          "watchers_count": 20439,
          "language": "Python",
          "has_issues": true,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": true,
          "has_discussions": false,
          "forks_count": 2843,
          "archived": false,
          "disabled": false,
          "open_issues_count": 345,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 2843,
          "open_issues": 345,
          "watchers": 20439,
          "default_branch": "main"
        }
      },
      "_links": {
        "self": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1343"
        },
        "html": {
          "href": "https://github.com/modelcontextprotocol/python-sdk/pull/1343"
        },
        "issue": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1343"
        },
        "comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1343/comments"
        },
        "review_comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1343/comments"
        },
        "review_comment": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/comments{/number}"
        },
        "commits": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1343/commits"
        },
        "statuses": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/statuses/d2ef92ca62071a7985a37e9b9699d01c9f06401e"
        }
      },
      "author_association": "CONTRIBUTOR",
      "auto_merge": null,
      "active_lock_reason": null,
      "linked_issues": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1310",
      "id": 2776631424,
      "node_id": "PR_kwDOM2n80s6lgAiA",
      "number": 1310,
      "state": "open",
      "locked": false,
      "title": "types: Setting default value for jsonrpc",
      "user": {
        "login": "sreenaths",
        "id": 626441,
        "node_id": "MDQ6VXNlcjYyNjQ0MQ==",
        "avatar_url": "https://avatars.githubusercontent.com/u/626441?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/sreenaths",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "body": "The JSON-RPC version is fixed at 2.0 for MCP messages. However, as the value is not set by default, we have to pass the correct value every time a model is instantiated.\r\n\r\n## Motivation and Context\r\nThis change simplifies model instantiation by automatically setting the JSON-RPC version. Additionally, if the version ever needs to change in the future, it only has to be updated in a single place.\r\n\r\nFor example\r\n```python\r\nJSONRPCMessage(\r\n    root=JSONRPCRequest(\r\n        # jsonrpc=\"2.0\", - This wouldn't be required\r\n        id=1,\r\n        method=\"ping\"\r\n    )\r\n),\r\n```\r\n\r\n## How Has This Been Tested?\r\nTests were improved and are working as expected.\r\n\r\n## Breaking Changes\r\nNo\r\n\r\n## Types of changes\r\n- [ ] Bug fix (non-breaking change which fixes an issue)\r\n- [x] New feature (non-breaking change which adds functionality)\r\n- [ ] Breaking change (fix or feature that would cause existing functionality to change)\r\n- [ ] Documentation update\r\n\r\n## Checklist\r\n- [x] I have read the [MCP Documentation](https://modelcontextprotocol.io)\r\n- [x] My code follows the repository's style guidelines\r\n- [x] New and existing tests pass locally\r\n- [ ] I have added appropriate error handling\r\n- [ ] I have added or updated documentation as needed\r\n\r\n## Additional context\r\nNone",
      "created_at": "2025-08-26T22:53:54Z",
      "updated_at": "2025-11-12T18:29:10Z",
      "closed_at": null,
      "merged_at": null,
      "merge_commit_sha": null,
      "assignee": null,
      "assignees": {},
      "requested_reviewers": {
        "0": {
          "login": "ihrpr",
          "id": 21148364,
          "node_id": "MDQ6VXNlcjIxMTQ4MzY0",
          "avatar_url": "https://avatars.githubusercontent.com/u/21148364?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/ihrpr",
          "type": "User",
          "user_view_type": "public",
          "site_admin": false
        }
      },
      "requested_teams": {},
      "labels": {
        "0": {
          "id": 9287728201,
          "node_id": "LA_kwDOM2n80s8AAAACKZd8SQ",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/needs%20maintainer%20action",
          "name": "needs maintainer action",
          "color": "d33428",
          "default": false,
          "description": "Potentially serious issue - needs proactive fix and maintainer attention"
        },
        "1": {
          "id": 9354757189,
          "node_id": "LA_kwDOM2n80s8AAAACLZZERQ",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/enhancement",
          "name": "enhancement",
          "color": "11b5cc",
          "default": true,
          "description": "Request for a new feature that's not currently supported"
        }
      },
      "milestone": null,
      "draft": false,
      "head": {
        "label": "sreenaths:setting-default-jsonrpc-version",
        "ref": "setting-default-jsonrpc-version",
        "sha": "43ecf96f556030c1c847e6dbd8619cb57c2e5eeb",
        "user": {
          "login": "sreenaths",
          "id": 626441,
          "node_id": "MDQ6VXNlcjYyNjQ0MQ==",
          "avatar_url": "https://avatars.githubusercontent.com/u/626441?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/sreenaths",
          "type": "User",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 1032287554,
          "node_id": "R_kgDOPYd1Qg",
          "name": "mcp-python-sdk",
          "full_name": "sreenaths/mcp-python-sdk",
          "private": false,
          "owner": {
            "login": "sreenaths",
            "id": 626441,
            "node_id": "MDQ6VXNlcjYyNjQ0MQ==",
            "avatar_url": "https://avatars.githubusercontent.com/u/626441?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/sreenaths",
            "type": "User",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": true,
          "url": "https://api.github.com/repos/sreenaths/mcp-python-sdk",
          "created_at": "2025-08-05T05:12:35Z",
          "updated_at": "2025-12-06T02:38:47Z",
          "pushed_at": "2025-12-06T09:23:17Z",
          "homepage": "https://modelcontextprotocol.io",
          "size": 3000,
          "stargazers_count": 0,
          "watchers_count": 0,
          "language": "Python",
          "has_issues": false,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": false,
          "has_discussions": false,
          "forks_count": 0,
          "archived": false,
          "disabled": false,
          "open_issues_count": 0,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 0,
          "open_issues": 0,
          "watchers": 0,
          "default_branch": "main"
        }
      },
      "base": {
        "label": "modelcontextprotocol:main",
        "ref": "main",
        "sha": "40acbc596c727e8ccc58c69df8e93e9cf6e56a4e",
        "user": {
          "login": "modelcontextprotocol",
          "id": 182288589,
          "node_id": "O_kgDOCt2AzQ",
          "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/modelcontextprotocol",
          "type": "Organization",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 862584018,
          "node_id": "R_kgDOM2n80g",
          "name": "python-sdk",
          "full_name": "modelcontextprotocol/python-sdk",
          "private": false,
          "owner": {
            "login": "modelcontextprotocol",
            "id": 182288589,
            "node_id": "O_kgDOCt2AzQ",
            "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/modelcontextprotocol",
            "type": "Organization",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": false,
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk",
          "created_at": "2024-09-24T21:01:35Z",
          "updated_at": "2025-12-06T05:02:17Z",
          "pushed_at": "2025-12-04T18:04:06Z",
          "homepage": "https://modelcontextprotocol.github.io/python-sdk/",
          "size": 4194,
          "stargazers_count": 20439,
          "watchers_count": 20439,
          "language": "Python",
          "has_issues": true,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": true,
          "has_discussions": false,
          "forks_count": 2843,
          "archived": false,
          "disabled": false,
          "open_issues_count": 345,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 2843,
          "open_issues": 345,
          "watchers": 20439,
          "default_branch": "main"
        }
      },
      "_links": {
        "self": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1310"
        },
        "html": {
          "href": "https://github.com/modelcontextprotocol/python-sdk/pull/1310"
        },
        "issue": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1310"
        },
        "comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1310/comments"
        },
        "review_comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1310/comments"
        },
        "review_comment": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/comments{/number}"
        },
        "commits": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1310/commits"
        },
        "statuses": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/statuses/43ecf96f556030c1c847e6dbd8619cb57c2e5eeb"
        }
      },
      "author_association": "CONTRIBUTOR",
      "auto_merge": null,
      "active_lock_reason": null,
      "linked_issues": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1308",
      "id": 2774309392,
      "node_id": "PR_kwDOM2n80s6lXJoQ",
      "number": 1308,
      "state": "open",
      "locked": false,
      "title": "fix: Catch http errors ",
      "user": {
        "login": "lorenss-m",
        "id": 31991968,
        "node_id": "MDQ6VXNlcjMxOTkxOTY4",
        "avatar_url": "https://avatars.githubusercontent.com/u/31991968?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/lorenss-m",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "body": "# Fix: Propagate HTTP errors to client\r\n\r\n## Motivation and Context\r\nHTTP request failures were not being properly communicated to clients, causing silent failures. This fix ensures errors are sent through the read stream so clients are notified when requests fail.\r\n\r\n## How Has This Been Tested?\r\nHas been tested in production environments (used by https://github.com/hud-evals/hud-python with a remote server).\r\n\r\n## Breaking Changes\r\nNone - this is a backwards-compatible error handling improvement.\r\n\r\n## Types of changes\r\n- [x] Bug fix (non-breaking change which fixes an issue)\r\n\r\n## Checklist\r\n- [x] I have read the [MCP Documentation](https://modelcontextprotocol.io)\r\n- [x] My code follows the repository's style guidelines\r\n- [x] New and existing tests pass locally\r\n- [x] I have added appropriate error handling\r\n- [x] Documentation not needed for this internal fix\r\n\r\n## Additional context\r\nThis change wraps the `handle_request_async` function in a try-catch block and sends any exceptions to `ctx.read_stream_writer` to ensure proper error propagation in the streamable HTTP transport layer.\r\n\r\n### Example scenario where this fix is critical:\r\n\r\n**HTTP Error Codes (502, 503, 504, etc.)**\r\n```python\r\n# Without this fix: Client hangs when server returns 502 Bad Gateway\r\n# With this fix: Client receives the HTTP error\r\nfrom mcp.client.streamable_http import streamablehttp_client\r\nfrom mcp.client.session import ClientSession\r\n\r\nasync with streamablehttp_client(server_url) as (read_stream, write_stream):\r\n    async with ClientSession(read_stream, write_stream) as session:\r\n        await session.initialize()\r\n        try:\r\n            result = await session.call_tool(\"api_operation\", arguments={})\r\n        except Exception as e:\r\n            print(f\"Error received: {e}\")  # Now properly catches 502, 503, 504 errors\r\n```\r\n",
      "created_at": "2025-08-26T08:30:36Z",
      "updated_at": "2025-10-03T21:33:39Z",
      "closed_at": null,
      "merged_at": null,
      "merge_commit_sha": "146ad48aa09f804206f133755c944d8057ae1242",
      "assignee": {
        "login": "felixweinberger",
        "id": 3823880,
        "node_id": "MDQ6VXNlcjM4MjM4ODA=",
        "avatar_url": "https://avatars.githubusercontent.com/u/3823880?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/felixweinberger",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "assignees": {
        "0": {
          "login": "felixweinberger",
          "id": 3823880,
          "node_id": "MDQ6VXNlcjM4MjM4ODA=",
          "avatar_url": "https://avatars.githubusercontent.com/u/3823880?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/felixweinberger",
          "type": "User",
          "user_view_type": "public",
          "site_admin": false
        }
      },
      "requested_reviewers": {
        "0": {
          "login": "Kludex",
          "id": 7353520,
          "node_id": "MDQ6VXNlcjczNTM1MjA=",
          "avatar_url": "https://avatars.githubusercontent.com/u/7353520?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/Kludex",
          "type": "User",
          "user_view_type": "public",
          "site_admin": false
        }
      },
      "requested_teams": {},
      "labels": {
        "0": {
          "id": 9287728201,
          "node_id": "LA_kwDOM2n80s8AAAACKZd8SQ",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/needs%20maintainer%20action",
          "name": "needs maintainer action",
          "color": "d33428",
          "default": false,
          "description": "Potentially serious issue - needs proactive fix and maintainer attention"
        }
      },
      "milestone": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/milestones/15",
        "id": 13770333,
        "node_id": "MI_kwDOM2n80s4A0h5d",
        "number": 15,
        "title": "Error catching improvements",
        "description": null,
        "creator": {
          "login": "felixweinberger",
          "id": 3823880,
          "node_id": "MDQ6VXNlcjM4MjM4ODA=",
          "avatar_url": "https://avatars.githubusercontent.com/u/3823880?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/felixweinberger",
          "type": "User",
          "user_view_type": "public",
          "site_admin": false
        },
        "open_issues": 6,
        "closed_issues": 0,
        "state": "open",
        "created_at": "2025-09-26T16:03:50Z",
        "updated_at": "2025-10-07T17:45:27Z",
        "due_on": null,
        "closed_at": null
      },
      "draft": false,
      "head": {
        "label": "hud-evals:cherry-pick-9352949",
        "ref": "cherry-pick-9352949",
        "sha": "66c844a8dc636cd5c796dabf241e29f09b64fdb5",
        "user": {
          "login": "hud-evals",
          "id": 187057607,
          "node_id": "O_kgDOCyZFxw",
          "avatar_url": "https://avatars.githubusercontent.com/u/187057607?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/hud-evals",
          "type": "Organization",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 1035627026,
          "node_id": "R_kgDOPbpqEg",
          "name": "mcp-python-sdk",
          "full_name": "hud-evals/mcp-python-sdk",
          "private": false,
          "owner": {
            "login": "hud-evals",
            "id": 187057607,
            "node_id": "O_kgDOCyZFxw",
            "avatar_url": "https://avatars.githubusercontent.com/u/187057607?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/hud-evals",
            "type": "Organization",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": true,
          "url": "https://api.github.com/repos/hud-evals/mcp-python-sdk",
          "created_at": "2025-08-10T19:50:22Z",
          "updated_at": "2025-09-27T22:35:01Z",
          "pushed_at": "2025-09-27T22:34:57Z",
          "homepage": "https://modelcontextprotocol.io",
          "size": 1553,
          "stargazers_count": 0,
          "watchers_count": 0,
          "language": "Python",
          "has_issues": false,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": false,
          "has_discussions": false,
          "forks_count": 0,
          "archived": false,
          "disabled": false,
          "open_issues_count": 0,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 0,
          "open_issues": 0,
          "watchers": 0,
          "default_branch": "main"
        }
      },
      "base": {
        "label": "modelcontextprotocol:main",
        "ref": "main",
        "sha": "eaf7cf41d5c1d3bcfd4416494ab5dc62b9c17a4a",
        "user": {
          "login": "modelcontextprotocol",
          "id": 182288589,
          "node_id": "O_kgDOCt2AzQ",
          "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/modelcontextprotocol",
          "type": "Organization",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 862584018,
          "node_id": "R_kgDOM2n80g",
          "name": "python-sdk",
          "full_name": "modelcontextprotocol/python-sdk",
          "private": false,
          "owner": {
            "login": "modelcontextprotocol",
            "id": 182288589,
            "node_id": "O_kgDOCt2AzQ",
            "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/modelcontextprotocol",
            "type": "Organization",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": false,
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk",
          "created_at": "2024-09-24T21:01:35Z",
          "updated_at": "2025-12-06T05:02:17Z",
          "pushed_at": "2025-12-04T18:04:06Z",
          "homepage": "https://modelcontextprotocol.github.io/python-sdk/",
          "size": 4194,
          "stargazers_count": 20439,
          "watchers_count": 20439,
          "language": "Python",
          "has_issues": true,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": true,
          "has_discussions": false,
          "forks_count": 2843,
          "archived": false,
          "disabled": false,
          "open_issues_count": 345,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 2843,
          "open_issues": 345,
          "watchers": 20439,
          "default_branch": "main"
        }
      },
      "_links": {
        "self": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1308"
        },
        "html": {
          "href": "https://github.com/modelcontextprotocol/python-sdk/pull/1308"
        },
        "issue": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1308"
        },
        "comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1308/comments"
        },
        "review_comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1308/comments"
        },
        "review_comment": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/comments{/number}"
        },
        "commits": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1308/commits"
        },
        "statuses": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/statuses/66c844a8dc636cd5c796dabf241e29f09b64fdb5"
        }
      },
      "author_association": "CONTRIBUTOR",
      "auto_merge": null,
      "active_lock_reason": null,
      "linked_issues": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1299",
      "id": 2769052533,
      "node_id": "PR_kwDOM2n80s6lDGN1",
      "number": 1299,
      "state": "open",
      "locked": false,
      "title": "fix: tool cache refresh with nested handler invocation",
      "user": {
        "login": "matthicksj",
        "id": 14180,
        "node_id": "MDQ6VXNlcjE0MTgw",
        "avatar_url": "https://avatars.githubusercontent.com/u/14180?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/matthicksj",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "body": "Fix MCP SDK issue #1298 where tool handlers fail to execute properly when streaming context is present in the parent process.\r\n\r\nThe fix stores a direct reference to the list_tools function to avoid nested handler invocation which can disrupt async execution flow in streaming contexts.\r\n\r\n<!-- Provide a brief summary of your changes -->\r\n\r\n## Motivation and Context\r\n<!-- Why is this change needed? What problem does it solve? -->\r\nTool handlers were failing when streaming context was present in the parent process. The root cause was that cache refresh used nested handler invocation via `self.request_handlers[ListToolsRequest](None)`, which disrupts async execution flow in streaming contexts. This fix resolves issue #1298 by using a direct function reference for cache refresh instead of invoking through the request handler.\r\n\r\n## How Has This Been Tested?\r\n<!-- Have you tested this in a real application? Which scenarios were tested? -->\r\n- Added comprehensive test in `tests/server/test_tool_cache_refresh_bug.py` that verifies cache refresh works without nested handler invocation\r\n- Test confirms the fix prevents async execution flow disruption\r\n- All existing tests pass\r\n\r\n## Breaking Changes\r\n<!-- Will users need to update their code or configurations? -->\r\nNone. This is an internal implementation fix that maintains the same external API and behavior.\r\n\r\n## Types of changes\r\n<!-- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->\r\n- [x] Bug fix (non-breaking change which fixes an issue)\r\n- [ ] New feature (non-breaking change which adds functionality)\r\n- [ ] Breaking change (fix or feature that would cause existing functionality to change)\r\n- [ ] Documentation update\r\n\r\n## Checklist\r\n<!-- Go over all the following points, and put an `x` in all the boxes that apply. -->\r\n- [x] I have read the [MCP Documentation](https://modelcontextprotocol.io)\r\n- [x] My code follows the repository's style guidelines\r\n- [x] New and existing tests pass locally\r\n- [x] I have added appropriate error handling\r\n- [ ] I have added or updated documentation as needed\r\n\r\n## Additional context\r\n<!-- Add any other context, implementation notes, or design decisions -->\r\nThe fix modifies `src/mcp/server/lowlevel/server.py` to store a direct reference to the `list_tools` function when it's registered via the decorator. During cache refresh, this direct reference is used instead of going through the request handler system, avoiding the nested invocation issue while maintaining identical functionality.",
      "created_at": "2025-08-23T18:02:13Z",
      "updated_at": "2025-10-10T10:02:50Z",
      "closed_at": null,
      "merged_at": null,
      "merge_commit_sha": null,
      "assignee": null,
      "assignees": {},
      "requested_reviewers": {
        "0": {
          "login": "ochafik",
          "id": 273860,
          "node_id": "MDQ6VXNlcjI3Mzg2MA==",
          "avatar_url": "https://avatars.githubusercontent.com/u/273860?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/ochafik",
          "type": "User",
          "user_view_type": "public",
          "site_admin": false
        }
      },
      "requested_teams": {},
      "labels": {
        "0": {
          "id": 7511840554,
          "node_id": "LA_kwDOM2n80s8AAAABv72XKg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/bug",
          "name": "bug",
          "color": "d73a4a",
          "default": true,
          "description": "Something isn't working"
        },
        "1": {
          "id": 9287728201,
          "node_id": "LA_kwDOM2n80s8AAAACKZd8SQ",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/needs%20maintainer%20action",
          "name": "needs maintainer action",
          "color": "d33428",
          "default": false,
          "description": "Potentially serious issue - needs proactive fix and maintainer attention"
        }
      },
      "milestone": null,
      "draft": false,
      "head": {
        "label": "matthicksj:fix-streaming-bug",
        "ref": "fix-streaming-bug",
        "sha": "c800467616d32240939234c433fa42d3791ea404",
        "user": {
          "login": "matthicksj",
          "id": 14180,
          "node_id": "MDQ6VXNlcjE0MTgw",
          "avatar_url": "https://avatars.githubusercontent.com/u/14180?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/matthicksj",
          "type": "User",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 1043042862,
          "node_id": "R_kgDOPiuSLg",
          "name": "python-sdk",
          "full_name": "matthicksj/python-sdk",
          "private": false,
          "owner": {
            "login": "matthicksj",
            "id": 14180,
            "node_id": "MDQ6VXNlcjE0MTgw",
            "avatar_url": "https://avatars.githubusercontent.com/u/14180?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/matthicksj",
            "type": "User",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": true,
          "url": "https://api.github.com/repos/matthicksj/python-sdk",
          "created_at": "2025-08-23T03:09:46Z",
          "updated_at": "2025-08-23T03:09:46Z",
          "pushed_at": "2025-08-24T15:30:30Z",
          "homepage": "https://modelcontextprotocol.io",
          "size": 1765,
          "stargazers_count": 0,
          "watchers_count": 0,
          "language": null,
          "has_issues": false,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": false,
          "has_discussions": false,
          "forks_count": 0,
          "archived": false,
          "disabled": false,
          "open_issues_count": 0,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 0,
          "open_issues": 0,
          "watchers": 0,
          "default_branch": "main"
        }
      },
      "base": {
        "label": "modelcontextprotocol:main",
        "ref": "main",
        "sha": "9a8592e7d4d69b785df8b5d9d7b694cb6cbb149f",
        "user": {
          "login": "modelcontextprotocol",
          "id": 182288589,
          "node_id": "O_kgDOCt2AzQ",
          "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/modelcontextprotocol",
          "type": "Organization",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 862584018,
          "node_id": "R_kgDOM2n80g",
          "name": "python-sdk",
          "full_name": "modelcontextprotocol/python-sdk",
          "private": false,
          "owner": {
            "login": "modelcontextprotocol",
            "id": 182288589,
            "node_id": "O_kgDOCt2AzQ",
            "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/modelcontextprotocol",
            "type": "Organization",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": false,
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk",
          "created_at": "2024-09-24T21:01:35Z",
          "updated_at": "2025-12-06T05:02:17Z",
          "pushed_at": "2025-12-04T18:04:06Z",
          "homepage": "https://modelcontextprotocol.github.io/python-sdk/",
          "size": 4194,
          "stargazers_count": 20439,
          "watchers_count": 20439,
          "language": "Python",
          "has_issues": true,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": true,
          "has_discussions": false,
          "forks_count": 2843,
          "archived": false,
          "disabled": false,
          "open_issues_count": 345,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 2843,
          "open_issues": 345,
          "watchers": 20439,
          "default_branch": "main"
        }
      },
      "_links": {
        "self": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1299"
        },
        "html": {
          "href": "https://github.com/modelcontextprotocol/python-sdk/pull/1299"
        },
        "issue": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1299"
        },
        "comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1299/comments"
        },
        "review_comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1299/comments"
        },
        "review_comment": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/comments{/number}"
        },
        "commits": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1299/commits"
        },
        "statuses": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/statuses/c800467616d32240939234c433fa42d3791ea404"
        }
      },
      "author_association": "NONE",
      "auto_merge": null,
      "active_lock_reason": null,
      "linked_issues": [
        1
      ]
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1244",
      "id": 2725751782,
      "node_id": "PR_kwDOM2n80s6id6vm",
      "number": 1244,
      "state": "open",
      "locked": false,
      "title": "Update FastMCP constructor to respect Pydantic settings configuration",
      "user": {
        "login": "saqadri",
        "id": 25641935,
        "node_id": "MDQ6VXNlcjI1NjQxOTM1",
        "avatar_url": "https://avatars.githubusercontent.com/u/25641935?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/saqadri",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "body": "Fix environment variable loading in FastMCP by preserving Pydantic Settings behavior\r\n\r\n## Motivation and Context\r\nPR #1198 introduced a regression where environment variables (e.g., `FASTMCP_HOST=0.0.0.0`) were no longer being loaded by FastMCP. The issue occurred because the refactored code explicitly passed all settings parameters to the Pydantic Settings constructor, which overrides environment variable values.\r\n\r\nThis fix ensures that only explicitly provided parameters are passed to the Settings constructor, allowing Pydantic's intended priority order to work correctly.\r\n\r\n## How Has This Been Tested?\r\nTested the following scenarios:\r\n- Environment variables are correctly loaded when no explicit parameters are provided\r\n- Explicit parameters override environment variables when provided\r\n- `.env` file values are loaded with correct priority\r\n- Default values from the Settings class are used as fallback\r\n\r\nExample test cases:\r\n```python\r\nserver = FastMCP()  # host=\"127.0.0.1\" from Settings default\r\n\r\n# With FASTMCP_HOST=0.0.0.0 in environment\r\nserver = FastMCP()  # host=\"0.0.0.0\" from env var\r\n\r\nserver = FastMCP(host=\"192.168.1.1\")  # host=\"192.168.1.1\" from explicit param\r\n```\r\n\r\n## Breaking Changes\r\nNo breaking changes. This restores the original behavior where environment variables are properly loaded.\r\n\r\n## Types of changes\r\n- [x] Bug fix (non-breaking change which fixes an issue)\r\n- [ ] New feature (non-breaking change which adds functionality)\r\n- [ ] Breaking change (fix or feature that would cause existing functionality to change)\r\n- [ ] Documentation update\r\n\r\n## Checklist\r\n- [x] I have read the [[MCP Documentation](https://modelcontextprotocol.io/)](https://modelcontextprotocol.io)\r\n- [x] My code follows the repository's style guidelines\r\n- [x] New and existing tests pass locally\r\n- [x] I have added appropriate error handling\r\n- [x] I have added or updated documentation as needed\r\n\r\n## Additional context\r\n\r\n### Settings Priority Order\r\nThis fix preserves Pydantic Settings' intended priority order (highest to lowest):\r\n1. **Explicit parameters** passed to `FastMCP()` constructor\r\n2. **Environment variables** (e.g., `FASTMCP_HOST`)\r\n3. **`.env` file** values\r\n4. **Default values** defined in the Settings class",
      "created_at": "2025-08-06T21:59:41Z",
      "updated_at": "2025-11-12T17:46:40Z",
      "closed_at": null,
      "merged_at": null,
      "merge_commit_sha": null,
      "assignee": null,
      "assignees": {},
      "requested_reviewers": {
        "0": {
          "login": "Kludex",
          "id": 7353520,
          "node_id": "MDQ6VXNlcjczNTM1MjA=",
          "avatar_url": "https://avatars.githubusercontent.com/u/7353520?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/Kludex",
          "type": "User",
          "user_view_type": "public",
          "site_admin": false
        }
      },
      "requested_teams": {},
      "labels": {
        "0": {
          "id": 9287728201,
          "node_id": "LA_kwDOM2n80s8AAAACKZd8SQ",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/needs%20maintainer%20action",
          "name": "needs maintainer action",
          "color": "d33428",
          "default": false,
          "description": "Potentially serious issue - needs proactive fix and maintainer attention"
        }
      },
      "milestone": null,
      "draft": false,
      "head": {
        "label": "saqadri:main",
        "ref": "main",
        "sha": "7219ac3ef9dfb06564326bb5f000a89994f235d7",
        "user": {
          "login": "saqadri",
          "id": 25641935,
          "node_id": "MDQ6VXNlcjI1NjQxOTM1",
          "avatar_url": "https://avatars.githubusercontent.com/u/25641935?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/saqadri",
          "type": "User",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 955007319,
          "node_id": "R_kgDOOOxBVw",
          "name": "stdio-fixes",
          "full_name": "saqadri/stdio-fixes",
          "private": false,
          "owner": {
            "login": "saqadri",
            "id": 25641935,
            "node_id": "MDQ6VXNlcjI1NjQxOTM1",
            "avatar_url": "https://avatars.githubusercontent.com/u/25641935?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/saqadri",
            "type": "User",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": true,
          "url": "https://api.github.com/repos/saqadri/stdio-fixes",
          "created_at": "2025-03-26T00:48:42Z",
          "updated_at": "2025-08-28T19:21:32Z",
          "pushed_at": "2025-08-28T19:21:23Z",
          "homepage": "https://modelcontextprotocol.io",
          "size": 1769,
          "stargazers_count": 0,
          "watchers_count": 0,
          "language": "Python",
          "has_issues": false,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": false,
          "has_discussions": false,
          "forks_count": 0,
          "archived": false,
          "disabled": false,
          "open_issues_count": 0,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 0,
          "open_issues": 0,
          "watchers": 0,
          "default_branch": "main"
        }
      },
      "base": {
        "label": "modelcontextprotocol:main",
        "ref": "main",
        "sha": "07ae8c0d4e58bc0527a6898709288686ef6506dd",
        "user": {
          "login": "modelcontextprotocol",
          "id": 182288589,
          "node_id": "O_kgDOCt2AzQ",
          "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/modelcontextprotocol",
          "type": "Organization",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 862584018,
          "node_id": "R_kgDOM2n80g",
          "name": "python-sdk",
          "full_name": "modelcontextprotocol/python-sdk",
          "private": false,
          "owner": {
            "login": "modelcontextprotocol",
            "id": 182288589,
            "node_id": "O_kgDOCt2AzQ",
            "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/modelcontextprotocol",
            "type": "Organization",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": false,
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk",
          "created_at": "2024-09-24T21:01:35Z",
          "updated_at": "2025-12-06T05:02:17Z",
          "pushed_at": "2025-12-04T18:04:06Z",
          "homepage": "https://modelcontextprotocol.github.io/python-sdk/",
          "size": 4194,
          "stargazers_count": 20439,
          "watchers_count": 20439,
          "language": "Python",
          "has_issues": true,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": true,
          "has_discussions": false,
          "forks_count": 2843,
          "archived": false,
          "disabled": false,
          "open_issues_count": 345,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 2843,
          "open_issues": 345,
          "watchers": 20439,
          "default_branch": "main"
        }
      },
      "_links": {
        "self": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1244"
        },
        "html": {
          "href": "https://github.com/modelcontextprotocol/python-sdk/pull/1244"
        },
        "issue": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1244"
        },
        "comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1244/comments"
        },
        "review_comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1244/comments"
        },
        "review_comment": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/comments{/number}"
        },
        "commits": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1244/commits"
        },
        "statuses": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/statuses/7219ac3ef9dfb06564326bb5f000a89994f235d7"
        }
      },
      "author_association": "CONTRIBUTOR",
      "auto_merge": null,
      "active_lock_reason": null,
      "linked_issues": [
        1
      ]
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1222",
      "id": 2710387756,
      "node_id": "PR_kwDOM2n80s6hjTws",
      "number": 1222,
      "state": "open",
      "locked": false,
      "title": "fix: Handle SSE Disconnects Properly When use starlette middleware",
      "user": {
        "login": "wenxuwan",
        "id": 11661906,
        "node_id": "MDQ6VXNlcjExNjYxOTA2",
        "avatar_url": "https://avatars.githubusercontent.com/u/11661906?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/wenxuwan",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "body": "<!-- Provide a brief summary of your changes -->\r\n\r\n## Motivation and Context\r\n<!-- Why is this change needed? What problem does it solve? -->\r\n\r\nWhen using the Starlette middleware capabilities, if the SSE client disconnects, the current server will return starlette.responses.Response, and the Response will send a message of type \"http.response.start\", which will cause the following error：\r\n\r\n\tFile \"/opt/anaconda3/lib/python3.12/contextlib.py\", line 158, in __exit__\r\n\t    self.gen.throw(value)\r\n\t  File \"/Users/wangwenxue/code/gitlab/sofapyapp/myenv/lib/python3.12/site-packages/starlette/_utils.py\", line 83, in collapse_excgroups\r\n\t    raise exc\r\n\t  File \"/Users/wangwenxue/code/gitlab/sofapyapp/myenv/lib/python3.12/site-packages/starlette/middleware/base.py\", line 185, in __call__\r\n\t    await response(scope, wrapped_receive, send)\r\n\t  File \"/Users/wangwenxue/code/gitlab/sofapyapp/myenv/lib/python3.12/site-packages/starlette/middleware/base.py\", line 223, in __call__\r\n\t    async for chunk in self.body_iterator:\r\n\t  File \"/Users/wangwenxue/code/gitlab/sofapyapp/myenv/lib/python3.12/site-packages/starlette/middleware/base.py\", line 169, in body_stream\r\n\t    assert message[\"type\"] == \"http.response.body\", f\"Unexpected message: {message}\"\r\n\t           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\r\n\tAssertionError: Unexpected message: {'type': 'http.response.start', 'status': 200, 'headers': [(b'content-length', b'0')]}\r\n\r\n\r\nThere are several issues that should be related to this PR, such as:\r\n\r\nhttps://github.com/modelcontextprotocol/python-sdk/issues/883\r\nhttps://github.com/jlowin/fastmcp/issues/858\r\n\r\n\r\n## How Has This Been Tested?\r\n<!-- Have you tested this in a real application? Which scenarios were tested? -->\r\n\r\nTested manually and ensured that the route was closed when clients close the connection.\r\n\r\n## Breaking Changes\r\n<!-- Will users need to update their code or configurations? -->\r\n\r\nNo\r\n\r\n## Types of changes\r\n<!-- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->\r\n- [x] Bug fix (non-breaking change which fixes an issue)\r\n- [ ] New feature (non-breaking change which adds functionality)\r\n- [ ] Breaking change (fix or feature that would cause existing functionality to change)\r\n- [ ] Documentation update\r\n\r\n## Checklist\r\n<!-- Go over all the following points, and put an `x` in all the boxes that apply. -->\r\n- [x] I have read the [MCP Documentation](https://modelcontextprotocol.io)\r\n- [x] My code follows the repository's style guidelines\r\n- [x] New and existing tests pass locally\r\n- [x] I have added appropriate error handling\r\n- [x] I have added or updated documentation as needed\r\n\r\n## Additional context\r\n<!-- Add any other context, implementation notes, or design decisions -->\r\n",
      "created_at": "2025-07-31T14:45:34Z",
      "updated_at": "2025-10-03T21:33:35Z",
      "closed_at": null,
      "merged_at": null,
      "merge_commit_sha": null,
      "assignee": null,
      "assignees": {},
      "requested_reviewers": {},
      "requested_teams": {},
      "labels": {
        "0": {
          "id": 9230424293,
          "node_id": "LA_kwDOM2n80s8AAAACJi0Y5Q",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/v2",
          "name": "v2",
          "color": "5d2a87",
          "default": false,
          "description": "Ideas, requests and plans for v2 of the SDK which will incorporate major changes and fixes"
        },
        "1": {
          "id": 9230425628,
          "node_id": "LA_kwDOM2n80s8AAAACJi0eHA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/needs%20more%20work",
          "name": "needs more work",
          "color": "af3f39",
          "default": false,
          "description": "Not ready to be merged yet, needs additional follow-up from the author(s)."
        }
      },
      "milestone": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/milestones/3",
        "id": 12112132,
        "node_id": "MI_kwDOM2n80s4AuNEE",
        "number": 3,
        "title": "Python SDK v2.0",
        "description": "",
        "creator": {
          "login": "dsp-ant",
          "id": 167242713,
          "node_id": "U_kgDOCffr2Q",
          "avatar_url": "https://avatars.githubusercontent.com/u/167242713?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/dsp-ant",
          "type": "User",
          "user_view_type": "public",
          "site_admin": false
        },
        "open_issues": 12,
        "closed_issues": 2,
        "state": "open",
        "created_at": "2025-01-02T09:08:45Z",
        "updated_at": "2025-10-07T17:22:59Z",
        "due_on": null,
        "closed_at": null
      },
      "draft": true,
      "head": {
        "label": "wenxuwan:try_fix_sse_disconnect",
        "ref": "try_fix_sse_disconnect",
        "sha": "00e38a8e1d62963e306cdfecb8c99d9dd79481b7",
        "user": {
          "login": "wenxuwan",
          "id": 11661906,
          "node_id": "MDQ6VXNlcjExNjYxOTA2",
          "avatar_url": "https://avatars.githubusercontent.com/u/11661906?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/wenxuwan",
          "type": "User",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 966489066,
          "node_id": "R_kgDOOZtz6g",
          "name": "python-sdk",
          "full_name": "wenxuwan/python-sdk",
          "private": false,
          "owner": {
            "login": "wenxuwan",
            "id": 11661906,
            "node_id": "MDQ6VXNlcjExNjYxOTA2",
            "avatar_url": "https://avatars.githubusercontent.com/u/11661906?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/wenxuwan",
            "type": "User",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": true,
          "url": "https://api.github.com/repos/wenxuwan/python-sdk",
          "created_at": "2025-04-15T02:14:01Z",
          "updated_at": "2025-04-22T03:18:38Z",
          "pushed_at": "2025-08-23T10:21:02Z",
          "homepage": "https://modelcontextprotocol.io",
          "size": 1839,
          "stargazers_count": 0,
          "watchers_count": 0,
          "language": "Python",
          "has_issues": false,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": false,
          "has_discussions": false,
          "forks_count": 0,
          "archived": false,
          "disabled": false,
          "open_issues_count": 0,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 0,
          "open_issues": 0,
          "watchers": 0,
          "default_branch": "main"
        }
      },
      "base": {
        "label": "modelcontextprotocol:main",
        "ref": "main",
        "sha": "9a8592e7d4d69b785df8b5d9d7b694cb6cbb149f",
        "user": {
          "login": "modelcontextprotocol",
          "id": 182288589,
          "node_id": "O_kgDOCt2AzQ",
          "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/modelcontextprotocol",
          "type": "Organization",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 862584018,
          "node_id": "R_kgDOM2n80g",
          "name": "python-sdk",
          "full_name": "modelcontextprotocol/python-sdk",
          "private": false,
          "owner": {
            "login": "modelcontextprotocol",
            "id": 182288589,
            "node_id": "O_kgDOCt2AzQ",
            "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/modelcontextprotocol",
            "type": "Organization",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": false,
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk",
          "created_at": "2024-09-24T21:01:35Z",
          "updated_at": "2025-12-06T05:02:17Z",
          "pushed_at": "2025-12-04T18:04:06Z",
          "homepage": "https://modelcontextprotocol.github.io/python-sdk/",
          "size": 4194,
          "stargazers_count": 20439,
          "watchers_count": 20439,
          "language": "Python",
          "has_issues": true,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": true,
          "has_discussions": false,
          "forks_count": 2843,
          "archived": false,
          "disabled": false,
          "open_issues_count": 345,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 2843,
          "open_issues": 345,
          "watchers": 20439,
          "default_branch": "main"
        }
      },
      "_links": {
        "self": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1222"
        },
        "html": {
          "href": "https://github.com/modelcontextprotocol/python-sdk/pull/1222"
        },
        "issue": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1222"
        },
        "comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1222/comments"
        },
        "review_comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1222/comments"
        },
        "review_comment": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/comments{/number}"
        },
        "commits": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1222/commits"
        },
        "statuses": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/statuses/00e38a8e1d62963e306cdfecb8c99d9dd79481b7"
        }
      },
      "author_association": "NONE",
      "auto_merge": null,
      "active_lock_reason": null,
      "linked_issues": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1209",
      "id": 2701285287,
      "node_id": "PR_kwDOM2n80s6hAlen",
      "number": 1209,
      "state": "open",
      "locked": false,
      "title": "Feature: Non-Blocking call_tool and request state externalisation",
      "user": {
        "login": "davemssavage",
        "id": 349016,
        "node_id": "MDQ6VXNlcjM0OTAxNg==",
        "avatar_url": "https://avatars.githubusercontent.com/u/349016?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/davemssavage",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "body": "This patch enables a non-blocking mode of running tools and introduces a RequestStateManager plugin api - this allows for long running tasks to be rejoined on the client and across process restarts.\r\n\r\n## Motivation and Context\r\nRather than introducing new protocol messages as per https://github.com/modelcontextprotocol/modelcontextprotocol/pull/617 this patch uses the existing protocol messages with client side changes to allow the client application to submit a call request and then later join that request to get the response and/or any progress notifications that may have occured. This works on top of the existing session resume processes so a client can submit a task in one process and rejoin from another if a persistent version of RequestStateManager is used (this has been tested using a redis implementation - not included in this patch)\r\n\r\n<!-- Why is this change needed? What problem does it solve? -->\r\nLong running tasks currently consume resources indefinitely on the client blocking until they return, Tool calls can currently timeout allowing control to return to the client however this leads to a messy control flow that exposes the internal details of the protocol implementaton - having to check the type of code is httpx.codes.REQUEST_TIMEOUT.\r\n\r\nThis patch instead introduces new methods request_call_tool and join_call_tool that handle various complex issues with resume tokens and via state stored in a pluggable RequestStateManager. An InMemoryRequestStateManager is provided as the default, other external state managers can be provided to the ClientSession to allow for persistence outside of process memory.\r\n\r\n## How Has This Been Tested?\r\nThis has been unit tested and tested on a server application that managed multiple sessions without blocking the server side threads.\r\n\r\n## Breaking Changes\r\nNone\r\n\r\n## Types of changes\r\n<!-- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->\r\n- [ ] Bug fix (non-breaking change which fixes an issue)\r\n- [x] New feature (non-breaking change which adds functionality)\r\n- [ ] Breaking change (fix or feature that would cause existing functionality to change)\r\n- [ ] Documentation update\r\n\r\n## Checklist\r\n<!-- Go over all the following points, and put an `x` in all the boxes that apply. -->\r\n- [x] I have read the [MCP Documentation](https://modelcontextprotocol.io)\r\n- [x] My code follows the repository's style guidelines\r\n- [x] New and existing tests pass locally\r\n- [x] I have added appropriate error handling\r\n- [ ] I have added or updated documentation as needed\r\n\r\n## Additional context\r\n\r\nIn order to handle some complex logic around resumption this patch introduces a new ResumeCapability which can be returned during initialisation. It currently is hard coded to assume that if streamable_http protocol is used then server sessions are resumeable. It may be worth while extending this along the lines of https://github.com/modelcontextprotocol/modelcontextprotocol/pull/617 where servers can indicate how long clients might expect a session to be resumable for.\r\n\r\nTesting on a non-trivial application has highlighted that at least one progress notification needs to be sent from the server prior to the start_request call returning a request_id. This is due to needing at least one event to trigger the sse.event_id to be passed back to the client for the resume token to be collected. This is a little opaque and relies on the client having passed a progress callback in the start_call_tool method. A new protocol notification sent from the server to indicate it has received the request could be a viable alternative, however one of the benefits of this is patch over https://github.com/modelcontextprotocol/modelcontextprotocol/pull/617 is it is trying to avoid new protocol messages.\r\n",
      "created_at": "2025-07-28T15:53:45Z",
      "updated_at": "2025-11-12T18:29:14Z",
      "closed_at": null,
      "merged_at": null,
      "merge_commit_sha": null,
      "assignee": null,
      "assignees": {},
      "requested_reviewers": {
        "0": {
          "login": "felixweinberger",
          "id": 3823880,
          "node_id": "MDQ6VXNlcjM4MjM4ODA=",
          "avatar_url": "https://avatars.githubusercontent.com/u/3823880?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/felixweinberger",
          "type": "User",
          "user_view_type": "public",
          "site_admin": false
        }
      },
      "requested_teams": {},
      "labels": {
        "0": {
          "id": 9231177417,
          "node_id": "LA_kwDOM2n80s8AAAACJjiWyQ",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/pending%20SEP%20approval",
          "name": "pending SEP approval",
          "color": "390ac3",
          "default": false,
          "description": "When a PR is attached as an implementation detail to a SEP, we mark it as such for triage."
        },
        "1": {
          "id": 9354757189,
          "node_id": "LA_kwDOM2n80s8AAAACLZZERQ",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/enhancement",
          "name": "enhancement",
          "color": "11b5cc",
          "default": true,
          "description": "Request for a new feature that's not currently supported"
        }
      },
      "milestone": null,
      "draft": true,
      "head": {
        "label": "davemssavage:feature/call-futures",
        "ref": "feature/call-futures",
        "sha": "06e356fe0dcb3076f85912be5ae860e1da25df39",
        "user": {
          "login": "davemssavage",
          "id": 349016,
          "node_id": "MDQ6VXNlcjM0OTAxNg==",
          "avatar_url": "https://avatars.githubusercontent.com/u/349016?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/davemssavage",
          "type": "User",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 977630790,
          "node_id": "R_kgDOOkV2Rg",
          "name": "python-sdk",
          "full_name": "davemssavage/python-sdk",
          "private": false,
          "owner": {
            "login": "davemssavage",
            "id": 349016,
            "node_id": "MDQ6VXNlcjM0OTAxNg==",
            "avatar_url": "https://avatars.githubusercontent.com/u/349016?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/davemssavage",
            "type": "User",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": true,
          "url": "https://api.github.com/repos/davemssavage/python-sdk",
          "created_at": "2025-05-04T16:35:11Z",
          "updated_at": "2025-08-16T12:53:48Z",
          "pushed_at": "2025-08-24T16:54:13Z",
          "homepage": "https://modelcontextprotocol.io",
          "size": 2008,
          "stargazers_count": 0,
          "watchers_count": 0,
          "language": "Python",
          "has_issues": false,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": false,
          "has_discussions": false,
          "forks_count": 0,
          "archived": false,
          "disabled": false,
          "open_issues_count": 0,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 0,
          "open_issues": 0,
          "watchers": 0,
          "default_branch": "main"
        }
      },
      "base": {
        "label": "modelcontextprotocol:main",
        "ref": "main",
        "sha": "d1ac8d68eb2d7ed139bdc2608b8b4e2ec4265be5",
        "user": {
          "login": "modelcontextprotocol",
          "id": 182288589,
          "node_id": "O_kgDOCt2AzQ",
          "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/modelcontextprotocol",
          "type": "Organization",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 862584018,
          "node_id": "R_kgDOM2n80g",
          "name": "python-sdk",
          "full_name": "modelcontextprotocol/python-sdk",
          "private": false,
          "owner": {
            "login": "modelcontextprotocol",
            "id": 182288589,
            "node_id": "O_kgDOCt2AzQ",
            "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/modelcontextprotocol",
            "type": "Organization",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": false,
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk",
          "created_at": "2024-09-24T21:01:35Z",
          "updated_at": "2025-12-06T05:02:17Z",
          "pushed_at": "2025-12-04T18:04:06Z",
          "homepage": "https://modelcontextprotocol.github.io/python-sdk/",
          "size": 4194,
          "stargazers_count": 20439,
          "watchers_count": 20439,
          "language": "Python",
          "has_issues": true,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": true,
          "has_discussions": false,
          "forks_count": 2843,
          "archived": false,
          "disabled": false,
          "open_issues_count": 345,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 2843,
          "open_issues": 345,
          "watchers": 20439,
          "default_branch": "main"
        }
      },
      "_links": {
        "self": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1209"
        },
        "html": {
          "href": "https://github.com/modelcontextprotocol/python-sdk/pull/1209"
        },
        "issue": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1209"
        },
        "comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1209/comments"
        },
        "review_comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1209/comments"
        },
        "review_comment": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/comments{/number}"
        },
        "commits": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1209/commits"
        },
        "statuses": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/statuses/06e356fe0dcb3076f85912be5ae860e1da25df39"
        }
      },
      "author_association": "NONE",
      "auto_merge": null,
      "active_lock_reason": null,
      "linked_issues": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1201",
      "id": 2696945910,
      "node_id": "PR_kwDOM2n80s6gwCD2",
      "number": 1201,
      "state": "open",
      "locked": false,
      "title": "Add CORS middleware to Starlette app for frontend support",
      "user": {
        "login": "SmartManoj",
        "id": 7231077,
        "node_id": "MDQ6VXNlcjcyMzEwNzc=",
        "avatar_url": "https://avatars.githubusercontent.com/u/7231077?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/SmartManoj",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "body": "Introduces CORS middleware to the Starlette app instances in FastMCP to allow requests from local web frontends. This enables compatibility with web clients running on localhost and related origins, supporting credentials and common HTTP methods and headers.\r\n\r\n<!-- Provide a brief summary of your changes -->\r\n\r\n## Motivation and Context\r\n<!-- Why is this change needed? What problem does it solve? -->\r\nFixes https://github.com/modelcontextprotocol/python-sdk/issues/187#issuecomment-2994114298\r\n\r\n## How Has This Been Tested?\r\n<!-- Have you tested this in a real application? Which scenarios were tested? -->\r\n\r\n## Breaking Changes\r\n<!-- Will users need to update their code or configurations? -->\r\n\r\n## Types of changes\r\n<!-- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->\r\n- [ ] Bug fix (non-breaking change which fixes an issue)\r\n- [x] New feature (non-breaking change which adds functionality)\r\n- [ ] Breaking change (fix or feature that would cause existing functionality to change)\r\n- [ ] Documentation update\r\n\r\n## Checklist\r\n<!-- Go over all the following points, and put an `x` in all the boxes that apply. -->\r\n- [ ] I have read the [MCP Documentation](https://modelcontextprotocol.io)\r\n- [ ] My code follows the repository's style guidelines\r\n- [ ] New and existing tests pass locally\r\n- [ ] I have added appropriate error handling\r\n- [ ] I have added or updated documentation as needed\r\n\r\n## Additional context\r\n<!-- Add any other context, implementation notes, or design decisions -->\r\n",
      "created_at": "2025-07-26T12:27:06Z",
      "updated_at": "2025-11-12T18:29:16Z",
      "closed_at": null,
      "merged_at": null,
      "merge_commit_sha": "e514666cd1af52991c8665ae87ce0e7c81ac939f",
      "assignee": null,
      "assignees": {},
      "requested_reviewers": {},
      "requested_teams": {},
      "labels": {
        "0": {
          "id": 9230424293,
          "node_id": "LA_kwDOM2n80s8AAAACJi0Y5Q",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/v2",
          "name": "v2",
          "color": "5d2a87",
          "default": false,
          "description": "Ideas, requests and plans for v2 of the SDK which will incorporate major changes and fixes"
        },
        "1": {
          "id": 9230425628,
          "node_id": "LA_kwDOM2n80s8AAAACJi0eHA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/needs%20more%20work",
          "name": "needs more work",
          "color": "af3f39",
          "default": false,
          "description": "Not ready to be merged yet, needs additional follow-up from the author(s)."
        },
        "2": {
          "id": 9354757189,
          "node_id": "LA_kwDOM2n80s8AAAACLZZERQ",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/enhancement",
          "name": "enhancement",
          "color": "11b5cc",
          "default": true,
          "description": "Request for a new feature that's not currently supported"
        }
      },
      "milestone": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/milestones/3",
        "id": 12112132,
        "node_id": "MI_kwDOM2n80s4AuNEE",
        "number": 3,
        "title": "Python SDK v2.0",
        "description": "",
        "creator": {
          "login": "dsp-ant",
          "id": 167242713,
          "node_id": "U_kgDOCffr2Q",
          "avatar_url": "https://avatars.githubusercontent.com/u/167242713?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/dsp-ant",
          "type": "User",
          "user_view_type": "public",
          "site_admin": false
        },
        "open_issues": 12,
        "closed_issues": 2,
        "state": "open",
        "created_at": "2025-01-02T09:08:45Z",
        "updated_at": "2025-10-07T17:22:59Z",
        "due_on": null,
        "closed_at": null
      },
      "draft": true,
      "head": {
        "label": "SmartManoj:cors",
        "ref": "cors",
        "sha": "a8ad68125ae064c44ccff43075e0afddbe2334fe",
        "user": {
          "login": "SmartManoj",
          "id": 7231077,
          "node_id": "MDQ6VXNlcjcyMzEwNzc=",
          "avatar_url": "https://avatars.githubusercontent.com/u/7231077?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/SmartManoj",
          "type": "User",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 1026674465,
          "node_id": "R_kgDOPTHPIQ",
          "name": "python-sdk",
          "full_name": "SmartManoj/python-sdk",
          "private": false,
          "owner": {
            "login": "SmartManoj",
            "id": 7231077,
            "node_id": "MDQ6VXNlcjcyMzEwNzc=",
            "avatar_url": "https://avatars.githubusercontent.com/u/7231077?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/SmartManoj",
            "type": "User",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": true,
          "url": "https://api.github.com/repos/SmartManoj/python-sdk",
          "created_at": "2025-07-26T11:24:01Z",
          "updated_at": "2025-07-26T11:24:02Z",
          "pushed_at": "2025-07-26T12:34:24Z",
          "homepage": "https://modelcontextprotocol.io",
          "size": 2876,
          "stargazers_count": 0,
          "watchers_count": 0,
          "language": null,
          "has_issues": false,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": false,
          "has_discussions": false,
          "forks_count": 0,
          "archived": false,
          "disabled": false,
          "open_issues_count": 0,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 0,
          "open_issues": 0,
          "watchers": 0,
          "default_branch": "main"
        }
      },
      "base": {
        "label": "modelcontextprotocol:main",
        "ref": "main",
        "sha": "959d4e39ae13e45d3059ec6d6ca82fb231039a91",
        "user": {
          "login": "modelcontextprotocol",
          "id": 182288589,
          "node_id": "O_kgDOCt2AzQ",
          "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/modelcontextprotocol",
          "type": "Organization",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 862584018,
          "node_id": "R_kgDOM2n80g",
          "name": "python-sdk",
          "full_name": "modelcontextprotocol/python-sdk",
          "private": false,
          "owner": {
            "login": "modelcontextprotocol",
            "id": 182288589,
            "node_id": "O_kgDOCt2AzQ",
            "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/modelcontextprotocol",
            "type": "Organization",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": false,
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk",
          "created_at": "2024-09-24T21:01:35Z",
          "updated_at": "2025-12-06T05:02:17Z",
          "pushed_at": "2025-12-04T18:04:06Z",
          "homepage": "https://modelcontextprotocol.github.io/python-sdk/",
          "size": 4194,
          "stargazers_count": 20439,
          "watchers_count": 20439,
          "language": "Python",
          "has_issues": true,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": true,
          "has_discussions": false,
          "forks_count": 2843,
          "archived": false,
          "disabled": false,
          "open_issues_count": 345,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 2843,
          "open_issues": 345,
          "watchers": 20439,
          "default_branch": "main"
        }
      },
      "_links": {
        "self": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1201"
        },
        "html": {
          "href": "https://github.com/modelcontextprotocol/python-sdk/pull/1201"
        },
        "issue": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1201"
        },
        "comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1201/comments"
        },
        "review_comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1201/comments"
        },
        "review_comment": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/comments{/number}"
        },
        "commits": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1201/commits"
        },
        "statuses": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/statuses/a8ad68125ae064c44ccff43075e0afddbe2334fe"
        }
      },
      "author_association": "NONE",
      "auto_merge": null,
      "active_lock_reason": null,
      "linked_issues": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1194",
      "id": 2690232891,
      "node_id": "PR_kwDOM2n80s6gWbI7",
      "number": 1194,
      "state": "open",
      "locked": false,
      "title": "Fix httpstreamable errorcode",
      "user": {
        "login": "CriticalGameEror",
        "id": 83310221,
        "node_id": "MDQ6VXNlcjgzMzEwMjIx",
        "avatar_url": "https://avatars.githubusercontent.com/u/83310221?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/CriticalGameEror",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "body": "<!-- Provide a brief summary of your changes -->\r\nAdded additional `if` statements to catch a 400 bad request error messages within the `streamable_http.py` file\r\n\r\n## Motivation and Context\r\n<!-- Why is this change needed? What problem does it solve? -->\r\nThis change is needed to fix an issue with the current way that a client uses streamable HTTP to connect to a MCP server. Currently, an unavoidable exception is raised when creating a `SessionGroup` and adding a steamable HTTP connection to an MCP server that returns an error 4xx code when a primitive (prompts, resources and tools) is requested. As long as at least one of these primitives returns an error 4xx code (except a 404 error), it will cause the exception, which crashes the MCP client.\r\n\r\nIn cases with independent sessions outside of `SessionGroup`, this error can be handled by the developer building the MCP client. However, when using `SessionGroup`, the developer cannot handle these errors, and so cannot prevent the program from crashing. This is because the `SessionGroup` automatically sends web requests to prompts, resources and tools without checking if they are supported, which I think goes against the [specification](https://modelcontextprotocol.io/specification/2025-06-18/basic/lifecycle#operation).\r\n\r\nThe change is needed to ensure that an MCP client doesn't crash when an MCP server sends an error code for a bad request (which it can do as defined in the [specifciation](https://modelcontextprotocol.io/specification/2025-06-18/basic/transports#sending-messages-to-the-server)). The change was made to the `streamable_http.py` file, as this avoids a possible breaking change if the `SessionGroup` was changed instead.\r\n\r\n## How Has This Been Tested?\r\n<!-- Have you tested this in a real application? Which scenarios were tested? -->\r\nThis has been tested with the [AWS Knowledge MCP Server](https://github.com/awslabs/mcp/tree/main/src/aws-knowledge-mcp-server), which returns an error code 400 when interacting with a `prompt` or `resource` primitive.\r\n\r\n## Breaking Changes\r\n<!-- Will users need to update their code or configurations? -->\r\nNo breaking changes. The only possible scenario of a breaking change is if a developer relies on the httpx status error exception currently raised to detect an error 400 code for an unsupported capability. In this case, the developer should be following the [specification](https://modelcontextprotocol.io/specification/2025-06-18/basic/lifecycle#operation), and check if a capability is supported before it is requested.\r\n\r\n## Types of changes\r\n<!-- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->\r\n- [x] Bug fix (non-breaking change which fixes an issue)\r\n- [ ] New feature (non-breaking change which adds functionality)\r\n- [ ] Breaking change (fix or feature that would cause existing functionality to change)\r\n- [ ] Documentation update\r\n\r\n## Checklist\r\n<!-- Go over all the following points, and put an `x` in all the boxes that apply. -->\r\n- [x] I have read the [MCP Documentation](https://modelcontextprotocol.io)\r\n- [x] My code follows the repository's style guidelines\r\n- [x] New and existing tests pass locally\r\n- [x] I have added appropriate error handling\r\n- [x] I have added or updated documentation as needed\r\n\r\n## Additional context\r\n<!-- Add any other context, implementation notes, or design decisions -->\r\nI apologise in advance if I have missunderstood anything about the code regarding this issue or anything about the MCP specification. Please correct me on any errors I have made so that I can learn from them.",
      "created_at": "2025-07-23T22:34:34Z",
      "updated_at": "2025-10-03T21:33:33Z",
      "closed_at": null,
      "merged_at": null,
      "merge_commit_sha": null,
      "assignee": {
        "login": "felixweinberger",
        "id": 3823880,
        "node_id": "MDQ6VXNlcjM4MjM4ODA=",
        "avatar_url": "https://avatars.githubusercontent.com/u/3823880?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/felixweinberger",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "assignees": {
        "0": {
          "login": "felixweinberger",
          "id": 3823880,
          "node_id": "MDQ6VXNlcjM4MjM4ODA=",
          "avatar_url": "https://avatars.githubusercontent.com/u/3823880?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/felixweinberger",
          "type": "User",
          "user_view_type": "public",
          "site_admin": false
        }
      },
      "requested_reviewers": {},
      "requested_teams": {},
      "labels": {
        "0": {
          "id": 7511840554,
          "node_id": "LA_kwDOM2n80s8AAAABv72XKg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/bug",
          "name": "bug",
          "color": "d73a4a",
          "default": true,
          "description": "Something isn't working"
        },
        "1": {
          "id": 9287728201,
          "node_id": "LA_kwDOM2n80s8AAAACKZd8SQ",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/needs%20maintainer%20action",
          "name": "needs maintainer action",
          "color": "d33428",
          "default": false,
          "description": "Potentially serious issue - needs proactive fix and maintainer attention"
        }
      },
      "milestone": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/milestones/15",
        "id": 13770333,
        "node_id": "MI_kwDOM2n80s4A0h5d",
        "number": 15,
        "title": "Error catching improvements",
        "description": null,
        "creator": {
          "login": "felixweinberger",
          "id": 3823880,
          "node_id": "MDQ6VXNlcjM4MjM4ODA=",
          "avatar_url": "https://avatars.githubusercontent.com/u/3823880?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/felixweinberger",
          "type": "User",
          "user_view_type": "public",
          "site_admin": false
        },
        "open_issues": 6,
        "closed_issues": 0,
        "state": "open",
        "created_at": "2025-09-26T16:03:50Z",
        "updated_at": "2025-10-07T17:45:27Z",
        "due_on": null,
        "closed_at": null
      },
      "draft": false,
      "head": {
        "label": "CriticalGameEror:fix-httpstreamable-errorcode",
        "ref": "fix-httpstreamable-errorcode",
        "sha": "5badab6b8ebcb2f17ab6e433becd819376cf96cb",
        "user": {
          "login": "CriticalGameEror",
          "id": 83310221,
          "node_id": "MDQ6VXNlcjgzMzEwMjIx",
          "avatar_url": "https://avatars.githubusercontent.com/u/83310221?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/CriticalGameEror",
          "type": "User",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 1025143313,
          "node_id": "R_kgDOPRpyEQ",
          "name": "python-sdk",
          "full_name": "CriticalGameEror/python-sdk",
          "private": false,
          "owner": {
            "login": "CriticalGameEror",
            "id": 83310221,
            "node_id": "MDQ6VXNlcjgzMzEwMjIx",
            "avatar_url": "https://avatars.githubusercontent.com/u/83310221?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/CriticalGameEror",
            "type": "User",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": true,
          "url": "https://api.github.com/repos/CriticalGameEror/python-sdk",
          "created_at": "2025-07-23T19:43:45Z",
          "updated_at": "2025-07-23T19:43:45Z",
          "pushed_at": "2025-08-05T20:49:31Z",
          "homepage": "https://modelcontextprotocol.io",
          "size": 1676,
          "stargazers_count": 0,
          "watchers_count": 0,
          "language": null,
          "has_issues": false,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": false,
          "has_discussions": false,
          "forks_count": 0,
          "archived": false,
          "disabled": false,
          "open_issues_count": 0,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 0,
          "open_issues": 0,
          "watchers": 0,
          "default_branch": "main"
        }
      },
      "base": {
        "label": "modelcontextprotocol:main",
        "ref": "main",
        "sha": "d4759288d009c65e8121464b42997cd59db65df1",
        "user": {
          "login": "modelcontextprotocol",
          "id": 182288589,
          "node_id": "O_kgDOCt2AzQ",
          "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/modelcontextprotocol",
          "type": "Organization",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 862584018,
          "node_id": "R_kgDOM2n80g",
          "name": "python-sdk",
          "full_name": "modelcontextprotocol/python-sdk",
          "private": false,
          "owner": {
            "login": "modelcontextprotocol",
            "id": 182288589,
            "node_id": "O_kgDOCt2AzQ",
            "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/modelcontextprotocol",
            "type": "Organization",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": false,
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk",
          "created_at": "2024-09-24T21:01:35Z",
          "updated_at": "2025-12-06T05:02:17Z",
          "pushed_at": "2025-12-04T18:04:06Z",
          "homepage": "https://modelcontextprotocol.github.io/python-sdk/",
          "size": 4194,
          "stargazers_count": 20439,
          "watchers_count": 20439,
          "language": "Python",
          "has_issues": true,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": true,
          "has_discussions": false,
          "forks_count": 2843,
          "archived": false,
          "disabled": false,
          "open_issues_count": 345,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 2843,
          "open_issues": 345,
          "watchers": 20439,
          "default_branch": "main"
        }
      },
      "_links": {
        "self": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1194"
        },
        "html": {
          "href": "https://github.com/modelcontextprotocol/python-sdk/pull/1194"
        },
        "issue": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1194"
        },
        "comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1194/comments"
        },
        "review_comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1194/comments"
        },
        "review_comment": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/comments{/number}"
        },
        "commits": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1194/commits"
        },
        "statuses": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/statuses/5badab6b8ebcb2f17ab6e433becd819376cf96cb"
        }
      },
      "author_association": "NONE",
      "auto_merge": null,
      "active_lock_reason": null,
      "linked_issues": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1177",
      "id": 2681096896,
      "node_id": "PR_kwDOM2n80s6fzkrA",
      "number": 1177,
      "state": "open",
      "locked": false,
      "title": "Add `streamable_http_client` which accepts `httpx.AsyncClient` instead of `httpx_client_factory`",
      "user": {
        "login": "Kludex",
        "id": 7353520,
        "node_id": "MDQ6VXNlcjczNTM1MjA=",
        "avatar_url": "https://avatars.githubusercontent.com/u/7353520?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/Kludex",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "body": "The current name is not very intuitive considering the class name and the module.\r\n\r\n- Closes #1370\r\n- Closes #1470",
      "created_at": "2025-07-21T08:43:12Z",
      "updated_at": "2025-12-04T18:04:07Z",
      "closed_at": null,
      "merged_at": null,
      "merge_commit_sha": "2b08dfa7cb02eb14feadc7aaef10902281a4e4db",
      "assignee": {
        "login": "felixweinberger",
        "id": 3823880,
        "node_id": "MDQ6VXNlcjM4MjM4ODA=",
        "avatar_url": "https://avatars.githubusercontent.com/u/3823880?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/felixweinberger",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "assignees": {
        "0": {
          "login": "felixweinberger",
          "id": 3823880,
          "node_id": "MDQ6VXNlcjM4MjM4ODA=",
          "avatar_url": "https://avatars.githubusercontent.com/u/3823880?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/felixweinberger",
          "type": "User",
          "user_view_type": "public",
          "site_admin": false
        }
      },
      "requested_reviewers": {
        "0": {
          "login": "maxisbey",
          "id": 224885523,
          "node_id": "U_kgDODWd7Ew",
          "avatar_url": "https://avatars.githubusercontent.com/u/224885523?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/maxisbey",
          "type": "User",
          "user_view_type": "public",
          "site_admin": false
        }
      },
      "requested_teams": {},
      "labels": {
        "0": {
          "id": 9354757189,
          "node_id": "LA_kwDOM2n80s8AAAACLZZERQ",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/enhancement",
          "name": "enhancement",
          "color": "11b5cc",
          "default": true,
          "description": "Request for a new feature that's not currently supported"
        }
      },
      "milestone": null,
      "draft": false,
      "head": {
        "label": "modelcontextprotocol:rename-streamable-http",
        "ref": "rename-streamable-http",
        "sha": "f897932af86e5f032e7116046135b75443d97a73",
        "user": {
          "login": "modelcontextprotocol",
          "id": 182288589,
          "node_id": "O_kgDOCt2AzQ",
          "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/modelcontextprotocol",
          "type": "Organization",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 862584018,
          "node_id": "R_kgDOM2n80g",
          "name": "python-sdk",
          "full_name": "modelcontextprotocol/python-sdk",
          "private": false,
          "owner": {
            "login": "modelcontextprotocol",
            "id": 182288589,
            "node_id": "O_kgDOCt2AzQ",
            "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/modelcontextprotocol",
            "type": "Organization",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": false,
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk",
          "created_at": "2024-09-24T21:01:35Z",
          "updated_at": "2025-12-06T05:02:17Z",
          "pushed_at": "2025-12-04T18:04:06Z",
          "homepage": "https://modelcontextprotocol.github.io/python-sdk/",
          "size": 4194,
          "stargazers_count": 20439,
          "watchers_count": 20439,
          "language": "Python",
          "has_issues": true,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": true,
          "has_discussions": false,
          "forks_count": 2843,
          "archived": false,
          "disabled": false,
          "open_issues_count": 345,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 2843,
          "open_issues": 345,
          "watchers": 20439,
          "default_branch": "main"
        }
      },
      "base": {
        "label": "modelcontextprotocol:main",
        "ref": "main",
        "sha": "89ff338174cec2b28f23deaec6136a4f3b11e875",
        "user": {
          "login": "modelcontextprotocol",
          "id": 182288589,
          "node_id": "O_kgDOCt2AzQ",
          "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/modelcontextprotocol",
          "type": "Organization",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 862584018,
          "node_id": "R_kgDOM2n80g",
          "name": "python-sdk",
          "full_name": "modelcontextprotocol/python-sdk",
          "private": false,
          "owner": {
            "login": "modelcontextprotocol",
            "id": 182288589,
            "node_id": "O_kgDOCt2AzQ",
            "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/modelcontextprotocol",
            "type": "Organization",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": false,
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk",
          "created_at": "2024-09-24T21:01:35Z",
          "updated_at": "2025-12-06T05:02:17Z",
          "pushed_at": "2025-12-04T18:04:06Z",
          "homepage": "https://modelcontextprotocol.github.io/python-sdk/",
          "size": 4194,
          "stargazers_count": 20439,
          "watchers_count": 20439,
          "language": "Python",
          "has_issues": true,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": true,
          "has_discussions": false,
          "forks_count": 2843,
          "archived": false,
          "disabled": false,
          "open_issues_count": 345,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 2843,
          "open_issues": 345,
          "watchers": 20439,
          "default_branch": "main"
        }
      },
      "_links": {
        "self": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1177"
        },
        "html": {
          "href": "https://github.com/modelcontextprotocol/python-sdk/pull/1177"
        },
        "issue": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1177"
        },
        "comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1177/comments"
        },
        "review_comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1177/comments"
        },
        "review_comment": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/comments{/number}"
        },
        "commits": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1177/commits"
        },
        "statuses": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/statuses/f897932af86e5f032e7116046135b75443d97a73"
        }
      },
      "author_association": "MEMBER",
      "auto_merge": null,
      "active_lock_reason": null,
      "linked_issues": [
        1,
        1370,
        1470
      ]
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1159",
      "id": 2671246502,
      "node_id": "PR_kwDOM2n80s6fN_ym",
      "number": 1159,
      "state": "open",
      "locked": false,
      "title": "Add idle timeout termination for StreamableHTTPServerTransport",
      "user": {
        "login": "hopeful0",
        "id": 13890191,
        "node_id": "MDQ6VXNlcjEzODkwMTkx",
        "avatar_url": "https://avatars.githubusercontent.com/u/13890191?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/hopeful0",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "body": "By adding an optional idle timeout termination to the StreamableHTTPServerTransport, this PR allows the stateful server to close long-idle sessions to avoid memory leak issues when the client does not terminate the session as expected\r\n\r\nThese changes comply with the specifications for [Streamable HTTP transports session management](https://modelcontextprotocol.io/specification/2025-06-18/basic/transports#session-management) in the MCP protocol.\r\n\r\nMeanwhile, optimized the logic for transport termination and session management without affecting existing functionality, including:\r\n- Moved the transport termination after handle stateless requests to the `finally` block\r\n- Called the terminate function directly after the transport connect finished\r\n- Removed the condition of the transport is not terminated in the `finally` block of the run_server in `handle_stateful_request`, because that instances should be cleared even if transport terminates first\r\n- The manager returns 404 instead of 400 when it receives a non-existent session ID, because this might be due to the server actively terminating the transport\r\n\r\n## Motivation and Context\r\n<!-- Why is this change needed? What problem does it solve? -->\r\n\r\n#1116 addressed the memory leak issue caused by session not terminating in stateless requests, but in stateful requests, if the client does not close the session as expected, the session on the server will never be closed, leading to a similar memory leak issue.\r\n\r\nThis PR adds an optional idle timeout parameter to StreamableHTTPServerTransport, a context manager for tracking idle status, and an `_idle_timeout_terminate` method. When the idle timeout parameter is set, an `_idle_timeout_terminate` task is initiated when transport `connect` is called. Once the transport does not receive or hanle any requests within the timeout period, the transport will be automatically terminated. To ensure that correctly tracks the idle status of transport, the `handle_request` method of the transport needs to be called within the context manager.\r\n\r\n## How Has This Been Tested?\r\n<!-- Have you tested this in a real application? Which scenarios were tested? -->\r\n\r\nI have added a test to verify that the transfer and session will exist before the idle timeout and will be terminated after the idle timeout.\r\n\r\n## Breaking Changes\r\n<!-- Will users need to update their code or configurations? -->\r\n\r\n## Types of changes\r\n<!-- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->\r\n- [x] Bug fix (non-breaking change which fixes an issue)\r\n- [x] New feature (non-breaking change which adds functionality)\r\n- [ ] Breaking change (fix or feature that would cause existing functionality to change)\r\n- [ ] Documentation update\r\n\r\n## Checklist\r\n<!-- Go over all the following points, and put an `x` in all the boxes that apply. -->\r\n- [x] I have read the [MCP Documentation](https://modelcontextprotocol.io)\r\n- [x] My code follows the repository's style guidelines\r\n- [x] New and existing tests pass locally\r\n- [x] I have added appropriate error handling\r\n- [x] I have added or updated documentation as needed\r\n\r\n## Additional context\r\n<!-- Add any other context, implementation notes, or design decisions -->\r\n",
      "created_at": "2025-07-16T16:11:53Z",
      "updated_at": "2025-12-03T17:59:38Z",
      "closed_at": null,
      "merged_at": null,
      "merge_commit_sha": null,
      "assignee": {
        "login": "felixweinberger",
        "id": 3823880,
        "node_id": "MDQ6VXNlcjM4MjM4ODA=",
        "avatar_url": "https://avatars.githubusercontent.com/u/3823880?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/felixweinberger",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "assignees": {
        "0": {
          "login": "felixweinberger",
          "id": 3823880,
          "node_id": "MDQ6VXNlcjM4MjM4ODA=",
          "avatar_url": "https://avatars.githubusercontent.com/u/3823880?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/felixweinberger",
          "type": "User",
          "user_view_type": "public",
          "site_admin": false
        }
      },
      "requested_reviewers": {
        "0": {
          "login": "ihrpr",
          "id": 21148364,
          "node_id": "MDQ6VXNlcjIxMTQ4MzY0",
          "avatar_url": "https://avatars.githubusercontent.com/u/21148364?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/ihrpr",
          "type": "User",
          "user_view_type": "public",
          "site_admin": false
        }
      },
      "requested_teams": {},
      "labels": {
        "0": {
          "id": 9287728201,
          "node_id": "LA_kwDOM2n80s8AAAACKZd8SQ",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/needs%20maintainer%20action",
          "name": "needs maintainer action",
          "color": "d33428",
          "default": false,
          "description": "Potentially serious issue - needs proactive fix and maintainer attention"
        },
        "1": {
          "id": 9354757189,
          "node_id": "LA_kwDOM2n80s8AAAACLZZERQ",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/enhancement",
          "name": "enhancement",
          "color": "11b5cc",
          "default": true,
          "description": "Request for a new feature that's not currently supported"
        }
      },
      "milestone": null,
      "draft": false,
      "head": {
        "label": "hopeful0:idle-timeout-termination",
        "ref": "idle-timeout-termination",
        "sha": "60756d866dd07b44873b4cf990fb6097a9c099a3",
        "user": {
          "login": "hopeful0",
          "id": 13890191,
          "node_id": "MDQ6VXNlcjEzODkwMTkx",
          "avatar_url": "https://avatars.githubusercontent.com/u/13890191?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/hopeful0",
          "type": "User",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 1017083822,
          "node_id": "R_kgDOPJ93rg",
          "name": "mcp",
          "full_name": "hopeful0/mcp",
          "private": false,
          "owner": {
            "login": "hopeful0",
            "id": 13890191,
            "node_id": "MDQ6VXNlcjEzODkwMTkx",
            "avatar_url": "https://avatars.githubusercontent.com/u/13890191?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/hopeful0",
            "type": "User",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": true,
          "url": "https://api.github.com/repos/hopeful0/mcp",
          "created_at": "2025-07-10T02:19:16Z",
          "updated_at": "2025-07-16T13:58:32Z",
          "pushed_at": "2025-09-22T20:27:27Z",
          "homepage": "https://modelcontextprotocol.io",
          "size": 1579,
          "stargazers_count": 0,
          "watchers_count": 0,
          "language": "Python",
          "has_issues": false,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": false,
          "has_discussions": false,
          "forks_count": 0,
          "archived": false,
          "disabled": false,
          "open_issues_count": 0,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 0,
          "open_issues": 0,
          "watchers": 0,
          "default_branch": "main"
        }
      },
      "base": {
        "label": "modelcontextprotocol:main",
        "ref": "main",
        "sha": "7e93a9fc19078f4fc804d617bec780c012404f53",
        "user": {
          "login": "modelcontextprotocol",
          "id": 182288589,
          "node_id": "O_kgDOCt2AzQ",
          "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/modelcontextprotocol",
          "type": "Organization",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 862584018,
          "node_id": "R_kgDOM2n80g",
          "name": "python-sdk",
          "full_name": "modelcontextprotocol/python-sdk",
          "private": false,
          "owner": {
            "login": "modelcontextprotocol",
            "id": 182288589,
            "node_id": "O_kgDOCt2AzQ",
            "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/modelcontextprotocol",
            "type": "Organization",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": false,
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk",
          "created_at": "2024-09-24T21:01:35Z",
          "updated_at": "2025-12-06T05:02:17Z",
          "pushed_at": "2025-12-04T18:04:06Z",
          "homepage": "https://modelcontextprotocol.github.io/python-sdk/",
          "size": 4194,
          "stargazers_count": 20439,
          "watchers_count": 20439,
          "language": "Python",
          "has_issues": true,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": true,
          "has_discussions": false,
          "forks_count": 2843,
          "archived": false,
          "disabled": false,
          "open_issues_count": 345,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 2843,
          "open_issues": 345,
          "watchers": 20439,
          "default_branch": "main"
        }
      },
      "_links": {
        "self": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1159"
        },
        "html": {
          "href": "https://github.com/modelcontextprotocol/python-sdk/pull/1159"
        },
        "issue": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1159"
        },
        "comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1159/comments"
        },
        "review_comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1159/comments"
        },
        "review_comment": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/comments{/number}"
        },
        "commits": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1159/commits"
        },
        "statuses": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/statuses/60756d866dd07b44873b4cf990fb6097a9c099a3"
        }
      },
      "author_association": "CONTRIBUTOR",
      "auto_merge": null,
      "active_lock_reason": null,
      "linked_issues": [
        1
      ]
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1149",
      "id": 2669083014,
      "node_id": "PR_kwDOM2n80s6fFvmG",
      "number": 1149,
      "state": "open",
      "locked": false,
      "title": "fix: Return JSON-RPC protocol errors for unknown tools",
      "user": {
        "login": "bzsurbhi",
        "id": 115104450,
        "node_id": "U_kgDOBtxawg",
        "avatar_url": "https://avatars.githubusercontent.com/u/115104450?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/bzsurbhi",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "body": "Return JSON-RPC protocol errors for unknown tools\r\n\r\n## Motivation and Context\r\nThe MCP server was returning tool execution errors for unknown tools instead of proper JSON-RPC protocol errors. This caused issues where Unknown tools were treated as tool execution failures rather than protocol-level errors\r\n\r\n**Before(Tool execution error):**\r\n```\r\n{\r\n  \"jsonrpc\": \"2.0\",\r\n  \"id\": 3,\r\n  \"result\": {\r\n    \"content\": [{\"type\": \"text\", \"text\": \"Unknown tool: invalid_tool_name\"}],\r\n    \"isError\": true\r\n  }\r\n}\r\n```\r\n\r\n**After(Protocol error):**\r\n```\r\n{\r\n  \"jsonrpc\": \"2.0\",\r\n  \"id\": 3,\r\n  \"error\": {\r\n    \"code\": -32601,\r\n    \"message\": \"Unknown tool: invalid_tool_name\"\r\n  }\r\n}\r\n```\r\n\r\nModified the tool call handler in src/mcp/server/lowlevel/server.py to:\r\n- Check for unknown tools after retrieving from cache\r\n- Raise McpError with METHOD_NOT_FOUND (-32601) error code for unknown tools\r\n\r\n## How Has This Been Tested?\r\n- Added unit test\r\n- Verified with a server and client example\r\n\r\n## Breaking Changes\r\nThis is a breaking change that corrects the error handling behavior:\r\n- Unknown tools now return JSON-RPC protocol errors\r\n- Valid tools that fail during execution still return tool execution errors\r\n- Input validation errors continue to work as before\r\n- Warning logs are still generated for unknown tools during lookup\r\n\r\n## Types of changes\r\n<!-- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->\r\n- [ ] Bug fix (non-breaking change which fixes an issue)\r\n- [ ] New feature (non-breaking change which adds functionality)\r\n- [x] Breaking change (fix or feature that would cause existing functionality to change)\r\n- [ ] Documentation update\r\n\r\n## Checklist\r\n<!-- Go over all the following points, and put an `x` in all the boxes that apply. -->\r\n- [x] I have read the [MCP Documentation](https://modelcontextprotocol.io)\r\n- [x] My code follows the repository's style guidelines\r\n- [x] New and existing tests pass locally\r\n- [x] I have added appropriate error handling\r\n- [x] I have added or updated documentation as needed\r\n\r\n## Additional context\r\n<!-- Add any other context, implementation notes, or design decisions -->\r\n",
      "created_at": "2025-07-16T01:23:32Z",
      "updated_at": "2025-11-12T17:42:27Z",
      "closed_at": null,
      "merged_at": null,
      "merge_commit_sha": null,
      "assignee": null,
      "assignees": {},
      "requested_reviewers": {},
      "requested_teams": {},
      "labels": {
        "0": {
          "id": 9230425628,
          "node_id": "LA_kwDOM2n80s8AAAACJi0eHA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/needs%20more%20work",
          "name": "needs more work",
          "color": "af3f39",
          "default": false,
          "description": "Not ready to be merged yet, needs additional follow-up from the author(s)."
        }
      },
      "milestone": null,
      "draft": true,
      "head": {
        "label": "bzsurbhi:fix/tool-not-found",
        "ref": "fix/tool-not-found",
        "sha": "a988d3713fceadf5710333fdf70aa80e9258bbf3",
        "user": {
          "login": "bzsurbhi",
          "id": 115104450,
          "node_id": "U_kgDOBtxawg",
          "avatar_url": "https://avatars.githubusercontent.com/u/115104450?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/bzsurbhi",
          "type": "User",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 975823672,
          "node_id": "R_kgDOOinjOA",
          "name": "python-sdk",
          "full_name": "bzsurbhi/python-sdk",
          "private": false,
          "owner": {
            "login": "bzsurbhi",
            "id": 115104450,
            "node_id": "U_kgDOBtxawg",
            "avatar_url": "https://avatars.githubusercontent.com/u/115104450?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/bzsurbhi",
            "type": "User",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": true,
          "url": "https://api.github.com/repos/bzsurbhi/python-sdk",
          "created_at": "2025-05-01T00:55:50Z",
          "updated_at": "2025-07-28T18:09:34Z",
          "pushed_at": "2025-07-28T18:09:28Z",
          "homepage": "https://modelcontextprotocol.io",
          "size": 1697,
          "stargazers_count": 0,
          "watchers_count": 0,
          "language": "Python",
          "has_issues": false,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": false,
          "has_discussions": false,
          "forks_count": 0,
          "archived": false,
          "disabled": false,
          "open_issues_count": 0,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 0,
          "open_issues": 0,
          "watchers": 0,
          "default_branch": "main"
        }
      },
      "base": {
        "label": "modelcontextprotocol:main",
        "ref": "main",
        "sha": "6566c08446ad37b66f1457532c7f5a14f243ae10",
        "user": {
          "login": "modelcontextprotocol",
          "id": 182288589,
          "node_id": "O_kgDOCt2AzQ",
          "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/modelcontextprotocol",
          "type": "Organization",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 862584018,
          "node_id": "R_kgDOM2n80g",
          "name": "python-sdk",
          "full_name": "modelcontextprotocol/python-sdk",
          "private": false,
          "owner": {
            "login": "modelcontextprotocol",
            "id": 182288589,
            "node_id": "O_kgDOCt2AzQ",
            "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/modelcontextprotocol",
            "type": "Organization",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": false,
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk",
          "created_at": "2024-09-24T21:01:35Z",
          "updated_at": "2025-12-06T05:02:17Z",
          "pushed_at": "2025-12-04T18:04:06Z",
          "homepage": "https://modelcontextprotocol.github.io/python-sdk/",
          "size": 4194,
          "stargazers_count": 20439,
          "watchers_count": 20439,
          "language": "Python",
          "has_issues": true,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": true,
          "has_discussions": false,
          "forks_count": 2843,
          "archived": false,
          "disabled": false,
          "open_issues_count": 345,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 2843,
          "open_issues": 345,
          "watchers": 20439,
          "default_branch": "main"
        }
      },
      "_links": {
        "self": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1149"
        },
        "html": {
          "href": "https://github.com/modelcontextprotocol/python-sdk/pull/1149"
        },
        "issue": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1149"
        },
        "comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1149/comments"
        },
        "review_comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1149/comments"
        },
        "review_comment": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/comments{/number}"
        },
        "commits": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1149/commits"
        },
        "statuses": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/statuses/a988d3713fceadf5710333fdf70aa80e9258bbf3"
        }
      },
      "author_association": "NONE",
      "auto_merge": null,
      "active_lock_reason": null,
      "linked_issues": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1075",
      "id": 2637337820,
      "node_id": "PR_kwDOM2n80s6dMpTc",
      "number": 1075,
      "state": "open",
      "locked": false,
      "title": "FEAT: enables oauth proxy capability",
      "user": {
        "login": "jessesanford",
        "id": 108698,
        "node_id": "MDQ6VXNlcjEwODY5OA==",
        "avatar_url": "https://avatars.githubusercontent.com/u/108698?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/jessesanford",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "body": "Enables a pass through OAuth server to mask upstream auth server lacking DCR.\r\n\r\n## Motivation and Context\r\nI sometimes want to auth my mcp server against authentication severs that do not have DCR enabled.\r\n\r\n## How Has This Been Tested?\r\nI have tested this with my cursor client and the example MCP server included. I have also run the unit tests and made sure that more were added for this new functionality.\r\n\r\n## Breaking Changes\r\nNone\r\n\r\n## Types of changes\r\n<!-- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->\r\n- [ ] Bug fix (non-breaking change which fixes an issue)\r\n- [x] New feature (non-breaking change which adds functionality)\r\n- [ ] Breaking change (fix or feature that would cause existing functionality to change)\r\n- [ ] Documentation update\r\n\r\n## Checklist\r\n<!-- Go over all the following points, and put an `x` in all the boxes that apply. -->\r\n- [x] I have read the [MCP Documentation](https://modelcontextprotocol.io)\r\n- [x] My code follows the repository's style guidelines\r\n- [x] New and existing tests pass locally\r\n- [x] I have added appropriate error handling\r\n- [x] I have added or updated documentation as needed\r\n\r\n## Additional context\r\nThis proxy server simply intercepts part of the 3LO oauth handshake. Specifically the /register portion all tokens are still minted and checked by the upstream server.",
      "created_at": "2025-07-03T05:03:35Z",
      "updated_at": "2025-11-12T17:42:27Z",
      "closed_at": null,
      "merged_at": null,
      "merge_commit_sha": null,
      "assignee": null,
      "assignees": {},
      "requested_reviewers": {},
      "requested_teams": {},
      "labels": {},
      "milestone": null,
      "draft": true,
      "head": {
        "label": "jessesanford:oauth-proxy",
        "ref": "oauth-proxy",
        "sha": "9acdf3160a09546dec678c88633b370b74bce9d6",
        "user": {
          "login": "jessesanford",
          "id": 108698,
          "node_id": "MDQ6VXNlcjEwODY5OA==",
          "avatar_url": "https://avatars.githubusercontent.com/u/108698?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/jessesanford",
          "type": "User",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 1012162408,
          "node_id": "R_kgDOPFRfaA",
          "name": "python-sdk",
          "full_name": "jessesanford/python-sdk",
          "private": false,
          "owner": {
            "login": "jessesanford",
            "id": 108698,
            "node_id": "MDQ6VXNlcjEwODY5OA==",
            "avatar_url": "https://avatars.githubusercontent.com/u/108698?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/jessesanford",
            "type": "User",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": true,
          "url": "https://api.github.com/repos/jessesanford/python-sdk",
          "created_at": "2025-07-01T23:15:29Z",
          "updated_at": "2025-07-09T19:48:21Z",
          "pushed_at": "2025-07-12T04:53:25Z",
          "homepage": "https://modelcontextprotocol.io",
          "size": 1362,
          "stargazers_count": 0,
          "watchers_count": 0,
          "language": "Python",
          "has_issues": false,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": false,
          "has_discussions": false,
          "forks_count": 0,
          "archived": false,
          "disabled": false,
          "open_issues_count": 1,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 0,
          "open_issues": 1,
          "watchers": 0,
          "default_branch": "main"
        }
      },
      "base": {
        "label": "modelcontextprotocol:main",
        "ref": "main",
        "sha": "d28a1a69eefceab2b9c71c113f0cb172c4f494c4",
        "user": {
          "login": "modelcontextprotocol",
          "id": 182288589,
          "node_id": "O_kgDOCt2AzQ",
          "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/modelcontextprotocol",
          "type": "Organization",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 862584018,
          "node_id": "R_kgDOM2n80g",
          "name": "python-sdk",
          "full_name": "modelcontextprotocol/python-sdk",
          "private": false,
          "owner": {
            "login": "modelcontextprotocol",
            "id": 182288589,
            "node_id": "O_kgDOCt2AzQ",
            "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/modelcontextprotocol",
            "type": "Organization",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": false,
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk",
          "created_at": "2024-09-24T21:01:35Z",
          "updated_at": "2025-12-06T05:02:17Z",
          "pushed_at": "2025-12-04T18:04:06Z",
          "homepage": "https://modelcontextprotocol.github.io/python-sdk/",
          "size": 4194,
          "stargazers_count": 20439,
          "watchers_count": 20439,
          "language": "Python",
          "has_issues": true,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": true,
          "has_discussions": false,
          "forks_count": 2843,
          "archived": false,
          "disabled": false,
          "open_issues_count": 345,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 2843,
          "open_issues": 345,
          "watchers": 20439,
          "default_branch": "main"
        }
      },
      "_links": {
        "self": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1075"
        },
        "html": {
          "href": "https://github.com/modelcontextprotocol/python-sdk/pull/1075"
        },
        "issue": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1075"
        },
        "comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1075/comments"
        },
        "review_comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1075/comments"
        },
        "review_comment": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/comments{/number}"
        },
        "commits": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1075/commits"
        },
        "statuses": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/statuses/9acdf3160a09546dec678c88633b370b74bce9d6"
        }
      },
      "author_association": "NONE",
      "auto_merge": null,
      "active_lock_reason": null,
      "linked_issues": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1043",
      "id": 2622024939,
      "node_id": "PR_kwDOM2n80s6cSOzr",
      "number": 1043,
      "state": "open",
      "locked": false,
      "title": "Adding roots changed and initialized notification handlers",
      "user": {
        "login": "gspencergoog",
        "id": 8867023,
        "node_id": "MDQ6VXNlcjg4NjcwMjM=",
        "avatar_url": "https://avatars.githubusercontent.com/u/8867023?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/gspencergoog",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "body": "I've added two server-side notification handlers, one for `InitializedNotification` and one for `RootsListChangedNotification`.  \r\n\r\n## Motivation and Context\r\nThis allows an MCP server to fully implement roots support, since once the initialization is complete, it needs to be able to request roots from clients which support them, and it needs to be able to react to changes in the client's list of roots if they change.\r\n\r\n## How Has This Been Tested?\r\nI wrote new tests for the notifications, and merged it with the existing progress notification tests.\r\n\r\n## Breaking Changes\r\nNo breaking changes were introduced.\r\n\r\n## Types of changes\r\n- [X] New feature (non-breaking change which adds functionality)\r\n\r\n## Checklist\r\n- [X] I have read the [MCP Documentation](https://modelcontextprotocol.io)\r\n- [X] My code follows the repository's style guidelines\r\n- [X] New and existing tests pass locally\r\n- [X] I have added appropriate error handling\r\n- [X] I have added or updated documentation as needed",
      "created_at": "2025-06-26T18:59:37Z",
      "updated_at": "2025-11-18T23:50:55Z",
      "closed_at": null,
      "merged_at": null,
      "merge_commit_sha": "335c1cbf4caf4434f1d38631eaa5c7d6bbaa94fe",
      "assignee": {
        "login": "felixweinberger",
        "id": 3823880,
        "node_id": "MDQ6VXNlcjM4MjM4ODA=",
        "avatar_url": "https://avatars.githubusercontent.com/u/3823880?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/felixweinberger",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "assignees": {
        "0": {
          "login": "felixweinberger",
          "id": 3823880,
          "node_id": "MDQ6VXNlcjM4MjM4ODA=",
          "avatar_url": "https://avatars.githubusercontent.com/u/3823880?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/felixweinberger",
          "type": "User",
          "user_view_type": "public",
          "site_admin": false
        }
      },
      "requested_reviewers": {},
      "requested_teams": {},
      "labels": {
        "0": {
          "id": 9287728201,
          "node_id": "LA_kwDOM2n80s8AAAACKZd8SQ",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/needs%20maintainer%20action",
          "name": "needs maintainer action",
          "color": "d33428",
          "default": false,
          "description": "Potentially serious issue - needs proactive fix and maintainer attention"
        },
        "1": {
          "id": 9331338299,
          "node_id": "LA_kwDOM2n80s8AAAACLDDsOw",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/improves%20spec%20compliance",
          "name": "improves spec compliance",
          "color": "9FD9BD",
          "default": false,
          "description": "When a change improves ability of SDK users to comply with spec definition"
        }
      },
      "milestone": null,
      "draft": false,
      "head": {
        "label": "gspencergoog:add_root_notification",
        "ref": "add_root_notification",
        "sha": "58fd39da6e4edd420361e13fd934bf1d573493fe",
        "user": {
          "login": "gspencergoog",
          "id": 8867023,
          "node_id": "MDQ6VXNlcjg4NjcwMjM=",
          "avatar_url": "https://avatars.githubusercontent.com/u/8867023?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/gspencergoog",
          "type": "User",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 999157076,
          "node_id": "R_kgDOO43tVA",
          "name": "mcp-python-sdk",
          "full_name": "gspencergoog/mcp-python-sdk",
          "private": false,
          "owner": {
            "login": "gspencergoog",
            "id": 8867023,
            "node_id": "MDQ6VXNlcjg4NjcwMjM=",
            "avatar_url": "https://avatars.githubusercontent.com/u/8867023?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/gspencergoog",
            "type": "User",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": true,
          "url": "https://api.github.com/repos/gspencergoog/mcp-python-sdk",
          "created_at": "2025-06-09T20:33:33Z",
          "updated_at": "2025-08-21T20:46:56Z",
          "pushed_at": "2025-11-18T23:50:52Z",
          "homepage": "https://modelcontextprotocol.io",
          "size": 2279,
          "stargazers_count": 0,
          "watchers_count": 0,
          "language": "Python",
          "has_issues": false,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": false,
          "has_discussions": false,
          "forks_count": 0,
          "archived": false,
          "disabled": false,
          "open_issues_count": 0,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 0,
          "open_issues": 0,
          "watchers": 0,
          "default_branch": "main"
        }
      },
      "base": {
        "label": "modelcontextprotocol:main",
        "ref": "main",
        "sha": "5489e8b6fb19ac32146eb633636df52b1dd049d5",
        "user": {
          "login": "modelcontextprotocol",
          "id": 182288589,
          "node_id": "O_kgDOCt2AzQ",
          "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/modelcontextprotocol",
          "type": "Organization",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 862584018,
          "node_id": "R_kgDOM2n80g",
          "name": "python-sdk",
          "full_name": "modelcontextprotocol/python-sdk",
          "private": false,
          "owner": {
            "login": "modelcontextprotocol",
            "id": 182288589,
            "node_id": "O_kgDOCt2AzQ",
            "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/modelcontextprotocol",
            "type": "Organization",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": false,
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk",
          "created_at": "2024-09-24T21:01:35Z",
          "updated_at": "2025-12-06T05:02:17Z",
          "pushed_at": "2025-12-04T18:04:06Z",
          "homepage": "https://modelcontextprotocol.github.io/python-sdk/",
          "size": 4194,
          "stargazers_count": 20439,
          "watchers_count": 20439,
          "language": "Python",
          "has_issues": true,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": true,
          "has_discussions": false,
          "forks_count": 2843,
          "archived": false,
          "disabled": false,
          "open_issues_count": 345,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 2843,
          "open_issues": 345,
          "watchers": 20439,
          "default_branch": "main"
        }
      },
      "_links": {
        "self": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1043"
        },
        "html": {
          "href": "https://github.com/modelcontextprotocol/python-sdk/pull/1043"
        },
        "issue": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1043"
        },
        "comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1043/comments"
        },
        "review_comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1043/comments"
        },
        "review_comment": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/comments{/number}"
        },
        "commits": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1043/commits"
        },
        "statuses": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/statuses/58fd39da6e4edd420361e13fd934bf1d573493fe"
        }
      },
      "author_association": "NONE",
      "auto_merge": null,
      "active_lock_reason": null,
      "linked_issues": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1008",
      "id": 2612634454,
      "node_id": "PR_kwDOM2n80s6buaNW",
      "number": 1008,
      "state": "open",
      "locked": false,
      "title": "fix: Add exception handling for POST request failures in StreamableHTTP",
      "user": {
        "login": "Kulaxyz",
        "id": 47082676,
        "node_id": "MDQ6VXNlcjQ3MDgyNjc2",
        "avatar_url": "https://avatars.githubusercontent.com/u/47082676?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/Kulaxyz",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "body": "<!-- Provide a brief summary of your changes -->\r\nAdded exception handling in the `_handle_post_request` method to gracefully handle transport errors and return proper JSON-RPC error responses.\r\n\r\n## Motivation and Context\r\n<!-- Why is this change needed? What problem does it solve? -->\r\nWhen an MCP server returns HTTP 5xx errors (e.g., when the server is down) after initial connection, these errors were not being propagated to the caller. This made it impossible for client applications to detect and handle server failures appropriately.\r\n## How Has This Been Tested?\r\n<!-- Have you tested this in a real application? Which scenarios were tested? -->\r\n- Verified that HTTP exceptions are properly forwarded to read streams\r\n- Confirmed error responses are delivered immediately with correct JSON-RPC format\r\n- All existing transport tests continue to pass\r\n\r\n## Breaking Changes\r\n<!-- Will users need to update their code or configurations? -->\r\nno\r\n## Types of changes\r\n<!-- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->\r\n- [x] Bug fix (non-breaking change which fixes an issue)\r\n- [ ] New feature (non-breaking change which adds functionality)\r\n- [ ] Breaking change (fix or feature that would cause existing functionality to change)\r\n- [ ] Documentation update\r\n\r\n## Checklist\r\n<!-- Go over all the following points, and put an `x` in all the boxes that apply. -->\r\n- [x] I have read the [MCP Documentation](https://modelcontextprotocol.io)\r\n- [x] My code follows the repository's style guidelines\r\n- [x] New and existing tests pass locally\r\n- [x] I have added appropriate error handling\r\n- [x] I have added or updated documentation as needed\r\n\r\n## Additional context\r\n<!-- Add any other context, implementation notes, or design decisions -->\r\n[Strands SDK](https://github.com/strands-agents/sdk-python) is an example of an implementation that is hanging when MCP Server is down.",
      "created_at": "2025-06-23T19:45:57Z",
      "updated_at": "2025-10-14T10:41:15Z",
      "closed_at": null,
      "merged_at": null,
      "merge_commit_sha": null,
      "assignee": null,
      "assignees": {},
      "requested_reviewers": {
        "0": {
          "login": "felixweinberger",
          "id": 3823880,
          "node_id": "MDQ6VXNlcjM4MjM4ODA=",
          "avatar_url": "https://avatars.githubusercontent.com/u/3823880?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/felixweinberger",
          "type": "User",
          "user_view_type": "public",
          "site_admin": false
        }
      },
      "requested_teams": {},
      "labels": {
        "0": {
          "id": 7511840554,
          "node_id": "LA_kwDOM2n80s8AAAABv72XKg",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/bug",
          "name": "bug",
          "color": "d73a4a",
          "default": true,
          "description": "Something isn't working"
        },
        "1": {
          "id": 9287728201,
          "node_id": "LA_kwDOM2n80s8AAAACKZd8SQ",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/needs%20maintainer%20action",
          "name": "needs maintainer action",
          "color": "d33428",
          "default": false,
          "description": "Potentially serious issue - needs proactive fix and maintainer attention"
        }
      },
      "milestone": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/milestones/15",
        "id": 13770333,
        "node_id": "MI_kwDOM2n80s4A0h5d",
        "number": 15,
        "title": "Error catching improvements",
        "description": null,
        "creator": {
          "login": "felixweinberger",
          "id": 3823880,
          "node_id": "MDQ6VXNlcjM4MjM4ODA=",
          "avatar_url": "https://avatars.githubusercontent.com/u/3823880?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/felixweinberger",
          "type": "User",
          "user_view_type": "public",
          "site_admin": false
        },
        "open_issues": 6,
        "closed_issues": 0,
        "state": "open",
        "created_at": "2025-09-26T16:03:50Z",
        "updated_at": "2025-10-07T17:45:27Z",
        "due_on": null,
        "closed_at": null
      },
      "draft": true,
      "head": {
        "label": "Kulaxyz:main",
        "ref": "main",
        "sha": "89ff996fa5c69dd8fb90cd7cedf7440df43862b2",
        "user": {
          "login": "Kulaxyz",
          "id": 47082676,
          "node_id": "MDQ6VXNlcjQ3MDgyNjc2",
          "avatar_url": "https://avatars.githubusercontent.com/u/47082676?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/Kulaxyz",
          "type": "User",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 1007299546,
          "node_id": "R_kgDOPAor2g",
          "name": "python-sdk",
          "full_name": "Kulaxyz/python-sdk",
          "private": false,
          "owner": {
            "login": "Kulaxyz",
            "id": 47082676,
            "node_id": "MDQ6VXNlcjQ3MDgyNjc2",
            "avatar_url": "https://avatars.githubusercontent.com/u/47082676?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/Kulaxyz",
            "type": "User",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": true,
          "url": "https://api.github.com/repos/Kulaxyz/python-sdk",
          "created_at": "2025-06-23T19:22:03Z",
          "updated_at": "2025-07-17T21:26:22Z",
          "pushed_at": "2025-07-17T21:26:15Z",
          "homepage": "https://modelcontextprotocol.io",
          "size": 2369,
          "stargazers_count": 0,
          "watchers_count": 0,
          "language": "Python",
          "has_issues": false,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": false,
          "has_discussions": false,
          "forks_count": 0,
          "archived": false,
          "disabled": false,
          "open_issues_count": 0,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 0,
          "open_issues": 0,
          "watchers": 0,
          "default_branch": "main"
        }
      },
      "base": {
        "label": "modelcontextprotocol:main",
        "ref": "main",
        "sha": "99c4f3c906a130ab7f4a03e5f255280e0cdce395",
        "user": {
          "login": "modelcontextprotocol",
          "id": 182288589,
          "node_id": "O_kgDOCt2AzQ",
          "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/modelcontextprotocol",
          "type": "Organization",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 862584018,
          "node_id": "R_kgDOM2n80g",
          "name": "python-sdk",
          "full_name": "modelcontextprotocol/python-sdk",
          "private": false,
          "owner": {
            "login": "modelcontextprotocol",
            "id": 182288589,
            "node_id": "O_kgDOCt2AzQ",
            "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/modelcontextprotocol",
            "type": "Organization",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": false,
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk",
          "created_at": "2024-09-24T21:01:35Z",
          "updated_at": "2025-12-06T05:02:17Z",
          "pushed_at": "2025-12-04T18:04:06Z",
          "homepage": "https://modelcontextprotocol.github.io/python-sdk/",
          "size": 4194,
          "stargazers_count": 20439,
          "watchers_count": 20439,
          "language": "Python",
          "has_issues": true,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": true,
          "has_discussions": false,
          "forks_count": 2843,
          "archived": false,
          "disabled": false,
          "open_issues_count": 345,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 2843,
          "open_issues": 345,
          "watchers": 20439,
          "default_branch": "main"
        }
      },
      "_links": {
        "self": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1008"
        },
        "html": {
          "href": "https://github.com/modelcontextprotocol/python-sdk/pull/1008"
        },
        "issue": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1008"
        },
        "comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/1008/comments"
        },
        "review_comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1008/comments"
        },
        "review_comment": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/comments{/number}"
        },
        "commits": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/1008/commits"
        },
        "statuses": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/statuses/89ff996fa5c69dd8fb90cd7cedf7440df43862b2"
        }
      },
      "author_association": "NONE",
      "auto_merge": null,
      "active_lock_reason": null,
      "linked_issues": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/968",
      "id": 2596893693,
      "node_id": "PR_kwDOM2n80s6ayXP9",
      "number": 968,
      "state": "open",
      "locked": false,
      "title": "feat: Add MCP server configuration parsing (e.g.: `mcp.json`)  to the SDK",
      "user": {
        "login": "msabramo",
        "id": 305268,
        "node_id": "MDQ6VXNlcjMwNTI2OA==",
        "avatar_url": "https://avatars.githubusercontent.com/u/305268?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/msabramo",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "body": "# Goals\r\n\r\n- Add features to the Python SDK that enable Python MCP client applications to support common functionality for configuration and reduce annoying differences between applications\r\n- Hopefully, once the ideas are discussed and settled on, this can be ported to the TypeScript SDK, so that client applications in that ecosystem can benefit as well.\r\n\r\n- Add `MCPServersConfig` class for parsing MCP server configuration (e.g.: `mcp.json`) to the SDK\r\n- Support feature that user can specify full command in `command` and it will automatically be parsed into `command` and `args` (Cursor has this feature but I don't know if any other apps do)\r\n- Support the standard `mcpServers` key or the `servers` key, which VS Code uses\r\n- Support VS Code `inputs` key and associated string interpolation\r\n- Support stripping out `//` comments (JSONC) because a lot of VS Code examples online have these\r\n- Optionally support YAML for MCP server configuration (while still preserving support for the JSON format)\r\n- Added docs for all the above at https://github.com/msabramo/python-sdk/blob/config/docs/client-configuration.md\r\n\r\n## Related issues/discussions\r\n\r\n- https://github.com/modelcontextprotocol/modelcontextprotocol/issues/292\r\n- https://github.com/modelcontextprotocol/modelcontextprotocol/discussions/681 (closed as dup of #292)\r\n\r\n## Motivation and Context\r\n\r\n### Config API\r\n\r\nClaude Desktop introduced the `mcp.json` file and then a lot of other applications copied the idea pretty closely, but some applications made little tweaks to their parsing code to support extensions. Examples:\r\n\r\n- Cursor allows one to put a full shell command into `command` for a stdio server which saves the user from having to split a shell command into a `command` string and `args` list, which is tedious.\r\n- Visual Studio Code GitHub Copilot uses `servers` key instead of `mcpServers` and supports an `inputs` key and allows associated interpolation of these inputs in other server fields (e.g.: https://github.com/Azure-Samples/remote-mcp-functions-python/blob/main/.vscode/mcp.json)\r\n\r\nAFAIK, there is no standard for the `mcp.json` so various applications have been evolving it very informally and so applications have differing abilities and their config files aren't necessarily compatible with each other.\r\n\r\nThis PR aims to create a simple API that standardizes config parsing so applications don't need to worry about implementing it and users benefit from more consistency between its handling by applications.\r\n\r\n```python\r\nfrom mcp.client.config.mcp_servers_config import MCPServersConfig\r\n\r\nmcp_server = MCPServersConfig.from_file(\"~/.cursor/mcp.json\").servers[\"time\"]\r\n\r\nprint(f\"Effective command: {mcp_server.effective_command}\")\r\nprint(f\"Effective args: {mcp_server.effective_args}\")\r\n```\r\n\r\nAssuming that `~/.cursor/mcp.json` has this:\r\n\r\n```json\r\n{\r\n  \"mcpServers\": {\r\n    \"time\": {\r\n      \"command\": \"uvx mcp-server-time\"\r\n    },\r\n    ...\r\n}\r\n```\r\n\r\n(Note the above syntax of stuffing the entire command in `command` works in Cursor but I don't think it works in Claude Desktop)\r\n\r\nthen the output of this code is:\r\n\r\n```\r\nEffective command: uvx\r\nEffective args: ['mcp-server-time']\r\n```\r\n\r\nNote that even though just `command` was specified, the code went ahead and parsed the command and split it into separate `command` and `args` so that the user doesn't have to.\r\n\r\n### Problems with JSON\r\n\r\nThe JSON format has some drawbacks:\r\n\r\n- No support for comments\r\n- No tolerance of commas at the end of a list, which leads to errors and noisy diffs\r\n\r\n### YAML MCP server config\r\n\r\nBecause of these problems with JSON, I have added an optional YAML variant of the server configuration. It provides a very nice, clean syntax for configuration for those who want to use it:\r\n\r\n```yaml\r\nmcpServers:\r\n  time:\r\n    command: uvx mcp-server-time\r\n\r\n  filesystem:\r\n    command: npx -y @modelcontextprotocol/server-filesystem /Users/username/Desktop\r\n```\r\n\r\nIf I have the above YAML in `mcp.yaml` and this Python code:\r\n\r\n```python\r\nfrom mcp.client.config.mcp_servers_config import MCPServersConfig\r\n\r\nmcp_config = MCPServersConfig.from_file(\"mcp.yaml\")\r\n\r\nfilesystem_mcp_server = mcp_config.servers[\"filesystem\"]\r\n\r\nprint(f\"Effective command: {filesystem_mcp_server.effective_command}\")\r\nprint(f\"Effective args: {filesystem_mcp_server.effective_args}\")\r\n```\r\n\r\nthen the output is:\r\n\r\n```\r\nEffective command: npx\r\nEffective args: ['-y', '@modelcontextprotocol/server-filesystem', '/Users/username/Desktop']\r\n```\r\n\r\nHowever, YAML is optional, and I have tried to ensure that existing `mcp.json` files work as expected with no changes.\r\n\r\nThis PR seeks to add parsing of the MCP servers configuration to the MCP SDK, so:\r\n\r\n- Applications have a stable base to rely on and don't have to duplicate work\r\n- Applications can get new configuration features more easily\r\n- MCP can evolve and it will be easier for applications to adapt to the changes\r\n\r\n## How Has This Been Tested?\r\nPretty extensive unit tests\r\n\r\n## Breaking Changes\r\nNo. There are lots of tests that use `mcp.json` files to ensure they are parsed correctly.\r\n\r\n## Types of changes\r\n<!-- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->\r\n- [ ] Bug fix (non-breaking change which fixes an issue)\r\n- [X] New feature (non-breaking change which adds functionality)\r\n- [ ] Breaking change (fix or feature that would cause existing functionality to change)\r\n- [X] Documentation update\r\n    https://github.com/msabramo/python-sdk/blob/config/docs/client-configuration.md\r\n\r\n## Checklist\r\n<!-- Go over all the following points, and put an `x` in all the boxes that apply. -->\r\n- [X] I have read the [MCP Documentation](https://modelcontextprotocol.io)\r\n- [X] My code follows the repository's style guidelines\r\n- [X] New and existing tests pass locally\r\n- [X] I have added appropriate error handling\r\n- [x] I have added or updated documentation as needed\r\n    https://github.com/msabramo/python-sdk/blob/config/docs/client-configuration.md\r\n\r\n## Additional context\r\n<!-- Add any other context, implementation notes, or design decisions -->\r\n",
      "created_at": "2025-06-16T20:56:56Z",
      "updated_at": "2025-11-12T17:47:18Z",
      "closed_at": null,
      "merged_at": null,
      "merge_commit_sha": null,
      "assignee": null,
      "assignees": {},
      "requested_reviewers": {},
      "requested_teams": {},
      "labels": {},
      "milestone": null,
      "draft": true,
      "head": {
        "label": "msabramo:config",
        "ref": "config",
        "sha": "1ac383ebadebfd00be879b7d67b3f727d78cab9b",
        "user": {
          "login": "msabramo",
          "id": 305268,
          "node_id": "MDQ6VXNlcjMwNTI2OA==",
          "avatar_url": "https://avatars.githubusercontent.com/u/305268?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/msabramo",
          "type": "User",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 1003231174,
          "node_id": "R_kgDOO8wXxg",
          "name": "python-sdk",
          "full_name": "msabramo/python-sdk",
          "private": false,
          "owner": {
            "login": "msabramo",
            "id": 305268,
            "node_id": "MDQ6VXNlcjMwNTI2OA==",
            "avatar_url": "https://avatars.githubusercontent.com/u/305268?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/msabramo",
            "type": "User",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": true,
          "url": "https://api.github.com/repos/msabramo/python-sdk",
          "created_at": "2025-06-16T20:37:07Z",
          "updated_at": "2025-06-16T20:37:07Z",
          "pushed_at": "2025-06-17T06:28:44Z",
          "homepage": "https://modelcontextprotocol.io",
          "size": 1309,
          "stargazers_count": 0,
          "watchers_count": 0,
          "language": null,
          "has_issues": false,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": false,
          "has_discussions": false,
          "forks_count": 0,
          "archived": false,
          "disabled": false,
          "open_issues_count": 0,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 0,
          "open_issues": 0,
          "watchers": 0,
          "default_branch": "main"
        }
      },
      "base": {
        "label": "modelcontextprotocol:main",
        "ref": "main",
        "sha": "1eb1bba83c70c3121bce7fc0263e5fac2c3f0520",
        "user": {
          "login": "modelcontextprotocol",
          "id": 182288589,
          "node_id": "O_kgDOCt2AzQ",
          "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/modelcontextprotocol",
          "type": "Organization",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 862584018,
          "node_id": "R_kgDOM2n80g",
          "name": "python-sdk",
          "full_name": "modelcontextprotocol/python-sdk",
          "private": false,
          "owner": {
            "login": "modelcontextprotocol",
            "id": 182288589,
            "node_id": "O_kgDOCt2AzQ",
            "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/modelcontextprotocol",
            "type": "Organization",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": false,
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk",
          "created_at": "2024-09-24T21:01:35Z",
          "updated_at": "2025-12-06T05:02:17Z",
          "pushed_at": "2025-12-04T18:04:06Z",
          "homepage": "https://modelcontextprotocol.github.io/python-sdk/",
          "size": 4194,
          "stargazers_count": 20439,
          "watchers_count": 20439,
          "language": "Python",
          "has_issues": true,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": true,
          "has_discussions": false,
          "forks_count": 2843,
          "archived": false,
          "disabled": false,
          "open_issues_count": 345,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 2843,
          "open_issues": 345,
          "watchers": 20439,
          "default_branch": "main"
        }
      },
      "_links": {
        "self": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/968"
        },
        "html": {
          "href": "https://github.com/modelcontextprotocol/python-sdk/pull/968"
        },
        "issue": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/968"
        },
        "comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/968/comments"
        },
        "review_comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/968/comments"
        },
        "review_comment": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/comments{/number}"
        },
        "commits": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/968/commits"
        },
        "statuses": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/statuses/1ac383ebadebfd00be879b7d67b3f727d78cab9b"
        }
      },
      "author_association": "CONTRIBUTOR",
      "auto_merge": null,
      "active_lock_reason": null,
      "linked_issues": [
        2
      ]
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/946",
      "id": 2586917739,
      "node_id": "PR_kwDOM2n80s6aMTtr",
      "number": 946,
      "state": "open",
      "locked": false,
      "title": "Improved Trio support",
      "user": {
        "login": "agronholm",
        "id": 130003,
        "node_id": "MDQ6VXNlcjEzMDAwMw==",
        "avatar_url": "https://avatars.githubusercontent.com/u/130003?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/agronholm",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "body": "* Removed the asyncio-only parametrization of the anyio_backend except for test_ws, as `websockets` doesn't support Trio yet\r\n* Try to close async generators explicitly where possible\r\n* Changed nesting order for more predictable closing of async resources\r\n* Refactored `__aenter__` and `__aexit__` in some cases to exit the task group if there's a problem during initialization\r\n* Fixed test failures in client/test_auth.py where an async fixture was used in sync tests\r\n* Fixed subtle bug in `SimpleEventStore` where retrieving the stream ID was timing-dependent\r\n* Added `typing-extensions` to dependencies, as the code already imported it unconditionally\r\n\r\n<!-- Provide a brief summary of your changes -->\r\n\r\n## Motivation and Context\r\n<!-- Why is this change needed? What problem does it solve? -->\r\n\r\nThis was requested at https://github.com/anthropics/oss-collab/issues/60.\r\n\r\n## How Has This Been Tested?\r\n<!-- Have you tested this in a real application? Which scenarios were tested? -->\r\n\r\nNo.\r\n\r\n## Breaking Changes\r\n<!-- Will users need to update their code or configurations? -->\r\n\r\nNo.\r\n\r\n## Types of changes\r\n<!-- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->\r\n- [ ] Bug fix (non-breaking change which fixes an issue)\r\n- [X] New feature (non-breaking change which adds functionality)\r\n- [ ] Breaking change (fix or feature that would cause existing functionality to change)\r\n- [ ] Documentation update\r\n\r\n## Checklist\r\n<!-- Go over all the following points, and put an `x` in all the boxes that apply. -->\r\n- [ ] I have read the [MCP Documentation](https://modelcontextprotocol.io)\r\n- [X] My code follows the repository's style guidelines\r\n- [X] New and existing tests pass locally\r\n- [X] I have added appropriate error handling\r\n- [ ] I have added or updated documentation as needed\r\n\r\n## Additional context\r\n<!-- Add any other context, implementation notes, or design decisions -->\r\n",
      "created_at": "2025-06-12T10:56:08Z",
      "updated_at": "2025-11-12T17:46:42Z",
      "closed_at": null,
      "merged_at": null,
      "merge_commit_sha": null,
      "assignee": null,
      "assignees": {},
      "requested_reviewers": {
        "0": {
          "login": "ihrpr",
          "id": 21148364,
          "node_id": "MDQ6VXNlcjIxMTQ4MzY0",
          "avatar_url": "https://avatars.githubusercontent.com/u/21148364?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/ihrpr",
          "type": "User",
          "user_view_type": "public",
          "site_admin": false
        }
      },
      "requested_teams": {},
      "labels": {
        "0": {
          "id": 9230424293,
          "node_id": "LA_kwDOM2n80s8AAAACJi0Y5Q",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/v2",
          "name": "v2",
          "color": "5d2a87",
          "default": false,
          "description": "Ideas, requests and plans for v2 of the SDK which will incorporate major changes and fixes"
        }
      },
      "milestone": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/milestones/3",
        "id": 12112132,
        "node_id": "MI_kwDOM2n80s4AuNEE",
        "number": 3,
        "title": "Python SDK v2.0",
        "description": "",
        "creator": {
          "login": "dsp-ant",
          "id": 167242713,
          "node_id": "U_kgDOCffr2Q",
          "avatar_url": "https://avatars.githubusercontent.com/u/167242713?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/dsp-ant",
          "type": "User",
          "user_view_type": "public",
          "site_admin": false
        },
        "open_issues": 12,
        "closed_issues": 2,
        "state": "open",
        "created_at": "2025-01-02T09:08:45Z",
        "updated_at": "2025-10-07T17:22:59Z",
        "due_on": null,
        "closed_at": null
      },
      "draft": true,
      "head": {
        "label": "agronholm:trio-support",
        "ref": "trio-support",
        "sha": "62aeec995d28e7f749c86b757f0fbce150472a96",
        "user": {
          "login": "agronholm",
          "id": 130003,
          "node_id": "MDQ6VXNlcjEzMDAwMw==",
          "avatar_url": "https://avatars.githubusercontent.com/u/130003?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/agronholm",
          "type": "User",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 1000804418,
          "node_id": "R_kgDOO6cQQg",
          "name": "python-sdk",
          "full_name": "agronholm/python-sdk",
          "private": false,
          "owner": {
            "login": "agronholm",
            "id": 130003,
            "node_id": "MDQ6VXNlcjEzMDAwMw==",
            "avatar_url": "https://avatars.githubusercontent.com/u/130003?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/agronholm",
            "type": "User",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": true,
          "url": "https://api.github.com/repos/agronholm/python-sdk",
          "created_at": "2025-06-12T10:50:15Z",
          "updated_at": "2025-06-12T10:50:15Z",
          "pushed_at": "2025-06-26T16:05:07Z",
          "homepage": "https://modelcontextprotocol.io",
          "size": 1404,
          "stargazers_count": 0,
          "watchers_count": 0,
          "language": null,
          "has_issues": false,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": false,
          "has_discussions": false,
          "forks_count": 0,
          "archived": false,
          "disabled": false,
          "open_issues_count": 0,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 0,
          "open_issues": 0,
          "watchers": 0,
          "default_branch": "main"
        }
      },
      "base": {
        "label": "modelcontextprotocol:main",
        "ref": "main",
        "sha": "dced22344d80d85884df9c26281fdfe0331e9c65",
        "user": {
          "login": "modelcontextprotocol",
          "id": 182288589,
          "node_id": "O_kgDOCt2AzQ",
          "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/modelcontextprotocol",
          "type": "Organization",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 862584018,
          "node_id": "R_kgDOM2n80g",
          "name": "python-sdk",
          "full_name": "modelcontextprotocol/python-sdk",
          "private": false,
          "owner": {
            "login": "modelcontextprotocol",
            "id": 182288589,
            "node_id": "O_kgDOCt2AzQ",
            "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/modelcontextprotocol",
            "type": "Organization",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": false,
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk",
          "created_at": "2024-09-24T21:01:35Z",
          "updated_at": "2025-12-06T05:02:17Z",
          "pushed_at": "2025-12-04T18:04:06Z",
          "homepage": "https://modelcontextprotocol.github.io/python-sdk/",
          "size": 4194,
          "stargazers_count": 20439,
          "watchers_count": 20439,
          "language": "Python",
          "has_issues": true,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": true,
          "has_discussions": false,
          "forks_count": 2843,
          "archived": false,
          "disabled": false,
          "open_issues_count": 345,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 2843,
          "open_issues": 345,
          "watchers": 20439,
          "default_branch": "main"
        }
      },
      "_links": {
        "self": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/946"
        },
        "html": {
          "href": "https://github.com/modelcontextprotocol/python-sdk/pull/946"
        },
        "issue": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/946"
        },
        "comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/946/comments"
        },
        "review_comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/946/comments"
        },
        "review_comment": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/comments{/number}"
        },
        "commits": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/946/commits"
        },
        "statuses": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/statuses/62aeec995d28e7f749c86b757f0fbce150472a96"
        }
      },
      "author_association": "NONE",
      "auto_merge": null,
      "active_lock_reason": null,
      "linked_issues": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/871",
      "id": 2562314712,
      "node_id": "PR_kwDOM2n80s6YudHY",
      "number": 871,
      "state": "open",
      "locked": false,
      "title": "User should set RootsListChanged capability",
      "user": {
        "login": "lorenzocesconetto",
        "id": 25406331,
        "node_id": "MDQ6VXNlcjI1NDA2MzMx",
        "avatar_url": "https://avatars.githubusercontent.com/u/25406331?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/lorenzocesconetto",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "body": "SDK user will set whether it supports RootsListChanged.\r\nTo fall into the safe side, the capability defaults to `False`.\r\n\r\n## Motivation and Context\r\nI was thinking of a more robust solution for this, but since it's the user providing the callback, I don't think there's much we can do here.\r\n\r\n## How Has This Been Tested?\r\nLocally.\r\n\r\n## Breaking Changes\r\nNo. I added a new arg, but it's in the end of the args list and has a default value.\r\n\r\n## Types of changes\r\n<!-- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->\r\n- [x] Bug fix (non-breaking change which fixes an issue)\r\n- [ ] New feature (non-breaking change which adds functionality)\r\n- [ ] Breaking change (fix or feature that would cause existing functionality to change)\r\n- [ ] Documentation update\r\n\r\n## Checklist\r\n<!-- Go over all the following points, and put an `x` in all the boxes that apply. -->\r\n- [x] I have read the [MCP Documentation](https://modelcontextprotocol.io)\r\n- [X] My code follows the repository's style guidelines\r\n- [x] New and existing tests pass locally\r\n- [x] I have added appropriate error handling\r\n- [x] I have added or updated documentation as needed\r\n\r\n## Additional context\r\n<!-- Add any other context, implementation notes, or design decisions -->\r\n",
      "created_at": "2025-06-03T01:30:51Z",
      "updated_at": "2025-10-14T10:41:04Z",
      "closed_at": null,
      "merged_at": null,
      "merge_commit_sha": null,
      "assignee": null,
      "assignees": {},
      "requested_reviewers": {},
      "requested_teams": {},
      "labels": {
        "0": {
          "id": 9230425628,
          "node_id": "LA_kwDOM2n80s8AAAACJi0eHA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/needs%20more%20work",
          "name": "needs more work",
          "color": "af3f39",
          "default": false,
          "description": "Not ready to be merged yet, needs additional follow-up from the author(s)."
        },
        "1": {
          "id": 9331338299,
          "node_id": "LA_kwDOM2n80s8AAAACLDDsOw",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/improves%20spec%20compliance",
          "name": "improves spec compliance",
          "color": "9FD9BD",
          "default": false,
          "description": "When a change improves ability of SDK users to comply with spec definition"
        }
      },
      "milestone": null,
      "draft": true,
      "head": {
        "label": "lorenzocesconetto:lorenzocesconetto/fix-client-roots-list-changed-capability",
        "ref": "lorenzocesconetto/fix-client-roots-list-changed-capability",
        "sha": "5411b1197354e35da88f0274e84488a1115bafb2",
        "user": {
          "login": "lorenzocesconetto",
          "id": 25406331,
          "node_id": "MDQ6VXNlcjI1NDA2MzMx",
          "avatar_url": "https://avatars.githubusercontent.com/u/25406331?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/lorenzocesconetto",
          "type": "User",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 987942585,
          "node_id": "R_kgDOOuLOuQ",
          "name": "mcp-python-sdk",
          "full_name": "lorenzocesconetto/mcp-python-sdk",
          "private": false,
          "owner": {
            "login": "lorenzocesconetto",
            "id": 25406331,
            "node_id": "MDQ6VXNlcjI1NDA2MzMx",
            "avatar_url": "https://avatars.githubusercontent.com/u/25406331?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/lorenzocesconetto",
            "type": "User",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": true,
          "url": "https://api.github.com/repos/lorenzocesconetto/mcp-python-sdk",
          "created_at": "2025-05-21T20:23:38Z",
          "updated_at": "2025-06-03T01:09:00Z",
          "pushed_at": "2025-09-30T13:36:33Z",
          "homepage": "https://modelcontextprotocol.io",
          "size": 2510,
          "stargazers_count": 0,
          "watchers_count": 0,
          "language": "Python",
          "has_issues": false,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": false,
          "has_discussions": false,
          "forks_count": 0,
          "archived": false,
          "disabled": false,
          "open_issues_count": 0,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 0,
          "open_issues": 0,
          "watchers": 0,
          "default_branch": "main"
        }
      },
      "base": {
        "label": "modelcontextprotocol:main",
        "ref": "main",
        "sha": "544176770b53e6a0ae8c413d3b6c5116421f67df",
        "user": {
          "login": "modelcontextprotocol",
          "id": 182288589,
          "node_id": "O_kgDOCt2AzQ",
          "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/modelcontextprotocol",
          "type": "Organization",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 862584018,
          "node_id": "R_kgDOM2n80g",
          "name": "python-sdk",
          "full_name": "modelcontextprotocol/python-sdk",
          "private": false,
          "owner": {
            "login": "modelcontextprotocol",
            "id": 182288589,
            "node_id": "O_kgDOCt2AzQ",
            "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/modelcontextprotocol",
            "type": "Organization",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": false,
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk",
          "created_at": "2024-09-24T21:01:35Z",
          "updated_at": "2025-12-06T05:02:17Z",
          "pushed_at": "2025-12-04T18:04:06Z",
          "homepage": "https://modelcontextprotocol.github.io/python-sdk/",
          "size": 4194,
          "stargazers_count": 20439,
          "watchers_count": 20439,
          "language": "Python",
          "has_issues": true,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": true,
          "has_discussions": false,
          "forks_count": 2843,
          "archived": false,
          "disabled": false,
          "open_issues_count": 345,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 2843,
          "open_issues": 345,
          "watchers": 20439,
          "default_branch": "main"
        }
      },
      "_links": {
        "self": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/871"
        },
        "html": {
          "href": "https://github.com/modelcontextprotocol/python-sdk/pull/871"
        },
        "issue": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/871"
        },
        "comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/871/comments"
        },
        "review_comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/871/comments"
        },
        "review_comment": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/comments{/number}"
        },
        "commits": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/871/commits"
        },
        "statuses": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/statuses/5411b1197354e35da88f0274e84488a1115bafb2"
        }
      },
      "author_association": "CONTRIBUTOR",
      "auto_merge": null,
      "active_lock_reason": null,
      "linked_issues": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/866",
      "id": 2557760321,
      "node_id": "PR_kwDOM2n80s6YdFNB",
      "number": 866,
      "state": "open",
      "locked": false,
      "title": "Feature/617 async call tools",
      "user": {
        "login": "davemssavage",
        "id": 349016,
        "node_id": "MDQ6VXNlcjM0OTAxNg==",
        "avatar_url": "https://avatars.githubusercontent.com/u/349016?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/davemssavage",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "body": "Work in progress towards Async Call Tools support as per https://github.com/modelcontextprotocol/modelcontextprotocol/pull/617\r\n\r\n## Motivation and Context\r\n\r\nTo see if the protocol as defined in https://github.com/modelcontextprotocol/modelcontextprotocol/pull/617 is implementable in practice, if so provide a reference implementation for others to follow\r\n\r\n## How Has This Been Tested?\r\n\r\nUnit testing only at this stage\r\n\r\n## Breaking Changes\r\n\r\nNone planned, goal is to make this backwards compatible and opt-in\r\n\r\n## Types of changes\r\n<!-- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->\r\n- [ ] Bug fix (non-breaking change which fixes an issue)\r\n- [x] New feature (non-breaking change which adds functionality)\r\n- [ ] Breaking change (fix or feature that would cause existing functionality to change)\r\n- [ ] Documentation update\r\n\r\n## Checklist\r\n<!-- Go over all the following points, and put an `x` in all the boxes that apply. -->\r\n- [x] I have read the [MCP Documentation](https://modelcontextprotocol.io)\r\n- [x] My code follows the repository's style guidelines\r\n- [x] New and existing tests pass locally\r\n- [ ] I have added appropriate error handling\r\n- [ ] I have added or updated documentation as needed\r\n\r\n## Additional context\r\nThis patch is shared for discussion at this stage, it will be marked as draft. As noted in RequestCache class there are several TODOs of varying degrees of severity that need resolving before it should be considered for merge\r\n",
      "created_at": "2025-06-01T06:54:22Z",
      "updated_at": "2025-11-12T17:43:27Z",
      "closed_at": null,
      "merged_at": null,
      "merge_commit_sha": null,
      "assignee": null,
      "assignees": {},
      "requested_reviewers": {},
      "requested_teams": {},
      "labels": {
        "0": {
          "id": 9230425628,
          "node_id": "LA_kwDOM2n80s8AAAACJi0eHA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/needs%20more%20work",
          "name": "needs more work",
          "color": "af3f39",
          "default": false,
          "description": "Not ready to be merged yet, needs additional follow-up from the author(s)."
        }
      },
      "milestone": null,
      "draft": true,
      "head": {
        "label": "davemssavage:feature/617-async-call-tools",
        "ref": "feature/617-async-call-tools",
        "sha": "d0e463e08d5faa4d992bc35b0d4fd29a58297c92",
        "user": {
          "login": "davemssavage",
          "id": 349016,
          "node_id": "MDQ6VXNlcjM0OTAxNg==",
          "avatar_url": "https://avatars.githubusercontent.com/u/349016?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/davemssavage",
          "type": "User",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 977630790,
          "node_id": "R_kgDOOkV2Rg",
          "name": "python-sdk",
          "full_name": "davemssavage/python-sdk",
          "private": false,
          "owner": {
            "login": "davemssavage",
            "id": 349016,
            "node_id": "MDQ6VXNlcjM0OTAxNg==",
            "avatar_url": "https://avatars.githubusercontent.com/u/349016?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/davemssavage",
            "type": "User",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": true,
          "url": "https://api.github.com/repos/davemssavage/python-sdk",
          "created_at": "2025-05-04T16:35:11Z",
          "updated_at": "2025-08-16T12:53:48Z",
          "pushed_at": "2025-08-24T16:54:13Z",
          "homepage": "https://modelcontextprotocol.io",
          "size": 2008,
          "stargazers_count": 0,
          "watchers_count": 0,
          "language": "Python",
          "has_issues": false,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": false,
          "has_discussions": false,
          "forks_count": 0,
          "archived": false,
          "disabled": false,
          "open_issues_count": 0,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 0,
          "open_issues": 0,
          "watchers": 0,
          "default_branch": "main"
        }
      },
      "base": {
        "label": "modelcontextprotocol:main",
        "ref": "main",
        "sha": "544176770b53e6a0ae8c413d3b6c5116421f67df",
        "user": {
          "login": "modelcontextprotocol",
          "id": 182288589,
          "node_id": "O_kgDOCt2AzQ",
          "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/modelcontextprotocol",
          "type": "Organization",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 862584018,
          "node_id": "R_kgDOM2n80g",
          "name": "python-sdk",
          "full_name": "modelcontextprotocol/python-sdk",
          "private": false,
          "owner": {
            "login": "modelcontextprotocol",
            "id": 182288589,
            "node_id": "O_kgDOCt2AzQ",
            "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/modelcontextprotocol",
            "type": "Organization",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": false,
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk",
          "created_at": "2024-09-24T21:01:35Z",
          "updated_at": "2025-12-06T05:02:17Z",
          "pushed_at": "2025-12-04T18:04:06Z",
          "homepage": "https://modelcontextprotocol.github.io/python-sdk/",
          "size": 4194,
          "stargazers_count": 20439,
          "watchers_count": 20439,
          "language": "Python",
          "has_issues": true,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": true,
          "has_discussions": false,
          "forks_count": 2843,
          "archived": false,
          "disabled": false,
          "open_issues_count": 345,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 2843,
          "open_issues": 345,
          "watchers": 20439,
          "default_branch": "main"
        }
      },
      "_links": {
        "self": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/866"
        },
        "html": {
          "href": "https://github.com/modelcontextprotocol/python-sdk/pull/866"
        },
        "issue": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/866"
        },
        "comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/866/comments"
        },
        "review_comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/866/comments"
        },
        "review_comment": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/comments{/number}"
        },
        "commits": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/866/commits"
        },
        "statuses": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/statuses/d0e463e08d5faa4d992bc35b0d4fd29a58297c92"
        }
      },
      "author_association": "NONE",
      "auto_merge": null,
      "active_lock_reason": null,
      "linked_issues": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/777",
      "id": 2535465389,
      "node_id": "PR_kwDOM2n80s6XICGt",
      "number": 777,
      "state": "open",
      "locked": false,
      "title": "Webhooks",
      "user": {
        "login": "pantanurag555",
        "id": 11739818,
        "node_id": "MDQ6VXNlcjExNzM5ODE4",
        "avatar_url": "https://avatars.githubusercontent.com/u/11739818?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/pantanurag555",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "body": "## Motivation and Context\r\nThis is draft PR for the changes discussed in specification discussion [#523](https://github.com/modelcontextprotocol/modelcontextprotocol/discussions/523).\r\n\r\n## How Has This Been Tested?\r\nTested by setting up a webhook, client and server locally. The webhook received all messages when the server was setup with streamable http. It was tested for both json_response True and False. All units tests succeeded.\r\n\r\n## Breaking Changes\r\nNone\r\n\r\n## Types of changes\r\n- [ ] Bug fix (non-breaking change which fixes an issue)\r\n- [x] New feature (non-breaking change which adds functionality)\r\n- [ ] Breaking change (fix or feature that would cause existing functionality to change)\r\n- [ ] Documentation update\r\n\r\n## Checklist\r\n- [x] I have read the [MCP Documentation](https://modelcontextprotocol.io)\r\n- [x] My code follows the repository's style guidelines\r\n- [x] New and existing tests pass locally\r\n- [x] I have added appropriate error handling\r\n- [x] I have added or updated documentation as needed\r\n",
      "created_at": "2025-05-21T21:09:11Z",
      "updated_at": "2025-11-12T17:43:05Z",
      "closed_at": null,
      "merged_at": null,
      "merge_commit_sha": null,
      "assignee": null,
      "assignees": {},
      "requested_reviewers": {},
      "requested_teams": {},
      "labels": {},
      "milestone": null,
      "draft": true,
      "head": {
        "label": "pantanurag555:webhooks",
        "ref": "webhooks",
        "sha": "d318db65ccb9068472498261f6a82eaeeb0c5318",
        "user": {
          "login": "pantanurag555",
          "id": 11739818,
          "node_id": "MDQ6VXNlcjExNzM5ODE4",
          "avatar_url": "https://avatars.githubusercontent.com/u/11739818?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/pantanurag555",
          "type": "User",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 978965619,
          "node_id": "R_kgDOOlnUcw",
          "name": "python-sdk",
          "full_name": "pantanurag555/python-sdk",
          "private": false,
          "owner": {
            "login": "pantanurag555",
            "id": 11739818,
            "node_id": "MDQ6VXNlcjExNzM5ODE4",
            "avatar_url": "https://avatars.githubusercontent.com/u/11739818?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/pantanurag555",
            "type": "User",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": true,
          "url": "https://api.github.com/repos/pantanurag555/python-sdk",
          "created_at": "2025-05-06T19:28:54Z",
          "updated_at": "2025-07-10T22:42:27Z",
          "pushed_at": "2025-07-10T22:42:18Z",
          "homepage": "https://modelcontextprotocol.io",
          "size": 1302,
          "stargazers_count": 0,
          "watchers_count": 0,
          "language": "Python",
          "has_issues": false,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": false,
          "has_discussions": false,
          "forks_count": 0,
          "archived": false,
          "disabled": false,
          "open_issues_count": 0,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 0,
          "open_issues": 0,
          "watchers": 0,
          "default_branch": "main"
        }
      },
      "base": {
        "label": "modelcontextprotocol:main",
        "ref": "main",
        "sha": "70014a2bbbfa1376027aab43e3f7b3622377e546",
        "user": {
          "login": "modelcontextprotocol",
          "id": 182288589,
          "node_id": "O_kgDOCt2AzQ",
          "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/modelcontextprotocol",
          "type": "Organization",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 862584018,
          "node_id": "R_kgDOM2n80g",
          "name": "python-sdk",
          "full_name": "modelcontextprotocol/python-sdk",
          "private": false,
          "owner": {
            "login": "modelcontextprotocol",
            "id": 182288589,
            "node_id": "O_kgDOCt2AzQ",
            "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/modelcontextprotocol",
            "type": "Organization",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": false,
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk",
          "created_at": "2024-09-24T21:01:35Z",
          "updated_at": "2025-12-06T05:02:17Z",
          "pushed_at": "2025-12-04T18:04:06Z",
          "homepage": "https://modelcontextprotocol.github.io/python-sdk/",
          "size": 4194,
          "stargazers_count": 20439,
          "watchers_count": 20439,
          "language": "Python",
          "has_issues": true,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": true,
          "has_discussions": false,
          "forks_count": 2843,
          "archived": false,
          "disabled": false,
          "open_issues_count": 345,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 2843,
          "open_issues": 345,
          "watchers": 20439,
          "default_branch": "main"
        }
      },
      "_links": {
        "self": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/777"
        },
        "html": {
          "href": "https://github.com/modelcontextprotocol/python-sdk/pull/777"
        },
        "issue": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/777"
        },
        "comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/777/comments"
        },
        "review_comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/777/comments"
        },
        "review_comment": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/comments{/number}"
        },
        "commits": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/777/commits"
        },
        "statuses": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/statuses/d318db65ccb9068472498261f6a82eaeeb0c5318"
        }
      },
      "author_association": "NONE",
      "auto_merge": null,
      "active_lock_reason": null,
      "linked_issues": [
        5
      ]
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/764",
      "id": 2532747678,
      "node_id": "PR_kwDOM2n80s6W9qme",
      "number": 764,
      "state": "open",
      "locked": false,
      "title": "Add support for remote-oauth-support Fix #686",
      "user": {
        "login": "ravibits",
        "id": 379730,
        "node_id": "MDQ6VXNlcjM3OTczMA==",
        "avatar_url": "https://avatars.githubusercontent.com/u/379730?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/ravibits",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "body": "This contains fix for the issue: #686 \r\n\r\n<!-- Provide a brief summary of your changes -->\r\nAs per the new authorization spec for MCP Servers as outlined here: https://modelcontextprotocol.io/specification/draft/basic/authorization, implementing the remote oauth support for the FastMCP Servers. \r\n\r\n- [x] Add support for /.well-known/oauth-protected-resource endpoint when the MCP Server is created with support with auth based off of remote authorization server\r\n- [ ] Add support for custom bearer token validation with default JWT based bearer token validation out of the box for MCP servers with remote oauth support.\r\n- [ ] Implement middleware to check for the JWT token validity\r\n- [ ] (optional) at a per tool level, create indicators for whether auth required and if yes, what scopes are required for that tool.\r\n\r\nAs part of the spec, the only responsibility of the MCP Server should be to indicate to the client it's oauth protected resource and indicate to the client where to find the authorization server. \r\n\r\nThis is just the initial version and based on the feedback from @localden, @ihrpr , I intend to keep making changes to complete the test cases and full feature documentation. \r\n\r\n## Motivation and Context\r\nImplement supoprt for [RFC9728](https://datatracker.ietf.org/doc/html/rfc9728), along with other requirements outlined in the [spec](https://modelcontextprotocol.io/specification/draft/basic/authorization). \r\n\r\n## How Has This Been Tested?\r\n- [ ] TODO: We will implement a simple MCP Server using an authorization server that supports PKCE, DCR etc and ensure that the MCP Server is receiving the access tokens as presented by the MCP client.\r\n\r\n## Breaking Changes\r\nMay have breaking changes.\r\n\r\n## Types of changes\r\n<!-- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->\r\n- [ ] Bug fix (non-breaking change which fixes an issue)\r\n- [ ] New feature (non-breaking change which adds functionality)\r\n- [x] Breaking change (fix or feature that would cause existing functionality to change)\r\n- [ ] Documentation update\r\n\r\n## Checklist\r\n<!-- Go over all the following points, and put an `x` in all the boxes that apply. -->\r\n- [x] I have read the [MCP Documentation](https://modelcontextprotocol.io)\r\n- [x] My code follows the repository's style guidelines\r\n- [ ] New and existing tests pass locally\r\n- [ ] I have added appropriate error handling\r\n- [ ] I have added or updated documentation as needed\r\n\r\n## Additional context\r\n<!-- Add any other context, implementation notes, or design decisions -->\r\n",
      "created_at": "2025-05-20T22:33:58Z",
      "updated_at": "2025-09-05T14:59:34Z",
      "closed_at": null,
      "merged_at": null,
      "merge_commit_sha": null,
      "assignee": null,
      "assignees": {},
      "requested_reviewers": {},
      "requested_teams": {},
      "labels": {
        "0": {
          "id": 9230425628,
          "node_id": "LA_kwDOM2n80s8AAAACJi0eHA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/needs%20more%20work",
          "name": "needs more work",
          "color": "af3f39",
          "default": false,
          "description": "Not ready to be merged yet, needs additional follow-up from the author(s)."
        }
      },
      "milestone": {
        "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/milestones/10",
        "id": 12945610,
        "node_id": "MI_kwDOM2n80s4AxYjK",
        "number": 10,
        "title": "OAuth Improvements & Fixes",
        "description": "",
        "creator": {
          "login": "ihrpr",
          "id": 21148364,
          "node_id": "MDQ6VXNlcjIxMTQ4MzY0",
          "avatar_url": "https://avatars.githubusercontent.com/u/21148364?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/ihrpr",
          "type": "User",
          "user_view_type": "public",
          "site_admin": false
        },
        "open_issues": 1,
        "closed_issues": 12,
        "state": "open",
        "created_at": "2025-05-23T13:43:49Z",
        "updated_at": "2025-12-02T15:11:04Z",
        "due_on": null,
        "closed_at": null
      },
      "draft": true,
      "head": {
        "label": "ravibits:main",
        "ref": "main",
        "sha": "379cb7f56fdbc20fe6365a6a99c60378fd41314b",
        "user": {
          "login": "ravibits",
          "id": 379730,
          "node_id": "MDQ6VXNlcjM3OTczMA==",
          "avatar_url": "https://avatars.githubusercontent.com/u/379730?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/ravibits",
          "type": "User",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 985511086,
          "node_id": "R_kgDOOr20rg",
          "name": "python-sdk",
          "full_name": "ravibits/python-sdk",
          "private": false,
          "owner": {
            "login": "ravibits",
            "id": 379730,
            "node_id": "MDQ6VXNlcjM3OTczMA==",
            "avatar_url": "https://avatars.githubusercontent.com/u/379730?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/ravibits",
            "type": "User",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": true,
          "url": "https://api.github.com/repos/ravibits/python-sdk",
          "created_at": "2025-05-17T23:19:47Z",
          "updated_at": "2025-05-20T23:58:23Z",
          "pushed_at": "2025-05-20T23:58:18Z",
          "homepage": "https://modelcontextprotocol.io",
          "size": 1077,
          "stargazers_count": 0,
          "watchers_count": 0,
          "language": "Python",
          "has_issues": false,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": false,
          "has_discussions": false,
          "forks_count": 0,
          "archived": false,
          "disabled": false,
          "open_issues_count": 0,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 0,
          "open_issues": 0,
          "watchers": 0,
          "default_branch": "main"
        }
      },
      "base": {
        "label": "modelcontextprotocol:main",
        "ref": "main",
        "sha": "2ca2de767b316832fdcb96984dd53c5c4c80b3be",
        "user": {
          "login": "modelcontextprotocol",
          "id": 182288589,
          "node_id": "O_kgDOCt2AzQ",
          "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/modelcontextprotocol",
          "type": "Organization",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 862584018,
          "node_id": "R_kgDOM2n80g",
          "name": "python-sdk",
          "full_name": "modelcontextprotocol/python-sdk",
          "private": false,
          "owner": {
            "login": "modelcontextprotocol",
            "id": 182288589,
            "node_id": "O_kgDOCt2AzQ",
            "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/modelcontextprotocol",
            "type": "Organization",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": false,
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk",
          "created_at": "2024-09-24T21:01:35Z",
          "updated_at": "2025-12-06T05:02:17Z",
          "pushed_at": "2025-12-04T18:04:06Z",
          "homepage": "https://modelcontextprotocol.github.io/python-sdk/",
          "size": 4194,
          "stargazers_count": 20439,
          "watchers_count": 20439,
          "language": "Python",
          "has_issues": true,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": true,
          "has_discussions": false,
          "forks_count": 2843,
          "archived": false,
          "disabled": false,
          "open_issues_count": 345,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 2843,
          "open_issues": 345,
          "watchers": 20439,
          "default_branch": "main"
        }
      },
      "_links": {
        "self": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/764"
        },
        "html": {
          "href": "https://github.com/modelcontextprotocol/python-sdk/pull/764"
        },
        "issue": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/764"
        },
        "comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/764/comments"
        },
        "review_comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/764/comments"
        },
        "review_comment": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/comments{/number}"
        },
        "commits": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/764/commits"
        },
        "statuses": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/statuses/379cb7f56fdbc20fe6365a6a99c60378fd41314b"
        }
      },
      "author_association": "NONE",
      "auto_merge": null,
      "active_lock_reason": null,
      "linked_issues": [
        6
      ]
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/758",
      "id": 2529915411,
      "node_id": "PR_kwDOM2n80s6Wy3IT",
      "number": 758,
      "state": "open",
      "locked": false,
      "title": "fix: add status field in Resource class and Resource as a return type in CallToolResult",
      "user": {
        "login": "bzsurbhi",
        "id": 115104450,
        "node_id": "U_kgDOBtxawg",
        "avatar_url": "https://avatars.githubusercontent.com/u/115104450?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/bzsurbhi",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "body": "\r\n\r\n<!-- Provide a brief summary of your changes -->\r\n\r\n## Motivation and Context\r\n<!-- Why is this change needed? What problem does it solve? -->\r\n\r\n## How Has This Been Tested?\r\n<!-- Have you tested this in a real application? Which scenarios were tested? -->\r\n\r\n## Breaking Changes\r\n<!-- Will users need to update their code or configurations? -->\r\n\r\n## Types of changes\r\n<!-- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->\r\n- [ ] Bug fix (non-breaking change which fixes an issue)\r\n- [ ] New feature (non-breaking change which adds functionality)\r\n- [ ] Breaking change (fix or feature that would cause existing functionality to change)\r\n- [ ] Documentation update\r\n\r\n## Checklist\r\n<!-- Go over all the following points, and put an `x` in all the boxes that apply. -->\r\n- [ ] I have read the [MCP Documentation](https://modelcontextprotocol.io)\r\n- [ ] My code follows the repository's style guidelines\r\n- [ ] New and existing tests pass locally\r\n- [ ] I have added appropriate error handling\r\n- [ ] I have added or updated documentation as needed\r\n\r\n## Additional context\r\n<!-- Add any other context, implementation notes, or design decisions -->\r\n",
      "created_at": "2025-05-19T22:41:22Z",
      "updated_at": "2025-11-12T17:47:19Z",
      "closed_at": null,
      "merged_at": null,
      "merge_commit_sha": null,
      "assignee": null,
      "assignees": {},
      "requested_reviewers": {},
      "requested_teams": {},
      "labels": {
        "0": {
          "id": 9230425628,
          "node_id": "LA_kwDOM2n80s8AAAACJi0eHA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/needs%20more%20work",
          "name": "needs more work",
          "color": "af3f39",
          "default": false,
          "description": "Not ready to be merged yet, needs additional follow-up from the author(s)."
        }
      },
      "milestone": null,
      "draft": true,
      "head": {
        "label": "bzsurbhi:feature/async-support",
        "ref": "feature/async-support",
        "sha": "976ce3961f5c587e021b7625c4c15f12e4bd5f4b",
        "user": {
          "login": "bzsurbhi",
          "id": 115104450,
          "node_id": "U_kgDOBtxawg",
          "avatar_url": "https://avatars.githubusercontent.com/u/115104450?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/bzsurbhi",
          "type": "User",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 975823672,
          "node_id": "R_kgDOOinjOA",
          "name": "python-sdk",
          "full_name": "bzsurbhi/python-sdk",
          "private": false,
          "owner": {
            "login": "bzsurbhi",
            "id": 115104450,
            "node_id": "U_kgDOBtxawg",
            "avatar_url": "https://avatars.githubusercontent.com/u/115104450?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/bzsurbhi",
            "type": "User",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": true,
          "url": "https://api.github.com/repos/bzsurbhi/python-sdk",
          "created_at": "2025-05-01T00:55:50Z",
          "updated_at": "2025-07-28T18:09:34Z",
          "pushed_at": "2025-07-28T18:09:28Z",
          "homepage": "https://modelcontextprotocol.io",
          "size": 1697,
          "stargazers_count": 0,
          "watchers_count": 0,
          "language": "Python",
          "has_issues": false,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": false,
          "has_discussions": false,
          "forks_count": 0,
          "archived": false,
          "disabled": false,
          "open_issues_count": 0,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 0,
          "open_issues": 0,
          "watchers": 0,
          "default_branch": "main"
        }
      },
      "base": {
        "label": "modelcontextprotocol:main",
        "ref": "main",
        "sha": "e33cd41c7a0e9a8efe3aac4c0e1d5bdbb849cd15",
        "user": {
          "login": "modelcontextprotocol",
          "id": 182288589,
          "node_id": "O_kgDOCt2AzQ",
          "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/modelcontextprotocol",
          "type": "Organization",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 862584018,
          "node_id": "R_kgDOM2n80g",
          "name": "python-sdk",
          "full_name": "modelcontextprotocol/python-sdk",
          "private": false,
          "owner": {
            "login": "modelcontextprotocol",
            "id": 182288589,
            "node_id": "O_kgDOCt2AzQ",
            "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/modelcontextprotocol",
            "type": "Organization",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": false,
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk",
          "created_at": "2024-09-24T21:01:35Z",
          "updated_at": "2025-12-06T05:02:17Z",
          "pushed_at": "2025-12-04T18:04:06Z",
          "homepage": "https://modelcontextprotocol.github.io/python-sdk/",
          "size": 4194,
          "stargazers_count": 20439,
          "watchers_count": 20439,
          "language": "Python",
          "has_issues": true,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": true,
          "has_discussions": false,
          "forks_count": 2843,
          "archived": false,
          "disabled": false,
          "open_issues_count": 345,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 2843,
          "open_issues": 345,
          "watchers": 20439,
          "default_branch": "main"
        }
      },
      "_links": {
        "self": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/758"
        },
        "html": {
          "href": "https://github.com/modelcontextprotocol/python-sdk/pull/758"
        },
        "issue": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/758"
        },
        "comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/758/comments"
        },
        "review_comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/758/comments"
        },
        "review_comment": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/comments{/number}"
        },
        "commits": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/758/commits"
        },
        "statuses": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/statuses/976ce3961f5c587e021b7625c4c15f12e4bd5f4b"
        }
      },
      "author_association": "NONE",
      "auto_merge": null,
      "active_lock_reason": null,
      "linked_issues": []
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/727",
      "id": 2523171340,
      "node_id": "PR_kwDOM2n80s6WZIoM",
      "number": 727,
      "state": "open",
      "locked": false,
      "title": "feat: support embedded resources in sampling",
      "user": {
        "login": "LucaButBoring",
        "id": 131398524,
        "node_id": "U_kgDOB9T7fA",
        "avatar_url": "https://avatars.githubusercontent.com/u/131398524?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/LucaButBoring",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "body": "Updates sampling to support embedded resources in requests and responses.\r\n\r\n## Motivation and Context\r\nBrings sampling to parity with tool calls in terms of supported message types. This PR is intended to support https://github.com/modelcontextprotocol/modelcontextprotocol/pull/522.\r\n\r\n## How Has This Been Tested?\r\nUpdated integration tests to include an embedded resource test.\r\n\r\n## Breaking Changes\r\nNone.\r\n\r\n## Types of changes\r\n<!-- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->\r\n- [ ] Bug fix (non-breaking change which fixes an issue)\r\n- [x] New feature (non-breaking change which adds functionality)\r\n- [ ] Breaking change (fix or feature that would cause existing functionality to change)\r\n- [ ] Documentation update\r\n\r\n## Checklist\r\n<!-- Go over all the following points, and put an `x` in all the boxes that apply. -->\r\n- [x] I have read the [MCP Documentation](https://modelcontextprotocol.io)\r\n- [x] My code follows the repository's style guidelines\r\n- [x] New and existing tests pass locally\r\n- [x] I have added appropriate error handling\r\n- [x] I have added or updated documentation as needed\r\n\r\n## Additional context\r\nThis PR will be updated accordingly if #725 is merged before this.",
      "created_at": "2025-05-15T21:47:31Z",
      "updated_at": "2025-11-12T17:42:31Z",
      "closed_at": null,
      "merged_at": null,
      "merge_commit_sha": null,
      "assignee": null,
      "assignees": {},
      "requested_reviewers": {},
      "requested_teams": {},
      "labels": {
        "0": {
          "id": 9231177417,
          "node_id": "LA_kwDOM2n80s8AAAACJjiWyQ",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/pending%20SEP%20approval",
          "name": "pending SEP approval",
          "color": "390ac3",
          "default": false,
          "description": "When a PR is attached as an implementation detail to a SEP, we mark it as such for triage."
        }
      },
      "milestone": null,
      "draft": true,
      "head": {
        "label": "LucaButBoring:feat/sampling-resources",
        "ref": "feat/sampling-resources",
        "sha": "89a3cd70d2cc200431da5b6456e6c663bcbff3c9",
        "user": {
          "login": "LucaButBoring",
          "id": 131398524,
          "node_id": "U_kgDOB9T7fA",
          "avatar_url": "https://avatars.githubusercontent.com/u/131398524?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/LucaButBoring",
          "type": "User",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 980286614,
          "node_id": "R_kgDOOm38lg",
          "name": "mcp-python-sdk",
          "full_name": "LucaButBoring/mcp-python-sdk",
          "private": false,
          "owner": {
            "login": "LucaButBoring",
            "id": 131398524,
            "node_id": "U_kgDOB9T7fA",
            "avatar_url": "https://avatars.githubusercontent.com/u/131398524?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/LucaButBoring",
            "type": "User",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": true,
          "url": "https://api.github.com/repos/LucaButBoring/mcp-python-sdk",
          "created_at": "2025-05-08T22:08:13Z",
          "updated_at": "2025-11-24T23:44:44Z",
          "pushed_at": "2025-11-24T23:44:39Z",
          "homepage": "https://modelcontextprotocol.io",
          "size": 2848,
          "stargazers_count": 0,
          "watchers_count": 0,
          "language": "Python",
          "has_issues": false,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": false,
          "has_discussions": false,
          "forks_count": 0,
          "archived": false,
          "disabled": false,
          "open_issues_count": 0,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 0,
          "open_issues": 0,
          "watchers": 0,
          "default_branch": "main"
        }
      },
      "base": {
        "label": "modelcontextprotocol:main",
        "ref": "main",
        "sha": "544176770b53e6a0ae8c413d3b6c5116421f67df",
        "user": {
          "login": "modelcontextprotocol",
          "id": 182288589,
          "node_id": "O_kgDOCt2AzQ",
          "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/modelcontextprotocol",
          "type": "Organization",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 862584018,
          "node_id": "R_kgDOM2n80g",
          "name": "python-sdk",
          "full_name": "modelcontextprotocol/python-sdk",
          "private": false,
          "owner": {
            "login": "modelcontextprotocol",
            "id": 182288589,
            "node_id": "O_kgDOCt2AzQ",
            "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/modelcontextprotocol",
            "type": "Organization",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": false,
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk",
          "created_at": "2024-09-24T21:01:35Z",
          "updated_at": "2025-12-06T05:02:17Z",
          "pushed_at": "2025-12-04T18:04:06Z",
          "homepage": "https://modelcontextprotocol.github.io/python-sdk/",
          "size": 4194,
          "stargazers_count": 20439,
          "watchers_count": 20439,
          "language": "Python",
          "has_issues": true,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": true,
          "has_discussions": false,
          "forks_count": 2843,
          "archived": false,
          "disabled": false,
          "open_issues_count": 345,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 2843,
          "open_issues": 345,
          "watchers": 20439,
          "default_branch": "main"
        }
      },
      "_links": {
        "self": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/727"
        },
        "html": {
          "href": "https://github.com/modelcontextprotocol/python-sdk/pull/727"
        },
        "issue": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/727"
        },
        "comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/727/comments"
        },
        "review_comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/727/comments"
        },
        "review_comment": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/comments{/number}"
        },
        "commits": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/727/commits"
        },
        "statuses": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/statuses/89a3cd70d2cc200431da5b6456e6c663bcbff3c9"
        }
      },
      "author_association": "CONTRIBUTOR",
      "auto_merge": null,
      "active_lock_reason": null,
      "linked_issues": [
        7
      ]
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/648",
      "id": 2503921989,
      "node_id": "PR_kwDOM2n80s6VPtFF",
      "number": 648,
      "state": "open",
      "locked": false,
      "title": "confused deputy fix in example + supporting sdk changes",
      "user": {
        "login": "pcarleton",
        "id": 704663,
        "node_id": "MDQ6VXNlcjcwNDY2Mw==",
        "avatar_url": "https://avatars.githubusercontent.com/u/704663?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/pcarleton",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "body": "<!-- Provide a brief summary of your changes -->\r\n\r\n## Motivation and Context\r\n<!-- Why is this change needed? What problem does it solve? -->\r\nSee the confused deputy consideration here:\r\nhttps://github.com/modelcontextprotocol/modelcontextprotocol/blob/c255349bd98d9dc73f3579c828d195bd09c0bee8/docs/specification/draft/basic/security_best_practices.mdx#21-confused-deputy-problem\r\n\r\nIn the example, we front the Github API, so we need to put a consent screen for each new client registration, otherwise the Github consent screen will be skipped for new clients, creating a path for token leakage.\r\n\r\nStill TODO:\r\n- [ ] make the has_consent functions optional (currently every provider needs to implement them)\r\n- [ ] allow overriding consent handler (currently always uses the default one)\r\n- [ ] consider keeping consent handler abstract in the SDK, and putting example impl into the example directory\r\n\r\n\r\nHere's what the consent screen looks like:\r\n![CleanShot 2025-05-07 at 11 19 05@2x](https://github.com/user-attachments/assets/345ab87c-9a32-416e-b576-e39d1f8fa5ec)\r\n\r\n\r\n## How Has This Been Tested?\r\n<!-- Have you tested this in a real application? Which scenarios were tested? -->\r\nTested using inspector to run through auth flow\r\n- [x] w/ consent required\r\n- [ ] w/o consent required\r\n\r\n## Breaking Changes\r\n<!-- Will users need to update their code or configurations? -->\r\n\r\n## Types of changes\r\n<!-- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->\r\n- [x] Bug fix (non-breaking change which fixes an issue)\r\n- [ ] New feature (non-breaking change which adds functionality)\r\n- [ ] Breaking change (fix or feature that would cause existing functionality to change)\r\n- [ ] Documentation update\r\n\r\n## Checklist\r\n<!-- Go over all the following points, and put an `x` in all the boxes that apply. -->\r\n- [x] I have read the [MCP Documentation](https://modelcontextprotocol.io)\r\n- [x] My code follows the repository's style guidelines\r\n- [ ] New and existing tests pass locally\r\n- [ ] I have added appropriate error handling\r\n- [ ] I have added or updated documentation as needed\r\n\r\n## Additional context\r\n<!-- Add any other context, implementation notes, or design decisions -->\r\n",
      "created_at": "2025-05-07T10:04:06Z",
      "updated_at": "2025-11-12T17:42:32Z",
      "closed_at": null,
      "merged_at": null,
      "merge_commit_sha": null,
      "assignee": null,
      "assignees": {},
      "requested_reviewers": {},
      "requested_teams": {},
      "labels": {
        "0": {
          "id": 9230425628,
          "node_id": "LA_kwDOM2n80s8AAAACJi0eHA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/needs%20more%20work",
          "name": "needs more work",
          "color": "af3f39",
          "default": false,
          "description": "Not ready to be merged yet, needs additional follow-up from the author(s)."
        }
      },
      "milestone": null,
      "draft": true,
      "head": {
        "label": "modelcontextprotocol:pcarleton/auth-confused-deputy",
        "ref": "pcarleton/auth-confused-deputy",
        "sha": "48eb13d0c459a7abf6362b9926b727715d7e286b",
        "user": {
          "login": "modelcontextprotocol",
          "id": 182288589,
          "node_id": "O_kgDOCt2AzQ",
          "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/modelcontextprotocol",
          "type": "Organization",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 862584018,
          "node_id": "R_kgDOM2n80g",
          "name": "python-sdk",
          "full_name": "modelcontextprotocol/python-sdk",
          "private": false,
          "owner": {
            "login": "modelcontextprotocol",
            "id": 182288589,
            "node_id": "O_kgDOCt2AzQ",
            "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/modelcontextprotocol",
            "type": "Organization",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": false,
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk",
          "created_at": "2024-09-24T21:01:35Z",
          "updated_at": "2025-12-06T05:02:17Z",
          "pushed_at": "2025-12-04T18:04:06Z",
          "homepage": "https://modelcontextprotocol.github.io/python-sdk/",
          "size": 4194,
          "stargazers_count": 20439,
          "watchers_count": 20439,
          "language": "Python",
          "has_issues": true,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": true,
          "has_discussions": false,
          "forks_count": 2843,
          "archived": false,
          "disabled": false,
          "open_issues_count": 345,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 2843,
          "open_issues": 345,
          "watchers": 20439,
          "default_branch": "main"
        }
      },
      "base": {
        "label": "modelcontextprotocol:main",
        "ref": "main",
        "sha": "ed25167fa5d715733437996682e20c24470e8177",
        "user": {
          "login": "modelcontextprotocol",
          "id": 182288589,
          "node_id": "O_kgDOCt2AzQ",
          "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/modelcontextprotocol",
          "type": "Organization",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 862584018,
          "node_id": "R_kgDOM2n80g",
          "name": "python-sdk",
          "full_name": "modelcontextprotocol/python-sdk",
          "private": false,
          "owner": {
            "login": "modelcontextprotocol",
            "id": 182288589,
            "node_id": "O_kgDOCt2AzQ",
            "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/modelcontextprotocol",
            "type": "Organization",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": false,
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk",
          "created_at": "2024-09-24T21:01:35Z",
          "updated_at": "2025-12-06T05:02:17Z",
          "pushed_at": "2025-12-04T18:04:06Z",
          "homepage": "https://modelcontextprotocol.github.io/python-sdk/",
          "size": 4194,
          "stargazers_count": 20439,
          "watchers_count": 20439,
          "language": "Python",
          "has_issues": true,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": true,
          "has_discussions": false,
          "forks_count": 2843,
          "archived": false,
          "disabled": false,
          "open_issues_count": 345,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 2843,
          "open_issues": 345,
          "watchers": 20439,
          "default_branch": "main"
        }
      },
      "_links": {
        "self": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/648"
        },
        "html": {
          "href": "https://github.com/modelcontextprotocol/python-sdk/pull/648"
        },
        "issue": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/648"
        },
        "comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/648/comments"
        },
        "review_comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/648/comments"
        },
        "review_comment": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/comments{/number}"
        },
        "commits": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/648/commits"
        },
        "statuses": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/statuses/48eb13d0c459a7abf6362b9926b727715d7e286b"
        }
      },
      "author_association": "MEMBER",
      "auto_merge": null,
      "active_lock_reason": null,
      "linked_issues": [
        2
      ]
    },
    {
      "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/628",
      "id": 2497516178,
      "node_id": "PR_kwDOM2n80s6U3RKS",
      "number": 628,
      "state": "open",
      "locked": false,
      "title": "Sending cancellation notification to server based on client anyio.CancelScope status",
      "user": {
        "login": "davemssavage",
        "id": 349016,
        "node_id": "MDQ6VXNlcjM0OTAxNg==",
        "avatar_url": "https://avatars.githubusercontent.com/u/349016?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/davemssavage",
        "type": "User",
        "user_view_type": "public",
        "site_admin": false
      },
      "body": "## Motivation and Context\r\nMCP 2025-03-26 introduces a cancellation notification [1] this patch simplifies the usage of this function for the ClientSession by using the anyio.CancelScope as a trigger to send the cancellation notification and is a potential fix for https://github.com/modelcontextprotocol/python-sdk/issues/160\r\n\r\n## How Has This Been Tested?\r\nAdded unit tests to assert behaviour and tidied up previous work around for lack of this behaviour in tests/shared/test_session.py#test_request_cancellation\r\n\r\n## Breaking Changes\r\nThis patch sends a CancelNotification to any in flight requests to the server at the point the client is cancelled.\r\nClients that would have expected calls to complete on the server regardless of status of cancel scope on the client will need to be updated. \r\n\r\nAs a work around for any clients where this behavior is not desired this patch adds a cancellable flag to send_request and call_tool to enable clients to opt out of this behaviour so server tasks must respond prior to exitting. \r\n\r\nThis cancellable=False behaviour is required for the initialised call from the client as described in [1] though this does open up a raft of questions on what is supposed to happen if the initialised call blocks on the server. A timeout on the client might be appropriate however this opens up follow on questions on what subsequent behaviour should be after an initialisation timeout. \r\n\r\nThis approach of a breaking change is suggested as author expects in general most clients would prefer to cancel an expensive server tasks if client is cancelled and initialisation tasks are expected to be quick and non-blocking on the server.\r\n\r\n## Types of changes\r\n<!-- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->\r\n- [ ] Bug fix (non-breaking change which fixes an issue)\r\n- [ ] New feature (non-breaking change which adds functionality)\r\n- [x] Breaking change (fix or feature that would cause existing functionality to change)\r\n- [ ] Documentation update\r\n\r\n## Checklist\r\n<!-- Go over all the following points, and put an `x` in all the boxes that apply. -->\r\n- [x] I have read the [MCP Documentation](https://modelcontextprotocol.io)\r\n- [x] My code follows the repository's style guidelines\r\n- [x] New and existing tests pass locally\r\n- [x] I have added appropriate error handling\r\n- [x] I have added or updated documentation as needed\r\n\r\n## Additional context\r\nI've added a docstring to describe the behaviour to send request. I suspect wider documentation updates would be sensible, I'm happy to write something if this patch looks useful.\r\n\r\nIt might also be useful to separate out the idea of client cancelation with server cancelation such that a client can cancel its work but leave the server task running. Comments on the pull request on the best approach is probably necessary.\r\n\r\n[1] https://modelcontextprotocol.io/specification/2025-03-26/basic/utilities/cancellation",
      "created_at": "2025-05-04T21:45:44Z",
      "updated_at": "2025-11-12T17:42:33Z",
      "closed_at": null,
      "merged_at": null,
      "merge_commit_sha": null,
      "assignee": null,
      "assignees": {},
      "requested_reviewers": {},
      "requested_teams": {},
      "labels": {
        "0": {
          "id": 9230425628,
          "node_id": "LA_kwDOM2n80s8AAAACJi0eHA",
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk/labels/needs%20more%20work",
          "name": "needs more work",
          "color": "af3f39",
          "default": false,
          "description": "Not ready to be merged yet, needs additional follow-up from the author(s)."
        }
      },
      "milestone": null,
      "draft": true,
      "head": {
        "label": "davemssavage:cancellation",
        "ref": "cancellation",
        "sha": "64a2ae084aafccb357022566ef2167f9b605e5b1",
        "user": {
          "login": "davemssavage",
          "id": 349016,
          "node_id": "MDQ6VXNlcjM0OTAxNg==",
          "avatar_url": "https://avatars.githubusercontent.com/u/349016?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/davemssavage",
          "type": "User",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 977630790,
          "node_id": "R_kgDOOkV2Rg",
          "name": "python-sdk",
          "full_name": "davemssavage/python-sdk",
          "private": false,
          "owner": {
            "login": "davemssavage",
            "id": 349016,
            "node_id": "MDQ6VXNlcjM0OTAxNg==",
            "avatar_url": "https://avatars.githubusercontent.com/u/349016?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/davemssavage",
            "type": "User",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": true,
          "url": "https://api.github.com/repos/davemssavage/python-sdk",
          "created_at": "2025-05-04T16:35:11Z",
          "updated_at": "2025-08-16T12:53:48Z",
          "pushed_at": "2025-08-24T16:54:13Z",
          "homepage": "https://modelcontextprotocol.io",
          "size": 2008,
          "stargazers_count": 0,
          "watchers_count": 0,
          "language": "Python",
          "has_issues": false,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": false,
          "has_discussions": false,
          "forks_count": 0,
          "archived": false,
          "disabled": false,
          "open_issues_count": 0,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 0,
          "open_issues": 0,
          "watchers": 0,
          "default_branch": "main"
        }
      },
      "base": {
        "label": "modelcontextprotocol:main",
        "ref": "main",
        "sha": "794218433656554deff37477c0bef8cb7deb40f6",
        "user": {
          "login": "modelcontextprotocol",
          "id": 182288589,
          "node_id": "O_kgDOCt2AzQ",
          "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
          "gravatar_id": "",
          "url": "https://api.github.com/users/modelcontextprotocol",
          "type": "Organization",
          "user_view_type": "public",
          "site_admin": false
        },
        "repo": {
          "id": 862584018,
          "node_id": "R_kgDOM2n80g",
          "name": "python-sdk",
          "full_name": "modelcontextprotocol/python-sdk",
          "private": false,
          "owner": {
            "login": "modelcontextprotocol",
            "id": 182288589,
            "node_id": "O_kgDOCt2AzQ",
            "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/modelcontextprotocol",
            "type": "Organization",
            "user_view_type": "public",
            "site_admin": false
          },
          "description": "The official Python SDK for Model Context Protocol servers and clients",
          "fork": false,
          "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk",
          "created_at": "2024-09-24T21:01:35Z",
          "updated_at": "2025-12-06T05:02:17Z",
          "pushed_at": "2025-12-04T18:04:06Z",
          "homepage": "https://modelcontextprotocol.github.io/python-sdk/",
          "size": 4194,
          "stargazers_count": 20439,
          "watchers_count": 20439,
          "language": "Python",
          "has_issues": true,
          "has_projects": true,
          "has_downloads": true,
          "has_wiki": false,
          "has_pages": true,
          "has_discussions": false,
          "forks_count": 2843,
          "archived": false,
          "disabled": false,
          "open_issues_count": 345,
          "license": {
            "key": "mit",
            "name": "MIT License",
            "spdx_id": "MIT",
            "url": "https://api.github.com/licenses/mit",
            "node_id": "MDc6TGljZW5zZTEz"
          },
          "allow_forking": true,
          "is_template": false,
          "web_commit_signoff_required": false,
          "topics": {},
          "visibility": "public",
          "forks": 2843,
          "open_issues": 345,
          "watchers": 20439,
          "default_branch": "main"
        }
      },
      "_links": {
        "self": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/628"
        },
        "html": {
          "href": "https://github.com/modelcontextprotocol/python-sdk/pull/628"
        },
        "issue": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/628"
        },
        "comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/issues/628/comments"
        },
        "review_comments": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/628/comments"
        },
        "review_comment": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/comments{/number}"
        },
        "commits": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/pulls/628/commits"
        },
        "statuses": {
          "href": "https://api.github.com/repos/modelcontextprotocol/python-sdk/statuses/64a2ae084aafccb357022566ef2167f9b605e5b1"
        }
      },
      "author_association": "NONE",
      "auto_merge": null,
      "active_lock_reason": null,
      "linked_issues": []
    }
  ],
  "discussions": [],
  "details": {
    "id": 862584018,
    "node_id": "R_kgDOM2n80g",
    "name": "python-sdk",
    "full_name": "modelcontextprotocol/python-sdk",
    "private": false,
    "owner": {
      "login": "modelcontextprotocol",
      "id": 182288589,
      "node_id": "O_kgDOCt2AzQ",
      "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
      "gravatar_id": "",
      "url": "https://api.github.com/users/modelcontextprotocol",
      "type": "Organization",
      "user_view_type": "public",
      "site_admin": false
    },
    "description": "The official Python SDK for Model Context Protocol servers and clients",
    "fork": false,
    "url": "https://api.github.com/repos/modelcontextprotocol/python-sdk",
    "created_at": "2024-09-24T21:01:35Z",
    "updated_at": "2025-12-06T05:02:17Z",
    "pushed_at": "2025-12-04T18:04:06Z",
    "homepage": "https://modelcontextprotocol.github.io/python-sdk/",
    "size": 4194,
    "stargazers_count": 20439,
    "watchers_count": 20439,
    "language": "Python",
    "has_issues": true,
    "has_projects": true,
    "has_downloads": true,
    "has_wiki": false,
    "has_pages": true,
    "has_discussions": false,
    "forks_count": 2843,
    "archived": false,
    "disabled": false,
    "open_issues_count": 345,
    "license": {
      "key": "mit",
      "name": "MIT License",
      "spdx_id": "MIT",
      "url": "https://api.github.com/licenses/mit",
      "node_id": "MDc6TGljZW5zZTEz"
    },
    "allow_forking": true,
    "is_template": false,
    "web_commit_signoff_required": false,
    "topics": {},
    "visibility": "public",
    "forks": 2843,
    "open_issues": 345,
    "watchers": 20439,
    "default_branch": "main",
    "permissions": {
      "admin": false,
      "maintain": false,
      "push": false,
      "triage": false,
      "pull": true
    },
    "temp_clone_token": "",
    "custom_properties": {
      "repo_protection_L3": "true"
    },
    "organization": {
      "login": "modelcontextprotocol",
      "id": 182288589,
      "node_id": "O_kgDOCt2AzQ",
      "avatar_url": "https://avatars.githubusercontent.com/u/182288589?v=4",
      "gravatar_id": "",
      "url": "https://api.github.com/users/modelcontextprotocol",
      "type": "Organization",
      "user_view_type": "public",
      "site_admin": false
    },
    "network_count": 2843,
    "subscribers_count": 148
  },
  "lastFetched": 1765014517776
}