Home Projects Project

SpiritMCP — AI Nervous System for an Agency

Internal Project · Development

Building SpiritMCP
An AI nervous system for our agency.

The first plugin and server pair that lets Claude — and every modern AI assistant — manage WordPress sites, hosting, and infrastructure with editorial care and surgical safety. Built in spare hours alongside a surgical career.

Status
Live · v0.1.1 in production
Tools shipped
56 across 20 categories
Tested
47 of 47 passing on spiritwp.com
Stack
PHP 8.2+ · TypeScript · Fastify · MCP SDK

Spirit MCP

Mossy forest path bathed in morning sunlight
A path that looks impossible until you start walking it. Then it becomes the only obvious way through.

The starting point

A surgeon, a side project, and a stack of broken bridges.

Every WordPress site we manage has dozens of moving parts. Every tool we tried connecting kept tripping over the seams. So we built our own.

Before

The friction tax

Standard automation tools strip # from colours. Hundreds of meta fields need quoting that breaks on every special character. Builder-specific data gets silently dropped by REST. Cache plugins return 404s when purged programmatically.

Every "easy" task became a thirty-minute fight with the wrong layer of the stack.

After

Speak in JSON, write in PHP

SpiritMCP exposes every WordPress task as a clean, schema-typed tool Claude can call. The plugin runs operations in WordPress's own native PHP — the same ones the block editor uses — so what you ask for is what you get.

Special characters survive. Builder fields actually save. Cache actually clears. 47/47 tests passing on first deploy.

Diagram 01 · System architecture

Two front doors. One careful system.

Claude connects to whichever side it needs. The server handles everything outside WordPress; the plugin handles everything inside. They speak through a single bridge when they need to coordinate.

Claude Desktop / Code MCP client SSE JSON-RPC 2.0 SpiritMCP server Fastify · TypeScript · MCP SDK SpiritWP MCP plugin PHP 8.2 · WordPress native VPS · SSH · FILES · CC Run servers, manage Claude Code screenshots, bridge, audit + wp.cli, wp.exec_sql fallbacks 20 WP TOOL CATEGORIES content · meta · cache · builder SEO · forms · taxonomies · users all gated by feature flags wp.plugin_call passthrough SSH + curl localhost · no auth · no firewalls

"The breakthrough wasn't building one big tool. It was realising the system needed two — and that the smartest part would be the bridge between them."

— design note · April 2026

Misty mountain valley at dawn
Sometimes the architecture comes into view all at once.

Diagram 02 · The wp.plugin_call flow

Seven steps. Zero compromise.

What happens when Claude asks the server to do something inside WordPress. Confirm-token retries are automatic. Multi-tenant hosts work because the Host header is resolved per call.

1 · Claude calls wp.plugin_call route: /spiritwp-mcp/v1/meta/post/264 2 · Resolve site domain via SSH ssh vps "wp option get home" → spiritwp.com 3 · Build curl command curl -X PUT -H "Host: spiritwp.com" -d '{...}' http://127.0.0.1/... 4 · Execute over SSH No HTTPS, no auth headers, no firewall rules 5 · Plugin receives (Mode A) Network guard passes (127.0.0.1) → controller runs 6 · Confirm-token auto-retry If CONFIRM_REQUIRED → extract token → re-curl with confirm_token in body retry 7 · Response envelope mapped {ok:true, data:{...}} → MCP ToolResult Claude receives structured data

Build timeline

From audit to live in one evening.

A condensed log of how the project came together — the moments where it clicked, broke, and clicked again.

Lit candle on wooden surface — contemplative light
The work is built in candlelight. The discipline is to keep it lit.
19:00 · Audit

Reviewing the original scaffold

Seven divergences from locked specifications. Decision: scrap and restart with a clean two-part architecture.

19:30 · Architecture

Two front doors, one shared core

Mode A for SpiritMCP server. Mode B for Claude Desktop. Same controllers, two dispatchers. Feature flags as outer gate; confirm tokens as inner gate.

20:00 · Build

Forty-two files, twenty controllers

Bootstrap to twenty REST controllers, MCP layer with rich JSON Schemas, admin settings, audit log, JWT auth, network guard, rate limiter, license stub.

21:30 · Test

Forty-seven tests, all passing

Every endpoint on a live production site. Special characters survived. Three minor bugs found and patched in v0.1.1.

22:30 · Integrate

SpiritMCP server learns the plugin

The server gained wp.plugin_call, wp.plugin_info, and automatic confirm-token retry.

23:00 · Ship

Live on GitHub. Live on production.

Code pushed to github.com/meditatingsurgeon/spiritwp-mcp · server deployed via Coolify · plugin installed · audit log accumulating.

Built with

Technology stack

PHP 8.2+
Plugin core
WordPress
Native APIs
TypeScript
MCP server
Fastify
HTTP layer
MCP SDK
Protocol
JSON-RPC 2.0
Transport
SSE
Streaming
JWT (HS256)
Auth
bcrypt
Bridge keys
Coolify
Deploy
Hetzner
Hosting
GitHub
Version control

What we built

Two halves, both production-ready.

SpiritMCP server

  • Fastify + MCP SDK over SSE transport
  • VPS, SSH, file, and Claude Code remoting
  • wp.plugin_call proxy with auto-retry
  • wp.plugin_info for live feature flag visibility
  • Per-VPS bridge settings in JSON store
  • Multi-tenant Host header resolution via SSH
  • Audit tail for live debugging

SpiritWP MCP plugin

  • 20 tool categories, 56 tools
  • Mode A (localhost bridge) + Mode B (public MCP)
  • 4 feature flags gating dangerous capabilities
  • Confirm-token flow for destructive operations
  • JSONL audit log with hash-and-rotate
  • Rate limiting (30/min) on Mode B
  • SEO adapter (autodetects any major plugin)

47/47
Live tests passing on first deploy
56
Tools across 20 categories
42
Files in plugin source
£4.99
Per month, full feature access

Open-source plugin. Hosted server. Yours from less than a coffee.

SpiritMCP is part of the Automate & Scale pillar — built once, refined publicly, available to every spiritual teacher who wants AI in their stack without losing control of it.

Ready to raise your frequency?

Tell us your vision — we will tell you what is possible.