# CLI-058 Tasks — MCP Streamable HTTP client

Spec: `.agents/spec-docs/active/CLI-058-mcp-http-client.md`

- [x] T1 (TC-01): mcp-protocol — spec-conformant `tools/call` params (`name`/`arguments`), `sendMCPRequest` (fetch POST, JSON/SSE parse, Mcp-Session-Id), `initializeMCPSession` handshake
- [x] T2 (TC-03): timeout via AbortSignal + bounded retries (network/5xx only, linear backoff)
- [x] T3 (TC-02): mcp-tool — execute() throws ToolExecutionError on JSON-RPC error / isError result (success-masking removed)
- [x] T4 (TC-05): real connection lifecycle — handshake-backed status transitions, disconnect() DELETE + state clear
- [x] T5 (TC-04): mock MCP server fixture (node:http) with header/body capture; integration tests for handshake, headers/apiKey, session echo, DELETE
- [x] T6 (TC-06): SPEC.md rewrite (protocol/lifecycle/error/test sections); build/typecheck/lint/test green
- [x] T7: backlog CLI-058 evidence recording
