Listed from the MCP registry; nobody on Odel publishes it.
Read WordPress content, ACF fields, and Yoast SEO data, and safely edit drafts.
Runs on your machine from its package; the steps are below.
At most: creates or changes data: records, files, settings.
Odel charges nothing per call. The publisher may charge for its own service.
Runs locally over stdio
This server isn't hosted — your MCP client launches it from a package registry. Use one of the commands below, or drop the config into your client (e.g. Claude Desktop).
Run
npx -y wp-headless-mcp
MCP client config
{
"mcpServers": {
"wordpress-headless": {
"command": "npx",
"args": [
"-y",
"wp-headless-mcp"
]
}
}
}An MCP server that lets AI assistants read, and safely help edit, the content of a WordPress website.
It connects a company's WordPress site (pages, posts, custom post types like projects or services, ACF fields, and Yoast SEO data) to AI clients such as Claude. Then people can ask questions about the site, or get help with its content, in plain language.
Status: feature-complete for its first version and tested against a real WordPress site, with 120 unit tests.
The Model Context Protocol is an open standard for connecting AI assistants to data and tools. An MCP server describes what it can do as:
Any MCP-compatible client (Claude Desktop, Claude Code, the Claude API, and others) can use the same server without custom integration work.
Many companies already keep their website content in WordPress: services, case studies, team members, FAQs, products. When they build something new on top of it, like a Progressive Web App (PWA), that content is often:
wp-headless-mcp gives all of these people one well-defined, safe AI gateway to the site.
┌────────────────────────────┐
│ WordPress website │
│ pages · projects · ACF · │
│ · Yoast SEO │
└─────────────┬──────────────┘
│ REST API
┌───────────────────┴───────────────────┐
│ │
PWA user interface wp-headless-mcp
(reads REST API directly: (AI layer: tools,
pages, lists, images) resources, prompts)
│
┌──────────────────────┼──────────────────────┐
│ │ │
AI assistant in the PWA Content team in Developers in
(via the PWA backend Claude Desktop Claude Code
and the Claude API)
The PWA keeps reading content from WordPress directly for its normal screens. The MCP server sits next to it and powers the AI features, plus the tools around the site.
An AI assistant inside the PWA that answers questions using the company's own content and links to the source page.
It only sees published, public content and can't change anything.
Staff connect Claude Desktop to the site and work with content conversationally.
Changes are always saved as drafts or pending review. The AI never publishes or deletes content.
Developers connect Claude Code while building the PWA.
The server isn't tied to one website. Point it at any WordPress site that meets the site requirements to add AI features for a client, audit content, or speed up headless builds. Need help with a client project? See setup and custom work.
| Area | Capabilities | Profile |
|---|---|---|
| Content | Search across the site, including ACF fields; get or list posts, pages, and custom post types; categories and tags; Markdown output | All |
| ACF | Custom field values on any item, with labels and types from acf-json | All |
| Company info | Site name, tagline, organization details and social profiles (from Yoast), and the home page text | All |
| SEO | Yoast titles, descriptions, canonical URLs, social images; per-page review and a site-wide issue scan | All (when Yoast is active) |
| Editing | Create and update drafts, copy published items into drafts, update ACF fields, upload media, list drafts | editor |
| Audit | Missing featured images, alt text, meta descriptions, excerpts, and stale content | editor |
| Developer tools | Content model, ACF schema, sample payloads, TypeScript type generation, site requirement and health checks | dev |
| Prompts | Answer a visitor, SEO review, write a blog draft, weekly content report | All / editor |
One server, three profiles. The profile decides which tools exist at all, so a public deployment can't expose editing tools even by mistake.
| Profile | For | Can do |
|---|---|---|
public | AI assistant in the PWA | Read published content. Never signs in, even if credentials are set |
editor | Content and marketing team | Read, plus create and update drafts, audits, and menus (menus need an Administrator) |
dev | Developers | Read, plus schemas, type generation, payload samples, and site checks |
The editor and dev profiles sign in with a WordPress Application Password, so WordPress's own user roles and permissions still apply. The server checks the login and the user's capabilities at startup.
To work fully, a WordPress site should:
show_in_rest => true.acf-json folder.The dev profile's check_site_requirements tool checks these for you.
Known limits: ACF options pages (site-wide settings like phone and email) aren't reachable through the REST API, and menus need a signed-in Administrator.
Requirements: Node.js 22 or newer, and a WordPress site whose REST API is reachable.
There's nothing to install: MCP clients start the server with npx -y wp-headless-mcp and pass the settings as environment variables. Set at least WP_URL. For the editor or dev profile, also create an Application Password (wp-admin → Users → Profile → Application Passwords, ideally for a dedicated user with the Editor role) and set WP_USER and WP_APP_PASSWORD. All settings: Configuration.
The server is also listed in the MCP Registry as io.github.aj-ua/wp-headless-mcp.
npx @modelcontextprotocol/inspector -e WP_URL=http://aj-ua.local -- npx -y wp-headless-mcp
The Inspector opens in the browser. Click Connect, then try the tools, resources, and prompts.
claude mcp add wp-headless-mcp -e WP_URL=http://aj-ua.local -- npx -y wp-headless-mcp
Add -e MCP_PROFILE=editor -e WP_USER=... -e WP_APP_PASSWORD=... for the editing tools.
Add the server to ~/Library/Application Support/Claude/claude_desktop_config.json (macOS), then restart Claude Desktop:
{
"mcpServers": {
"wordpress": {
"command": "npx",
"args": ["-y", "wp-headless-mcp"],
"env": {
"WP_URL": "http://aj-ua.local",
"MCP_PROFILE": "editor",
"WP_USER": "mcp-editor",
"WP_APP_PASSWORD": "<application password>",
"ACF_JSON_PATH": "/absolute/path/to/wp-content/themes/your-theme/acf-json"
}
}
}
}
Run the server in HTTP mode and call it from the backend. Setup, security, and runnable Claude API examples: docs/PWA_BACKEND.md.
All settings are environment variables. MCP clients pass them when they start the server (-e in Claude Code, env in Claude Desktop). When running from source, the npm scripts also read .env.
| Variable | Default | Purpose |
|---|---|---|
WP_URL | required | Site base URL, for example http://aj-ua.local |
WP_USER | — | Application Password user (editor and dev profiles) |
WP_APP_PASSWORD | — | Application Password |
MCP_PROFILE | public | public, editor, or dev |
WP_CACHE_TTL | 60 | Seconds to cache GET requests; 0 turns caching off |
ACF_JSON_PATH | — | Path to the theme's acf-json folder, for ACF labels, schemas, and TypeScript types |
MCP_CPTS | auto | Custom post type tools: auto, none, or JSON such as [{"postType":"project","singular":"project","plural":"projects"}] |
MCP_TRANSPORT | stdio | stdio for local clients, http for remote clients |
MCP_HTTP_TOKEN | — | Bearer token for HTTP mode, at least 32 characters (openssl rand -hex 32) |
MCP_HTTP_HOST | 127.0.0.1 | HTTP bind address; use 0.0.0.0 only behind an HTTPS reverse proxy |
MCP_HTTP_PORT | 3333 | HTTP port |
MCP_HTTP_SESSIONS | false | true keeps one session per client; default is stateless |
MCP_HTTP_SESSION_IDLE_MINUTES | 30 | Idle session timeout |
MCP_HTTP_ALLOWED_ORIGINS | — | Comma-separated browser origins allowed by CORS; empty means server-to-server only |
All profiles:
| Tool | What it does |
|---|---|
list_post_types | Content types with published counts and taxonomies |
search_content | Keyword search; results from WordPress search plus acf_matches from ACF fields |
list_posts / get_post | List or read any post type; body as Markdown, ACF fields, featured image, terms |
list_<type> / get_<type> | Generated per custom post type, for example list_projects and get_project |
list_terms | Categories, tags, and custom taxonomy terms |
get_acf_fields | One item's ACF values with labels, types, and field groups |
get_company_info | Site, organization, social profiles, and home page text |
get_seo_meta | Yoast SEO data and issues for one item or URL (Yoast only) |
find_seo_issues | Site-wide SEO scan with counts per issue (Yoast only) |
editor profile:
| Tool | What it does |
|---|---|
create_draft | New draft, optionally copied from an existing item (copy_from) |
update_post | Change a draft or pending item; can submit it for review |
update_acf_fields | Set ACF values on a draft or pending item, checked against its field groups |
list_drafts | Drafts and pending items with edit links |
upload_media | Add an image or PDF from a public URL, with alt text |
content_audit | Missing images, alt text, descriptions, excerpts, and stale content |
get_menu | Navigation menus as a tree (Administrators only) |
dev profile:
| Tool | What it does |
|---|---|
describe_content_model | Post types, REST routes, taxonomy fields, and ACF groups per type |
get_acf_schema | Full ACF field definitions |
sample_payload | Raw REST JSON for a content route |
generate_ts_types | TypeScript interfaces for a post type, in standard or light ACF format |
check_site_requirements | Checks the site requirements above |
site_health | WordPress version, namespaces, plugins, HTTPS, timezone, and CORS for a PWA origin |
| URI | Content |
|---|---|
wp://site/info | Site, organization, post types, taxonomies, and detected features (JSON) |
wp://post/{type}/{id} | One item as Markdown, including ACF fields |
wp://page/{slug} | One page as Markdown, including ACF fields |
| Prompt | Profile | What it does |
|---|---|---|
answer_visitor_question | All | Answers from site content only, with links |
seo_review | All (Yoast only) | Reviews one item and proposes fixes |
write_blog_draft | editor | Writes a post in the site's style and saves it as a draft |
weekly_content_report | editor | Recent changes, drafts waiting for review, and top issues |
git clone https://github.com/aj-ua/wp-headless-mcp.git
cd wp-headless-mcp
npm install
cp .env.example .env
npm run build
Edit .env and set at least WP_URL. npm start, npm run dev, and npm run inspect read it. To connect an MCP client to your local build, use node /absolute/path/to/wp-headless-mcp/dist/index.js in place of npx -y wp-headless-mcp, and pass the settings as environment variables.
| Command | What it does |
|---|---|
npm run dev | Run from source with tsx (stdio) |
npm run build / npm start | Compile to dist/ and run it |
npm run inspect | Open the MCP Inspector against the source |
npm test | Unit tests (vitest), no network needed |
npm run lint / npm run format | ESLint and Prettier |
npm run check | Everything CI should run: type checks, lint, formatting, and tests |
npm run example:client -- "<question>" | Ask Claude a question through the server (docs/PWA_BACKEND.md) |
The tests use recorded aj-ua responses in tests/fixtures/. Build and type checks use TypeScript 7 (installed as typescript7). TypeScript 6.0 is also installed, only for ESLint and the type-generator test, because typescript-eslint and TypeScript's JavaScript API don't support TypeScript 7 yet.
typescript-eslint supports TypeScript 7.@modelcontextprotocol/sdk and zodturndown for HTML to Markdowntypescript-eslint), and PrettierI build and maintain wp-headless-mcp, and I'm available for paid work around it:
Get in touch through aj-ua.com or LinkedIn.