Skip to content

HTTP MCP client does not negotiate Accept header correctly #2

Description

@WangSimiao2000

Summary

Atman v1.10.0 cannot connect to an HTTP MCP server that requires the client to advertise both application/json and text/event-stream in the Accept header.

Environment

  • Atman: v1.10.0
  • Transport: HTTP MCP
  • Server: MCP server using JSON responses and SSE responses

Steps to reproduce

  1. Configure an HTTP MCP server in ~/.config/atman/mcp_servers.json with type: "http", url, and custom headers.
  2. Set the server's Accept header to application/json, text/event-stream.
  3. Run atman mcp test <server>.

Expected behavior

Atman sends an HTTP request whose Accept header includes both media types, and the MCP server completes initialization.

Actual behavior

The server returns:

406 Not Acceptable: Client must accept both application/json and text/event-stream

The same endpoint succeeds when called with a standalone MCP client that explicitly sends Accept: application/json, text/event-stream, so the endpoint and credentials are valid. Adding Accept under the configured headers does not appear to affect Atman's initialization request.

Impact

HTTP MCP servers with this negotiation requirement cannot be used directly from Atman. A local stdio bridge that forwards the request with the correct Accept header is currently required as a workaround.

Suggested investigation

Ensure the HTTP MCP transport applies configured headers, or otherwise always advertises both application/json and text/event-stream during MCP initialization and subsequent requests.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions