Skip to content

Commit 4cad553

Browse files
authored
Merge pull request ChatGPTNextWeb#5974 from ChatGPTNextWeb/feat-mcp
Support MCP( WIP)
2 parents 93652db + a3d3ce3 commit 4cad553

30 files changed

+2830
-297
lines changed

.env.template

+5
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@ CODE=your-password
77
# You can start service behind a proxy. (optional)
88
PROXY_URL=http://localhost:7890
99

10+
# Enable MCP functionality (optional)
11+
# Default: Empty (disabled)
12+
# Set to "true" to enable MCP functionality
13+
ENABLE_MCP=
14+
1015
# (optional)
1116
# Default: Empty
1217
# Google Gemini Pro API key, set if you want to use Google Gemini Pro API.

.eslintignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
public/serviceWorker.js
1+
public/serviceWorker.js
2+
app/mcp/mcp_config.json

.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -46,3 +46,6 @@ dev
4646
*.key.pub
4747

4848
masks.json
49+
50+
# mcp config
51+
app/mcp/mcp_config.json

Dockerfile

+4
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,16 @@ ENV PROXY_URL=""
3434
ENV OPENAI_API_KEY=""
3535
ENV GOOGLE_API_KEY=""
3636
ENV CODE=""
37+
ENV ENABLE_MCP=""
3738

3839
COPY --from=builder /app/public ./public
3940
COPY --from=builder /app/.next/standalone ./
4041
COPY --from=builder /app/.next/static ./.next/static
4142
COPY --from=builder /app/.next/server ./.next/server
4243

44+
RUN mkdir -p /app/app/mcp && chmod 777 /app/app/mcp
45+
COPY --from=builder /app/app/mcp/mcp_config.json /app/app/mcp/
46+
4347
EXPOSE 3000
4448

4549
CMD if [ -n "$PROXY_URL" ]; then \

README_CN.md

+15-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<h1 align="center">NextChat</h1>
88

9-
一键免费部署你的私人 ChatGPT 网页应用,支持 GPT3, GPT4 & Gemini Pro 模型。
9+
一键免费部署你的私人 ChatGPT 网页应用,支持 Claude, GPT4 & Gemini Pro 模型。
1010

1111
[NextChatAI](https://nextchat.dev/chat?utm_source=readme) / [企业版](#%E4%BC%81%E4%B8%9A%E7%89%88) / [演示 Demo](https://chat-gpt-next-web.vercel.app/) / [反馈 Issues](https://github.com/Yidadaa/ChatGPT-Next-Web/issues) / [加入 Discord](https://discord.gg/zrhvHCr79N)
1212

@@ -262,6 +262,10 @@ Stability API密钥
262262

263263
自定义的Stability API请求地址
264264

265+
### `ENABLE_MCP` (optional)
266+
267+
启用MCP(Model Context Protocol)功能
268+
265269

266270
## 开发
267271

@@ -315,6 +319,16 @@ docker run -d -p 3000:3000 \
315319
yidadaa/chatgpt-next-web
316320
```
317321

322+
如需启用 MCP 功能,可以使用:
323+
324+
```shell
325+
docker run -d -p 3000:3000 \
326+
-e OPENAI_API_KEY=sk-xxxx \
327+
-e CODE=页面访问密码 \
328+
-e ENABLE_MCP=true \
329+
yidadaa/chatgpt-next-web
330+
```
331+
318332
如果你的本地代理需要账号密码,可以使用:
319333

320334
```shell

0 commit comments

Comments
 (0)