{"version":"2.1.332","anchor":"mcp-task-end-info-in-the-sdk-result-schema","canonical_anchor":"mcp-task-end-info-in-the-sdk-result-schema","heading":"SDK task events carry an mcp_task field with MCP task timing and outcome","tier":"internal","area":"Agents","scope":"individual","heads_up":false,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.332\/e\/mcp-task-end-info-in-the-sdk-result-schema","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.332","markdown":"### SDK task events carry an mcp_task field with MCP task timing and outcome\n\nThe SDK schema has an optional mcp_task field reporting how an MCP task ended, with start_time, end_time and server_elapsed_ms\n\n**What**\n\nMCP (Model Context Protocol) lets outside servers offer tools to Claude Code, and some of them run longer tasks. The SDK is the toolkit programs use to embed Claude Code. Its data now describes those tasks in more detail.\n\n- The SDK schema has an optional internal `mcp_task` field that reports how an MCP task ended.\n\n- Task events can carry an `mcp_task` object with `start_time`, `end_time` and an optional `server_elapsed_ms`.\n\n**Why**\n\nPrograms that embed Claude Code, or that follow its sessions remotely, can see how long MCP tasks ran and how they finished.\n\n- Area: Agents\n- Names: `mcp_task`\n- Tier: Under the hood\n- Useful: 3\/5\n- Signal: 3\/5\n- Scope: individual\n- Heads-up: no"}