Title: bug: MCP server - SSE connection from Claude Code CLI drops after ≈ 5 min idle – “Body Timeout Error” · Issue #2134 · triggerdotdev/trigger.dev · GitHub
Open Graph Title: bug: MCP server - SSE connection from Claude Code CLI drops after ≈ 5 min idle – “Body Timeout Error” · Issue #2134 · triggerdotdev/trigger.dev
X Title: bug: MCP server - SSE connection from Claude Code CLI drops after ≈ 5 min idle – “Body Timeout Error” · Issue #2134 · triggerdotdev/trigger.dev
Description: Provide environment information System: OS: Linux 6.1 Debian GNU/Linux 12 (bookworm) 12 (bookworm) CPU: (8) x64 Intel(R) Xeon(R) CPU @ 2.80GHz Memory: 28.92 GB / 31.35 GB Container: Yes Shell: 5.2.15 - /bin/bash Binaries: Node: 22.13.0 -...
Open Graph Description: Provide environment information System: OS: Linux 6.1 Debian GNU/Linux 12 (bookworm) 12 (bookworm) CPU: (8) x64 Intel(R) Xeon(R) CPU @ 2.80GHz Memory: 28.92 GB / 31.35 GB Container: Yes Shell: 5.2....
X Description: Provide environment information System: OS: Linux 6.1 Debian GNU/Linux 12 (bookworm) 12 (bookworm) CPU: (8) x64 Intel(R) Xeon(R) CPU @ 2.80GHz Memory: 28.92 GB / 31.35 GB Container: Yes Shell: 5.2....
Opengraph URL: https://github.com/triggerdotdev/trigger.dev/issues/2134
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"bug: MCP server - SSE connection from Claude Code CLI drops after ≈ 5 min idle – “Body Timeout Error”","articleBody":"### Provide environment information\n\n\n System:\n OS: Linux 6.1 Debian GNU/Linux 12 (bookworm) 12 (bookworm)\n CPU: (8) x64 Intel(R) Xeon(R) CPU @ 2.80GHz\n Memory: 28.92 GB / 31.35 GB\n Container: Yes\n Shell: 5.2.15 - /bin/bash\n Binaries:\n Node: 22.13.0 - ~/miniforge3/bin/node\n Yarn: 1.22.22 - /usr/bin/yarn\n npm: 10.9.2 - ~/miniforge3/bin/npm\n\n### Describe the bug\n\nWhen Claude Code CLI connects to a local Trigger.dev MCP server, the Server-Sent Events (SSE) stream is closed after ~5 minutes of inactivity.\nOnce closed, every MCP call fails until the Claude CLI process is restarted (Trigger.dev server itself does not need a restart).\n\n```\nMCP server \"triggerdev\" Error: SSE error: TypeError: terminated: Body Timeout Error\n```\n\n**Expected**\nThe SSE control channel should stay open indefinitely so the CLI can send tasks even after long idle periods.\n\n**Likely cause**\nMost HTTP servers/proxies close an SSE response that stays silent for several minutes. Because the Trigger.dev MCP endpoint sends no keep-alive heartbeat while idle, the connection hits this idle “body timeout” and terminates.\n\n### Reproduction repo\n\nNone\n\n### To reproduce\n\nStart Trigger.dev MCP server locally\n\ntrigger dev --mcp # or equivalent command\n\nIn another terminal, run\n\nclaude --mcp-debug\n\nExecute any MCP command → it succeeds.\n\nLeave the session idle for ~5 minutes.\n\nRun another MCP command.\nActual: CLI logs the error above and the command fails.\nWork-around: Restarting claude --mcp-debug restores functionality.\n\n### Additional information\n\n\u003chtml>\n\u003cbody>\n\u003c!--StartFragment-->\u003cp data-start=\"2391\" data-end=\"2519\">\u003cem data-start=\"2391\" data-end=\"2406\">Proposed fix:\u003c/em> Send a periodic SSE heartbeat/keep-alive (e.g. \u003ccode data-start=\"2454\" data-end=\"2471\">: keepalive\\n\\n\u003c/code>) every ≤ 30 s so the stream never appears idle.\u003c/p>\n\u003cp data-start=\"2521\" data-end=\"2551\">\u003cstrong data-start=\"2521\" data-end=\"2551\">Related discussions & bugs\u003c/strong>\u003c/p>\n\u003cdiv class=\"_tableContainer_16hzy_1\">\u003cdiv tabindex=\"-1\" class=\"_tableWrapper_16hzy_14 group flex w-fit flex-col-reverse\">\nSource | Note\n-- | --\nanthropics/claude-code #424 | Long MCP tasks hit timeout; mentions same Body Timeout and need for heartbeats\nmodelcontextprotocol/typescript-sdk #270 | SSE closed after 300 s idle; fixed by adding keep-alive ping\nCursor Community thread (Apr 2025) | Users report identical error; resolved by sending : keepalive comments\nFigma MCP Server issue #41 | Maintainers confirm adding SSE ping prevents Body Timeout disconnects\n\n\u003c/div>\u003c/div>\u003c!--EndFragment-->\n\u003c/body>\n\u003c/html>","author":{"url":"https://github.com/mulyoved","@type":"Person","name":"mulyoved"},"datePublished":"2025-06-01T10:42:14Z","url":"https://github.com/triggerdotdev/trigger.dev/issues/2134"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:e7b4cd24-1149-5cd6-7528-fd03417a7b87 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8150:37ACD:48B334:6B5A95:6AFAE89A |
| html-safe-nonce | 7dd4527d5152ff6fb9c75f708f6eb38d373ccffdecf2c391ed747d1b506805d7 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4MTUwOjM3QUNEOjQ4QjMzNDo2QjVBOTU6NkFGQUU4OUEiLCJ2aXNpdG9yX2lkIjoiNjYwMDA3Mjc1ODA0NDU4NDA5MCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 07a0906a67d04064b6bf6c1c9fa6cbf669cf7f5b2dee69310f06aa1f38cfbb98 |
| hovercard-subject-tag | issue:3107045954 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/triggerdotdev/trigger.dev/2134/issue_layout |
| twitter:image | https://opengraph.githubassets.com/41431bf74b4ef0b5604a674861b520c32c1b6ccd883b8737f2eba4e6dbb09907/triggerdotdev/trigger.dev/issues/2134 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/41431bf74b4ef0b5604a674861b520c32c1b6ccd883b8737f2eba4e6dbb09907/triggerdotdev/trigger.dev/issues/2134 |
| og:image:alt | Provide environment information System: OS: Linux 6.1 Debian GNU/Linux 12 (bookworm) 12 (bookworm) CPU: (8) x64 Intel(R) Xeon(R) CPU @ 2.80GHz Memory: 28.92 GB / 31.35 GB Container: Yes Shell: 5.2.... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | mulyoved |
| hostname | github.com |
| expected-hostname | github.com |
| None | 0178036d8230524a18422872393ab7e708443ae4c2047f758560a2db870c1913 |
| turbo-cache-control | no-preview |
| go-import | github.com/triggerdotdev/trigger.dev git https://github.com/triggerdotdev/trigger.dev.git |
| octolytics-dimension-user_id | 95297378 |
| octolytics-dimension-user_login | triggerdotdev |
| octolytics-dimension-repository_id | 572570113 |
| octolytics-dimension-repository_nwo | triggerdotdev/trigger.dev |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 572570113 |
| octolytics-dimension-repository_network_root_nwo | triggerdotdev/trigger.dev |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 12fff95459b24b0f882a66698ee6a36a5934d247 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width