MCP.so
登录
A

Archrad Deterministic MCP Server

@archradhq

基本信息

分类

开发工具

传输方式

stdio

作者

archradhq

提交者

Archrad

关于 Archrad Deterministic MCP Server

stdio MCP server from @archrad/deterministic—same engine as the archrad CLI. Validates architecture IR (structural + IR-LINT), merges local PolicyPack YAML, checks export drift vs generated files on disk, and returns static archrad_suggest_fix guidance per built-in rule code. No

Archrad Deterministic MCP Server 配置

使用下面的配置,将此服务器添加到你的 MCP 客户端。

{
  "mcpServers": {
    "archrad": {
      "command": "npx",
      "args": [
        "-y",
        "--package=@archrad/deterministic",
        "archrad-mcp"
      ]
    }
  }
}

Archrad Deterministic MCP Server 工具

6

Architecture-as-code validation: run this when you need to check whether an IR graph is valid or to list violations before export or drift checks. Keywords: validate IR, architecture lint, IR-STRUCT, IR-LINT, policy pack, blueprint graph, nodes and edges. Runs in one call: 1) Structural validation — graph shape, references, IR-STRUCT-* errors. 2) Architecture lint — design rules (auth, dead nodes, DB access, sync chains, etc.). 3) Optional PolicyPack rules — pass policiesDirectory to load YAML/JSON packs from disk. Returns irStructuralFindings, irLintFindings, and combined (sorted by severity). ok is false when any finding has severity "error". After results: call archrad_suggest_fix with a finding code for remediation text; use archrad_lint_summary for a short human-readable digest. Input: provide exactly one of ir (inline JSON object) or irPath (path to .json). Large graphs: prefer irPath.

Human-readable summary of validation results: error/warning counts and up to 20 top findings (plain text). Keywords: summary, PR comment, explain violations, readable lint output. Use when you need a short narrative or comment, not structured JSON. For machine-actionable findings, use archrad_validate_ir instead. Same inputs as archrad_validate_ir: ir or irPath, optional policiesDirectory. Provide only one of ir or irPath.

Look up curated remediation steps and documentation URL for one built-in rule code (e.g. IR-LINT-MISSING-AUTH-010, IR-STRUCT-*, DRIFT-*). Keywords: remediation, how to fix, rule code, docs link, IR-LINT, IR-STRUCT. Does not return generated code patches or IR edits — only static guidance. PolicyPack and org-specific rule ids are not covered; see your YAML packs. Call archrad_list_rule_codes to list codes that have static guidance.

Returns the sorted list of built-in IR-STRUCT-*, IR-LINT-*, and DRIFT-* codes that archrad_suggest_fix can explain. Keywords: catalog, all rules, rule list, documentation index. Use before suggest_fix to confirm a code exists. Excludes PolicyPack custom ids. No arguments.

Compare the architecture IR to generated code under exportDir and report drift (files that no longer match deterministic export). Keywords: drift, CI, codegen diff, FastAPI, Express, Node, Python, validate export, architecture vs implementation. Requires: ir or irPath, exportDir (absolute path to the export tree), and target. target must be "python" or "nodejs" (use "nodejs" for Node/TypeScript; do not use "node"). Optional: policiesDirectory, skipIrLint (true to skip IR-LINT and only check drift). Returns driftFindings plus IR structural and lint findings from the same engine as CLI validate-drift.

Validate PolicyPack YAML/JSON without running against a graph: syntax, rule ids, and compilation. Keywords: policy pack, YAML rules, validate policies, org rules, offline check. You usually do not need this before archrad_validate_ir or archrad_validate_drift — those accept policiesDirectory and load packs internally. Use this tool to debug pack files in isolation. Provide either directory (folder path) or files (array of { name, content }), not both.

概览

What is Archrad Deterministic Mcp?

Archrad Deterministic Mcp gives AI coding agents (Claude Desktop, Cursor, and other MCP-capable hosts) deterministic architecture governance. It validates an intermediate representation (IR) against structural rules and built-in IR-LINT with no LLM in the validation loop, using the same engine as the archrad CLI. Licensed under Apache-2.0.

How to use Archrad Deterministic Mcp?

Install globally with npm install -g @archrad/deterministic; the binary archrad-mcp ships with the package. Alternatively, use npx without a global install by adding the server configuration to your MCP host (e.g., Claude Desktop's claude_desktop_config.json). The server exposes six MCP tools: archrad_validate_ir, archrad_lint_summary, archrad_validate_drift, archrad_policy_packs_load, archrad_suggest_fix, and archrad_list_rule_codes.

Key features of Archrad Deterministic Mcp

  • Deterministic IR validation without LLM involvement
  • Built-in IR-LINT rules for common architecture issues
  • Drift detection between IR and on-disk export directories
  • Optional PolicyPack support for custom governance rules
  • Stateless per-call design; policies must be passed on each invocation
  • Curated, static fix suggestions for individual rule codes

Use cases of Archrad Deterministic Mcp

  • AI agents validating system graphs before code generation
  • Pre-commit structural checks in CI/CD pipelines
  • Comparing architecture IR against existing code exports for drift
  • Smoke-checking PolicyPack YAML or JSON configurations
  • Listing all built-in rule codes with static remediation guidance

常见问题

1

Does Archrad Deterministic Mcp use an LLM for validation?

No. The validation is fully deterministic, using the same engine as the `archrad` CLI. No AI is involved in rule evaluation.

2

What transport protocol does the server use?

The server uses standard MCP transport. For detailed transport options, IR size limits, and testing recipes, refer to the separate `MCP.md` documentation.

3

How are policies loaded and applied?

Policies are passed per-tool call via the `policiesDirectory` parameter. The `archrad_policy_packs_load` tool compiles and smoke-checks them but does not register them; they must be re-provided for each validation or lint call.

4

Can I use this with enterprise policy management?

Yes. For teams using ArchRad Cloud, a separate package (`@archrad/remote-mcp`) provides an HTTP MCP gateway that fetches org PolicyPack context using a bearer token. Deployment and token issuance are product-specific.

5

What are the runtime dependencies?

The server requires Node.js and the npm package `@archrad/deterministic`. It is tested with standard MCP hosts like Claude Desktop and Cursor. No additional databases or services are needed for the open-source version.

评论

开发工具 分类下的更多 MCP 服务器