fix: use HTTP MCP server for Kiro 2.14.1+ so @agentbridge tools load#949
Conversation
Kiro 2.14.1 advertises mcpCapabilities.http at ACP initialize but silently ignores stdio MCP servers passed over session/new, so no @AgentBridge tools load and the agent is left with only web_fetch/web_search. Add buildMcpHttpServer()/advertisesHttpMcp() to AcpClient and make KiroClient.customizeNewSession() send an HTTP MCP server pointing at the already-running in-IDE McpHttpServer. The HTTP MCP entry must include a `headers` ARRAY (even when empty). Kiro 2.14.1's session/new parser rejects an entry without it — or with `headers` as an object — by exiting cleanly (exit 0, no error), which kills the whole session before any MCP connection is attempted. This was verified empirically by driving kiro-cli 2.14.1 over ACP: with headers:[] Kiro emits kiro.dev/mcp/server_initialized: agentbridge and loads all tools. Version-gate the transport as a conservative safeguard: older Kiro (e.g. 2.10.0) also advertises mcpCapabilities.http:true and was observed to crash on session/new, but only ever with the earlier headerless payload; it was not re-verified with the corrected shape. So HTTP is used only for Kiro >= 2.14.1 (verified working) and older versions fall back to the stdio transport, which keeps the session alive (without @AgentBridge tools) — no worse than before. Fixes catatafishen#948 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
|
Thanks, I appreciate the help! As a side note, I can no longer verify Kiro end to end. My account got banned for “suspicious activity,” and when I created a new one with another email, the same thing happened after a few days. I guess they’re quite sensitive to ACP-related testing, so it’s probably worth being careful when trying things out. |

Summary
Fixes #948.
In Kiro CLI sessions, only `web_fetch`/`web_search` were available — none of the `@agentbridge/` MCP tools loaded, leaving the agent with effectively no IDE/file tools.
Root cause
Kiro 2.14.1 advertises `mcpCapabilities: { http: true, sse: false }` during ACP `initialize`, but `KiroClient.customizeNewSession()` injected a stdio MCP server via `buildMcpStdioServer()`. Kiro 2.14.1 silently ignores stdio MCP servers passed over ACP, so `_kiro.dev/mcp/server_initialized` never fired and no tools loaded.
Switching to an HTTP MCP server (pointing at the already-running `McpHttpServer`) surfaced a second, subtler bug: Kiro's `session/new` parser requires the HTTP server entry to carry a `headers` field as a JSON array (even empty `[]`). Without it — or with `headers` as an object — Kiro exits cleanly (exit code 0, no stderr, never connecting to MCP) the instant it parses `session/new`, killing the whole session.
The correct shape is:
```json
{"type":"http","name":"agentbridge","url":"http://127.0.0.1:/mcp","headers":[]}
```
The fix
Verification