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

[Bug] 在Cloudflare worker中 ENABLE_MCP=true 不生效 #6393

Open
elcn233 opened this issue Mar 20, 2025 · 1 comment
Open

[Bug] 在Cloudflare worker中 ENABLE_MCP=true 不生效 #6393

elcn233 opened this issue Mar 20, 2025 · 1 comment
Labels
bug Something isn't working

Comments

@elcn233
Copy link

elcn233 commented Mar 20, 2025

📦 部署方式

Other

📌 软件版本

v2.15.8

💻 系统环境

Other Linux

📌 系统版本

N/A

🌐 浏览器

Chrome

📌 浏览器版本

132.0.6818.0

🐛 问题描述

我根据项目所提供的cloudflare部署文档,尝试在cloudflare部署NextChat
我首先保持使用如下推荐的环境变量进行了配置:
NODE_VERSION=20.1
NEXT_TELEMETRY_DISABLE=1
OPENAI_API_KEY=我的APIkey
YARN_VERSION=1.22.19
PHP_VERSION=7.4
BASE_URL=我的baseurl

在首次部署后,我为了使用mcp功能,按照下列新的环境变量,重新进行了部署:
我在worker 中 使用了新的环境变量:
NODE_VERSION=20.1
NEXT_TELEMETRY_DISABLE=1
YARN_VERSION=1.22.19
PHP_VERSION=7.4
ENABLE_MCP=true
然后重新部署

然而意外的是重新部署后的cloudflare page并没有MCP按钮
同时我在浏览器日志中发现了:
page-11392df71ff8766e.js:1 [SideBar] MCP enabled: undefined

疑似是MCP enabled环境获取失误

(很抱歉我不知道这属于NextChat的问题还是Cloudflare worker/page的问题,所以在这里发了这个issues,希望作者和各位前辈能提供帮助)

📷 复现步骤

根据项目所提供的cloudflare部署文档,尝试在cloudflare部署NextChat
我首先保持使用如下推荐的环境变量进行了配置:
NODE_VERSION=20.1
NEXT_TELEMETRY_DISABLE=1
OPENAI_API_KEY=我的APIkey
YARN_VERSION=1.22.19
PHP_VERSION=7.4
BASE_URL=我的baseurl

在首次部署后,我为了使用mcp功能,按照下列新的环境变量,重新进行了部署:
我在worker 中 使用了新的环境变量:
NODE_VERSION=20.1
NEXT_TELEMETRY_DISABLE=1
YARN_VERSION=1.22.19
PHP_VERSION=7.4
ENABLE_MCP=true
然后重新部署

🚦 期望结果

期望部署后的网站拥有MCP功能按钮

📝 补充信息

No response

@elcn233 elcn233 added the bug Something isn't working label Mar 20, 2025
@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically.


Title: [Bug] ENABLE_MCP=true does not take effect in Cloudflare worker

📦 Deployment method

Other

📌 Software version

v2.15.8

💻 System environment

Other Linux

📌 System version

N/A

🌐 Browser

Chrome

📌 Browser version

132.0.6818.0

🐛 Question description

I'm trying to deploy NextChat in cloudflare based on the cloudflare deployment documentation provided by the project (https://github.com/ChatGPTNextWeb/NextChat/blob/main/docs/cloudflare-pages-cn.md)
I first kept configuring using the recommended environment variables below:
NODE_VERSION=20.1
NEXT_TELEMETRY_DISABLE=1
OPENAI_API_KEY=My APIkey
YARN_VERSION=1.22.19
PHP_VERSION=7.4
BASE_URL=My baseurl

After the first deployment, I re-deployed following the new environment variables in order to use the mcp function:
I've used a new environment variable in the worker:
NODE_VERSION=20.1
NEXT_TELEMETRY_DISABLE=1
YARN_VERSION=1.22.19
PHP_VERSION=7.4
ENABLE_MCP=true
Then redeploy

However, unexpectedly, the cloudflare page after redeployment does not have an MCP button
At the same time, I found in the browser log:
page-11392df71ff8766e.js:1 [SideBar] MCP enabled: undefined

It is suspected that it is an error in obtaining the MCP enabled environment

(I'm sorry I don't know if this is a problem with NextChat or a problem with Cloudflare worker/page, so I posted this issue here, I hope the author and all the predecessors can help)

📷 Reproduction steps

According to the cloudflare deployment documentation provided by the project, try to deploy NextChat in cloudflare
I first kept configuring using the recommended environment variables below:
NODE_VERSION=20.1
NEXT_TELEMETRY_DISABLE=1
OPENAI_API_KEY=My APIkey
YARN_VERSION=1.22.19
PHP_VERSION=7.4
BASE_URL=My baseurl

After the first deployment, I re-deployed following the new environment variables in order to use the mcp function:
I've used a new environment variable in the worker:
NODE_VERSION=20.1
NEXT_TELEMETRY_DISABLE=1
YARN_VERSION=1.22.19
PHP_VERSION=7.4
ENABLE_MCP=true
Then redeploy

🚦 Expected results

Expect the deployed website to have the MCP function button

📝 Supplementary information

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants