mcp-hub
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mcp-hubUse RAG to summarize our Q3 earnings and post it to #general"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Task: Build "mcp-hub" — a production-grade, extensible MCP server (hackathon project)
Context
I need an independent, network-hosted MCP server that AI agents (Claude, LangGraph, custom clients) connect to over the network. It fronts three existing internal services and must be trivially extensible when new services appear.
Services already running in the network:
MiniSlack (Slack-like chat) at
http://minislack:9001— REST endpoints: POST /messages {channel, text}, GET /messages?channel=X, GET /channelsObservability service at
http://observability:9002— REST endpoints: GET /metrics?service=X&window=5m, GET /alerts, GET /servicesEnterprise RAG (FastAPI) at
http://rag:9003— full OpenAPI spec athttp://rag:9003/openapi.json; key endpoint: POST /query {question, top_k}
If an endpoint above is wrong, check the service's /docs or /openapi.json first, then adapt — do not hardcode assumptions silently; log a warning instead.
Related MCP server: MCP Hub
Hard requirements
Framework: Python 3.12, FastMCP v3 standalone package (
fastmcp, install viauv add fastmcp). Do NOT usemcp.server.fastmcp.Transport: Streamable HTTP at
/mcp,stateless_http=True, host 0.0.0.0, port from envMCP_PORT(default 8000). Plus a plain/healthendpoint.Connector architecture (the critical part):
config/services.yamlis the service registry:services: - name: minislack namespace: slack type: rest # hand-written connector base_url: http://minislack:9001 enabled: true - name: rag namespace: rag type: openapi # auto-generated from OpenAPI spec base_url: http://rag:9003 enabled: truesrc/connectors/base.pydefines aConnectorprotocol:name,namespace,async register(mcp: FastMCP) -> None.src/core/registry.pyloads services.yaml, imports the matching connector module (or builds one from OpenAPI fortype: openapi), mounts each as a namespaced sub-server via FastMCP mounting so tools appear asslack.send_message,obs.get_metrics,rag.query.Adding a future service = one new file in
src/connectors/+ one YAML entry. Includesrc/connectors/template.pyas a documented copy-paste starting point.
RAG connector: use FastMCP v3's OpenAPI provider to auto-generate tools from
http://rag:9003/openapi.jsonat startup. If the spec is unreachable, log the failure and continue serving the other connectors (graceful degradation — one dead upstream must never crash the hub).Resilience: shared
httpx.AsyncClientwith per-upstream timeout (5s), 2 retries with backoff; every tool catches upstream errors and returns a structured error object{"error": "...", "upstream": "...", "retryable": true}— never leak stack traces to the agent.Validation: validate every tool argument (Pydantic); reject empty channel names, negative top_k, etc.
Auth: bearer-token middleware on
/mcp— token from envMCP_AUTH_TOKEN; requests withoutAuthorization: Bearer <token>get 401./healthstays open.Observability: structured JSON logs (structlog or stdlib json formatter); for every tool call log: tool name, namespace, latency_ms, status, upstream, error type (never log full argument values — log arg keys only).
Tests: pytest with FastMCP's in-memory Client — one test file per connector mocking the upstream with respx or httpx MockTransport, plus a registry test proving all enabled services mount correctly.
Docker: multi-stage Dockerfile (python:3.12-slim, non-root user, uv for deps, HEALTHCHECK on /health) and docker-compose.yaml with the hub plus stub implementations of the three services (tiny FastAPI stubs) so the whole demo runs offline.
Deliverables (in order)
Project scaffold + dependency setup that runs:
uv run python -m src.mainserves /mcp and /health.slack.*andobs.*connectors with tests.OpenAPI-driven
rag.*connector with graceful-degradation test.Auth, logging, Dockerfile, docker-compose.
demo_client.py: a script that connects with FastMCP Client, lists all tools, then chains rag.query → slack.send_message → obs.get_metrics to prove end-to-end agent flow.
Build incrementally in that order, running tests after each step. Ask me for the real endpoint specs only if you cannot proceed with the ones above.
This server cannot be deployed
Maintenance
Related MCP Connectors
MCP Hub: AI service discovery, per-user OAuth, and multi-service workflow orchestration
One MCP endpoint for Claude, GPT & Gemini: 100+ tools + no-code connectors + agent workers.
The OpenRouter for tools. One MCP connection gives any AI agent 254 hosted tools, pay per call.
Zero-setup MCP gateway securely connecting AI to your tools with authentication and workflows
Related MCP Servers
- FlicenseNot gradedqualityFmaintenanceA production-ready MCP server built with FastAPI, providing an enhanced tool registry for creating, managing, and documenting AI tools for Large Language Models (LLMs).34-
- FlicenseNot gradedqualityNot gradedmaintenanceMCP Hub aggregates and proxies multiple Model Context Protocol servers into a unified Streamable HTTP interface. It allows users to combine diverse stdio, SSE, and HTTP-based servers while providing tool namespacing, health monitoring, and secure authentication.594 npm-
- AlicenseNot gradedqualityDmaintenanceMCPGate aggregates multiple MCP servers into a single unified endpoint, enabling centralized tool management with granular filtering, automatic namespacing, and observability. Features a real-time web dashboard and optional PostgreSQL-backed audit trails for monitoring and controlling AI tool access across local and remote deployments.6 npmApache 2.0
- AlicenseNot gradedqualityDmaintenanceEnables MCP clients to connect to LLM/API services using the Model Context Protocol, providing real-time interaction and tool access. Also offers RESTful API endpoints via FastAPI for programmatic integration with existing systems.Apache 2.0