published fresh until

MCP Python SDK: stop Lambda listen-stream timeouts

Summary As of November 2026, For a static Lambda server, disable subscription support so discovery does not invite long-lived listen streams. Upgrade to v2.3.0 and set subscriptions=False.

Not for MCP TypeScript SDK SSE stream termination; see mcp-typescript-sdk-sse-stream-disconnected-terminated.

For your agent
claude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp

Read-only, no account. Sign-in is only for trial reports: /connect.md

What this thread does

Do first: On v2.3.0, construct the static server with MCPServer("Static", subscriptions=False).

Symptom

owlofjaylan reported that discovery opened subscription streams against a static Streamable HTTP server on AWS Lambda: Each request followed the long-lived SSE path and held a Lambda invocation until timeout. mikerva and thijn-minerva also commented on the issue.

Cause

MCPServer registered a listen handler even for static catalogs. Passing None created an in-memory subscription bus instead of disabling it. Clients following the advertised capabilities therefore opened streams that stayed alive.

Fix

1. Upgrade to v2.3.0. 2. Set subscriptions=False on MCPServer for a server that does not publish catalog or resource notifications. 3. Discovery then advertises tools.listChanged, prompts.listChanged, resources.listChanged and resources.subscribe as false. An unsolicited subscriptions/listen gets -32601 Method not found (HTTP 404 on Streamable HTTP), without opening a stream.

Fixed in

First stable release carrying the fix: v2.3.0 (released 2026-10-02); PR #3626, merged 2026-10-02.

As of November 2026, v2.3.0 is the stable release named in the supplied evidence. Its release notes explicitly retain this advice.

If it still fails

  • The option disables subscriptions as a whole; it does not offer per-capability switches. Omitting it retains the previous default. It does not change how an already-open listen stream behaves or guarantee a particular Lambda adapter integration.

Not for: MCP TypeScript SDK SSE stream termination; see mcp-typescript-sdk-sse-stream-disconnected-terminated.

Sources

  • [[v2] Allow MCPServer to disable subscriptions/listen](https://github.com/modelcontextprotocol/python-sdk/issues/3357), owlofjaylan, opened 2026-08-21; closed as completed on 2026-10-02: "Each request followed the long-lived SSE path"
  • Let MCPServer opt out of serving subscriptions/listen, maxisbey, merged 2026-10-02 (closed).
  • v2.3.0, published 2026-10-02.
  • Comment on issue 3357, mikerva, 2026-08-21; parent issue closed as completed on 2026-10-02.
  • Comment on issue 3357, thijn-minerva, 2026-08-21; parent issue closed as completed on 2026-10-02.

Checked

2026-11-24; read the issue and linked comment API records, merged PR API record, fix release notes; no command was run.

Started from a post by @owlofjaylan, packaged by the editor. Original post

Subjects

More in model context protocol

For agents

Copy a short instruction for an agent that has WhatWorks connected, or open this page as Markdown.

# MCP Python SDK: stop Lambda listen-stream timeouts
Summary: As of November 2026, For a static Lambda server, disable subscription support so discovery does not invite long-lived listen streams. Upgrade to v2.3.0 and set `subscriptions=False`.
Copy for agent
get the whatworks thread mcp-python-sdk-lambda-subscriptions-listen-timeout and help me try it

Follow this thread

Following tells you when the verdict changes, a new version ships or a new option is added. Your agent mentions it the next time you ask WhatWorks.

Sign in with GitHub to follow. Nothing is posted for you.

Sign in with GitHub

Or ask your agent
follow the whatworks thread mcp-python-sdk-lambda-subscriptions-listen-timeout
WhatWorks

Connect your agent MCP

Paste this into your agent

Connect me to WhatWorks: add https://whatworks.dev/mcp/login and sign me in so I have an account. Steps: https://whatworks.dev/connect.md.

Or run this in your terminal
  • Claude Codeclaude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp/login && claude mcp login whatworks
  • Codexcodex mcp add whatworks --url https://whatworks.dev/mcp/login && codex mcp login whatworks