WebGraft
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
WebGraft (webgraft)
Turn the fragmented internal portals & legacy ERPs you have access to into an invisible, permission-scoped Personal Capability Graph inside your AI Agent — 100×–350× faster pure-HTTP execution, fail-closed human confirmation, and zero new dashboards.
WebGraft lives silently inside Claude Code, Cursor, Antigravity, DSH, or OpenClaw via an ultra-lean 6-tool MCP bridge (~590 tokens). It compiles authorized web apps from live JS bundles (oxc-parser AST) + optional repo/OpenAPI + inherited user session, maps your exact role & permission boundary, evaluates whether a task can be completed (and what you can do next if blocked), enforces fail-closed native OS human confirmation + Post-Write Read-Back verification, and auto-heals in milliseconds via Bundle-Diff when portals silently upgrade.
Why WebGraft?
Approach | Examples | What Breaks in Real Enterprise Use |
Browser / DOM Agents | Browser Use, Stagehand, Playwright MCP | Boot & drive full Chromium DOM every step (5–20s, 600MB RAM, burns VLM/LLM tokens, fragile selectors) |
Static HAR Converters | AnythingMCP, | Only capture the 3 endpoints you clicked; shatter on CSRF rotation, auth expiry, or app upgrades |
Site-Owner Protocols | WebMCP | Require legacy ERP / internal SaaS teams to rewrite their frontend (99% never will) |
WebGraft |
| Compiles JS Bundle AST + Inherited RBAC → Permission-Scoped Personal Capability Graph + Pure HTTP (<2ms local / <150ms remote) + Fail-Closed Confirmation + Bundle-Diff Self-Heal |
Related MCP server: varco_mcp
Core Capabilities
Permission-Scoped Personal Capability Graph & Task Feasibility Advisor
Automatically captures your logged-in identity, role, and permissions (
/session,/me,/login, custom auth headersCookie/Bearer/X-Token/X-Access-Token) and prunes403boundaries on the fly.Keeps the capability graph internal so users never have to memorize admin menus — instead, for every natural-language request, WebGraft tells the Agent:
Can it be completed? (
CAN_COMPLETE_NOW,AUTO_RESOLVE_THEN_ACT,NEEDS_CONFIRMATION) with logical execution steps & auto-resolution of missing entity IDs;If blocked by permissions (
BLOCKED_PERMISSION), blocks before popping any dialog, points to a safe read-onlyprepActionto pull facts, and gives concrete "what you can do next" unblock options (e.g., ready-to-send handover summary for anadmincolleague).
3-Layer Quality Gates & Fail-Closed Unforgeable Human Confirmation
Gate 1 (Pre-Flight): Deterministic
<0.1msschema, required-param, enum, and type check before touching the network.Gate 2 (Fail-Closed Human Confirmation on
run_write):Pops a clean, jargon-free native desktop confirmation modal (macOS / Windows — default button is always
Cancel, 55s timeout auto-denies) that the AI cannot forge or bypass even if the Agent host auto-approves MCP calls.Automatically fails closed to SHA-256 parameter-bound single-use cryptographic tickets (
--strict-tickets) in headless / SSH / CI / chat-bot environments.
Gate 3 (Post-Write Read-Back Verification): Automatically locates the exact parent
GETdetail endpoint (ignoring/logsor/invoicesub-resources), verifies the persisted write, and computes field-levelbefore → afterreceipts.
Pure Business Outcome Delivery (Zero Scripts, Zero Plumbing)
Ships with an Agent skill (
skills/webgraft/SKILL.md) that keeps the assistant focused on what was accomplished, verified before → after effect, and where to view it — never dumping.mjsscripts, HTTP paths, or raw JSON.
Bundle-Diff Self-Healing
When an ERP silently ships breaking
v1 → v2endpoint moves or parameter renames (/api/v1/orders→/api/v2/orders,keyword→searchTerm), WebGraft catches404/400, re-fetches live chunks, diffs the AST capability graph, remaps renamed parameters, persists the updated IR, and retries in ~6–10ms with 0 UI clicks.
Verified Benchmarks & Real-World Blind Tests
1. Enterprise ERP Benchmark (npm run bench & npm run demo:chat)
Same 3-step authenticated ERP workflow (REST list + POST search + GraphQL query) with HttpOnly Cookie + rotating CSRF + dual-role RBAC (operator vs admin):
Metric | Measured Result |
One-time compile + Chrome CDP session capture | 1,090 ms (10 capabilities across 3 chunks, incl. unclicked hidden APIs) |
Headless Chrome DOM workflow (excl. LLM wait) | 585.6 ms avg |
WebGraft Pure-HTTP MCP (0 Chrome, $0 LLM) | 1.68 ms avg (348.5× faster) |
Breaking Portal Upgrade ( | Self-healed in 5.8 ms via Bundle-Diff AST (0 UI clicks) |
Global Multi-App MCP Schema Footprint | 6 tools (~590 tokens total) — stays constant even across 10 portals & 500 endpoints |
2. Cold Blind Tests on Live Production Web Apps (npm run blind-test, zero source code)
Live Production Target | Bundler / Stack | Real APIs Discovered | False Positives | Elapsed |
| Webpack 5 + Umi + React | 25 APIs (36 chunks, 38 vendor skipped) | 0 | 7.8s |
| Webpack 4 + Vue CLI (inline map) | 14 APIs (76 lazy chunks auto-discovered) | 0 | 5.8s |
| Vite 6 + Rolldown + Vue 3 | 41 CRUD APIs (100 concurrent chunks) | 0 | 2.2s |
| Next.js App Router | 6 APIs (static | 0 | 3.1s |
Architecture
flowchart LR
S1["1. Live JS Bundles<br/>(Webpack 4/5, Vite, Next.js)"] --> IR
S2["2. Optional Source Repo / OpenAPI<br/>(TS, TSX, Vue SFC, Swagger)"] --> IR
S3["3. Inherited Human Auth & Role<br/>(CDP Headed SSO / --attach 9222)"] --> IR
IR["Role-Scoped Personal Capability Graph<br/>~/.webgraft/apps/ (Zero Secrets in IR)"] --> MCP["Ultra-Thin 6-Tool MCP<br/>(~590 tokens) + Agent Skill"]
IR --> CLI["Standalone CLI"]
MCP --> PLAN["Task Feasibility &<br/>Unblock Advisor"]
PLAN --> GATE["3-Layer Quality Gate<br/>Pre-Flight · Fail-Closed Modal · Read-Back"]
GATE --> EXEC["Pure-HTTP Runtime (<150ms)<br/>+ Outcome Receipt + Audit Log"]
EXEC -- "404 / Schema Drift" --> HEAL["Bundle-Diff Self-Heal<br/>Re-parse chunks & patch IR (~6ms)"]
HEAL --> EXECQuick Start
Requires Node.js >= 22 (uses native fetch & WebSocket CDP; single dependency oxc-parser).
1. Connect inside Claude Code / Cursor / DSH / OpenClaw (Zero New UI)
# Add WebGraft MCP server once
claude mcp add webgraft -- npx -y webgraft mcp
# Optional: generate project-level Agent Skill (.agents/skills/webgraft-bridge/SKILL.md) + MCP snippet
npx webgraft initThen just talk naturally in your AI Agent:
"Connect to our internal ERP at https://erp.company.internal"(pops an auto-closing Chrome login window only if auth is required)"Approve Initech's pending order"(auto-locates the order → pops fail-closed confirmation card → verifies persisted state → delivers clean before/after outcome)"Refund order ORD-1002"(if your role lacks permission, blocks with 0 popups, pulls order facts, and drafts a ready-to-send handover message for an admin)
2. Standalone CLI (Great for Enterprise Intranet / Existing Chrome SSO)
# Option A: Compile + open Chrome to log in via corporate SSO/MFA/QR + verify READ endpoints
npx webgraft connect https://erp.company.internal --name my-erp --headed --verify
# Option B: Attach to your already logged-in Chrome (started with --remote-debugging-port=9222)
npx webgraft connect https://erp.company.internal --name my-erp --attach 9222 --verify
# Inspect compiled capabilities & playbooks (stored under ~/.webgraft/apps/<name>/)
npx webgraft apps
npx webgraft ask "list pending orders" --execute
# Run the local interactive demo without touching any real system
npm run demo:chatSecurity & Honest Execution Boundaries
Local-First & Strict Secret Isolation: Session cookies, Bearer tokens, custom auth headers, and CSRF tokens live strictly in
~/.webgraft/apps/<appId>/session.json(0600) and are never written intocapabilities.jsonor Git.Inherited Human RBAC + 403 Self-Pruning: Executes strictly under the employee's real authenticated session — zero privilege escalation (handles both standard HTTP
401/403and enterprise HTTP200JSON error envelopes).Hard Read/Write Tool Separation & Fail-Closed Confirmation:
run_readphysically refuses anyWRITEorDANGEROUS_WRITEcapability (READ_ONLY_TOOL_VIOLATION).run_writeenforces fail-closed native OS confirmation by default, falling back to single-use SHA-256 parameter-bound tickets (--strict-tickets) in headless environments.3-Tier Execution Honesty:
Tier 1 (
pure-http): Direct Nodefetch()— zero Chrome, millisecond execution.Tier 2 (
page-fetch): In-pagefetch()via CDP (--mode page-fetch) forSameSite/proxy quirks — still zero DOM clicks.Tier 3 (Frontend-signed / encrypted payloads): Honestly surfaced rather than silently pretending to succeed.
License
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Zero-secret MCP gateway for AI agents: risk-scored, audited calls with human-in-the-loop approval.
An MCP gateway for teams deploying AI tools at scale to employee-facing and headless agents.
Zero-setup MCP gateway securely connecting AI to your tools with authentication and workflows
MCP server for your apps' tools and custom tools, plus hosted AI agents and approval-gated workflows
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to access internal systems without public APIs as typed, governed MCP tools, with human-approved writes and fail-closed contract updates.Apache 2.0
- AlicenseNot gradedqualityDmaintenanceEnables MCP-compatible AI agents to safely act on business backends by enforcing per-agent permissions, autonomy thresholds, human approval with review-and-edit, and full audit trails.MIT
- FlicenseNot gradedqualityDmaintenanceEnables AI agents to securely call enterprise MCP tools with tenant-scoped RBAC, human approvals, audit logging, and multi-tool workflows across customer, order, document, and ticket data.-
- FlicenseNot gradedqualityBmaintenanceEnables AI agents to execute real-world API actions with exactly-once reliability, deduplication, auditing, and human-in-the-loop safeguards via MCP.3-