aws / aws/amazon-q-developer-cli

All MCP servers fail to load: connection closed: initialize response (-32002)

Open
#3,744 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
2k
Forks
439
PR merge metrics
No merged PRs in 30d

Description

## Bug Report

**kiro-cli version:** 1.29.7 (latest, confirmed via `kiro-cli update`)
**OS:** macOS (Apple Silicon)
**Terminal:** iTerm2, launched via `kiro-cli chat`

## Problem

Every MCP server configured in `~/.kiro/settings/mcp.json` fails to initialize with the same error:

```
Error loading server {name}: McpError(ErrorData { code: ErrorCode(-32002), message: "connection closed: initialize response", data: None })
```

This affects **all 11 configured servers** — 0 out of 11 load successfully:
- Native binaries: `rize-mcp` (Zig), `elementor-mcp` (Rust), `pinchtab`
- npx-based: `@playwright/mcp`, `@modelcontextprotocol/server-memory`, `sequential-thinking`, `@drawio/mcp`, `@liuyoshio/mcp-compass`
- uvx-based: `duckduckgo-mcp-server`, `mcp-server-fetch`, `mcp_pdf_reader`
- docker-based: `github`

## Expected Behavior

MCP servers should initialize successfully. All servers respond correctly to the `initialize` JSON-RPC request when tested manually from the same terminal:

```bash
echo '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"test","version":"1"}}}' | ./rize-mcp
# Returns valid initialize response
```

## Log Output

From `$TMPDIR/kiro-log/kiro-chat.log` (pattern repeats every session):

```
Error loading server ddg-search: McpError(ErrorData { code: ErrorCode(-32002), message: "connection closed: initialize response", data: None })
Error loading server fetch: McpError(ErrorData { code: ErrorCode(-32002), message: "connection closed: initialize response", data: None })
Error loading server mcp-pdf-reader: McpError(ErrorData { code: ErrorCode(-32002), message: "connection closed: initialize response", data: None })
Error loading server playwright: McpError(ErrorData { code: ErrorCode(-32002), message: "connection closed: initialize response", data: None })
Error loading server pinchtab: McpError(ErrorData { code: ErrorCode(-32002), message: "connection closed: initialize response", data: None })
Error loading server github: McpError(ErrorData { code: ErrorCode(-32002), message: "connection closed: initialize response", data: None })
Error loading server memory: McpError(ErrorData { code: ErrorCode(-32002), message: "connection closed: initialize response", data: None })
Error loading server rize: McpError(ErrorData { code: ErrorCode(-32002), message: "connection closed: initialize response", data: None })
Error loading server mcp-for-page-builders: McpError(ErrorData { code: ErrorCode(-32002), message: "connection closed: initialize response", data: None })
Error loading server mcp-compass: McpError(ErrorData { code: ErrorCode(-32002), message: "connection closed: initialize response", data: None })
```

Also in macOS system log:
```
Trust evaluate failure: [leaf TemporalValidity]
```

## Additional Context

- `kiro-cli doctor` reports: "terminal integrations not running with latest version"
- All tools (npx, uvx, docker, native binaries) are in PATH and functional
- Process tree is clean: iTerm2 → zsh → kiro-cli → kiro-cli-chat
- Restarting terminal does not fix the issue
- The error occurs within ~3 seconds of startup for all servers

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.