Skip to content

aws-knowledge-mcp-server: ping returns Error from MCP server: Invalid request - Malformed JSON-RPC request #925

@georgenmatthew

Description

@georgenmatthew

Describe the bug

I am attempting to configure LibreChat (https://github.com/danny-avila/LibreChat) to use the AWS Knowledge MCP Server, but it fails to initialize.

I previously opened a bug report on the LibreChat repository, and after troubleshooting it seems that the aws-knowledge-mcp-server is lacking support for ping. Ping requests are not handled gracefully by the MCP server, resulting in a Malformed JSON-RPC request error and failing to initialize with LibreChat.

This error is also reproducible using the npx @modelcontextprotocol/inspector tool.

Expected Behavior

aws-knowledge-mcp-server should support ping and work with LibreChat.
If ping support is not planned, ping requests should be handled gracefully by the MCP server and not return a Malformed JSON-RPC request error.

Current Behavior

$ npx @modelcontextprotocol/inspector
Starting MCP inspector...
⚙️ Proxy server listening on 127.0.0.1:6277
🔑 Session token: [redacted]
Use this token to authenticate requests or set DANGEROUSLY_OMIT_AUTH=true to disable auth

🔗 Open inspector with token pre-filled:
   http://localhost:6274/?MCP_PROXY_AUTH_TOKEN=[redacted]

🔍 MCP Inspector is up and running at http://127.0.0.1:6274 🚀
New StreamableHttp connection request
Query parameters: {"url":"https://knowledge-mcp.global.api.aws","transportType":"streamable-http"}
Created StreamableHttp server transport
Created StreamableHttp client transport
Client <-> Proxy  sessionId: [redacted]
Received POST message for sessionId [redacted]
Received GET message for sessionId [redacted]
Error from MCP server: StreamableHTTPError: Streamable HTTP error: Failed to open SSE stream: Not Found
    at StreamableHTTPClientTransport._startOrAuthSse (file:///C:/Users/user/AppData/Local/npm-cache/_npx/.../node_modules/@modelcontextprotocol/sdk/dist/esm/client/streamableHttp.js:99:23)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
  code: 404
}
Error from MCP server: StreamableHTTPError: Streamable HTTP error: Failed to open SSE stream: Not Found
    at StreamableHTTPClientTransport._startOrAuthSse (file:///C:/Users/user/AppData/Local/npm-cache/_npx/.../node_modules/@modelcontextprotocol/sdk/dist/esm/client/streamableHttp.js:99:23)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
  code: 404
}
Received POST message for sessionId [redacted]
Error from MCP server: Error: Error POSTing to endpoint (HTTP 400): {"jsonrpc":"2.0","id":"1.0","error":{"code":-32600,"message":"Invalid request - Malformed JSON-RPC request"}}
    at StreamableHTTPClientTransport.send (file:///C:/Users/user/AppData/Local/npm-cache/_npx/.../node_modules/@modelcontextprotocol/sdk/dist/esm/client/streamableHttp.js:284:23)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

Reproduction Steps

  1. Use npx @modelcontextprotocol/inspector to connect to https://knowledge-mcp.global.api.aws as streamable-http MCP server.
  2. Attempt to send ping.
  3. Observe error:
Error from MCP server: Error: Error POSTing to endpoint (HTTP 400): {"jsonrpc":"2.0","id":"1.0","error":{"code":-32600,"message":"Invalid request - Malformed JSON-RPC request"}}

Possible Solution

AWS Knowledge MCP Server should support ping and work with LibreChat.
If ping support is not planned, ping requests should be handled gracefully by the MCP server and not return a Malformed JSON-RPC request error.

Additional Information/Context

No response

OS

Windows

Server

other

Server Version

aws-knowledge-mcp-server

Region experiencing the issue

us-east-1

Other information

No response

Service quota

  • I have reviewed the service quotas for this construct

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions