WebMCP Forge

Zero-config CLI and visual inspector that compiles any live web app via Playwright into a typed MCP server, llms.txt, and SkillGuard prompt-injection-audited SKILL.md in one command.

Documentation

WebMCP Forge

Compile any website or localhost app into a verified WebMCP server, llms.txt, and prompt-injection-audited SKILL.md in one command.

CI Release v0.1.0 Glama MCP Server TypeScript Node 20+ MCP Compatible SkillGuard Verified MIT License


WebMCP Forge Live Demo

Prefer GIF? View assets/demo.gif.

WebMCP Forge Light-Mode Visual Inspector


Why webmcp-forge?

Vision loops burn thousands of screenshot & HTML tokens on every click, while static SKILL.md files go stale and carry supply-chain prompt-injection risks. webmcp-forge crawls your live app once with Playwright, compiles every workflow into strict JSON-Schema MCP tools, verifies the pack with SkillGuard, and serves live tools over stdio or sse.

CapabilityRaw Browser ScrapingStatic SKILL.mdwebmcp-forge
Token CostRaw outerHTML + 1280×800 screenshots (1,366 vision tokens/page) on every turnProse instructions; agent still scrapes/guesses DOMUp to 94% token reduction (92.4% verified on bundled 4-page demo store: 19,033 → 1,437 tokens)
Execution DeterminismFragile LLM-guessed CSS/XPath selectorsUnverified natural-language hintsTyped JSON Schema tools + standalone mcp-server.ts with multi-strategy Playwright locators
API & Form DiscoveryBlind to background XHR/fetch payloadsManually authored & drifts fastAuto-extracts forms, tables, buttons, routes, ARIA landmarks, and live JSON APIs
Supply-Chain SecurityUnaudited DOM text exposed to prompt injectionZero integrity or payload checksBuilt-in SkillGuard (12 static/entropy/decode rules + SHA-256 WEBMCP-MANIFEST signing)
Developer DebuggingTrial-and-error in agent logsPlain Markdown textSwiss Light-Mode Visual Inspector (localhost:4173) with one-click Test Tool Live

1-Line Quickstarts

Requires Node.js 20+ and Playwright Chromium (npx playwright install chromium). Listed on the Glama MCP Server Directory and testable with MCP Inspector.

Compile Any Site or Localhost Dev Server

npx webmcp-forge http://localhost:3000 --ui

That single command crawls your app, outputs webmcp.json, mcp-server.ts, llms.txt, llms-full.txt, and SHA-256-signed SKILL.md to ./agent-pack, audits them with SkillGuard, and opens the Visual Inspector at http://localhost:4173.

Plug Into Any Coding Agent in One Line

Claude Code

claude mcp add webmcp-forge -- npx -y webmcp-forge serve ./agent-pack/webmcp.json --transport stdio

OpenCode

node -e "const fs=require('fs'),p='opencode.json',c=fs.existsSync(p)?JSON.parse(fs.readFileSync(p,'utf8')):{$schema:'https://opencode.ai/config.json'};c.mcp=c.mcp||{};c.mcp['webmcp-forge']={type:'local',command:['npx','-y','webmcp-forge','serve','./agent-pack/webmcp.json','--transport','stdio'],enabled:true};fs.writeFileSync(p,JSON.stringify(c,null,2)+'\n');"

Cursor

node -e "const fs=require('fs');fs.mkdirSync('.cursor',{recursive:true});const p='.cursor/mcp.json',c=fs.existsSync(p)?JSON.parse(fs.readFileSync(p,'utf8')):{};c.mcpServers=c.mcpServers||{};c.mcpServers['webmcp-forge']={command:'npx',args:['-y','webmcp-forge','serve','./agent-pack/webmcp.json','--transport','stdio']};fs.writeFileSync(p,JSON.stringify(c,null,2)+'\n');"

Gemini CLI

gemini mcp add webmcp-forge npx -y webmcp-forge serve ./agent-pack/webmcp.json --transport stdio

Antigravity

node -e "const fs=require('fs'),os=require('os'),path=require('path'),p=path.join(os.homedir(),'.gemini','antigravity','mcp_config.json');fs.mkdirSync(path.dirname(p),{recursive:true});const c=fs.existsSync(p)?JSON.parse(fs.readFileSync(p,'utf8')):{};c.mcpServers=c.mcpServers||{};c.mcpServers['webmcp-forge']={command:'npx',args:['-y','webmcp-forge','serve','./agent-pack/webmcp.json','--transport','stdio']};fs.writeFileSync(p,JSON.stringify(c,null,2)+'\n');"

Prefer HTTP/SSE transport? Run npx webmcp-forge serve ./agent-pack/webmcp.json --transport sse --port 4174.


Gate Pull Requests with webmcp-forge audit (GitHub Action)

Drop this workflow into .github/workflows/skillguard.yml to block hidden prompt injections, Unicode smuggling, Base64 exfiltration payloads, and tampered SKILL.md manifests on every PR:

name: SkillGuard Audit
on:
  pull_request:
    paths:
      - '**/SKILL.md'
      - 'agent-pack/**'

jobs:
  audit-skills:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with:
          node-version: 22
      - name: Run SkillGuard strict audit
        run: npx -y webmcp-forge audit . --strict

Compiled Pack Breakdown

Every webmcp-forge scan <url> outputs five deterministic artifacts into --out <dir> (default ./agent-pack):

ArtifactWhat It Contains
webmcp.jsonTyped WebMCP manifest with crawled pages, ARIA landmarks, observed JSON APIs, token savings breakdown, SkillGuard audit summary, and executable tool definitions (form, action, navigation, table, api).
mcp-server.tsStandalone TypeScript MCP server using @modelcontextprotocol/sdk (Server, StdioServerTransport, SSEServerTransport) and Playwright—ready to compile or customize.
llms.txtClean, spec-aligned agent discovery index summarizing routes, tools, APIs, and pack files.
llms-full.txtComplete Markdown technical reference including full JSON Schemas and field specifications for every tool.
SKILL.mdSigned agent playbook carrying integrity_sha256 in YAML frontmatter and an inline <!-- WEBMCP-MANIFEST-START --> / <!-- WEBMCP-MANIFEST-END --> table binding the Markdown body and every sibling file by SHA-256.

CLI Reference

webmcp-forge scan <url>

Crawl a live URL (or pass <url> directly without scan), compile the WebMCP pack, audit SKILL.md, and optionally launch the Visual Inspector.

FlagDefaultDescription
-o, --out <dir>./agent-packOutput directory for compiled agent pack
--uifalseLaunch the Swiss light-mode Visual Inspector after compilation
-p, --port <number>4173Port for the Visual Inspector HTTP server
--max-pages <number>8Maximum same-origin pages to crawl
--max-depth <number>2Maximum link crawl depth
--timeout <number>15000Per-page navigation timeout in ms
--jsonfalseOutput scan result as JSON
--no-open—Do not attempt to open the browser automatically

webmcp-forge audit <targetPath>

Run SkillGuard static, Shannon-entropy, and SHA-256 manifest verification on a SKILL.md file or directory. Exits with code 1 on threats.

FlagDefaultDescription
--jsonfalseOutput SkillGuard audit report as JSON
--strictfalseExit with code 1 on any finding (including warnings)

webmcp-forge serve <manifestPath>

Start a live Playwright-backed MCP server from a compiled webmcp.json.

FlagDefaultDescription
-t, --transport <mode>stdioMCP transport mode: stdio or sse
-p, --port <number>4174Port for SSE transport

Visual Inspector API (--ui)

  • GET /api/health — server readiness, target URL, and compiled tool count
  • GET /api/pack — compiled manifest, auditReport, raw artifacts, and artifactMeta (bytes, sha256)
  • POST /api/test-tool — executes a named tool live via PlaywrightToolExecutor ({ toolName, args })
  • POST /api/audit — runs SkillGuard on submitted { content, filename } or re-audits the pack on disk

SkillGuard Security Scanner

SkillGuard audits SKILL.md files and agent packs across 12 deterministic rules, pinpointing exact file:line:column coordinates, decoded obfuscated payloads, and remediation steps:

Rule IDCategorySeverityWhat It Catches
SG-UNI-001unicode-smugglingcriticalZero-width characters (U+200B–U+200F, U+2060–U+2064, non-BOM U+FEFF) & Unicode Tag ASCII smuggling (U+E0000–U+E007F) with decoded ASCII preview
SG-UNI-002unicode-smugglingcriticalBidirectional Trojan Source control characters (U+202A–U+202E, U+2066–U+2069)
SG-INJ-001prompt-injectioncriticalDirect prompt-override & jailbreak directives (ignore all previous instructions, override safety, new system prompt:)
SG-INJ-002prompt-injectioncriticalSuspicious agent, shell, or credential directives hidden inside HTML comments (<!-- ... -->)
SG-INJ-003prompt-injectionhighRole or chat-template delimiter spoofing (<|im_start|>, <|system|>, [INST], <system>, ### SYSTEM OVERRIDE)
SG-OBF-001obfuscationcritical / highHigh-entropy (>= 2.8) Base64 payloads decoding to shell/network/injection commands (critical) or long hidden text (high), ignoring data:image/*, UUIDs, and SHA-256 digests
SG-OBF-002obfuscationhighExplicit decode/eval obfuscation (base64 -d, atob(, Buffer.from(..., 'base64'), String.fromCharCode(...), \x.. chains, PowerShell -EncodedCommand)
SG-EXF-001network-exfiltrationcriticalExfiltration capture/tunnel domains (webhook.site, requestbin, pipedream.net, burpcollaborator, oastify.com, interact.sh, ngrok), raw non-localhost IP URLs, and parameterized image beacons
SG-EXF-002network-exfiltrationcriticalRemote script pipes (curl | bash, wget | sh, Invoke-WebRequest | iex) and file/env HTTP upload flags
SG-SHL-001dangerous-shellcriticalReverse-shell primitives (/dev/tcp/, nc -e, mkfifo /tmp, bash -i >&) and destructive commands (rm -rf /, chmod +s)
SG-SHL-002dangerous-shellhighCredential & secret harvesting (~/.ssh, id_rsa, ~/.aws/credentials, /etc/shadow, /etc/passwd, cat .env, printenv, env |)
SG-MAN-001manifest-integritycriticalWEBMCP-MANIFEST verification failure: SKILL.md body SHA-256 mismatch, frontmatter integrity_sha256 mismatch, or tampered/missing sibling artifact

Programmatic API

import {
  scanAndCompile,
  auditTarget,
  startMcpServer,
  startInspectorServer,
} from 'webmcp-forge';

const compiled = await scanAndCompile('http://127.0.0.1:3456', {
  outDir: './agent-pack',
  crawlOptions: { maxPages: 8, maxDepth: 2, timeoutMs: 15000 },
});

const audit = await auditTarget('./agent-pack/SKILL.md');
if (audit.status !== 'CLEAN') {
  throw new Error(`SkillGuard failed (${audit.score}/100)`);
}

const inspector = await startInspectorServer({ packDir: compiled.outDir, port: 4173 });
const mcp = await startMcpServer(compiled.files.webmcpJson, { transport: 'sse', port: 4174 });

Local Development & Testing

git clone https://github.com/noahsh/webmcp-forge.git
cd webmcp-forge
npm install
npx playwright install chromium

npm run typecheck     # Strict TypeScript check
npm run build         # Bundle CLI/library (tsup) and Visual Inspector UI (vite)
npm test              # Run all 4 Vitest + Playwright integration test suites
npm run demo:server   # Run bundled Atelier Hardware demo store on http://127.0.0.1:3456
npm run capture:demo  # Re-run real scan + Playwright/ffmpeg asset capture

See CONTRIBUTING.md and CHANGELOG.md.

License

MIT © 2026 WebMCP Forge Contributors