copilot-swe-agent[bot] 7f1e4d5de1 feat: Add OAuth 2.0 / OIDC SSO login support
- Add OAuth SSO provider configuration types (OAuthSsoProviderConfig, OAuthSsoConfig)
- Create OAuth SSO service with support for Google, Microsoft, GitHub, and custom OIDC providers
- Implement OAuth SSO controller with endpoints for SSO configuration, login initiation, and callback handling
- Add routes for /api/auth/sso/* endpoints
- Update User entity and DAOs to support OAuth-linked accounts (oauthProvider, oauthSubject, email, displayName, avatarUrl)
- Update SystemConfig entity to include oauthSso field
- Update migration utility to handle OAuth SSO configuration and user fields
- Add OAuth callback page for frontend token handling
- Update LoginPage with SSO provider buttons and hybrid auth support
- Add i18n translations for OAuth SSO (English and Chinese)
- Add comprehensive tests for OAuth SSO service (13 new tests)

Co-authored-by: samanhappy <2755122+samanhappy@users.noreply.github.com>
2025-12-31 15:17:07 +00:00
2025-04-12 22:47:28 +08:00
2025-04-20 13:58:52 +08:00

MCPHub: The Unified Hub for Model Context Protocol (MCP) Servers

English | Français | 中文版

MCPHub makes it easy to manage and scale multiple MCP (Model Context Protocol) servers by organizing them into flexible Streamable HTTP (SSE) endpoints—supporting access to all servers, individual servers, or logical server groups.

Dashboard Preview

🌐 Live Demo & Docs

🚀 Features

  • Centralized Management - Monitor and control all MCP servers from a unified dashboard
  • Flexible Routing - Access all servers, specific groups, or individual servers via HTTP/SSE
  • Smart Routing - AI-powered tool discovery using vector semantic search (Learn more)
  • Hot-Swappable Config - Add, remove, or update servers without downtime
  • OAuth 2.0 Support - Both client and server modes for secure authentication (Learn more)
  • Database Mode - Store configuration in PostgreSQL for production environments (Learn more)
  • Docker-Ready - Deploy instantly with containerized setup

🔧 Quick Start

Configuration

Create a mcp_settings.json file:

{
  "mcpServers": {
    "time": {
      "command": "npx",
      "args": ["-y", "time-mcp"]
    },
    "fetch": {
      "command": "uvx",
      "args": ["mcp-server-fetch"]
    }
  }
}

📖 See Configuration Guide for full options including OAuth, environment variables, and more.

Docker Deployment

# Run with custom config (recommended)
docker run -p 3000:3000 -v ./mcp_settings.json:/app/mcp_settings.json -v ./data:/app/data samanhappy/mcphub

# Or run with default settings
docker run -p 3000:3000 samanhappy/mcphub

Access Dashboard

Open http://localhost:3000 and log in with default credentials: admin / admin123

Connect AI Clients

Connect AI clients (Claude Desktop, Cursor, etc.) via:

http://localhost:3000/mcp           # All servers
http://localhost:3000/mcp/{group}   # Specific group
http://localhost:3000/mcp/{server}  # Specific server
http://localhost:3000/mcp/$smart    # Smart routing

📖 See API Reference for detailed endpoint documentation.

📚 Documentation

Topic Description
Quick Start Get started in 5 minutes
Configuration MCP server configuration options
Database Mode PostgreSQL setup for production
OAuth OAuth 2.0 client and server setup
Smart Routing AI-powered tool discovery
Docker Setup Docker deployment guide

🧑‍💻 Local Development

git clone https://github.com/samanhappy/mcphub.git
cd mcphub
pnpm install
pnpm dev

For Windows users, start backend and frontend separately: pnpm backend:dev, pnpm frontend:dev

📖 See Development Guide for detailed setup instructions.

🔍 Tech Stack

  • Backend: Node.js, Express, TypeScript
  • Frontend: React, Vite, Tailwind CSS
  • Auth: JWT & bcrypt
  • Protocol: Model Context Protocol SDK

👥 Contributing

Contributions welcome! See our Discord community for discussions and support.

❤️ Sponsor

ko-fi

🌟 Star History

Star History Chart

📄 License

Licensed under the Apache 2.0 License.

Description
A unified hub for centralized management and dynamic organization of multiple MCP servers into streamable HTTP (SSE) endpoints, with support for flexible routing strategies
Readme Apache-2.0 17 MiB
Languages
TypeScript 98.2%
JavaScript 0.9%
CSS 0.7%
Dockerfile 0.1%