MCP Server & Sibling Integrations
AI ships a built-in Model Context Protocol (McpServer, JSON-RPC 2.0 protocol version 2024-11-05) so external AI IDEs and agents can inspect ProcessWire content, propose edits, and invoke governed module capabilities safely.
Two MCP Transports (McpServer)
Section titled “Two MCP Transports (McpServer)”1. Standalone HTTP MCP (POST /_ai/mcp)
Section titled “1. Standalone HTTP MCP (POST /_ai/mcp)”- Disabled by default; enable in Setup -> AI -> Routing & Governance -> MCP & Audit Logs.
- Clients authenticate with
Authorization: Bearer pwai_<secret>issued in Setup -> AI -> MCP Access (ai-mcp-keys). - Every key binds an Acting User, an optional expiration date, allowed tool scopes, and a Write Policy (
Read-Only,Propose Only, orWrite). - Every JSON-RPC call is audited in
entries_tbl_ai_mcp_logs(ai_mcp_logs).
2. Local CLI Stdio MCP (vendor/bin/wire ai:mcp)
Section titled “2. Local CLI Stdio MCP (vendor/bin/wire ai:mcp)”For local developer workflows with zero HTTP exposure, launch the stdio JSON-RPC 2.0 server directly from your terminal or IDE MCP configuration:
php vendor/bin/wire ai:mcp --user=editor --read-only --modules=pages,entriesSee the full flag table for ai:mcp (--user, --scopes, --modules, --read-only, --write-mode, --allow-destructive) in PHP API, Hooks & CLI.
All 6 Optional Sibling Integrations (src/Integration/*)
Section titled “All 6 Optional Sibling Integrations (src/Integration/*)”Whenever a sibling Entries-dependent module is installed, AI boots its isolated adapter automatically with zero cross-module coupling when absent:
| Sibling Module | Integration Adapter Capabilities |
|---|---|
Blocks |
Resolves registered block JSON schemas (Ai::resolveBlockSchemas), composes valid block trees via compose(), and audits block content. |
Forms |
Classifies and triages incoming form submissions via Ai::classifySubmission (spam detection, intent routing, priority tagging). |
Headless |
Exposes authenticated REST endpoints at /api/v1/ai/* and /api/v1/mcp through Headless’s auth middleware (JWT/PAT/HMAC/Session). |
Media |
Adds one-click AI alt text, caption, focal point analysis (analyzeImage()), and AI image generation (generateImage()) inside the Media workspace. |
Navigation |
Localizes navigation menu items and labels across active ProcessWire languages via Ai::localizeMenu. |
Seo |
Grounds SEO metadata optimization (SEO & Search Optimizer assistant) across seo.* fields while protecting robots_noindex, canonical URLs, and sitemap flags. |