fareworks-mcp-wp
v1.2.0
Published
Fareworks open-source framework and CLI for scaffolding WordPress AI agent skills, prompts, and MCP configurations
Downloads
493
Maintainers
Readme
fareworks-mcp-wp / create-fareworks-wp
Fareworks open-source framework and CLI for scaffolding WordPress AI agent skills, prompts, and Model Context Protocol (MCP) configurations across Google Antigravity, Claude Code, Cursor, Windsurf, and Roo Code/Cline.
⚡ Quick Start
Scaffold a complete WordPress AI agent setup with a single command:
# Interactive setup
npx fareworks-mcp-wp
# Or via create alias
npx create-fareworks-wp
# Zero-prompt one-liner (Roofing & Solar Custom Theme for all agent platforms)
npx fareworks-mcp-wp init --agent all --method custom-theme --industry roofing --output ./my-wp-agent🎯 What Does It Generate?
mcp-wp-frameworks produces ready-to-run files tailored to your choice of AI IDE and WordPress architecture:
my-wp-agent/
├── .gemini/skills/wordpress-theme-builder/SKILL.md # Official Google Antigravity Agent Skill
├── .claude/skills/wordpress-theme-builder/SKILL.md # Official Claude Code Agent Skill
├── .cursorrules # Cursor Agent Rules
├── .windsurfrules # Windsurf Cascade Rules
├── PROMPT.md # Master Autonomous Build Blueprint
├── SYSTEM_PERSONA.md # Chief WordPress Architect Persona
├── SCHEMA.json # Draft-07 Site Specification Schema
├── mcp-config.json # stdio & sse MCP Client Configuration
├── mcp-wp-bridge.zip # (Optional) WordPress Bridge Plugin (.zip)
└── mcp-wp-bridge-single.php # (Optional) Drop-in mu-plugin installer🏗️ Architecture Methods
| Feature | Method 1: Custom Hybrid Theme | Method 2: Elementor + Hello Elementor |
|---|---|---|
| Paradigm | Zero-bloat semantic HTML5 & native CSS variables | 100% native Elementor container widget trees |
| Theme Base | Bespoke custom theme in wp-content/themes/ | hello-elementor theme |
| PageSpeed Target | 100 / 100 on Google PageSpeed Insights | High PageSpeed with compiled static Elementor CSS |
| Client Editability| WP Customizer / Gutenberg / Hybrid the_content() | Full visual drag-and-drop Elementor editor |
| Database Storage | Semantic PHP templates & core post content | Native JSON structures stored in _elementor_data |
| Best For | High-performance enterprise, local SEO, fast loading | Agencies delivering visually editable client sites |
🛠️ CLI Usage
init — Scaffold a Project
# Interactive wizard
npx mcp-wp-frameworks init
# Flags for automated workflows
npx mcp-wp-frameworks init [options]
Options:
-a, --agent <platform> Target agent platform:
'all' | 'antigravity' | 'claude' | 'cursor' | 'windsurf' | 'cline'
-m, --method <method> Architecture method:
'custom-theme' | 'elementor'
-i, --industry <preset> Industry preset:
'roofing-solar' | 'garage-doors' | 'plumbing-hvac' |
'medical-dental' | 'legal-firm' | 'custom'
-o, --output <dir> Target output directory (default: ./wordpress-scaffold)
--copy-bridge Copy bundled WordPress MCP bridge plugin assets to output
--dry-run Preview generated files without writing to disk
-y, --yes Non-interactive execution with defaultsguide — 4-Step Interactive Creation Guide
Walk through the complete process of connecting an AI agent to WordPress:
# View the complete 4-step creation guide
npx mcp-wp-frameworks guide
# View a specific step (1..4)
npx mcp-wp-frameworks guide --step 1 # Bridge Plugin Installation
npx mcp-wp-frameworks guide --step 2 # MCP Server Configuration
npx mcp-wp-frameworks guide --step 3 # Agent Tools Verification (wp_run_php, wp_cli, etc.)
npx mcp-wp-frameworks guide --step 4 # Page Generation & Unsplash Media Ingestiondoctor — Health & Connectivity Diagnostics
Diagnose WordPress REST and MCP bridge connectivity before launching agents:
# Test local development instance
npx mcp-wp-frameworks doctor --wp-url http://localhost:8088
# Test with authentication token
npx mcp-wp-frameworks doctor --wp-url https://staging.example.com --wp-token my-secret-token💻 Programmatic TypeScript / ESM API
Import generators directly into custom build tools, orchestration workflows, or agent scripts:
import {
generateSkills,
generatePrompts,
getMcpConfig,
getSystemPersona,
scaffoldProject,
runDoctor,
getDoctorGuide,
INDUSTRY_PRESETS,
} from 'mcp-wp-frameworks';
// 1. Generate multi-platform agent skills
const skills = generateSkills({
agent: 'all',
method: 'custom-theme',
industry: 'roofing',
});
// 2. Generate blueprint prompts and Unsplash protocols
const prompts = generatePrompts({
method: 'custom-theme',
industry: 'roofing',
businessName: 'Apex Roofing & Solar KC',
primaryColor: '#1E3A8A',
});
console.log(prompts.masterPrompt);
console.log(prompts.unsplashProtocol);
console.log(prompts.schemaJsonLd);
// 3. Generate MCP Server Client Configuration
const mcpConfig = getMcpConfig({
agent: 'antigravity',
wpUrl: 'http://localhost:8088',
wpToken: 'dev-secret-token-change-in-production-64bytes',
});
// 4. Scaffold full project directly to disk
const { writtenFiles, outputDir } = await scaffoldProject({
agent: 'all',
method: 'custom-theme',
industry: 'roofing',
outputDir: './my-scaffolded-site',
copyBridge: true,
});
// 5. Run health diagnostics programmatically
const diagnostic = await runDoctor({
wpUrl: 'http://localhost:8088',
wpToken: 'dev-secret-token-change-in-production-64bytes',
});
console.log(diagnostic.status); // 'pass' | 'fail' | 'warn'🏢 Built-in Industry Presets
The package includes 5 production-hardened local service business presets:
- Roofing & Solar Contractor (
roofing-solar/roofing):- Default: Apex Roofing & Solar KC (Kansas City, MO)
- Colors: Primary
#1E3A8A(Deep Navy), Accent#F59E0B(Solar Amber)
- Garage Door Repair & Installation (
garage-doors/garage):- Default: Open Way Garage Door LLC (Central Illinois)
- Colors: Primary
#1C1C1C(Charcoal), Accent#B9975B(Warm Brass)
- HVAC & Emergency Plumbing (
plumbing-hvac/plumbing):- Default: Mile High HVAC & Emergency Plumbing (Denver, CO)
- Colors: Primary
#0C2340(Steel Blue), Accent#00A3E0(Electric Cyan)
- Luxury Dental & Aesthetics (
medical-dental/dental):- Default: Lumina Modern Dental & Aesthetics (Scottsdale, AZ)
- Colors: Primary
#111827(Onyx), Accent#10B981(Emerald Mint)
- Personal Injury & Trial Law (
legal-firm/legal):- Default: Sterling & Vance Trial Attorneys (Chicago, IL)
- Colors: Primary
#18181B(Rich Slate), Accent#C29B38(Judicial Gold)
🧪 Testing & Verification
The package comes with 100% automated Vitest test coverage across CLI commands, programmatic APIs, presets integrity, agent skills specifications, and doctor guides:
# Build TypeScript
npm run build
# Run Vitest test suites
npm test
# Typecheck without emit
npm run typecheck📄 License
MIT © MCP WP Frameworks Authors
