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

[Feature Request] MCP示例文档 #6410

Open
FUjr opened this issue Mar 27, 2025 · 2 comments
Open

[Feature Request] MCP示例文档 #6410

FUjr opened this issue Mar 27, 2025 · 2 comments
Labels
enhancement New feature or request

Comments

@FUjr
Copy link

FUjr commented Mar 27, 2025

🥰 需求描述

启用了MCP构建选项后,由于没有更多信息支持,只能使用空的app/mcp/mcp_config.default.json,无法使用mcp功能

🧐 解决方案

是否可以在这个仓库提供一个示例配置(如filesystem等基础功能)以便参考

📝 补充信息

No response

@FUjr FUjr added the enhancement New feature or request label Mar 27, 2025
@Issues-translate-bot
Copy link

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

@FUjr
Copy link
Author

FUjr commented Mar 28, 2025

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读取

Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants