CRA-Switch EU CRA Article 14 & OpenVEX MCP Server

v2.1.0
dev.craswitch/mcp-server Checked 1 day ago Published 1 day ago

EU CRA Article 14 CVE triage, ENISA SRP 24h worksheets, CSIRT mapping & Ed25519 OpenVEX MCP.

Zero-dependency Model Context Protocol (MCP) server (JSON-RPC 2.0 over stdio) from theperipetycompany/cra-switch enabling AI coding assistants (Claude Code, Cursor, Antigravity), security engineers, and procurement bots to scan lockfiles with the 4-state CRA triage machine, scaffold and update .cra-vex.json v2 attestations, draft 1:1 ENISA SRP manual web-form worksheets + Article 14(8) customer advisories, and cryptographically verify Ed25519-signed OpenVEX documents.

Summary extracted from the README.

@craswitch/mcp-server — EU CRA Article 14 & OpenVEX MCP Server

Zero-dependency Model Context Protocol (MCP) server (JSON-RPC 2.0 over stdio) from theperipetycompany/cra-switch enabling AI coding assistants (Claude Code, Cursor, Antigravity), security engineers, and procurement bots to scan lockfiles with the 4-state CRA triage machine, scaffold and update .cra-vex.json v2 attestations, draft 1:1 ENISA SRP manual web-form worksheets + Article 14(8) customer advisories, and cryptographically verify Ed25519-signed OpenVEX documents.

Requirements

  • Node.js >= 22.0.0 (built-in --experimental-strip-types, fetch, and WebCrypto Ed25519 — zero external runtime dependencies).

Exposed MCP Tools

CRA-Switch v2 Core Tools

Tool Description
craswitch_scan_lockfile Scans a lockfile (package-lock.json, pnpm-lock.yaml, Cargo.lock, go.sum, requirements.txt, poetry.lock, pom.xml) via POST /api/v1/scan or local @cra-switch/core fallback. Returns CycloneDX PURL count, matched KEV/EUVD advisories, and 4-state triage status (triage_required on raw matches — NEVER automatically starts a 24h statutory clock — or clean).
craswitch_init_vex Scaffolds a valid .cra-vex.json v2 document (version: "2", securityContactEmail, coordinatorCsirt, euMemberStatesDistributed, suppressions: [], triageEvents: []).
craswitch_add_suppression Appends a spec-compliant OpenVEX not_affected suppression AND an auditable triageEvents timestamp entry to .cra-vex.json v2.
craswitch_draft_enisa_srp Generates a 1:1 ENISA SRP manual web-form copy-paste worksheet AND a parallel Article 14(8) customer notification advisory (markdown, emailSubject, emailBody, ghsaPayload). Never auto-submits to ENISA.

Vendor Verification & Legacy Compatibility Tools

Tool Description
check_vendor_cra_status Queries GET /api/v1/x402/attest/:org/:repo. Returns structured x402 payment challenge details on HTTP 402 or signed CRA posture on HTTP 200 with paymentProof.
verify_vex_signature Fetches GET /.well-known/vex.json?repo=<org>/<repo> and cryptographically verifies its Ed25519 signature via WebCrypto (crypto.subtle).
scan_lockfile_kev Legacy alias for lockfile KEV scanning (preserved for v1 compatibility).

Client Setup

Claude Code

claude mcp add craswitch -- npx -y @craswitch/mcp-server

Cursor / Claude Desktop / Antigravity / MCP Registry

Add to .cursor/mcp.json, claude_desktop_config.json, or your MCP Registry client config:

{
  "mcpServers": {
    "craswitch": {
      "command": "npx",
      "args": ["-y", "@craswitch/mcp-server"],
      "env": {
        "CRA_SWITCH_URL": "https://craswitch.dev"
      }
    }
  }
}

Running Directly From the Monorepo Checkout

{
  "mcpServers": {
    "craswitch": {
      "command": "node",
      "args": [
        "--experimental-strip-types",
        "./packages/mcp/src/cli.ts"
      ],
      "env": {
        "CRA_SWITCH_URL": "https://craswitch.dev"
      }
    }
  }
}

Publishing to npm & the Official MCP Registry

packages/mcp/package.json sets "mcpName": "dev.craswitch/mcp-server" and pairs with packages/mcp/server.json for DNS-verified Official MCP Registry publication (Glama and downstream MCP directories auto-ingest from the Official MCP Registry).

  1. Publish the npm package (after bundling @cra-switch/core for standalone distribution):
    cd ./packages/mcp && npm publish --access public
    
  2. Verify domain ownership for dev.craswitch via DNS TXT on craswitch.dev (mcp-publisher init / DNS TXT challenge), then publish the registry manifest:
    cd ./packages/mcp && mcp-publisher publish
    
  3. Directory auto-ingestion: Once live in the Official MCP Registry (dev.craswitch/mcp-server), Glama and compatible MCP registries automatically index the listing from server.json — no manual duplicate form submission required.

Packaging note: In the monorepo, packages/mcp imports @cra-switch/core via relative paths (../../core/src/*.ts). Run it directly from the theperipetycompany/cra-switch checkout, or bundle packages/core before running npm publish --access public.

Example JSON-RPC 2.0 Session

printf '%s\n%s\n' \
  '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"demo","version":"2.0.0"}}}' \
  '{"jsonrpc":"2.0","id":2,"method":"tools/list"}' \
  | CRA_SWITCH_URL=https://craswitch.dev node --experimental-strip-types packages/mcp/src/cli.ts

DRAFT COMPLIANCE AID ONLY — NOT LEGAL ADVICE. CRA-Switch aggregates public vulnerability feeds on a best-effort basis and NEVER auto-submits reports to ENISA. Raw dependency matches enter triage_required and never start the statutory 24-hour Article 14 clock until a vendor confirms active exploitation.