How to Connect Your Self-Hosted WordPress Site to Claude Desktop via MCP
Step-by-step guide to connecting any self-hosted WordPress site to Claude Desktop using the Model Context Protocol. Manage posts, drafts, and SEO through natural language — no plugins required.
What if you could create, edit, and manage your WordPress posts without ever opening your browser? With Claude Desktop and the Model Context Protocol (MCP), you can connect your self-hosted WordPress site directly to Claude — and run your entire content workflow through natural language conversation.
I set this up for The Science Talk and it transformed how I manage content. Drafting posts, checking SEO, bulk-updating tags — all from one chat window. No extra plugins on the WordPress side, no third-party dashboard. Just a lightweight bridge running locally on your computer.
Here is exactly how to set it up in under 15 minutes, including every gotcha I hit so you don’t have to.
What you need before starting
This works with any self-hosted WordPress site — WP Engine, SiteGround, Kinsta, or other hosts. You also need:
- Claude Desktop (available at claude.ai/download for Mac and Windows)
- A Claude Pro or Team plan
- A terminal or command prompt
The MCP server runs as a lightweight local bridge and only connects when Claude Desktop is open.
Step 1: Install Node.js
The MCP bridge runs on Node.js. Visit nodejs.org, download the LTS version (v22.x), and run the installer. Verify in Terminal (Mac) or Command Prompt (Windows):
node -v
npm -v
Both should return version numbers. If they do, you’re ready.
Step 2: Create a WordPress Application Password
Application Passwords let external tools authenticate securely without using your main login. In WordPress admin, go to Users → Profile, scroll to Application Passwords, enter a name like “Claude Desktop”, click Add New Application Password, and copy the generated password immediately — WordPress only shows it once.
Don’t see Application Passwords? This feature is built into WordPress 5.6+. Some security plugins (Wordfence, iThemes) may disable it — check your plugin settings.
Step 3: Verify your REST API
Confirm your WordPress REST API is accessible. Open your browser and visit:
https://yoursite.com/wp-json/wp/v2/posts?per_page=1
If you see JSON data with post titles and content, the API is working. If you see an error or your homepage, your host may be restricting REST API access — check your hosting dashboard or contact their support.
Step 4: Create the site configuration file
This file tells the MCP server which WordPress site to connect to. On Mac, open Terminal and run:
mkdir -p ~/.wp-mcp
cat > ~/.wp-mcp/wp-sites.json << 'EOF'
{
"default_test": {
"URL": "https://yoursite.com",
"USER": "your-wordpress-username",
"PASS": "xxxx xxxx xxxx xxxx xxxx xxxx",
"authType": "basic"
}
}
EOF
Replace the URL, username, and password with your actual credentials. On Windows, create this file at C:\Users\YourName\.wp-mcp\wp-sites.json with the same JSON content.
Important: The site key must be "default_test" — the MCP server expects this name for tool registration. A different name causes a silent connection failure.
Step 5: Find your system username
Run whoami in Terminal (Mac) or echo %USERNAME% in Command Prompt (Windows). You need this for the next step.
Step 6: Configure Claude Desktop
On Mac, run this in Terminal — replace janedoe with your actual system username from Step 5:
cat > ~/Library/Application\ Support/Claude/claude_desktop_config.json << 'EOF'
{
"mcpServers": {
"claudeus-wp-mcp": {
"command": "npx",
"args": ["-y", "claudeus-wp-mcp"],
"env": {
"WP_SITES_PATH": "/Users/janedoe/.wp-mcp/wp-sites.json"
}
}
}
}
EOF
This is where most people get stuck. The path must contain your actual system username. A wrong path causes the server to disconnect immediately with no error message.
On Windows, edit the file at %APPDATA%\Claude\claude_desktop_config.json with the same JSON structure, adjusting the path accordingly.
Step 7: Launch and verify
Quit Claude Desktop completely (Cmd+Q on Mac) and reopen it. Wait 30–60 seconds for the MCP server to initialise on first launch. Then click the + button in the chat input and look for “Add from claudeus-wp-mcp” in the menu.
If you see it listed with tools — the connection is live. Safe first test: ask Claude “List my 5 most recent posts” — read-only, changes nothing on your site.
What you can do now
With the connection active, manage WordPress through natural conversation:
- Read content: “Show me all draft posts” or “Get the content of post 1234”
- Create posts: “Create a new draft about European AI regulation”
- Update content: “Change the title of post 1234 to…”
- SEO analysis: “Analyse the SEO of my latest published post”
- Bulk operations: “Add the tag ‘Horizon Europe’ to all posts from 2025”
Troubleshooting
Server shows as “disconnected”: Almost always a wrong path in claude_desktop_config.json. Check logs with cat ~/Library/Logs/Claude/mcp-server-claudeus-wp-mcp.log | tail -20 for specific errors.
Claude sees the server but doesn’t use it: Click the + button, select “Add from claudeus-wp-mcp”, and attach your site alias before asking.
Authentication errors: Verify your Application Password was copied correctly — the spaces WordPress adds are intentional. Confirm you used "default_test" as the site key.
Security best practices
Start with a staging site if you have one. Create a dedicated WordPress user for Claude with only the permissions it needs. You can revoke the Application Password at any time from your WordPress profile to cut access instantly. Keep wp-sites.json out of version control — it contains credentials.
Ready to extend your AI workflow further? Get in touch →
Found this useful? Share it or explore more guides.