RealWorker-Manager MCP Server
Enables centralized management and monitoring of multiple distributed worker MCP servers. Provides tools to list workers, get status of all workers, and query specific worker status.
README
MCP Admin Server Architecture
Overview
This is a Manager/Admin MCP (Model Context Protocol) Server that coordinates and monitors multiple worker MCP servers across a distributed network. It acts as a centralized control plane for managing worker nodes. This is a Manager/Admin MCP (Model Context Protocol) Server that coordinates and monitors multiple worker MCP servers across a distributed network. It acts as a centralized control plane for managing worker nodes.
Architecture Diagram
┌─────────────────────────────────────────────────────────────────┐
│ MCP Client (Claude/AI) │
│ │
└───────────────────────────┬─────────────────────────────────────┘
│ STDIO
│ (Standard Input/Output)
│
┌───────────────────────────▼─────────────────────────────────────┐
│ ADMIN/MANAGER SERVER │
│ (admin_server/admin.py) │
│ │
│ ┌─────────────────────────────────────────────────────────┐ │
│ │ FastMCP Server Core │ │
│ │ - Server Name: "Manager" │ │
│ │ - Transport: STDIO │ │
│ └─────────────────────────────────────────────────────────┘ │
│ │
│ ┌─────────────────────────────────────────────────────────┐ │
│ │ Management Tools │ │
│ │ │ │
│ │ 1. get_all_workers_status() │ │
│ │ - Polls all workers simultaneously │ │
│ │ - Returns aggregated status │ │
│ │ │ │
│ │ 2. get_worker_status(worker_name) │ │
│ │ - Gets status from specific worker │ │
│ │ - Returns detailed worker info │ │
│ │ │ │
│ │ 3. list_workers() │ │
│ │ - Lists all configured workers │ │
│ │ - Returns worker URLs │ │
│ └─────────────────────────────────────────────────────────┘ │
│ │
│ ┌─────────────────────────────────────────────────────────┐ │
│ │ Worker Registry (WORKERS dict) │ │
│ │ │ │
│ │ Worker-One: http://10.149.14.61:8000 │ │
│ │ [Additional workers can be added here] │ │
│ └─────────────────────────────────────────────────────────┘ │
│ │
└───────────┬─────────────────────────────────┬───────────────────┘
│ HTTP/HTTPX │ HTTP/HTTPX
│ (Async Client) │ (Async Client)
│ │
┌───────────▼─────────────┐ ┌──────────▼──────────────┐
│ WORKER-ONE SERVER │ │ WORKER-N SERVER │
│ (10.149.14.61:8000) │ │ (Additional Workers) │
│ │ │ │
│ ┌──────────────────┐ │ │ ┌──────────────────┐ │
│ │ MCP Worker Core │ │ │ │ MCP Worker Core │ │
│ │ - SSE Endpoints │ │ │ │ - SSE Endpoints │ │
│ │ - Tool Handler │ │ │ │ - Tool Handler │ │
│ └──────────────────┘ │ │ └──────────────────┘ │
│ │ │ │
│ ┌──────────────────┐ │ │ ┌──────────────────┐ │
│ │ Worker Tools │ │ │ │ Worker Tools │ │
│ │ - System Status │ │ │ │ - System Status │ │
│ │ - Battery Info │ │ │ │ - Battery Info │ │
│ │ - Custom Tasks │ │ │ │ - Custom Tasks │ │
│ └──────────────────┘ │ │ └──────────────────┘ │
│ │ │ │
└─────────────────────────┘ └─────────────────────────┘
Component Details
1. Admin/Manager Server (admin.py)
Purpose: Central coordination server that manages multiple worker MCP servers
Key Components:
- FastMCP Core: Lightweight MCP server framework
- Worker Registry: Dictionary mapping worker names to URLs
- HTTP Client: Async HTTPX client for worker communication
- Management Tools: Three exposed tools for worker management
Communication:
- Upstream (to AI Client): STDIO transport
- Downstream (to Workers): HTTP POST requests to worker SSE endpoints
2. Worker Servers
Purpose: Distributed worker nodes that perform actual tasks and report status
Key Components:
- MCP Server Core: Handles incoming requests via SSE
- Tool Endpoints:
/sse/tools/callfor tool execution - Status Tools:
get_worker_status()and other worker-specific tools
Communication:
- Upstream (to Admin): HTTP responses to manager requests
- Local Resources: Access to system information (CPU, memory, battery, etc.)
Data Flow
Scenario 1: Get All Workers Status
1. AI Client → Admin: Call get_all_workers_status()
2. Admin → Worker-One: POST /sse/tools/call (get_worker_status)
3. Admin → Worker-N: POST /sse/tools/call (get_worker_status)
[Parallel async requests]
4. Worker-One → Admin: Return status data
5. Worker-N → Admin: Return status data
6. Admin → AI Client: Aggregated results from all workers
Scenario 2: Get Specific Worker Status
1. AI Client → Admin: Call get_worker_status("Worker-One")
2. Admin: Lookup worker URL from WORKERS registry
3. Admin → Worker-One: POST /sse/tools/call (get_worker_status)
4. Worker-One → Admin: Return status data
5. Admin → AI Client: Worker status
Scenario 3: List Workers
1. AI Client → Admin: Call list_workers()
2. Admin: Return WORKERS dictionary
3. Admin → AI Client: List of workers with URLs
Technical Stack
Core Technologies
- Python 3.11+: Runtime environment
- FastMCP: MCP server framework
- HTTPX: Async HTTP client for worker communication
- STDIO: Transport protocol for AI client communication
Dependencies
httpx>=0.28.1 # Async HTTP client
mcp[cli]>=1.26.0 # MCP framework
psutil>=7.2.2 # System monitoring (likely used by workers)
uvicorn>=0.40.0 # ASGI server (for workers)
Deployment Architecture
Network Layer:
┌─────────────────────────────────────────────────────────┐
│ Local Network / VPN │
│ │
│ Admin Server Worker-One Worker-N │
│ (localhost) (10.149.14.61) (10.x.x.x) │
│ │
└─────────────────────────────────────────────────────────┘
Deployment Characteristics:
- Admin runs locally and communicates via STDIO with AI client
- Workers are distributed across network (LAN/VPN)
- HTTP-based communication between admin and workers
- 10-second timeout for worker requests
- Async/parallel communication for efficiency
Security Considerations
-
Network Security:
- Workers expose HTTP endpoints (currently unencrypted)
- Should be deployed on trusted network or use VPN
- Consider adding HTTPS/TLS for production
-
Authentication:
- Currently no authentication between admin and workers
- Consider adding API keys or mutual TLS
-
Error Handling:
- Graceful degradation when workers are unavailable
- Timeout protection (10s) prevents hanging
Scalability
Current Design:
- Synchronous registry (WORKERS dict)
- Hardcoded worker URLs
- Manual configuration
Future Improvements:
- Service discovery mechanism
- Dynamic worker registration
- Health check automation
- Load balancing across workers
- Worker heartbeat monitoring
Extension Points
- Add New Worker: Update WORKERS dictionary with new worker URL
- Add New Tool: Define new
@mcp.tool()function in admin.py - Custom Worker Communication: Extend HTTP client logic
- Monitoring: Add logging, metrics collection, alerting
Usage Example
# From AI Client (Claude)
# The admin server exposes these tools:
# 1. List all configured workers
list_workers()
# Returns: {"workers": {"Worker-One": "http://10.149.14.61:8000"}}
# 2. Get status from all workers
get_all_workers_status()
# Returns: {"Worker-One": {...status data...}}
# 3. Get status from specific worker
get_worker_status("Worker-One")
# Returns: {...status data from Worker-One...}
Running the Server
# Development mode
uv run admin.py
# Production mode (via MCP configuration)
# Add to Claude Desktop config:
{
"mcpServers": {
"admin-server": {
"command": "uv",
"args": ["run", "admin.py"],
"cwd": "d:\\SLT\\AI\\MCP_Servers\\admin_server"
}
}
}
Project Structure
admin_server/
├── admin.py # Main admin/manager server
├── main.py # Alternative entry point (unused)
├── pyproject.toml # Project dependencies
└── README.md # This architecture document
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。