aws / aws/amazon-q-developer-cli

bug: MCP client expects session id from server when spec says it is optional.

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

Description

### Checks

- [x] I have searched [github.com/aws/amazon-q-developer-cli/issues](https://github.com/aws/amazon-q-developer-cli/issues?q=) and there are no duplicates of my issue
- [x] I have run `q doctor` in the affected terminal session
- [x] I have run `q restart` and replicated the issue again

### Operating system

MacOS

### Expected behaviour

Connecting to an HTTP MCP server should work regardless of the implementation of a header session id.

https://modelcontextprotocol.io/specification/2025-06-18/basic/transports#session-management

### Actual behaviour

Amazon Q cannot connect to MCP servers that do not offer a session id in their response headers.

### Steps to reproduce

Create an HTTPS transport MCP server that does not create or return a header of Mcp-Session-Id to the MCP client. Try to connect to this MCP server, it will fail with a message like
`worker quit with fatal: Missing session id in HTTP response, when process initialize response`
and
`McpError(ErrorData { code: ErrorCode(-32002), message: "connection closed: initialize response", data: None })`

### Environment

```yaml

```

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.