MCP 服务器概览
What is Mcp Server? Mcp Server (@decantr/mcp-server) is Decantr’s Model Context Protocol (MCP) server package (stable v3.9.4) that provides a local design-intelligence layer for AI-assisted web application development. It implements an Observe -> Prepare -> Verify -> Report loop to read local project state, produce route-backed TaskCapsuleV1 context, verify UI diffs, and produce typed evidence and scoped repair prompts without generating or applying code edits.
How to use the project?
- Install/run the stdio MCP server via npx: npx @decantr/mcp-server@3.9.4, or install via client integration commands (Decantr CLI) where supported.
- Integrations provided: Claude Desktop, Cursor (connector/CLI), Windsurf, VS Code (.vscode/mcp.json), Zed (settings), Continue.dev (.continue/mcpServers). Configure the client to point at the decantr MCP server and request route-backed task context before edits.
- Use the server by calling one of its tools with an action payload (JSON) to observe project state, prepare task context for a route, query the project graph, verify diffs, or produce repair plans.
- Typical workflow: decantr_project (state) -> decantr_context (task for route) -> decantr_graph (query/traverse) -> agent edits project -> decantr_verify -> decantr_repair (if needed).
Key features
- Stable MCP tool surface (v3.9.4) with eight action-based tools exposing Observe/Prepare/Verify/Report behaviors.
- Route-backed TaskCapsuleV1: compact, source-ranked task context for route-scoped edits.
- Local verification: critique, evidence bundles, health state, and scoped repair plans without uploading source.
- Typed findings and repair prompts consumable by coding agents.
- Graph and evidence reads: query/traverse local typed graph and source evidence for impact analysis.
- Compatibility envelopes and stable tool contracts; documented product boundaries and unreleased candidate features (3.10) described separately.
- Security: reads project files and Decantr artifacts; write access limited to explicit contract_write actions; no telemetry emitted.
- MIT licensed, npm package includes required stdio transport modules and stable server identity metadata.
Key tools (summary)
- decantr_project: read project state, adoption truth, workspace health.
- decantr_contract: read/validate project Essence/Contract and compatibility skeletons.
- decantr_context: prepare route-backed task capsule or section/page context.
- decantr_graph: read/query/traverse typed graph and evidence.
- decantr_registry: read official corpus vocabulary and execution pack metadata.
- decantr_verify: verify diffs, return critique, evidence bundles, health state.
- decantr_repair: produce scoped repair plans and repair prompts.
- decantr_contract_write: limited write surface for accepting drift or updating Essence.
Use cases
- Provide context to LLM-driven coding agents (Claude, Cursor, VS Code Copilot Chat, Windsurf, Zed) before making route-scoped edits.
- Verify UI changes and generate evidence-backed reports and repair plans after local edits.
- Audit and enforce project Essence/Contract and adoption truth for design-system consistency.
- Discover and rank local source impact for targeted UI improvements (loading, accessibility, performance) without uploading code.
- Integrate verification and repair loops into CI/agent workflows that require local-only analysis.
FAQ (from the project)
-
Q: Will Decantr generate or apply code changes for me? A: No. The MCP server prepares context, verifies results, and suggests repairs; it does not generate or apply source edits.
-
Q: Do I need a Decantr account or hosted service to use the local MCP server? A: No. Local verification and evidence reporting work without an account; some optional content-corpus or pack-resolution actions can call a configured Decantr API but are not required.
-
Q: Which MCP tools are available and stable? A: The published v3.9.4 MCP surface exposes eight tools: decantr_project, decantr_contract, decantr_context, decantr_graph, decantr_registry, decantr_verify, decantr_repair, decantr_contract_write.
-
Q: How do I install or run the server for my agent/client? A: Use npx @decantr/mcp-server@3.9.4 or follow the provided integration snippets for Claude Desktop, Cursor, Windsurf, VS Code, Zed, and Continue.dev.
-
Q: Is this release stable and are breaking changes expected? A: v3.9.4 is stable for the documented tool surface. Breaking changes would require a major version and migration notes. Unreleased 3.10 features are not available in 3.9.4.
-
Q: What about security and write access? A: The server reads project artifacts and graph files within the workspace root. Writes are limited to the explicit decantr_contract_write tool (accept_drift, update_essence). Paths are constrained and the server does not emit telemetry.
-
Q: What license governs the package? A: MIT.