๐ MCP Ping-Pong Server with FastAPI
@kimtth
About ๐ MCP Ping-Pong Server with FastAPI
๐ An experimental and educational script for Ping-pong server demonstrating remote MCP (Model Context Protocol) calls
Config
Add this server to your MCP-compatible client using the configuration below.
{
"mcpServers": {
"mcp-fastapi-ping-pong": {
"command": "python",
"args": [
"mcp-api-server.py"
]
}
}
}Tools
No tools detected
We auto-extract tools from the README. The maintainer can list them under a ## Tools heading to populate this section.
Overview
What is ๐ MCP Ping-Pong Server with FastAPI?
An experimental and educational Ping-Pong server that demonstrates MCP (Model Context Protocol) calls through a FastAPI/FastMCP backend. It provides a simple commandโhandling system (ping, pong, count) accessible via API endpoints or ServerโSent Events (SSE), making it a learning tool for understanding remote MCP integrations.
How to use ๐ MCP Ping-Pong Server with FastAPI?
Install dependencies with poetry install. Run python mcp-api-server.py to start the FastAPI server on http://localhost:8080 and open mcp-api-client.html in a browser for the UI, or use the API directly. For SSE transport, run python mcp-sse-server.py and then python mcp-sse-client.py to interact via the command line with commands like ping, pong, and count.
Key features of ๐ MCP Ping-Pong Server with FastAPI
- FastAPI/FastMCP backend for remote MCP calls.
- MCP integration for command handling (ping, pong, count).
- Thread-safe session management.
- API endpoints for GET (prompt retrieval) and POST (tool invocation).
- SSE transport support for realโtime communication.
Use cases of ๐ MCP Ping-Pong Server with FastAPI
- Learning how to build and run an MCP server with FastAPI.
- Demonstrating remote MCP calls via HTTP and SSE transports.
- Experimenting with thread-safe session handling in MCP.
- Teaching MCP concepts through a simple, interactive command loop.
FAQ from ๐ MCP Ping-Pong Server with FastAPI
What commands does the server support?
The MCP server supports three commands: ping, pong, and count. The sample output shows ping returns pong, pong returns ping, and count returns the current count (e.g., 2).
How do I install and run the server?
Install dependencies with poetry install. For the API server, run python mcp-api-server.py. For SSE, run python mcp-sse-server.py. The client for SSE is started with python mcp-sse-client.py.
Is there a graphical user interface?
Yes, the repository includes mcp-api-client.html which you can open in a browser to interact with the API server via a simple UI.
What transport options are available?
Two transport methods are demonstrated: HTTP API (GET/POST endpoints at http://localhost:8080) and Server-Sent Events (SSE) using separate server and client scripts.
What dependencies does the server require?
All Python dependencies are managed via Poetry. The key libraries include FastAPI and FastMCP (for the backend), along with other runtime dependencies listed in the pyproject.toml file.
Frequently asked questions
What commands does the server support?
The MCP server supports three commands: `ping`, `pong`, and `count`. The sample output shows `ping` returns `pong`, `pong` returns `ping`, and `count` returns the current count (e.g., `2`).
How do I install and run the server?
Install dependencies with `poetry install`. For the API server, run `python mcp-api-server.py`. For SSE, run `python mcp-sse-server.py`. The client for SSE is started with `python mcp-sse-client.py`.
Is there a graphical user interface?
Yes, the repository includes `mcp-api-client.html` which you can open in a browser to interact with the API server via a simple UI.
What transport options are available?
Two transport methods are demonstrated: HTTP API (GET/POST endpoints at `http://localhost:8080`) and Server-Sent Events (SSE) using separate server and client scripts.
What dependencies does the server require?
All Python dependencies are managed via Poetry. The key libraries include FastAPI and FastMCP (for the backend), along with other runtime dependencies listed in the `pyproject.toml` file.
Basic information
More Developer Tools MCP servers

discoverGPT
Joe MonastierodiscoverGPT is visualAI's unified MCP gateway for AI commerce, exposing 29 tools across four capabilities on one canonical product catalog: trimodal search (natural-language, precise-color, and image-similarity), AI cata

TaskerArmy Agent
TaskerArmyAsk Claude or ChatGPT what Shopify theme optimization tasks are pending on your store, a remote MCP server for TaskerArmy Agent accounts.

Moxie Docs
Jackalope-DevAutomated codebase documentation for GitHub: searchable docs, MCP context for AI agents, doc drift detection, and Friday Cleanup PRs.
DevDocs by CyberAGI ๐
cyberagiincCompletely free, private, UI based Tech Documentation MCP server. Designed for coders and software developers in mind. Easily integrate into Cursor, Windsurf, Cline, Roo Code, Claude Desktop App
extentos
Asger mรธlgaardExtentos is a multi-vendor development platform for adding smart-glasses capabilities to existing iOS and Android apps. The simplest analogy is Stripe for smart glasses:
Comments