Native MCP Client Server
@hackerinheels
A native implementation of the MCP (Model Context Protocol) client-server architecture with HTTP Server-Sent Events (SSE) for real-time communication.
Overview
What is Native MCP Client Server?
A native implementation of the Machine Conversation Protocol (MCP) using HTTP Server-Sent Events (SSE) for real-time communication between a WebSocket-based host and multiple tool servers. It provides a host, product server, analytics server, and client for building multi-service tool systems.
How to use Native MCP Client Server?
Set up a Python virtual environment, install dependencies (httpx, fastapi, uvicorn, websockets, python-dotenv, requests, PyYAML), and configure .env files for the host and each tool server. Start the tool servers (e.g., python product-server/server_product.py and python analytics-server/server_analytics.py), then run python mcp-host.py. Send messages like "get products" or "show analytics" to interact.
Key features of Native MCP Client Server
- Tool discovery via HTTP endpoints
- Real-time tool execution with SSE
- WebSocket-based client-host communication
- Support for Ollama and Gemini LLM backends
- Multiple tool servers (Product and Analytics)
- Dynamic tool discovery from all configured servers
Use cases of Native MCP Client Server
- Query product information from a dedicated server via the "get products" command
- Retrieve analytics data for daily, weekly, or monthly periods using "get analytics"
- Combine data from multiple tool servers through a single MCP Host
- Extend the system by adding custom tool servers with new
/toolsand/runendpoints
FAQ from Native MCP Client Server
What runtime dependencies are required?
Python 3 and packages: httpx, fastapi, uvicorn, websockets, python-dotenv, requests, PyYAML. Optionally Ollama or Gemini for the LLM backend.
How does the system communicate?
The MCP Host communicates with clients via WebSocket and with tool servers via HTTP using Server-Sent Events (SSE) for real‑time responses.
How can I add a new tool server?
Create a server with /tools and /run endpoints, add its URL and script path to config.yaml, and update the