依据 F-260619-02 设计,对外暴露数据层接入 Claude Code/Cursor: - 新建 df-mcp crate:JSON-RPC 2.0 over stdio(initialize/tools/list/tools/call) - 暴露 19 数据层工具(项目/任务/灵感/工作流/回收站),复用 df-storage Repo 零重复 CRUD - 三层安全降级:High 风险(delete/purge/run_workflow)tools/list 不暴露+dispatch 拒+handler 二次拒;Medium 允许+审计日志;--read-only 仅 Low - 不暴露文件系统工具(防绕过应用内路径校验) - Tauri CLI 子命令 devflow mcp-server [--db/--read-only/--print-config] - SQLite WAL 已启用(复用 Database::open),应用与 MCP server 并发写安全 自验: df-mcp 8 passed + workspace EXIT 0
20 lines
489 B
TOML
20 lines
489 B
TOML
[package]
|
|
name = "df-mcp"
|
|
version = "0.1.0"
|
|
edition = "2021"
|
|
description = "DevFlow MCP Server — 对外暴露数据层工具(JSON-RPC 2.0 over stdio)"
|
|
|
|
[dependencies]
|
|
df-storage = { path = "../df-storage" }
|
|
df-types = { path = "../df-types" }
|
|
serde.workspace = true
|
|
serde_json.workspace = true
|
|
tokio.workspace = true
|
|
anyhow.workspace = true
|
|
tracing.workspace = true
|
|
uuid.workspace = true
|
|
futures = "0.3"
|
|
|
|
[dev-dependencies]
|
|
tokio = { workspace = true, features = ["full", "test-util"] }
|