Skip to content

aws-pricing-mcp-server fails to connect on Windows (stdio JSON parse error) #3823

Description

@ManojRamani

Description

The awslabs.aws-pricing-mcp-server fails to establish an MCP connection when running on Windows 11 via Claude Code (CLI). The server process starts successfully but the JSON-RPC handshake fails with a Pydantic validation error related to empty input parsing.

Environment

  • OS: Windows 11 Enterprise 10.0.26100
  • Shell: Git Bash / PowerShell
  • MCP Client: Claude Code (CLI)
  • Package versions tested: @latest (1.0.31), @1.0.28, @1.0.20
  • Python: 3.12+ (via uvx)
  • AWS credentials: Valid (other awslabs MCP servers connect fine with the same profile)

Steps to Reproduce

  1. Configure ~/.claude/mcp.json:
{
  "mcpServers": {
    "aws-pricing-mcp-server": {
      "command": "uvx",
      "args": ["awslabs.aws-pricing-mcp-server@latest"],
      "env": {
        "AWS_PROFILE": "team-config",
        "AWS_REGION": "us-east-1"
      }
    }
  }
}
  1. Launch Claude Code on Windows
  2. The pricing server never appears in the available tools list

Error Output (manual launch)

Running manually in PowerShell:

$env:AWS_PROFILE="team-config"; $env:AWS_REGION="us-east-1"; uvx awslabs.aws-pricing-mcp-server@latest

Produces:

ERROR:mcp.server.lowlevel.server:Received exception from stream: 1 validation error for JSONRPCMessage
  Invalid JSON: EOF while parsing a value at line 2 column 0 [type=json_invalid, input_value='\n', input_type=str]
    For further information visit https://errors.pydantic.dev/2.13/v/json_invalid
{"method":"notifications/message","params":{"level":"error","logger":"mcp.server.exception_handler","data":"Internal Server Error"},"jsonrpc":"2.0"}

Expected Behavior

The server should connect and expose its pricing tools via MCP, as the other awslabs servers do (aws-api-mcp-server, aws-documentation-mcp-server, amazon-bedrock-agentcore-mcp-server) with the same configuration pattern on the same Windows machine.

Suspected Cause

Windows CRLF (\r\n) line endings on stdin may be causing the JSON-RPC message parser to fail. The error shows input_value='\n' suggesting the parser is receiving an empty/malformed line after splitting on \n but before stripping \r. The other awslabs servers likely handle this correctly.

Workaround

Using aws pricing get-products via the aws-api-mcp-server as a fallback for pricing queries.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status
    To triage

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions