This project is a FastAPI-based application acting as a central client and orchestrator for multiple MCP (Meta Call Protocol) compliant tool servers. It connects to these tool servers via SSE (Server-Sent Events), aggregates their available tools, and leverages a large language model (LLM) to understand user queries and intelligently invoke the appropriate tools. It also includes health checks and an automatic reconnection mechanism to enhance system robustness.
Read this in other languages:
- MCP Client: Connects to MCP-compliant tool servers via SSE.
- MCP Service Cluster Configuration: This client service can be configured in a cluster mode to manage multiple tool servers.
- Tool Aggregation: Automatically discovers and aggregates tools from all connected servers.
- LLM Integration: Utilizes large language models to understand natural language queries.
- Tool Invocation: Routes tool execution requests to the correct server based on LLM decisions.
- Health Checks: Periodically checks the status of connected services via an HTTP
/healthendpoint. - Auto Disconnect & Reconnect: Automatically disconnects unresponsive or timed-out services and periodically attempts to reconnect failed or disconnected ones.
- API Interface: Provides HTTP APIs for registering new MCP services, sending queries, and checking health.
- Flexible Configuration: Configured via a
pyproject.tomlfile.
- Python 3.10+
- uv (Recommended Python package installer and virtual environment manager)