Skip to content
This repository was archived by the owner on Jul 14, 2025. It is now read-only.

Commit 43f4515

Browse files
committed
Update quick start documentation.
1 parent ef6e2c5 commit 43f4515

File tree

9 files changed

+758
-310
lines changed

9 files changed

+758
-310
lines changed
Lines changed: 88 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,76 @@
11
# 快速开始
22

3-
## 设置 MCP Gateway
3+
## 一键启动 MCP Gateway
44

5-
1. 创建必要的目录并下载配置文件
5+
这边需要注意几个环境变量的内容要改一下
66

77
```bash
8-
mkdir -p mcp-gateway/{configs,data}
9-
cd mcp-gateway/
10-
curl -sL https://raw.githubusercontent.com/mcp-ecosystem/mcp-gateway/refs/heads/main/configs/apiserver.yaml -o configs/apiserver.yaml
11-
curl -sL https://raw.githubusercontent.com/mcp-ecosystem/mcp-gateway/refs/heads/main/configs/mcp-gateway.yaml -o configs/mcp-gateway.yaml
12-
curl -sL https://raw.githubusercontent.com/mcp-ecosystem/mcp-gateway/refs/heads/main/.env.example -o .env.allinone
8+
export OPENAI_API_KEY="sk-eed837fb0b4a62ee69abc29a983492b7PlsChangeMe"
9+
export OPENAI_MODEL="gpt-4o-mini"
10+
export APISERVER_JWT_SECRET_KEY="fec6d38f73d4211318e7c85617f0e333PlsChangeMe"
11+
export SUPER_ADMIN_USERNAME="admin"
12+
export SUPER_ADMIN_PASSWORD="297df52fbc321ebf7198d497fe1c9206PlsChangeMe"
13+
```
14+
15+
一键拉起
16+
17+
```bash
18+
docker run -d \
19+
--name mcp-gateway \
20+
-p 8080:80 \
21+
-p 5234:5234 \
22+
-p 5235:5235 \
23+
-p 5335:5335 \
24+
-p 5236:5236 \
25+
-e ENV=production \
26+
-e TZ=Asia/Shanghai \
27+
-e OPENAI_API_KEY=${OPENAI_API_KEY} \
28+
-e OPENAI_MODEL=${OPENAI_MODEL} \
29+
-e APISERVER_JWT_SECRET_KEY=${APISERVER_JWT_SECRET_KEY} \
30+
-e SUPER_ADMIN_USERNAME=${SUPER_ADMIN_USERNAME} \
31+
-e SUPER_ADMIN_PASSWORD=${SUPER_ADMIN_PASSWORD} \
32+
--restart unless-stopped \
33+
ghcr.io/mcp-ecosystem/mcp-gateway/allinone:latest
1334
```
1435

15-
> 在中国境内的设备可以拉阿里云仓库的镜像
16-
>
17-
> ```bash
18-
> registry.ap-southeast-1.aliyuncs.com/mcp-ecosystem/mcp-gateway-allinone:latest
19-
> ```
36+
中国境内的设备可以拉阿里云仓库的镜像并自定义模型(这边示例是千问)
2037

21-
> LLMs可以按需更换,如换成千问
22-
> ```bash
23-
> OPENAI_BASE_URL=https://dashscope.aliyuncs.com/compatible-mode/v1/
24-
> OPENAI_API_KEY=sk-yourkeyhere
25-
> OPENAI_MODEL=qwen-turbo
26-
> ```
38+
```bash
39+
export OPENAI_BASE_URL="https://dashscope.aliyuncs.com/compatible-mode/v1/"
40+
export OPENAI_API_KEY="sk-eed837fb0b4a62ee69abc29a983492b7PlsChangeMe"
41+
export OPENAI_MODEL="qwen-turbo"
42+
export APISERVER_JWT_SECRET_KEY="fec6d38f73d4211318e7c85617f0e333PlsChangeMe"
43+
export SUPER_ADMIN_USERNAME="admin"
44+
export SUPER_ADMIN_PASSWORD="297df52fbc321ebf7198d497fe1c9206PlsChangeMe"
45+
```
2746

28-
2. 使用 Docker 运行 MCP Gateway:
47+
一键拉起
2948

3049
```bash
3150
docker run -d \
32-
--name mcp-gateway \
33-
-p 8080:80 \
34-
-p 5234:5234 \
35-
-p 5235:5235 \
36-
-p 5335:5335 \
37-
-p 5236:5236 \
38-
-e ENV=production \
39-
-v $(pwd)/configs:/app/configs \
40-
-v $(pwd)/data:/app/data \
41-
-v $(pwd)/.env.allinone:/app/.env \
42-
--restart unless-stopped \
43-
ghcr.io/mcp-ecosystem/mcp-gateway/allinone:latest
51+
--name mcp-gateway \
52+
-p 8080:80 \
53+
-p 5234:5234 \
54+
-p 5235:5235 \
55+
-p 5335:5335 \
56+
-p 5236:5236 \
57+
-e ENV=production \
58+
-e TZ=Asia/Shanghai \
59+
-e OPENAI_BASE_URL=${OPENAI_BASE_URL} \
60+
-e OPENAI_API_KEY=${OPENAI_API_KEY} \
61+
-e OPENAI_MODEL=${OPENAI_MODEL} \
62+
-e APISERVER_JWT_SECRET_KEY=${APISERVER_JWT_SECRET_KEY} \
63+
-e SUPER_ADMIN_USERNAME=${SUPER_ADMIN_USERNAME} \
64+
-e SUPER_ADMIN_PASSWORD=${SUPER_ADMIN_PASSWORD} \
65+
--restart unless-stopped \
66+
registry.ap-southeast-1.aliyuncs.com/mcp-ecosystem/mcp-gateway-allinone:latest
4467
```
4568

4669
## 访问和配置
4770

4871
1. 访问 Web 界面:
4972
- 在浏览器中打开 http://localhost:8080/
73+
- 使用配置的管理员账号密码登录
5074

5175
2. 添加 MCP Server:
5276
- 复制配置文件:https://github.com/mcp-ecosystem/mcp-gateway/blob/main/configs/mock-user-svc.yaml
@@ -67,5 +91,37 @@ docker run -d \
6791

6892
您可以通过以下两种方式测试服务:
6993

70-
1. 使用 Web 界面中的 MCP Chat 页面(需要在 .env.allinone 中配置 API KEY)
94+
1. 使用 Web 界面中的 MCP Chat 页面
7195
2. 使用您自己的 MCP Client(**推荐**
96+
97+
## 高级配置(可选)
98+
99+
如果您需要更细粒度的配置控制,可以通过挂载配置文件的方式启动:
100+
101+
1. 创建必要的目录并下载配置文件:
102+
103+
```bash
104+
mkdir -p mcp-gateway/{configs,data}
105+
cd mcp-gateway/
106+
curl -sL https://raw.githubusercontent.com/mcp-ecosystem/mcp-gateway/refs/heads/main/configs/apiserver.yaml -o configs/apiserver.yaml
107+
curl -sL https://raw.githubusercontent.com/mcp-ecosystem/mcp-gateway/refs/heads/main/configs/mcp-gateway.yaml -o configs/mcp-gateway.yaml
108+
curl -sL https://raw.githubusercontent.com/mcp-ecosystem/mcp-gateway/refs/heads/main/.env.example -o .env.allinone
109+
```
110+
111+
2. 使用 Docker 运行 MCP Gateway:
112+
113+
```bash
114+
docker run -d \
115+
--name mcp-gateway \
116+
-p 8080:80 \
117+
-p 5234:5234 \
118+
-p 5235:5235 \
119+
-p 5335:5335 \
120+
-p 5236:5236 \
121+
-e ENV=production \
122+
-v $(pwd)/configs:/app/configs \
123+
-v $(pwd)/data:/app/data \
124+
-v $(pwd)/.env.allinone:/app/.env \
125+
--restart unless-stopped \
126+
ghcr.io/mcp-ecosystem/mcp-gateway/allinone:latest
127+
```
Lines changed: 99 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,71 +1,127 @@
11
# Schnellstart
22

3-
## MCP Gateway einrichten
3+
## Ein-Klick-Bereitstellung von MCP Gateway
44

5-
1. Erstellen Sie die erforderlichen Verzeichnisse und laden Sie die Konfigurationsdateien herunter:
5+
Zuerst die erforderlichen Umgebungsvariablen einrichten:
66

77
```bash
8-
mkdir -p mcp-gateway/{configs,data}
9-
cd mcp-gateway/
10-
curl -sL https://raw.githubusercontent.com/mcp-ecosystem/mcp-gateway/refs/heads/main/configs/apiserver.yaml -o configs/apiserver.yaml
11-
curl -sL https://raw.githubusercontent.com/mcp-ecosystem/mcp-gateway/refs/heads/main/configs/mcp-gateway.yaml -o configs/mcp-gateway.yaml
12-
curl -sL https://raw.githubusercontent.com/mcp-ecosystem/mcp-gateway/refs/heads/main/.env.example -o .env.allinone
8+
export OPENAI_API_KEY="sk-eed837fb0b4a62ee69abc29a983492b7PlsChangeMe"
9+
export OPENAI_MODEL="gpt-4o-mini"
10+
export APISERVER_JWT_SECRET_KEY="fec6d38f73d4211318e7c85617f0e333PlsChangeMe"
11+
export SUPER_ADMIN_USERNAME="admin"
12+
export SUPER_ADMIN_PASSWORD="297df52fbc321ebf7198d497fe1c9206PlsChangeMe"
13+
```
14+
15+
Ein-Klick-Bereitstellung:
16+
17+
```bash
18+
docker run -d \
19+
--name mcp-gateway \
20+
-p 8080:80 \
21+
-p 5234:5234 \
22+
-p 5235:5235 \
23+
-p 5335:5335 \
24+
-p 5236:5236 \
25+
-e ENV=production \
26+
-e TZ=Asia/Shanghai \
27+
-e OPENAI_API_KEY=${OPENAI_API_KEY} \
28+
-e OPENAI_MODEL=${OPENAI_MODEL} \
29+
-e APISERVER_JWT_SECRET_KEY=${APISERVER_JWT_SECRET_KEY} \
30+
-e SUPER_ADMIN_USERNAME=${SUPER_ADMIN_USERNAME} \
31+
-e SUPER_ADMIN_PASSWORD=${SUPER_ADMIN_PASSWORD} \
32+
--restart unless-stopped \
33+
ghcr.io/mcp-ecosystem/mcp-gateway/allinone:latest
1334
```
1435

15-
> Wenn Sie sich in China befinden, können Sie das Image aus dem Alibaba Cloud Registry beziehen:
16-
>
17-
> ```bash
18-
> registry.ap-southeast-1.aliyuncs.com/mcp-ecosystem/mcp-gateway-allinone:latest
19-
> ```
36+
Für Benutzer in China können Sie das Alibaba Cloud Registry verwenden und das Modell anpassen (Beispiel mit Qwen):
2037

21-
> Bei Bedarf können Sie das Standard-LLM ersetzen. Zum Beispiel für den Wechsel zu Qwen:
22-
> ```bash
23-
> OPENAI_BASE_URL=https://dashscope.aliyuncs.com/compatible-mode/v1/
24-
> OPENAI_API_KEY=sk-yourkeyhere
25-
> OPENAI_MODEL=qwen-turbo
26-
> ```
38+
```bash
39+
export OPENAI_BASE_URL="https://dashscope.aliyuncs.com/compatible-mode/v1/"
40+
export OPENAI_API_KEY="sk-eed837fb0b4a62ee69abc29a983492b7PlsChangeMe"
41+
export OPENAI_MODEL="qwen-turbo"
42+
export APISERVER_JWT_SECRET_KEY="fec6d38f73d4211318e7c85617f0e333PlsChangeMe"
43+
export SUPER_ADMIN_USERNAME="admin"
44+
export SUPER_ADMIN_PASSWORD="297df52fbc321ebf7198d497fe1c9206PlsChangeMe"
45+
```
2746

28-
2. Starten Sie MCP Gateway mit Docker:
47+
Ein-Klick-Bereitstellung:
2948

3049
```bash
3150
docker run -d \
32-
--name mcp-gateway \
33-
-p 8080:80 \
34-
-p 5234:5234 \
35-
-p 5235:5235 \
36-
-p 5335:5335 \
37-
-p 5236:5236 \
38-
-e ENV=production \
39-
-v $(pwd)/configs:/app/configs \
40-
-v $(pwd)/data:/app/data \
41-
-v $(pwd)/.env.allinone:/app/.env \
42-
--restart unless-stopped \
43-
ghcr.io/mcp-ecosystem/mcp-gateway/allinone:latest
51+
--name mcp-gateway \
52+
-p 8080:80 \
53+
-p 5234:5234 \
54+
-p 5235:5235 \
55+
-p 5335:5335 \
56+
-p 5236:5236 \
57+
-e ENV=production \
58+
-e TZ=Asia/Shanghai \
59+
-e OPENAI_BASE_URL=${OPENAI_BASE_URL} \
60+
-e OPENAI_API_KEY=${OPENAI_API_KEY} \
61+
-e OPENAI_MODEL=${OPENAI_MODEL} \
62+
-e APISERVER_JWT_SECRET_KEY=${APISERVER_JWT_SECRET_KEY} \
63+
-e SUPER_ADMIN_USERNAME=${SUPER_ADMIN_USERNAME} \
64+
-e SUPER_ADMIN_PASSWORD=${SUPER_ADMIN_PASSWORD} \
65+
--restart unless-stopped \
66+
registry.ap-southeast-1.aliyuncs.com/mcp-ecosystem/mcp-gateway-allinone:latest
4467
```
4568

4669
## Zugriff und Konfiguration
4770

48-
1. Greifen Sie auf die Web-UI zu:
49-
- Öffnen Sie einen Browser und navigieren Sie zu http://localhost:8080/
71+
1. Web-UI aufrufen:
72+
- Öffnen Sie http://localhost:8080/ in Ihrem Browser
73+
- Melden Sie sich mit den konfigurierten Administrator-Anmeldedaten an
5074

51-
2. Fügen Sie einen neuen MCP-Server hinzu:
52-
- Kopieren Sie die Konfigurationsdatei: https://github.com/mcp-ecosystem/mcp-gateway/blob/main/configs/mock-user-svc.yaml
53-
- Klicken Sie in der Web-UI auf "Add MCP Server"
54-
- Fügen Sie die Konfiguration ein und speichern Sie sie
75+
2. Neuen MCP-Server hinzufügen:
76+
- Konfigurationsdatei kopieren: https://github.com/mcp-ecosystem/mcp-gateway/blob/main/configs/mock-user-svc.yaml
77+
- In der Web-UI auf "Add MCP Server" klicken
78+
- Konfiguration einfügen und speichern
5579

56-
![Beispiel für das Hinzufügen eines MCP-Servers](/img/add_mcp_server.png)
80+
![MCP-Server hinzufügen Beispiel](/img/add_mcp_server.png)
5781

5882
## Verfügbare Endpunkte
5983

60-
Nach der Konfiguration können Sie den Service über folgende Endpunkte nutzen:
84+
Nach der Konfiguration sind die Dienste an folgenden Endpunkten verfügbar:
6185

6286
- MCP SSE: http://localhost:5235/mcp/user/sse
63-
- MCP HTTP Streamable: http://localhost:5235/mcp/user/message
87+
- MCP Streamable HTTP: http://localhost:5235/mcp/user/message
6488
- MCP: http://localhost:5235/mcp/user/mcp
6589

6690
## Testen
6791

68-
Der Service kann auf zwei Arten getestet werden:
92+
Sie können den Dienst auf zwei Arten testen:
93+
94+
1. Verwenden Sie die MCP Chat-Seite in der Web-UI
95+
2. Verwenden Sie Ihren eigenen MCP-Client (**empfohlen**)
96+
97+
## Erweiterte Konfiguration (Optional)
6998

70-
1. Verwenden Sie die MCP Chat-Seite in der Web-UI (API-Schlüssel in `.env.allinone` erforderlich)
71-
2. Verwenden Sie Ihren eigenen MCP-Client (**empfohlen**)
99+
Wenn Sie eine feinere Kontrolle über die Konfiguration benötigen, können Sie den Dienst durch Einbinden von Konfigurationsdateien starten:
100+
101+
1. Erstellen Sie die erforderlichen Verzeichnisse und laden Sie die Konfigurationsdateien herunter:
102+
103+
```bash
104+
mkdir -p mcp-gateway/{configs,data}
105+
cd mcp-gateway/
106+
curl -sL https://raw.githubusercontent.com/mcp-ecosystem/mcp-gateway/refs/heads/main/configs/apiserver.yaml -o configs/apiserver.yaml
107+
curl -sL https://raw.githubusercontent.com/mcp-ecosystem/mcp-gateway/refs/heads/main/configs/mcp-gateway.yaml -o configs/mcp-gateway.yaml
108+
curl -sL https://raw.githubusercontent.com/mcp-ecosystem/mcp-gateway/refs/heads/main/.env.example -o .env.allinone
109+
```
110+
111+
2. MCP Gateway mit Docker ausführen:
112+
113+
```bash
114+
docker run -d \
115+
--name mcp-gateway \
116+
-p 8080:80 \
117+
-p 5234:5234 \
118+
-p 5235:5235 \
119+
-p 5335:5335 \
120+
-p 5236:5236 \
121+
-e ENV=production \
122+
-v $(pwd)/configs:/app/configs \
123+
-v $(pwd)/data:/app/data \
124+
-v $(pwd)/.env.allinone:/app/.env \
125+
--restart unless-stopped \
126+
ghcr.io/mcp-ecosystem/mcp-gateway/allinone:latest
127+
```

0 commit comments

Comments
 (0)