dev-manager-tauri/.blueprint/modules/mcp-server.md
lanrtop c598c9b05b feat: add BlueprintPromptModal for blueprint management and sync functionality
- Implemented BlueprintPromptModal component to handle blueprint prompt generation and rule synchronization.
- Added BlueprintStatusBadge to display the current status of blueprints in ProjectCard.
- Integrated blueprint status fetching and synchronization in ProjectCard.
- Enhanced SettingsPage with a new section for MCP service configuration and batch sync for blueprint rules.
- Updated commands to include new blueprint-related functionalities and types.
- Changed application name from "Dev Manager" to "炼境" in various components.
2026-04-04 10:47:27 +09:00

1.8 KiB
Raw Blame History

内嵌 MCP Server

炼境进程内置一个 axum HTTP 服务器,实现 MCP 协议,按产品组聚合上下文数据,供组内所有项目的 Claude 实例查询。

决策记录

  • 内嵌在 Tauri 进程而非独立进程,因为炼境托盘常驻时天然保证服务存活,无需额外进程管理
  • 使用 HTTP/SSE 传输而非 stdio因为 HTTP 可被 Windows 和 WSL 两侧同时访问WSL localhost 穿透)
  • 默认端口 27190冷门端口冲突概率极低可在设置页修改
  • MCP 工具按 group_id 路由,不同产品组的数据完全隔离

任务卡

启动时绑定 HTTP 端口

  • status: done
  • complexity: M
  • files: src-tauri/src/mcp_server.rs, src-tauri/src/lib.rs, src-tauri/Cargo.toml
  • depends: tray-service
  • acceptance: 炼境启动后 http://localhost:27190/health 返回 200进程退出后端口释放

实现 MCP JSON-RPC 基础协议

  • status: done
  • complexity: M
  • files: src-tauri/src/mcp_server.rs
  • acceptance: 支持 initializetools/listtools/call 三个 JSON-RPC 方法,通过 MCP Inspector 验证

实现产品组上下文工具

  • status: done
  • complexity: M
  • files: src-tauri/src/mcp_server.rs
  • depends: mcp-server基础协议
  • acceptance: 以下三个工具可用且返回正确数据
    • list_group_projects(group_id) → 组内项目列表名称、路径、平台、tech_stack
    • get_project_blueprint(group_id, project_id) → 对应项目的 manifest.yaml 内容
    • get_project_file(group_id, project_id, relative_path) → 对应项目的任意文件内容

MCP 端口可配置Rust 侧)

  • status: done
  • complexity: S
  • files: src-tauri/src/db.rs, src-tauri/src/mcp_server.rs
  • acceptance: settings 表默认写入 mcp_port=27190启动时读取该值绑定端口SettingsPage UI 见 product-group-mcp 模块)