mgmt/MCP_CONFIGURATION_SHARE.md

41 lines
1.7 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# MCP 配置共享方案
本项目实现了跨主机多个IDE之间共享MCPModel Context Protocol配置的解决方案使用NFS卷实现跨主机同步。
## 配置结构
- `/root/.mcp/mcp_settings.json` - 主MCP配置文件符号链接指向NFS卷
- `/mnt/fnsync/mcp/mcp_shared_config.json` - NFS卷上的统一配置文件权威源
- `mcp_shared_config.json` - 指向NFS卷上配置文件的符号链接
- `sync_mcp_config.sh` - 同步脚本用于将统一配置复制到各个IDE
- `sync_all_mcp_configs.sh` - 完整同步脚本同步到所有可能的IDE和AI助手
- `.kilocode/mcp.json` - 指向共享配置的符号链接
- 其他IDE和AI助手的配置文件
## 统一配置内容
合并了以下MCP服务器
### 标准服务器
- context7: 提供库文档和代码示例
- filesystem: 文件系统访问
- sequentialthinking: 顺序思考工具
- git: Git 操作
- time: 时间相关操作
- memory: 知识图谱和记忆管理
- tavily: 网络搜索功能
## 使用方法
1. **更新配置**: 编辑 `/mnt/fnsync/mcp/mcp_shared_config.json` 文件以修改MCP服务器配置或通过符号链接 `/root/.mcp/mcp_settings.json`
2. **同步配置**:
- 运行 `./sync_mcp_config.sh` 同步到特定IDE
- 运行 `./sync_all_mcp_configs.sh` 同步到所有IDE和AI助手
3. **验证配置**: 确认各IDE中的MCP功能正常工作
## 维护说明
- 所有MCP配置更改都应在 `/mnt/fnsync/mcp/mcp_shared_config.json` 中进行(这是权威源)
- `/root/.mcp/mcp_settings.json` 现在是符号链接指向NFS卷上的统一配置
- 由于使用NFS卷配置更改会自动跨主机共享
- 如果添加新的IDE可以将其配置文件链接到或复制自 `/mnt/fnsync/mcp/mcp_shared_config.json`