server-hub-mcp
Server Hub
Server Hub 是一个 Python 服务,通过两个接口提供服务器管理和运维数据:
REST API,基于 FastAPI 实现
MCP 服务器,为支持 MCP 的客户端和 AI 代理提供工具
这两个接口旨在提供相同的底层应用能力,而不是重复业务逻辑。
架构
flowchart LR
RESTClient["REST Client"] --> REST["REST API"]
MCPClient["MCP Client / AI Agent"] --> MCP["MCP Server"]
REST --> App["Application Layer"]
MCP --> App
App --> Domain["Domain / Models"]
App --> Persistence["Persistence"]
Persistence --> DB[("Database")]REST 和 MCP 是围绕应用层的接口边界。持久化细节保留在该边界之后。
Related MCP server: quads-mcp
MCP 工具
MCP 接口提供:
search_serversget_serverget_server_metricsget_active_alertsget_system_statscreate_alert
MCP 层将内部应用数据映射为面向客户端的响应,而不是暴露持久化实现细节。
REST API
REST 接口提供以下操作:
服务器发现和查找
服务器状态
服务器指标
活动告警
告警创建
系统统计
测试
使用以下命令运行完整测试套件:
pytest -q该仓库包含针对公共接口的独立测试,以及一个 REST ↔ MCP 等价性测试套件。
tests/
├── test_api.py
├── test_mcp.py
└── test_rest_mcp_equivalence.pyREST ↔ MCP 等价性测试验证两个接口暴露等价的能力和数据,而不要求它们的响应封装完全相同。
项目结构
app/
├── api/
│ ├── domain/
│ ├── routes/
│ └── ...
├── mcp/
└── ...
tests/
docs/该实现围绕应用/领域逻辑和接口适配器进行组织。
文档
随着项目的发展,可以在 docs/ 下添加更多文档。
开发
创建虚拟环境,安装项目依赖,然后运行测试:
python -m venv .venv
source .venv/bin/activate
pip install -e ".[test]"
pytest -q该仓库还包含用于在本地运行 REST 和 MCP 服务的脚本/组件。
设计原则
保持应用行为与传输协议无关。
将 REST 和 MCP 视为接口适配器。
将持久化细节保留在应用边界之后。
在面向 MCP 的操作中优先使用有意义的领域标识符。
测试公共接口及其语义等价性。
许可证
当前项目材料中未指定许可证。
This server cannot be deployed
Maintenance
Related MCP Connectors
Read-only MCP server for AIStatusDashboard status, incidents, metrics, and fallback recommendations.
- UnifAPIOAuthcom.unifapi
Hosted MCP server for live public-data APIs and Skills for AI agents.
Guarded MCP server for agent-readable business truth, provenance, readiness, and discovery.
An MCP server that provides an API to LLMs to manage their JumpCloud resources.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceProvides comprehensive monitoring and observability for MCP server ecosystems with real-time health checks, performance metrics, distributed tracing, anomaly detection, and automated performance reports using OpenTelemetry and Prometheus.1MIT
- AlicenseNot gradedqualityDmaintenanceMCP server for interacting with QUADS infrastructure systems via API, enabling resource management and automation through LLM applications.MIT
- FlicenseNot gradedqualityDmaintenanceExposes DevOps/SRE operations like Kubernetes pod status, Prometheus metrics queries, and deploy history as tools for MCP-compatible clients.-
- FlicenseNot gradedqualityCmaintenanceAn MCP server that exposes RAG search, ServiceNow, and observability tools to MCP clients, and proxies curated calls to remote ServiceNow and observability MCP servers.-