Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pull] main from ChatGPTNextWeb:main #36

Merged
merged 33 commits into from
Jan 19, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
e1c7c54
chore: change md
Leizhenpeng Dec 23, 2024
c3108ad
feat: simple MCP example
Kadxy Dec 28, 2024
664879b
feat: Create all MCP Servers at startup
Kadxy Dec 28, 2024
e1ba8f1
feat: Send MCP response as a user
Kadxy Dec 29, 2024
fe67f79
feat: MCP message type
Kadxy Dec 29, 2024
77be190
feat: carry mcp primitives content as a system prompt
Kadxy Jan 9, 2025
f2a2b40
feat: carry mcp primitives content as a system prompt
Kadxy Jan 9, 2025
0c14ce6
fix: MCP execution content matching failed.
Kadxy Jan 9, 2025
7d51bfd
feat: MCP market
Kadxy Jan 9, 2025
b410ec3
feat: auto scroll to bottom when MCP response
Kadxy Jan 9, 2025
125a71f
fix: unnecessary initialization
Kadxy Jan 9, 2025
e95c94d
fix: inaccurate content
Kadxy Jan 9, 2025
a3af563
feat: Reset mcp_config.json to empty
Kadxy Jan 9, 2025
ce13cf6
feat: ignore mcp_config.json
Kadxy Jan 9, 2025
8aa9a50
feat: Optimize MCP configuration logic
Kadxy Jan 15, 2025
a70e9a3
chore:update mcp icon
Leizhenpeng Jan 15, 2025
be59de5
feat: Display the number of clients instead of the number of availabl…
Kadxy Jan 15, 2025
ac3d940
Merge branch 'feat-mcp' of https://github.com/ChatGPTNextWeb/ChatGPT-…
Leizhenpeng Jan 15, 2025
c89e488
chore: update icon
Leizhenpeng Jan 15, 2025
e440ff5
fix: env not work
Kadxy Jan 15, 2025
07c6349
feat: support stop/start MCP servers
Kadxy Jan 16, 2025
4d63d73
feat: load MCP preset data from server
Kadxy Jan 16, 2025
d4f499e
feat: adjust form style
Kadxy Jan 16, 2025
588d81e
feat: remove unused files
Kadxy Jan 16, 2025
4d535b1
chore: enhance mcp prompt
Leizhenpeng Jan 16, 2025
65810d9
feat: improve async operations and UI feedback
Kadxy Jan 16, 2025
0112b54
fix: missing en translation
Kadxy Jan 16, 2025
bc71ae2
feat: add ENABLE_MCP env var to toggle MCP feature globally and in Do…
Kadxy Jan 18, 2025
bfeea4e
fix: prevent MCP operations from blocking chat interface
Kadxy Jan 18, 2025
611e97e
docs: update README.md
Kadxy Jan 19, 2025
a3d3ce3
Merge branch 'main' into feat-mcp
Kadxy Jan 19, 2025
4cad553
Merge pull request #5974 from ChatGPTNextWeb/feat-mcp
Leizhenpeng Jan 19, 2025
8111acf
Update README.md
Leizhenpeng Jan 19, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .env.template
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ CODE=your-password
# You can start service behind a proxy. (optional)
PROXY_URL=http://localhost:7890

# Enable MCP functionality (optional)
# Default: Empty (disabled)
# Set to "true" to enable MCP functionality
ENABLE_MCP=

# (optional)
# Default: Empty
# Google Gemini Pro API key, set if you want to use Google Gemini Pro API.
Expand Down
3 changes: 2 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
public/serviceWorker.js
public/serviceWorker.js
app/mcp/mcp_config.json
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,6 @@ dev
*.key.pub

masks.json

# mcp config
app/mcp/mcp_config.json
4 changes: 4 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,16 @@ ENV PROXY_URL=""
ENV OPENAI_API_KEY=""
ENV GOOGLE_API_KEY=""
ENV CODE=""
ENV ENABLE_MCP=""

COPY --from=builder /app/public ./public
COPY --from=builder /app/.next/standalone ./
COPY --from=builder /app/.next/static ./.next/static
COPY --from=builder /app/.next/server ./.next/server

RUN mkdir -p /app/app/mcp && chmod 777 /app/app/mcp
COPY --from=builder /app/app/mcp/mcp_config.json /app/app/mcp/

EXPOSE 3000

CMD if [ -n "$PROXY_URL" ]; then \
Expand Down
23 changes: 23 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
</a>



<h1 align="center">NextChat (ChatGPT Next Web)</h1>

English / [简体中文](./README_CN.md)
Expand Down Expand Up @@ -39,6 +40,12 @@ One-Click to get a well-designed cross-platform ChatGPT web UI, with Claude, GPT

</div>

## 🫣 NextChat Support MCP !
> Before build, please set env ENABLE_MCP=true

<img src="https://github.com/user-attachments/assets/d8851f40-4e36-4335-b1a4-ec1e11488c7e"/>


## Enterprise Edition

Meeting Your Company's Privatization and Customization Deployment Requirements:
Expand Down Expand Up @@ -333,6 +340,12 @@ Stability API key.

Customize Stability API url.


### `ENABLE_MCP` (optional)

Enable MCP(Model Context Protocol)Feature


## Requirements

NodeJS >= 18, Docker >= 20
Expand Down Expand Up @@ -391,6 +404,16 @@ If your proxy needs password, use:
-e PROXY_URL="http://127.0.0.1:7890 user pass"
```

If enable MCP, use:

```
docker run -d -p 3000:3000 \
-e OPENAI_API_KEY=sk-xxxx \
-e CODE=your-password \
-e ENABLE_MCP=true \
yidadaa/chatgpt-next-web
```

### Shell

```shell
Expand Down
16 changes: 15 additions & 1 deletion README_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

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

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

[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)

Expand Down Expand Up @@ -262,6 +262,10 @@ Stability API密钥

自定义的Stability API请求地址

### `ENABLE_MCP` (optional)

启用MCP(Model Context Protocol)功能


## 开发

Expand Down Expand Up @@ -315,6 +319,16 @@ docker run -d -p 3000:3000 \
yidadaa/chatgpt-next-web
```

如需启用 MCP 功能,可以使用:

```shell
docker run -d -p 3000:3000 \
-e OPENAI_API_KEY=sk-xxxx \
-e CODE=页面访问密码 \
-e ENABLE_MCP=true \
yidadaa/chatgpt-next-web
```

如果你的本地代理需要账号密码,可以使用:

```shell
Expand Down
Loading
Loading