@samanhappy/mcphub 0.10.6 → 0.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.fr.md +36 -152
- package/README.md +34 -255
- package/README.zh.md +33 -212
- package/dist/config/DaoConfigService.js +3 -3
- package/dist/config/DaoConfigService.js.map +1 -1
- package/dist/controllers/authController.js +2 -2
- package/dist/controllers/authController.js.map +1 -1
- package/dist/controllers/groupController.js +24 -24
- package/dist/controllers/groupController.js.map +1 -1
- package/dist/controllers/openApiController.js +1 -1
- package/dist/controllers/openApiController.js.map +1 -1
- package/dist/controllers/serverController.js +95 -61
- package/dist/controllers/serverController.js.map +1 -1
- package/dist/controllers/userController.js +22 -21
- package/dist/controllers/userController.js.map +1 -1
- package/dist/dao/DaoFactory.js +19 -0
- package/dist/dao/DaoFactory.js.map +1 -1
- package/dist/dao/DatabaseDaoFactory.js +68 -0
- package/dist/dao/DatabaseDaoFactory.js.map +1 -0
- package/dist/dao/GroupDaoDbImpl.js +131 -0
- package/dist/dao/GroupDaoDbImpl.js.map +1 -0
- package/dist/dao/ServerDaoDbImpl.js +109 -0
- package/dist/dao/ServerDaoDbImpl.js.map +1 -0
- package/dist/dao/SystemConfigDaoDbImpl.js +56 -0
- package/dist/dao/SystemConfigDaoDbImpl.js.map +1 -0
- package/dist/dao/UserConfigDaoDbImpl.js +61 -0
- package/dist/dao/UserConfigDaoDbImpl.js.map +1 -0
- package/dist/dao/UserDaoDbImpl.js +90 -0
- package/dist/dao/UserDaoDbImpl.js.map +1 -0
- package/dist/dao/index.js +7 -0
- package/dist/dao/index.js.map +1 -1
- package/dist/db/entities/Group.js +49 -0
- package/dist/db/entities/Group.js.map +1 -0
- package/dist/db/entities/Server.js +93 -0
- package/dist/db/entities/Server.js.map +1 -0
- package/dist/db/entities/SystemConfig.js +66 -0
- package/dist/db/entities/SystemConfig.js.map +1 -0
- package/dist/db/entities/User.js +45 -0
- package/dist/db/entities/User.js.map +1 -0
- package/dist/db/entities/UserConfig.js +45 -0
- package/dist/db/entities/UserConfig.js.map +1 -0
- package/dist/db/entities/index.js +7 -2
- package/dist/db/entities/index.js.map +1 -1
- package/dist/db/repositories/GroupRepository.js +81 -0
- package/dist/db/repositories/GroupRepository.js.map +1 -0
- package/dist/db/repositories/ServerRepository.js +80 -0
- package/dist/db/repositories/ServerRepository.js.map +1 -0
- package/dist/db/repositories/SystemConfigRepository.js +64 -0
- package/dist/db/repositories/SystemConfigRepository.js.map +1 -0
- package/dist/db/repositories/UserConfigRepository.js +69 -0
- package/dist/db/repositories/UserConfigRepository.js.map +1 -0
- package/dist/db/repositories/UserRepository.js +68 -0
- package/dist/db/repositories/UserRepository.js.map +1 -0
- package/dist/db/repositories/index.js +6 -1
- package/dist/db/repositories/index.js.map +1 -1
- package/dist/index.js +12 -0
- package/dist/index.js.map +1 -1
- package/dist/middlewares/auth.js +1 -1
- package/dist/middlewares/auth.js.map +1 -1
- package/dist/middlewares/userContext.js +1 -1
- package/dist/middlewares/userContext.js.map +1 -1
- package/dist/models/User.js +29 -48
- package/dist/models/User.js.map +1 -1
- package/dist/routes/index.js +2 -1
- package/dist/routes/index.js.map +1 -1
- package/dist/scripts/migrate-to-database.js +5 -0
- package/dist/scripts/migrate-to-database.js.map +1 -0
- package/dist/server.js +2 -2
- package/dist/server.js.map +1 -1
- package/dist/services/groupService.js +87 -113
- package/dist/services/groupService.js.map +1 -1
- package/dist/services/keepAliveService.js +58 -0
- package/dist/services/keepAliveService.js.map +1 -0
- package/dist/services/mcpOAuthProvider.js +22 -28
- package/dist/services/mcpOAuthProvider.js.map +1 -1
- package/dist/services/mcpService.js +73 -92
- package/dist/services/mcpService.js.map +1 -1
- package/dist/services/oauthServerService.js +18 -12
- package/dist/services/oauthServerService.js.map +1 -1
- package/dist/services/oauthService.js +11 -10
- package/dist/services/oauthService.js.map +1 -1
- package/dist/services/oauthSettingsStore.js +17 -12
- package/dist/services/oauthSettingsStore.js.map +1 -1
- package/dist/services/openApiGeneratorService.js +6 -7
- package/dist/services/openApiGeneratorService.js.map +1 -1
- package/dist/services/sseService.js +20 -62
- package/dist/services/sseService.js.map +1 -1
- package/dist/services/userService.js +38 -45
- package/dist/services/userService.js.map +1 -1
- package/dist/utils/migration.js +184 -0
- package/dist/utils/migration.js.map +1 -0
- package/dist/utils/oauthBearer.js +3 -3
- package/dist/utils/oauthBearer.js.map +1 -1
- package/frontend/dist/assets/index-Dno2pywv.js +251 -0
- package/frontend/dist/assets/index-Dno2pywv.js.map +1 -0
- package/frontend/dist/index.html +1 -1
- package/mcp_settings.json +23 -1
- package/package.json +1 -1
- package/frontend/dist/assets/index-DDht0WYq.js +0 -251
- package/frontend/dist/assets/index-DDht0WYq.js.map +0 -1
package/README.fr.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
# MCPHub : Le Hub Unifié pour les Serveurs MCP
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
[English](README.md) | Français | [中文版](README.zh.md)
|
|
4
4
|
|
|
5
5
|
MCPHub facilite la gestion et la mise à l'échelle de plusieurs serveurs MCP (Model Context Protocol) en les organisant en points de terminaison HTTP streamables (SSE) flexibles, prenant en charge l'accès à tous les serveurs, à des serveurs individuels ou à des groupes de serveurs logiques.
|
|
6
6
|
|
|
@@ -13,171 +13,74 @@ MCPHub facilite la gestion et la mise à l'échelle de plusieurs serveurs MCP (M
|
|
|
13
13
|
|
|
14
14
|
## 🚀 Fonctionnalités
|
|
15
15
|
|
|
16
|
-
- **
|
|
17
|
-
- **
|
|
18
|
-
- **
|
|
19
|
-
- **Configuration à chaud**
|
|
20
|
-
- **
|
|
21
|
-
- **
|
|
22
|
-
- **Prêt pour Docker**
|
|
16
|
+
- **Gestion centralisée** - Surveillez et contrôlez tous les serveurs MCP depuis un tableau de bord unifié
|
|
17
|
+
- **Routage flexible** - Accédez à tous les serveurs, groupes spécifiques ou serveurs individuels via HTTP/SSE
|
|
18
|
+
- **Routage intelligent** - Découverte d'outils propulsée par IA utilisant la recherche sémantique vectorielle ([En savoir plus](https://docs.mcphubx.com/features/smart-routing))
|
|
19
|
+
- **Configuration à chaud** - Ajoutez, supprimez ou mettez à jour les serveurs sans temps d'arrêt
|
|
20
|
+
- **Support OAuth 2.0** - Modes client et serveur pour une authentification sécurisée ([En savoir plus](https://docs.mcphubx.com/features/oauth))
|
|
21
|
+
- **Mode Base de données** - Stockez la configuration dans PostgreSQL pour les environnements de production ([En savoir plus](https://docs.mcphubx.com/configuration/database-configuration))
|
|
22
|
+
- **Prêt pour Docker** - Déployez instantanément avec la configuration conteneurisée
|
|
23
23
|
|
|
24
24
|
## 🔧 Démarrage rapide
|
|
25
25
|
|
|
26
26
|
### Configuration
|
|
27
27
|
|
|
28
|
-
Créez un fichier `mcp_settings.json`
|
|
28
|
+
Créez un fichier `mcp_settings.json` :
|
|
29
29
|
|
|
30
30
|
```json
|
|
31
31
|
{
|
|
32
32
|
"mcpServers": {
|
|
33
|
-
"
|
|
34
|
-
"command": "npx",
|
|
35
|
-
"args": ["-y", "@amap/amap-maps-mcp-server"],
|
|
36
|
-
"env": {
|
|
37
|
-
"AMAP_MAPS_API_KEY": "votre-clé-api"
|
|
38
|
-
}
|
|
39
|
-
},
|
|
40
|
-
"playwright": {
|
|
33
|
+
"time": {
|
|
41
34
|
"command": "npx",
|
|
42
|
-
"args": ["
|
|
35
|
+
"args": ["-y", "time-mcp"]
|
|
43
36
|
},
|
|
44
37
|
"fetch": {
|
|
45
38
|
"command": "uvx",
|
|
46
39
|
"args": ["mcp-server-fetch"]
|
|
47
|
-
},
|
|
48
|
-
"slack": {
|
|
49
|
-
"command": "npx",
|
|
50
|
-
"args": ["-y", "@modelcontextprotocol/server-slack"],
|
|
51
|
-
"env": {
|
|
52
|
-
"SLACK_BOT_TOKEN": "votre-jeton-bot",
|
|
53
|
-
"SLACK_TEAM_ID": "votre-id-équipe"
|
|
54
|
-
}
|
|
55
40
|
}
|
|
56
41
|
}
|
|
57
42
|
}
|
|
58
43
|
```
|
|
59
44
|
|
|
60
|
-
|
|
45
|
+
📖 Consultez le [Guide de configuration](https://docs.mcphubx.com/configuration/mcp-settings) pour les options complètes incluant OAuth, les variables d'environnement, et plus.
|
|
61
46
|
|
|
62
|
-
|
|
47
|
+
### Déploiement avec Docker
|
|
63
48
|
|
|
64
49
|
```bash
|
|
50
|
+
# Exécutez avec une configuration personnalisée (recommandé)
|
|
65
51
|
docker run -p 3000:3000 -v ./mcp_settings.json:/app/mcp_settings.json -v ./data:/app/data samanhappy/mcphub
|
|
66
|
-
```
|
|
67
|
-
|
|
68
|
-
Ou exécutez avec les paramètres par défaut :
|
|
69
52
|
|
|
70
|
-
|
|
53
|
+
# Ou exécutez avec les paramètres par défaut
|
|
71
54
|
docker run -p 3000:3000 samanhappy/mcphub
|
|
72
55
|
```
|
|
73
56
|
|
|
74
57
|
### Accéder au tableau de bord
|
|
75
58
|
|
|
76
|
-
Ouvrez `http://localhost:3000` et connectez-vous avec
|
|
77
|
-
|
|
78
|
-
> **Note** : Les identifiants par défaut sont `admin` / `admin123`.
|
|
79
|
-
|
|
80
|
-
**Aperçu du tableau de bord** :
|
|
81
|
-
|
|
82
|
-
- État en direct de tous les serveurs MCP
|
|
83
|
-
- Activer/désactiver ou reconfigurer les serveurs
|
|
84
|
-
- Gestion des groupes pour organiser les serveurs
|
|
85
|
-
- Administration des utilisateurs pour le contrôle d'accès
|
|
86
|
-
|
|
87
|
-
### Point de terminaison HTTP streamable
|
|
88
|
-
|
|
89
|
-
> Pour le moment, la prise en charge des points de terminaison HTTP en streaming varie selon les clients IA. Si vous rencontrez des problèmes, vous pouvez utiliser le point de terminaison SSE ou attendre les futures mises à jour.
|
|
90
|
-
|
|
91
|
-
Connectez les clients IA (par exemple, Claude Desktop, Cursor, DeepChat, etc.) via :
|
|
92
|
-
|
|
93
|
-
```
|
|
94
|
-
http://localhost:3000/mcp
|
|
95
|
-
```
|
|
96
|
-
|
|
97
|
-
Ce point de terminaison fournit une interface HTTP streamable unifiée pour tous vos serveurs MCP. Il vous permet de :
|
|
98
|
-
|
|
99
|
-
- Envoyer des requêtes à n'importe quel serveur MCP configuré
|
|
100
|
-
- Recevoir des réponses en temps réel
|
|
101
|
-
- Intégrer facilement avec divers clients et outils IA
|
|
102
|
-
- Utiliser le même point de terminaison pour tous les serveurs, simplifiant votre processus d'intégration
|
|
103
|
-
|
|
104
|
-
**Routage intelligent (expérimental)** :
|
|
105
|
-
|
|
106
|
-
Le routage intelligent est le système de découverte d'outils intelligent de MCPHub qui utilise la recherche sémantique vectorielle pour trouver automatiquement les outils les plus pertinents pour une tâche donnée.
|
|
107
|
-
|
|
108
|
-
```
|
|
109
|
-
http://localhost:3000/mcp/$smart
|
|
110
|
-
```
|
|
111
|
-
|
|
112
|
-
**Comment ça marche** :
|
|
113
|
-
|
|
114
|
-
1. **Indexation des outils** : Tous les outils MCP sont automatiquement convertis en plongements vectoriels et stockés dans PostgreSQL avec pgvector.
|
|
115
|
-
2. **Recherche sémantique** : Les requêtes des utilisateurs sont converties en vecteurs et comparées aux plongements des outils en utilisant la similarité cosinus.
|
|
116
|
-
3. **Filtrage intelligent** : Des seuils dynamiques garantissent des résultats pertinents sans bruit.
|
|
117
|
-
4. **Exécution précise** : Les outils trouvés peuvent être directement exécutés avec une validation appropriée des paramètres.
|
|
118
|
-
|
|
119
|
-
**Prérequis pour la configuration** :
|
|
120
|
-
|
|
121
|
-

|
|
122
|
-
|
|
123
|
-
Pour activer le routage intelligent, vous avez besoin de :
|
|
59
|
+
Ouvrez `http://localhost:3000` et connectez-vous avec les identifiants par défaut : `admin` / `admin123`
|
|
124
60
|
|
|
125
|
-
|
|
126
|
-
- Une clé API OpenAI (ou un service de plongement compatible)
|
|
127
|
-
- Activer le routage intelligent dans les paramètres de MCPHub
|
|
61
|
+
### Connecter les clients IA
|
|
128
62
|
|
|
129
|
-
|
|
63
|
+
Connectez les clients IA (Claude Desktop, Cursor, etc.) via :
|
|
130
64
|
|
|
131
|
-

|
|
132
|
-
|
|
133
|
-
Pour un accès ciblé à des groupes de serveurs spécifiques, utilisez le point de terminaison HTTP basé sur les groupes :
|
|
134
|
-
|
|
135
|
-
```
|
|
136
|
-
http://localhost:3000/mcp/{group}
|
|
137
|
-
```
|
|
138
|
-
|
|
139
|
-
Où `{group}` est l'ID ou le nom du groupe que vous avez créé dans le tableau de bord. Cela vous permet de :
|
|
140
|
-
|
|
141
|
-
- Vous connecter à un sous-ensemble spécifique de serveurs MCP organisés par cas d'utilisation
|
|
142
|
-
- Isoler différents outils IA pour n'accéder qu'aux serveurs pertinents
|
|
143
|
-
- Mettre en œuvre un contrôle d'accès plus granulaire pour différents environnements ou équipes
|
|
144
|
-
|
|
145
|
-
**Points de terminaison spécifiques aux serveurs** :
|
|
146
|
-
Pour un accès direct à des serveurs individuels, utilisez le point de terminaison HTTP spécifique au serveur :
|
|
147
|
-
|
|
148
|
-
```
|
|
149
|
-
http://localhost:3000/mcp/{server}
|
|
150
|
-
```
|
|
151
|
-
|
|
152
|
-
Où `{server}` est le nom du serveur auquel vous souhaitez vous connecter. Cela vous permet d'accéder directement à un serveur MCP spécifique.
|
|
153
|
-
|
|
154
|
-
> **Note** : Si le nom du serveur et le nom du groupe sont identiques, le nom du groupe aura la priorité.
|
|
155
|
-
|
|
156
|
-
### Point de terminaison SSE (obsolète à l'avenir)
|
|
157
|
-
|
|
158
|
-
Connectez les clients IA (par exemple, Claude Desktop, Cursor, DeepChat, etc.) via :
|
|
159
|
-
|
|
160
|
-
```
|
|
161
|
-
http://localhost:3000/sse
|
|
162
65
|
```
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
66
|
+
http://localhost:3000/mcp # Tous les serveurs
|
|
67
|
+
http://localhost:3000/mcp/{group} # Groupe spécifique
|
|
68
|
+
http://localhost:3000/mcp/{server} # Serveur spécifique
|
|
69
|
+
http://localhost:3000/mcp/$smart # Routage intelligent
|
|
166
70
|
```
|
|
167
|
-
http://localhost:3000/sse/$smart
|
|
168
|
-
```
|
|
169
|
-
|
|
170
|
-
Pour un accès ciblé à des groupes de serveurs spécifiques, utilisez le point de terminaison SSE basé sur les groupes :
|
|
171
71
|
|
|
172
|
-
|
|
173
|
-
http://localhost:3000/sse/{group}
|
|
174
|
-
```
|
|
72
|
+
📖 Consultez la [Référence API](https://docs.mcphubx.com/api-reference) pour la documentation détaillée des points de terminaison.
|
|
175
73
|
|
|
176
|
-
|
|
74
|
+
## 📚 Documentation
|
|
177
75
|
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
76
|
+
| Sujet | Description |
|
|
77
|
+
| ------------------------------------------------------------------------------------- | ------------------------------------------- |
|
|
78
|
+
| [Démarrage rapide](https://docs.mcphubx.com/quickstart) | Commencez en 5 minutes |
|
|
79
|
+
| [Configuration](https://docs.mcphubx.com/configuration/mcp-settings) | Options de configuration du serveur MCP |
|
|
80
|
+
| [Mode Base de données](https://docs.mcphubx.com/configuration/database-configuration) | Configuration PostgreSQL pour la production |
|
|
81
|
+
| [OAuth](https://docs.mcphubx.com/features/oauth) | Configuration client et serveur OAuth 2.0 |
|
|
82
|
+
| [Routage intelligent](https://docs.mcphubx.com/features/smart-routing) | Découverte d'outils propulsée par IA |
|
|
83
|
+
| [Configuration Docker](https://docs.mcphubx.com/configuration/docker-setup) | Guide de déploiement Docker |
|
|
181
84
|
|
|
182
85
|
## 🧑💻 Développement local
|
|
183
86
|
|
|
@@ -188,19 +91,9 @@ pnpm install
|
|
|
188
91
|
pnpm dev
|
|
189
92
|
```
|
|
190
93
|
|
|
191
|
-
|
|
94
|
+
> Pour les utilisateurs Windows, démarrez le backend et le frontend séparément : `pnpm backend:dev`, `pnpm frontend:dev`
|
|
192
95
|
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
## 🛠️ Problèmes courants
|
|
196
|
-
|
|
197
|
-
### Utiliser Nginx comme proxy inverse
|
|
198
|
-
|
|
199
|
-
Si vous utilisez Nginx pour inverser le proxy de MCPHub, assurez-vous d'ajouter la configuration suivante dans votre configuration Nginx :
|
|
200
|
-
|
|
201
|
-
```nginx
|
|
202
|
-
proxy_buffering off
|
|
203
|
-
```
|
|
96
|
+
📖 Consultez le [Guide de développement](https://docs.mcphubx.com/development) pour les instructions de configuration détaillées.
|
|
204
97
|
|
|
205
98
|
## 🔍 Stack technique
|
|
206
99
|
|
|
@@ -211,19 +104,10 @@ proxy_buffering off
|
|
|
211
104
|
|
|
212
105
|
## 👥 Contribuer
|
|
213
106
|
|
|
214
|
-
Les contributions
|
|
215
|
-
|
|
216
|
-
- Nouvelles fonctionnalités et optimisations
|
|
217
|
-
- Améliorations de la documentation
|
|
218
|
-
- Rapports de bugs et corrections
|
|
219
|
-
- Traductions et suggestions
|
|
220
|
-
|
|
221
|
-
Rejoignez notre [communauté Discord](https://discord.gg/qMKNsn5Q) pour des discussions et du soutien.
|
|
107
|
+
Les contributions sont les bienvenues ! Rejoignez notre [communauté Discord](https://discord.gg/qMKNsn5Q) pour des discussions et du support.
|
|
222
108
|
|
|
223
109
|
## ❤️ Sponsor
|
|
224
110
|
|
|
225
|
-
Si vous aimez ce projet, vous pouvez peut-être envisager de :
|
|
226
|
-
|
|
227
111
|
[](https://ko-fi.com/samanhappy)
|
|
228
112
|
|
|
229
113
|
## 🌟 Historique des étoiles
|
package/README.md
CHANGED
|
@@ -13,276 +13,74 @@ MCPHub makes it easy to manage and scale multiple MCP (Model Context Protocol) s
|
|
|
13
13
|
|
|
14
14
|
## 🚀 Features
|
|
15
15
|
|
|
16
|
-
- **
|
|
17
|
-
- **
|
|
18
|
-
- **
|
|
19
|
-
- **Hot-Swappable
|
|
20
|
-
- **
|
|
21
|
-
- **
|
|
22
|
-
- **
|
|
23
|
-
- Full OAuth support for upstream MCP servers with proxy authorization capabilities
|
|
24
|
-
- **NEW**: Act as OAuth 2.0 authorization server for external clients (ChatGPT Web, custom apps)
|
|
25
|
-
- **Environment Variable Expansion**: Use environment variables anywhere in your configuration for secure credential management. See [Environment Variables Guide](docs/environment-variables.md).
|
|
26
|
-
- **Docker-Ready**: Deploy instantly with our containerized setup.
|
|
16
|
+
- **Centralized Management** - Monitor and control all MCP servers from a unified dashboard
|
|
17
|
+
- **Flexible Routing** - Access all servers, specific groups, or individual servers via HTTP/SSE
|
|
18
|
+
- **Smart Routing** - AI-powered tool discovery using vector semantic search ([Learn more](https://docs.mcphubx.com/features/smart-routing))
|
|
19
|
+
- **Hot-Swappable Config** - Add, remove, or update servers without downtime
|
|
20
|
+
- **OAuth 2.0 Support** - Both client and server modes for secure authentication ([Learn more](https://docs.mcphubx.com/features/oauth))
|
|
21
|
+
- **Database Mode** - Store configuration in PostgreSQL for production environments ([Learn more](https://docs.mcphubx.com/configuration/database-configuration))
|
|
22
|
+
- **Docker-Ready** - Deploy instantly with containerized setup
|
|
27
23
|
|
|
28
24
|
## 🔧 Quick Start
|
|
29
25
|
|
|
30
26
|
### Configuration
|
|
31
27
|
|
|
32
|
-
Create a `mcp_settings.json` file
|
|
28
|
+
Create a `mcp_settings.json` file:
|
|
33
29
|
|
|
34
30
|
```json
|
|
35
31
|
{
|
|
36
32
|
"mcpServers": {
|
|
37
|
-
"
|
|
33
|
+
"time": {
|
|
38
34
|
"command": "npx",
|
|
39
|
-
"args": ["-y", "
|
|
40
|
-
"env": {
|
|
41
|
-
"AMAP_MAPS_API_KEY": "your-api-key"
|
|
42
|
-
}
|
|
43
|
-
},
|
|
44
|
-
"playwright": {
|
|
45
|
-
"command": "npx",
|
|
46
|
-
"args": ["@playwright/mcp@latest", "--headless"]
|
|
35
|
+
"args": ["-y", "time-mcp"]
|
|
47
36
|
},
|
|
48
37
|
"fetch": {
|
|
49
38
|
"command": "uvx",
|
|
50
39
|
"args": ["mcp-server-fetch"]
|
|
51
|
-
},
|
|
52
|
-
"slack": {
|
|
53
|
-
"command": "npx",
|
|
54
|
-
"args": ["-y", "@modelcontextprotocol/server-slack"],
|
|
55
|
-
"env": {
|
|
56
|
-
"SLACK_BOT_TOKEN": "your-bot-token",
|
|
57
|
-
"SLACK_TEAM_ID": "your-team-id"
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
```
|
|
63
|
-
|
|
64
|
-
#### OAuth Configuration (Optional)
|
|
65
|
-
|
|
66
|
-
MCPHub supports OAuth 2.0 for authenticating with upstream MCP servers. See the [OAuth feature guide](docs/features/oauth.mdx) for a full walkthrough. In practice you will run into two configuration patterns:
|
|
67
|
-
|
|
68
|
-
- **Dynamic registration servers** (e.g., Vercel, Linear) publish all metadata and allow MCPHub to self-register. Simply declare the server URL and MCPHub handles the rest.
|
|
69
|
-
- **Manually provisioned servers** (e.g., GitHub Copilot) require you to create an OAuth App and provide the issued client ID/secret to MCPHub.
|
|
70
|
-
|
|
71
|
-
Dynamic registration example:
|
|
72
|
-
|
|
73
|
-
```json
|
|
74
|
-
{
|
|
75
|
-
"mcpServers": {
|
|
76
|
-
"vercel": {
|
|
77
|
-
"type": "sse",
|
|
78
|
-
"url": "https://mcp.vercel.com"
|
|
79
40
|
}
|
|
80
41
|
}
|
|
81
42
|
}
|
|
82
43
|
```
|
|
83
44
|
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
```json
|
|
87
|
-
{
|
|
88
|
-
"mcpServers": {
|
|
89
|
-
"github": {
|
|
90
|
-
"type": "sse",
|
|
91
|
-
"url": "https://api.githubcopilot.com/mcp/",
|
|
92
|
-
"oauth": {
|
|
93
|
-
"clientId": "${GITHUB_OAUTH_APP_ID}",
|
|
94
|
-
"clientSecret": "${GITHUB_OAUTH_APP_SECRET}"
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
```
|
|
100
|
-
|
|
101
|
-
For manual providers, create the OAuth App in the upstream console, set the redirect URI to `http://localhost:3000/oauth/callback` (or your deployed domain), and then plug the credentials into the dashboard or config file.
|
|
102
|
-
|
|
103
|
-
#### OAuth Authorization Server (NEW)
|
|
104
|
-
|
|
105
|
-
MCPHub can now act as an OAuth 2.0 authorization server, allowing external applications to securely access your MCP servers using standard OAuth flows. This is particularly useful for integrating with ChatGPT Web and other services that require OAuth authentication.
|
|
106
|
-
|
|
107
|
-
**Enable OAuth Server:**
|
|
108
|
-
|
|
109
|
-
```json
|
|
110
|
-
{
|
|
111
|
-
"systemConfig": {
|
|
112
|
-
"oauthServer": {
|
|
113
|
-
"enabled": true,
|
|
114
|
-
"accessTokenLifetime": 3600,
|
|
115
|
-
"refreshTokenLifetime": 1209600,
|
|
116
|
-
"allowedScopes": ["read", "write"]
|
|
117
|
-
}
|
|
118
|
-
},
|
|
119
|
-
"oauthClients": [
|
|
120
|
-
{
|
|
121
|
-
"clientId": "your-client-id",
|
|
122
|
-
"name": "ChatGPT Web",
|
|
123
|
-
"redirectUris": ["https://chatgpt.com/oauth/callback"],
|
|
124
|
-
"grants": ["authorization_code", "refresh_token"],
|
|
125
|
-
"scopes": ["read", "write"]
|
|
126
|
-
}
|
|
127
|
-
]
|
|
128
|
-
}
|
|
129
|
-
```
|
|
130
|
-
|
|
131
|
-
**Key Features:**
|
|
132
|
-
- Standard OAuth 2.0 authorization code flow
|
|
133
|
-
- PKCE support for enhanced security
|
|
134
|
-
- Token refresh capabilities
|
|
135
|
-
- Compatible with ChatGPT Web and other OAuth clients
|
|
136
|
-
|
|
137
|
-
For detailed setup instructions, see the [OAuth Server Documentation](docs/oauth-server.md).
|
|
45
|
+
📖 See [Configuration Guide](https://docs.mcphubx.com/configuration/mcp-settings) for full options including OAuth, environment variables, and more.
|
|
138
46
|
|
|
139
47
|
### Docker Deployment
|
|
140
48
|
|
|
141
|
-
**Recommended**: Mount your custom config:
|
|
142
|
-
|
|
143
49
|
```bash
|
|
50
|
+
# Run with custom config (recommended)
|
|
144
51
|
docker run -p 3000:3000 -v ./mcp_settings.json:/app/mcp_settings.json -v ./data:/app/data samanhappy/mcphub
|
|
145
|
-
```
|
|
146
52
|
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
```bash
|
|
53
|
+
# Or run with default settings
|
|
150
54
|
docker run -p 3000:3000 samanhappy/mcphub
|
|
151
55
|
```
|
|
152
56
|
|
|
153
|
-
### Access
|
|
154
|
-
|
|
155
|
-
Open `http://localhost:3000` and log in with your credentials.
|
|
156
|
-
|
|
157
|
-
> **Note**: Default credentials are `admin` / `admin123`.
|
|
57
|
+
### Access Dashboard
|
|
158
58
|
|
|
159
|
-
|
|
59
|
+
Open `http://localhost:3000` and log in with default credentials: `admin` / `admin123`
|
|
160
60
|
|
|
161
|
-
|
|
162
|
-
- Enable/disable or reconfigure servers
|
|
163
|
-
- Group management for organizing servers
|
|
164
|
-
- User administration for access control
|
|
61
|
+
### Connect AI Clients
|
|
165
62
|
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
> As of now, support for streaming HTTP endpoints varies across different AI clients. If you encounter issues, you can use the SSE endpoint or wait for future updates.
|
|
169
|
-
|
|
170
|
-
Connect AI clients (e.g., Claude Desktop, Cursor, DeepChat, etc.) via:
|
|
63
|
+
Connect AI clients (Claude Desktop, Cursor, etc.) via:
|
|
171
64
|
|
|
172
65
|
```
|
|
173
|
-
http://localhost:3000/mcp
|
|
66
|
+
http://localhost:3000/mcp # All servers
|
|
67
|
+
http://localhost:3000/mcp/{group} # Specific group
|
|
68
|
+
http://localhost:3000/mcp/{server} # Specific server
|
|
69
|
+
http://localhost:3000/mcp/$smart # Smart routing
|
|
174
70
|
```
|
|
175
71
|
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
- Send requests to any configured MCP server
|
|
179
|
-
- Receive responses in real-time
|
|
180
|
-
- Easily integrate with various AI clients and tools
|
|
181
|
-
- Use the same endpoint for all servers, simplifying your integration process
|
|
182
|
-
|
|
183
|
-
**Smart Routing (Experimental)**:
|
|
184
|
-
|
|
185
|
-
Smart Routing is MCPHub's intelligent tool discovery system that uses vector semantic search to automatically find the most relevant tools for any given task.
|
|
186
|
-
|
|
187
|
-
```
|
|
188
|
-
# Search across all servers
|
|
189
|
-
http://localhost:3000/mcp/$smart
|
|
190
|
-
|
|
191
|
-
# Search within a specific group
|
|
192
|
-
http://localhost:3000/mcp/$smart/{group}
|
|
193
|
-
```
|
|
72
|
+
📖 See [API Reference](https://docs.mcphubx.com/api-reference) for detailed endpoint documentation.
|
|
194
73
|
|
|
195
|
-
|
|
74
|
+
## 📚 Documentation
|
|
196
75
|
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-

|
|
206
|
-
|
|
207
|
-
To enable Smart Routing, you need:
|
|
208
|
-
|
|
209
|
-
- PostgreSQL with pgvector extension
|
|
210
|
-
- OpenAI API key (or compatible embedding service)
|
|
211
|
-
- Enable Smart Routing in MCPHub settings
|
|
212
|
-
|
|
213
|
-
**Group-Scoped Smart Routing**:
|
|
214
|
-
|
|
215
|
-
You can combine Smart Routing with group filtering to search only within specific server groups:
|
|
216
|
-
|
|
217
|
-
```
|
|
218
|
-
# Search only within production servers
|
|
219
|
-
http://localhost:3000/mcp/$smart/production
|
|
220
|
-
|
|
221
|
-
# Search only within development servers
|
|
222
|
-
http://localhost:3000/mcp/$smart/development
|
|
223
|
-
```
|
|
224
|
-
|
|
225
|
-
This enables:
|
|
226
|
-
- **Focused Discovery**: Find tools only from relevant servers
|
|
227
|
-
- **Environment Isolation**: Separate tool discovery by environment (dev, staging, prod)
|
|
228
|
-
- **Team-Based Access**: Limit tool search to team-specific server groups
|
|
229
|
-
|
|
230
|
-
**Group-Specific Endpoints (Recommended)**:
|
|
231
|
-
|
|
232
|
-

|
|
233
|
-
|
|
234
|
-
For targeted access to specific server groups, use the group-based HTTP endpoint:
|
|
235
|
-
|
|
236
|
-
```
|
|
237
|
-
http://localhost:3000/mcp/{group}
|
|
238
|
-
```
|
|
239
|
-
|
|
240
|
-
Where `{group}` is the ID or name of the group you created in the dashboard. This allows you to:
|
|
241
|
-
|
|
242
|
-
- Connect to a specific subset of MCP servers organized by use case
|
|
243
|
-
- Isolate different AI tools to access only relevant servers
|
|
244
|
-
- Implement more granular access control for different environments or teams
|
|
245
|
-
|
|
246
|
-
**Server-Specific Endpoints**:
|
|
247
|
-
For direct access to individual servers, use the server-specific HTTP endpoint:
|
|
248
|
-
|
|
249
|
-
```
|
|
250
|
-
http://localhost:3000/mcp/{server}
|
|
251
|
-
```
|
|
252
|
-
|
|
253
|
-
Where `{server}` is the name of the server you want to connect to. This allows you to access a specific MCP server directly.
|
|
254
|
-
|
|
255
|
-
> **Note**: If the server name and group name are the same, the group name will take precedence.
|
|
256
|
-
|
|
257
|
-
### SSE Endpoint (Deprecated in Future)
|
|
258
|
-
|
|
259
|
-
Connect AI clients (e.g., Claude Desktop, Cursor, DeepChat, etc.) via:
|
|
260
|
-
|
|
261
|
-
```
|
|
262
|
-
http://localhost:3000/sse
|
|
263
|
-
```
|
|
264
|
-
|
|
265
|
-
For smart routing, use:
|
|
266
|
-
|
|
267
|
-
```
|
|
268
|
-
# Search across all servers
|
|
269
|
-
http://localhost:3000/sse/$smart
|
|
270
|
-
|
|
271
|
-
# Search within a specific group
|
|
272
|
-
http://localhost:3000/sse/$smart/{group}
|
|
273
|
-
```
|
|
274
|
-
|
|
275
|
-
For targeted access to specific server groups, use the group-based SSE endpoint:
|
|
276
|
-
|
|
277
|
-
```
|
|
278
|
-
http://localhost:3000/sse/{group}
|
|
279
|
-
```
|
|
280
|
-
|
|
281
|
-
For direct access to individual servers, use the server-specific SSE endpoint:
|
|
282
|
-
|
|
283
|
-
```
|
|
284
|
-
http://localhost:3000/sse/{server}
|
|
285
|
-
```
|
|
76
|
+
| Topic | Description |
|
|
77
|
+
| ------------------------------------------------------------------------------ | --------------------------------- |
|
|
78
|
+
| [Quick Start](https://docs.mcphubx.com/quickstart) | Get started in 5 minutes |
|
|
79
|
+
| [Configuration](https://docs.mcphubx.com/configuration/mcp-settings) | MCP server configuration options |
|
|
80
|
+
| [Database Mode](https://docs.mcphubx.com/configuration/database-configuration) | PostgreSQL setup for production |
|
|
81
|
+
| [OAuth](https://docs.mcphubx.com/features/oauth) | OAuth 2.0 client and server setup |
|
|
82
|
+
| [Smart Routing](https://docs.mcphubx.com/features/smart-routing) | AI-powered tool discovery |
|
|
83
|
+
| [Docker Setup](https://docs.mcphubx.com/configuration/docker-setup) | Docker deployment guide |
|
|
286
84
|
|
|
287
85
|
## 🧑💻 Local Development
|
|
288
86
|
|
|
@@ -293,19 +91,9 @@ pnpm install
|
|
|
293
91
|
pnpm dev
|
|
294
92
|
```
|
|
295
93
|
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
> For windows users, you may need to start the backend server and frontend separately: `pnpm backend:dev`, `pnpm frontend:dev`.
|
|
299
|
-
|
|
300
|
-
## 🛠️ Common Issues
|
|
94
|
+
> For Windows users, start backend and frontend separately: `pnpm backend:dev`, `pnpm frontend:dev`
|
|
301
95
|
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
If you are using Nginx to reverse proxy MCPHub, please make sure to add the following configuration in your Nginx setup:
|
|
305
|
-
|
|
306
|
-
```nginx
|
|
307
|
-
proxy_buffering off
|
|
308
|
-
```
|
|
96
|
+
📖 See [Development Guide](https://docs.mcphubx.com/development) for detailed setup instructions.
|
|
309
97
|
|
|
310
98
|
## 🔍 Tech Stack
|
|
311
99
|
|
|
@@ -316,19 +104,10 @@ proxy_buffering off
|
|
|
316
104
|
|
|
317
105
|
## 👥 Contributing
|
|
318
106
|
|
|
319
|
-
Contributions
|
|
320
|
-
|
|
321
|
-
- New features & optimizations
|
|
322
|
-
- Documentation improvements
|
|
323
|
-
- Bug reports & fixes
|
|
324
|
-
- Translations & suggestions
|
|
325
|
-
|
|
326
|
-
Welcome to join our [Discord community](https://discord.gg/qMKNsn5Q) for discussions and support.
|
|
107
|
+
Contributions welcome! See our [Discord community](https://discord.gg/qMKNsn5Q) for discussions and support.
|
|
327
108
|
|
|
328
109
|
## ❤️ Sponsor
|
|
329
110
|
|
|
330
|
-
If you like this project, maybe you can consider:
|
|
331
|
-
|
|
332
111
|
[](https://ko-fi.com/samanhappy)
|
|
333
112
|
|
|
334
113
|
## 🌟 Star History
|