Skip to content

V2 TUI sends empty mcpServers[] to ACP — MCP servers never load in new TUI mode #3814

@ebenayas

Description

@ebenayas

Summary

MCP servers defined in ~/.kiro/settings/mcp.json never load when using the V2 TUI (default mode). They work correctly with --classic and
--no-interactive.

Version

kiro-cli 2.4.1, Linux x86_64

Root Cause

The TUI (bun/tui.js) sends mcpServers: [] in the session/new ACP request, even when:

  • ~/.kiro/settings/mcp.json defines servers
  • The agent config has includeMcpJson: true
  • --require-mcp-startup is passed on the command line

Evidence (ACP wire trace via KIRO_ACP_RECORD_PATH)

The session/new request sent by TUI to ACP:
{"method":"session/new","params":{"cwd":"/path","mcpServers":[]}}

The mcpServers array is empty. The ACP never receives the server definitions.

Reproduction

  1. Define MCP servers in ~/.kiro/settings/mcp.json (stdio/docker type)
  2. Create agent with includeMcpJson: true
  3. Run: kiro-cli chat --agent my-agent --require-mcp-startup
  4. Ask the agent: do you have MCP tools?
  5. Agent says NO — no MCP tools available
  6. No docker containers spawned for MCP servers

Workaround

Use --classic flag:
kiro-cli chat --agent my-agent --require-mcp-startup --classic

Classic mode loads MCPs correctly (shows 4 of 4 mcp servers initialized).

Process tree comparison

Default TUI (broken):
kiro-cli-chat chat --require-mcp-startup
-> bun tui.js
-> kiro-cli-chat acp (NO docker children, NO MCP)

Classic mode (works):
kiro-cli-chat chat --require-mcp-startup --classic
-> docker (mcp-server-1)
-> docker (mcp-server-2)
-> docker (mcp-server-3)
-> docker (mcp-server-4)

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions