[Feature Request] MCP示例文档
🥰 需求描述
启用了MCP构建选项后,由于没有更多信息支持,只能使用空的app/mcp/mcp_config.default.json,无法使用mcp功能
🧐 解决方案
是否可以在这个仓库提供一个示例配置(如filesystem等基础功能)以便参考
📝 补充信息
No response
Bot detected the issue body's language is not English, translate it automatically.
Title: [Feature Request] MCP sample documentation
🥰 Requirement description
After enabling the MCP build option, since there is no more information support, you can only use the empty app/mcp/mcp_config.default.json, and the mcp function cannot be used.
🧐 Solution
Is it possible to provide an example configuration (such as filesystem and other basic functions) in [this repository] (https://github.com/ChatGPTNextWeb/NextChat-MCP-Awesome) for reference
📝 Supplementary information
No response
mcp server可参考这个仓库
以部署filesystem为例
0.构建选项开启mcp
1.修改docker-compose.yaml以挂载mcp_config(请根据实际情况修改)
volumes: - ./mcp/mcp.json:/app/app/mcp/mcp_config.json - ./files:/files
2.修改mcp_config.json(请根据实际情况修改)
{ "mcpServers": { "filesystem": { "command": "npx", "args": ["-y", "@modelcontextprotocol/server-filesystem", "/files"] } } }
3.重启compose
docker compose down docker compose up
4.观察日志
出现以下日志时说明配置已经成果,正在安装或构建npm服务
chatgpt-next-web | [MCP Actions] Restarting all clients... chatgpt-next-web | [MCP Actions] Initializing client [filesystem]... chatgpt-next-web | [NextChat MCP Client] Creating client for filesystem... 出现以下日志时说明安装已成功
chatgpt-next-web | Secure MCP Filesystem Server running on stdio chatgpt-next-web | Allowed directories: [ '/files' ] chatgpt-next-web | [MCP Actions] Supported tools for [filesystem]: { chatgpt-next-web | "tools": [ chatgpt-next-web | { chatgpt-next-web | "name": "read_file", chatgpt-next-web | "description": "Read the complete contents of a file from the file system. Handles various text encodings and provides detailed error messages if the file cannot be read
5.使用deepseek/chatgpt等模型,配合适当的prompt读取
I believe MCP could be the default feature since it is growing rapidly and is quickly becoming a standard in AI.
@FUjr Following your steps, I started successfully and also checked the success log. But when I checked the mcp list, it seemed that there was no available one. I don't know why.
I tried to call it in the chat, it was recognized normally, but it could not be executed
I tried to call it in the chat, it was recognized normally, but it could not be executed
First of all, the MCP market should be a feature similar to an MCP app store. Since the app store is provided by NextChat, it is normal that no services are available.
As for the content in the second screenshot, further diagnostic information might need to be obtained by checking the logs in the console.
Thanks a lot for your reply.
I am not familiar with this project, but I can share my experience from when I deployed it. Based on your screenshot, this might be an issue that occurred during the installation or deployment of the MCP client (the filesystem serivce). You may need to check the earlier startup logs for more details.
The startup logs should like this
chatgpt-next-web | [MCP Actions] Restarting all clients... chatgpt-next-web | [MCP Actions] Initializing client [filesystem]... chatgpt-next-web | [NextChat MCP Client] Creating client for filesystem...
From the log, there seems to be nothing unusual
mcp server可参考这个仓库 以部署filesystem为例 0.构建选项开启mcp 1.修改docker-compose.yaml以挂载mcp_config(请根据实际情况修改)
volumes: - ./mcp/mcp.json:/app/app/mcp/mcp_config.json - ./files:/files2.修改mcp_config.json(请根据实际情况修改)
{ "mcpServers": { "filesystem": { "command": "npx", "args": ["-y", "@modelcontextprotocol/server-filesystem", "/files"] } } }3.重启composedocker compose down docker compose up4.观察日志 出现以下日志时说明配置已经成果,正在安装或构建npm服务chatgpt-next-web | [MCP Actions] Restarting all clients... chatgpt-next-web | [MCP Actions] Initializing client [filesystem]... chatgpt-next-web | [NextChat MCP Client] Creating client for filesystem... 出现以下日志时说明安装已成功
chatgpt-next-web | Secure MCP Filesystem Server running on stdio chatgpt-next-web | Allowed directories: [ '/files' ] chatgpt-next-web | [MCP Actions] Supported tools for [filesystem]: { chatgpt-next-web | "tools": [ chatgpt-next-web | { chatgpt-next-web | "name": "read_file", chatgpt-next-web | "description": "Read the complete contents of a file from the file system. Handles various text encodings and provides detailed error messages if the file cannot be read
5.使用deepseek/chatgpt等模型,配合适当的prompt读取
你好,我想请教一下,可以支持sse协议,访问部署的mcpServer吗,一直没找到正常的方式,mcp_config文件一直不对,请问有没有正常的样例,或者说案例呢