Bug Report
Description
When using kiro-cli chat --agent <name>, MCP servers do not load — neither from the agent JSON's mcpServers field nor from the global ~/.kiro/settings/mcp.json. Without --agent, the same mcp.json works correctly and all MCP tools appear.
Steps to Reproduce
- Configure
~/.kiro/settings/mcp.json:
{
"mcpServers": {
"my-server": {
"url": "http://localhost:8080/mcp",
"disabled": false
}
}
}
-
Create an agent config at .kiro/agents/my-agent.json with mcpServers also defined.
-
Run without --agent:
kiro-cli chat --no-interactive --trust-all-tools --require-mcp-startup "list your MCP tools"
Result: MCP tools from mcp.json are loaded and available. ✅
- Run with
--agent:
kiro-cli chat --agent my-agent --no-interactive --trust-all-tools --require-mcp-startup "list your MCP tools"
Result: MCP tools are NOT available. Agent only sees built-in tools (read, write, shell, etc.). ❌
Expected Behavior
MCP servers should load regardless of whether --agent is specified. The agent's mcpServers field and/or global mcp.json should both be respected.
Environment
- kiro-cli version: 2.11.1
- OS: macOS 26.5 (arm64) and macOS 13.7.8 (x86_64)
- MCP transport: Streamable HTTP (
url field, not command)
--require-mcp-startup flag has no effect when --agent is used
Additional Context
- The
--require-mcp-startup flag does not error or exit with code 3 when MCP fails to load with --agent — it silently proceeds without tools.
- The agent JSON's
tools array (listing built-in tools) and allowedTools array (listing MCP tool names) are both correctly configured.
- This affects non-interactive mode (
--no-interactive) which is critical for programmatic/bot use cases.
Bug Report
Description
When using
kiro-cli chat --agent <name>, MCP servers do not load — neither from the agent JSON'smcpServersfield nor from the global~/.kiro/settings/mcp.json. Without--agent, the samemcp.jsonworks correctly and all MCP tools appear.Steps to Reproduce
~/.kiro/settings/mcp.json:{ "mcpServers": { "my-server": { "url": "http://localhost:8080/mcp", "disabled": false } } }Create an agent config at
.kiro/agents/my-agent.jsonwithmcpServersalso defined.Run without
--agent:kiro-cli chat --no-interactive --trust-all-tools --require-mcp-startup "list your MCP tools"Result: MCP tools from
mcp.jsonare loaded and available. ✅--agent:kiro-cli chat --agent my-agent --no-interactive --trust-all-tools --require-mcp-startup "list your MCP tools"Result: MCP tools are NOT available. Agent only sees built-in tools (read, write, shell, etc.). ❌
Expected Behavior
MCP servers should load regardless of whether
--agentis specified. The agent'smcpServersfield and/or globalmcp.jsonshould both be respected.Environment
urlfield, notcommand)--require-mcp-startupflag has no effect when--agentis usedAdditional Context
--require-mcp-startupflag does not error or exit with code 3 when MCP fails to load with--agent— it silently proceeds without tools.toolsarray (listing built-in tools) andallowedToolsarray (listing MCP tool names) are both correctly configured.--no-interactive) which is critical for programmatic/bot use cases.