mcp-pingpong

jhinrichsen/mcp-pingpong

3.2

If you are the rightful owner of mcp-pingpong and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to dayong@mcphub.com.

The MCP PingPong server is a minimal implementation designed to test the Streamable HTTP protocol for LLM agents and MCP clients.

Tools
1
Resources
0
Prompts
0

= mcp-pingpong :toc: :toc-placement!:

A minimal MCP (Model Context Protocol) server that implements only the Streamable HTTP protocol.

toc::[]

== Purpose

This server exists specifically to verify that LLM agents and MCP clients properly support the Streamable HTTP transport protocol introduced in March 2025.

=== Supported Protocol

  • Streamable HTTP (POST-based messaging)

=== Explicitly NOT Supported

  • stdio transport
  • HTTP/SSE (Server-Sent Events) transport

The server will return 405 Method Not Allowed for GET requests (used by SSE) to ensure clients use Streamable HTTP exclusively.

== Building

[source,bash]

make build

This will create a binary with version information from git tags.

== Running

[source,bash]

./mcp-pingpong

Options:

  • --protocol - Protocol (default: "http")
  • --server - Listen address (default: "localhost")
  • --port - Listen port (default: 8081)
  • --version - Show version and exit

The server will be available at http://localhost:8081/mcp (and also at root /).

== MCP Tool

The server provides a single tool:

=== ping

A simple ping tool that echoes an optional message and returns a server timestamp.

Input:

  • msg (optional): Message to echo back

Output:

  • pong: The echoed message or "pong" if no message provided
  • time: RFC3339 UTC timestamp from the server

== Testing

=== With MCP Clients

Add to a client that supports Streamable HTTP:

  • Claude Code / Desktop (remote MCP over HTTP):

[source,bash]

claude mcp add -t http ping-http http://localhost:8081

  • LM Studio: Add a remote MCP server pointing to http://localhost:8081/mcp

=== Manual Testing

. Initialize session: + [source,bash]

curl -s -X POST http://localhost:8081/mcp -H 'Content-Type: application/json'
-d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-03-26","clientInfo":{"name":"curl","version":"0"}}}' | jq

. Call the ping tool: + [source,bash]

curl -s -X POST http://localhost:8081/mcp -H 'Content-Type: application/json'
-d '{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"ping","arguments":{"msg":"hello"}}}' | jq

== License

AGPL v3