mcp-hub is a backend service for registering and managing Model Context Protocol (MCP) servers, with built-in LangGraph agent support for dynamic interactions.
- 🔧 MCP Server Management - Full CRUD operations for standard and custom MCP servers.
- 📂 Categorization - Organized server ecosystem with custom icons and colors.
- 🤖 Agents - LangGraph-powered agents with dynamic tool binding.
- 🔐 Authentication - Google OAuth integration with NextAuth.js compatibility.
- 📊 GraphQL API - Flexible Strawberry-powered API for seamless frontend integration.
- Core: Django 5.2 | Python 3.12+
- API: GraphQL (Strawberry Django)
- Agent: LangGraph | OpenAI / DeepSeek
- Connectivity: Redis | CopilotKit
- Database: SQLite (PostgreSQL compatible)
We recommend using uv for the fastest setup:
# Setup environment and install dependencies
uv venv
uv pip install -r requirements.txtCreate a .env file in the root directory:
SECRET_KEY=your_secret_key
DEBUG=True
GOOGLE_CLIENT_ID=your_id.apps.googleusercontent.com
OPENAI_API_KEY=sk-...
REDIS_URL=redis://localhost:6379/0# Apply migrations
uv run manage.py migrate
# Seed default categories (optional)
uv run python seed_categories.py
# Launch the engine
uv run uvicorn assistant.asgi:application --reloadTip
The backend runs at http://localhost:8000. You can explore the API via the GraphiQL interactive playground at /graphql.
app/mcp/- Core logic for server configs, transport adapters, and state.app/agent/- LangGraph definition, chat nodes, and LLM configuration.app/auth/- Authentication middleware and schema.assistant/- Global project settings and ASGI configuration.
The backend is purpose-built to work with CopilotKit, exposing specialized endpoints for agent interaction:
POST /api/copilotkit/infoPOST /api/copilotkit/agent/{name}
- Admin: Create a superuser (
uv run manage.py createsuperuser) and visit/admin. - Testing: Run the suite with
uv run pytest. - Redis: Ensure
redis-serveris active for connection state persistence.