Connect Claude Code to tools via MCP changedmcp
Nearest release: v2.1.330, published 4 hours before upstream edited the page. Shown because the two are within 24 hours of each other. Nothing here says the release caused the edit.
Upstream edited this page at 20 Nov 2026 23:31 UTC, give or take a minute or two: the time comes from Anthropic’s own sitemap rather than from a commit. This site recorded the change at 20 Nov 2026 23:37 UTC.
Upstream edited
Recorded here
Lines+15added
Lines−3removed
From line
500
where the diff opens
First seen
14 Aug 2026
this site's first read of the page
Recorded edits118to this page, all time
#### Choose a time to live and a poll interval
The whole hunk
from line 500, old and new numbered
/
from line 500
500500
501501> [!NOTE]
502502>
503> MCP tasks are in public beta in the Claude Code CLI and require Claude Code v2.1.304 or later. [What a call needs to become an MCP task](#requirements-for-mcp-tasks) lists the sessions and servers that get them.
503> MCP tasks are in public beta and require Claude Code v2.1.304 or later. [What a call needs to become an MCP task](#requirements-for-mcp-tasks) lists the sessions and servers that get them.
504504
505505#### Stop an MCP task or get its result
506506
from line 541
541541* The server supports tasks
542542* The server is an HTTP, stdio, or claude.ai connector server connected on [protocol revision 2026-07-28](#mcp-client-runtimes). Setting [`MCP_SDK_GENERATION=v1` or `MCP_PROTOCOL_NEGOTIATION=legacy`](https://code.claude.com/docs/en/env-vars) rules that out
543543* The session [fetches feature flags](https://code.claude.com/docs/en/env-vars.md#features-that-need-feature-flag-fetching), so not on a third-party provider such as Amazon Bedrock, and not with telemetry or flag fetching turned off
544* Anthropic has turned MCP tasks on for your kind of session. On v2.1.304 or later that covers terminal CLI sessions, [Agent SDK](https://code.claude.com/docs/en/agent-sdk/overview.md) sessions, and [GitHub Actions](https://code.claude.com/docs/en/github-actions.md) runs. Other surfaces, such as the [VS Code extension](https://code.claude.com/docs/en/vs-code.md) and the [desktop app](https://code.claude.com/docs/en/desktop.md), don't have MCP tasks
544* Anthropic has turned MCP tasks on for your kind of session:
545 * Terminal CLI sessions, [Agent SDK](https://code.claude.com/docs/en/agent-sdk/overview.md) sessions, and [GitHub Actions](https://code.claude.com/docs/en/github-actions.md) runs have them on v2.1.304 or later
546 * [Cloud sessions](https://code.claude.com/docs/en/claude-code-on-the-web.md), including ones you open in the desktop app, have them only if Anthropic has turned them on for your account or organization. You can't turn them on or look up their state in a setting
547 * Some other Claude Code surfaces, such as the [VS Code extension](https://code.claude.com/docs/en/vs-code.md) and local sessions in the [desktop app](https://code.claude.com/docs/en/desktop.md), don't have them
545548* The call comes from the main conversation, not from a [subagent](https://code.claude.com/docs/en/sub-agents.md)
546549* Either the session is interactive, or an [Agent SDK](https://code.claude.com/docs/en/agent-sdk/overview.md) session or a `claude -p` run reading `--input-format stream-json` has:
547550 * [`CLAUDE_AUTO_BACKGROUND_TASKS`](https://code.claude.com/docs/en/env-vars) at `1`
from line 612
609612 "createdAt": "2026-10-22T14:03:07Z",
610613 "lastUpdatedAt": "2026-10-22T14:03:07Z",
611614 "ttlMs": null,
612 "pollIntervalMs": 5000
615 "pollIntervalMs": 10000
613616}
614617```
615618
from line 659
656659| JSON-RPC error `-32602` | Read as an unknown task ID. For a task in the background, Claude Code keeps asking for up to five minutes, then reports the outcome to Claude as unknown |
657660| `tasks/cancel` | Sent, for example, when Claude or the person stops the task while the server is connected. Not sent on exit |
658661| `tasks/result`, `tasks/list`, `notifications/tasks` | Not used, so put the outcome in your `tasks/get` responses |
662
663#### Choose a time to live and a poll interval
664
665Keep a finished task's result for at least an hour, and longer if you can. A person can exit while a remote server's task runs and [resume the session](#exit-clear-or-resume-while-an-mcp-task-runs) later. Claude then gets the result only if your server still knows the task.
666
667Set `ttlMs` and `pollIntervalMs`, both in milliseconds, in your `tools/call` answer and your `tasks/get` responses:
668
669* **`ttlMs`**: report how long your server keeps the task, counted from the task's creation. Send your longest run time plus the time you keep the result, such as `5400000` for a 30-minute job and one hour. Send `null` if your server keeps tasks with no time limit
670* **`pollIntervalMs`**: send 10000 to 30000 for a job that runs longer than a minute, so your server answers fewer status checks. For a shorter job, send 2000 so Claude gets the result sooner
659671
660672### Plugin-provided MCP servers
661673
No line in this hunk matches that.