WordPress MCP server
Commit Nov 11, 2026Allows AI agents to read WordPress site content and create new post drafts via the REST API.
Also known as bgildea/wordpress-mcp-server
- Stars
- 0
- Tools
- 7
- Downloads, 30 days
- —
- Latest version
- —
- Last commit
- Nov 11, 2026
- License
- MIT
What is WordPress MCP?
WordPress allows AI agents to read WordPress site content and create new post drafts via the REST API. It exposes 7 tools, such as get_site_info, list_posts, get_post.
Summary generated from the project's README
About WordPress MCP server
Managing WordPress content through an AI assistant becomes possible by connecting your site to an MCP client like Claude. This server allows agencies and web teams to query their own site data directly, such as checking for outdated plugins or searching through previous publications. It uses the WordPress REST API to bridge the gap between your chat interface and your website dashboard, eliminating the need to copy and paste text between windows.
Security is prioritized by using WordPress Application Passwords instead of admin credentials. The server is designed to be safe because it only creates drafts rather than publishing content directly, ensuring a human always maintains final control. You can also enable a read-only mode via environment variables to remove all writing capabilities entirely. The system converts HTML into plain text so the model focuses on the actual meaning of your posts and comments.
Setup requires Node.js 20+ and a site with the REST API enabled. You connect it via stdio by configuring your local MCP settings with your site URL and credentials. The available tools include get_site_info, list_posts, list_plugins, and create_draft_post.
What you can do with it
- 1Audit site pluginsAsk your assistant to identify which plugins are currently installed and if they are active or out of date.
- 2Search historical contentRetrieve information about specific topics or events that were published on your site in the past.
- 3Automate content draftingInstruct the AI to write a new post and save it as a draft in your WordPress dashboard.
Written from the project's README. Every use case is checked against a quote from it.
WordPress MCP tools 7
Detected from the READMEget_site_infolist_postsget_postlist_commentsget_commentlist_pluginscreate_draft_post
Configuration
WP_APP_PASSWORDWP_READ_ONLYWP_URLWP_USERNAME
Automated checks
Ran Nov 14, 2026Full report →Not verified yet. A server needs a score of 80, no serious finding, and enough data for us to check. How checks work · What to fix for more points
- Source repository linked and reachablebgildea/wordpress-mcp-server is public and reachablegithub.com/bgildea/wordpress-mcp-server ↗Pass
- Package names this repository as its sourceNot checked
- Build provenance (Sigstore attestation)Not checked
- Open source license (OSI)MITspdx.org/licenses/MIT.html ↗Pass
- Commit or release in the last yearLast commit or release 2026-11-11github.com/bgildea/wordpress-mcp-server ↗Pass
- OpenSSF ScorecardNot checked
- Package name not close to a popular packageNot checked
- No critical advisory in the package or its dependenciesNot checked
- No hidden instructions to the model7 tool descriptions and the README read; no override phrases, credential paths or hidden charactersPass
- Destructive tools are labelledNo tool named like delete, drop or execPass
- Remote endpoint answers the MCP handshakeNot checked
README
View on GitHubwordpress-mcp-server
An MCP server that lets Claude, and any other MCP-capable agent, read a WordPress site and draft new posts through the WordPress REST API.
Ask your assistant things like "what did we publish about the conference last month?", "which plugins are out of date?" or "draft a post announcing early-bird tickets", and it works against your real site.
Product brief
Who it's for: people who run WordPress sites (agencies, in-house web teams, membership organisations) and want an AI assistant that knows what's actually on the site.
Problem: assistants can write content but can't see the site it's going into. People copy and paste between the dashboard and the chat, and drafts get written without knowing what already exists.
Key decisions
- Drafts only. The assistant can create drafts but cannot publish, edit or delete. A person always presses Publish. See ADR 001.
- Read-only mode.
WP_READ_ONLY=trueremoves every write tool, for sites where even drafts aren't wanted. - Plain text out. Content comes back as clean text, not raw HTML, so the model spends its context on meaning rather than markup.
- Application Passwords, not admin passwords. Uses WordPress's built-in, revocable per-app credentials.
What success looks like: a site owner connects it in a couple of minutes and gets useful answers about their own site without giving the assistant power to break anything.
Tools
| Tool | What it does | Needs credentials |
|---|---|---|
get_site_info |
Site name, tagline, URL and REST namespaces | No |
list_posts |
Posts or pages, with search, status filter and paging | Only for non-published statuses |
get_post |
One post or page with content as plain text | No (published content) |
list_comments |
Comments, optionally for one post, with search, status filter and paging. Never returns author emails | Only for held, spam or trashed comments |
get_comment |
One comment with its text as plain text | Only for unapproved comments |
list_plugins |
Installed plugins, versions and active status | Yes, administrator |
create_draft_post |
Creates a new post as a draft | Yes, author or above |
How it works
flowchart LR
A[Claude or another MCP client] -- MCP over stdio --> B[wordpress-mcp-server]
B -- HTTPS + Application Password --> C[WordPress REST API /wp-json/wp/v2]
B -. read-only mode removes write tools .-> B
src/wordpress.ts: a small typed REST client with timeouts, clear errors and HTML-to-text conversionsrc/server.ts: registers the MCP tools with input validation (zod) and read-only hintssrc/index.ts: reads config from environment variables and connects over stdio
Setup
Requirements: Node.js 20+, a WordPress site with the REST API enabled (the default).
git clone https://github.com/bgildea/wordpress-mcp-server.git
cd wordpress-mcp-server
npm ci
npm run build
Create an Application Password in WordPress under Users > Profile > Application Passwords. Use a dedicated user with the lowest role that does the job (Author is enough for drafts).
Connect it to Claude Desktop
Add this to your MCP config file (claude_desktop_config.json):
{
"mcpServers": {
"wordpress": {
"command": "node",
"args": ["/absolute/path/to/wordpress-mcp-server/dist/index.js"],
"env": {
"WP_URL": "https://your-site.com",
"WP_USERNAME": "your-user",
"WP_APP_PASSWORD": "xxxx xxxx xxxx xxxx xxxx xxxx",
"WP_READ_ONLY": "false"
}
}
}
}
Leave out WP_USERNAME and WP_APP_PASSWORD to browse published content only.
Configuration
| Variable | Required | Description |
|---|---|---|
WP_URL |
Yes | Site root, e.g. https://example.com |
WP_USERNAME |
No | WordPress username for authenticated calls |
WP_APP_PASSWORD |
No | Application Password for that user (spaces are fine) |
WP_READ_ONLY |
No | true to disable all write tools |
Development
npm test # vitest: REST client and MCP tools, against a mocked WordPress
npm run typecheck # strict TypeScript, tests included
npm run build # compile to dist/
The tests run the real MCP server against an in-memory MCP client, so they check tool listing, argument validation and error handling exactly as an agent would see them.
Security notes
- Credentials live in environment variables, never in the repo
- Use HTTPS. Application Passwords are sent as Basic auth
- Give the WordPress user the smallest role that works, and revoke the Application Password when you stop using it
- Tool output is content from your site. Treat anything an agent reads there as data, not instructions. This matters most for comments, which anyone visiting the site can write
Roadmap
-
list_commentsandget_commentfor moderation help - WooCommerce read tools (orders, products) behind a separate flag
- Media library search
- Publish to npm for
npxusage
Licence
MIT. Built by Barry Gildea, who has spent 15+ years building on WordPress.
WordPress MCP questions
What tools does WordPress MCP provide?
It exposes 7 tools, including get_site_info, list_posts, get_post, list_comments, get_comment.
Can the AI publish posts directly?
No, the assistant can only create drafts. A human must manually press the Publish button.
How can I prevent the AI from making any changes to my site?
You can enable read-only mode by setting the WP_READ_ONLY environment variable to true, which removes all write tools.
What kind of credentials does the server use?
It uses WordPress Application Passwords rather than admin passwords for secure, revocable access.