MCP Server 目录与架构规划

Active 运行区

存放当前正在运行的服务,每个服务独立文件夹。

Shared 共享区

通用的脚本、库和工具类,减少代码冗余。

Templates 模板区

标准化的服务模板,支持快速横向扩展。

graph LR subgraph Root["/opt/mcp-servers/ (核心根目录)"] direction TB Active["📂 active/ (运行中)"] Inactive["📂 inactive/ (已禁用)"] Templates["📂 templates/ (脚手架)"] Shared["📂 shared/ (公共资源)"] Logs["📂 logs/ (全局日志)"] end subgraph Details["文件说明"] F1["📄 fastlog-server/ (Python/JS)"] S1["📜 scripts/ (sh/py)"] L1["📚 libs/ (Common)"] end Active --> F1 Shared --> S1 Shared --> L1 style Root fill:#f1f5f9,stroke:#64748b style Active fill:#dbeafe,stroke:#3b82f6 style Shared fill:#dcfce7,stroke:#10b981 style Templates fill:#fef3c7,stroke:#f59e0b
路径 主要作用 典型文件类型
/active/fastlog/日志查询主程序.py, .json
/shared/libs/通用 API 封装.py
/shared/scripts/部署与管理脚本.sh