How to Connect Claude Desktop to WordPress via MCP (Step-by-Step)
This is the setup guide. If you’ve already got the connection working and want to know what to do with it, start with How to Use Claude Desktop to Manage WordPress Content instead.
If you’re here, you want Claude to talk directly to your WordPress site — creating posts, setting SEO metadata, scheduling content — without copy-pasting between tabs. This guide gets you from zero to a working MCP connection in under 30 minutes.

What Is MCP and Why It Matters for WordPress
MCP stands for Model Context Protocol — an open standard that gives AI models like Claude a standardized way to connect to external tools. Think of it as a plugin system for Claude: instead of Claude generating text that you then act on, Claude calls a tool directly and gets a result back.
For WordPress, this means Claude can create a post, update Yoast SEO metadata, or schedule content in a single conversation — without you opening the dashboard. The WordPress MCP adapter is what sits between Claude Desktop and your WordPress site’s REST API, translating Claude’s instructions into authenticated API calls.
MCP is only available in Claude Desktop (the Mac and Windows app). It does not work in the browser-based Claude.ai.
What You’ll Need Before You Start
- Claude Desktop — Pro plan or above. Download from claude.ai/download
- Node.js 18+ — required to run the MCP adapter. Download from nodejs.org
- A WordPress site — self-hosted (not WordPress.com free tier). REST API must be accessible publicly or via VPN
- WordPress admin access — you’ll need to generate an Application Password
- Your site URL — the full URL including https://
This guide uses the official WordPress MCP server maintained by Automattic. It’s the most stable option and handles post creation, updates, Yoast SEO, and scheduling out of the box.
Step 1 — Verify Your WordPress REST API Is Accessible
The REST API ships enabled by default in WordPress 4.7 and above. To confirm it’s working, open your browser and go to:
https://yoursite.com/wp-json/wp/v2/posts
You should see a JSON array of your recent posts. If you get a 403 or “rest_disabled” error, a security plugin (Wordfence, iThemes Security) is likely blocking unauthenticated REST requests. Whitelist the /wp-json/ path in your security plugin settings before continuing.
[IMAGE: Browser showing a JSON response from the WordPress REST API endpoint. Alt text: “WordPress REST API JSON response confirming the API is accessible”]
Step 2 — Generate a WordPress Application Password
Application Passwords give Claude authenticated access to your WordPress site without using your main login password. Each password is scoped to one connection and can be revoked at any time.
- In WordPress, go to Users → Profile
- Scroll down to the Application Passwords section
- Type a name for the password — something like “Claude Desktop MCP”
- Click Add New Application Password
- Copy the generated password immediately — it won’t be shown again
Store the password somewhere safe (a password manager works fine). You’ll need your WordPress username and this application password in Step 4.

Step 3 — Install the WordPress MCP Server
Open your terminal and install the WordPress MCP package globally via npm:
npm install -g @automattic/wordpress-mcp
Verify the install completed without errors:
wordpress-mcp --version
If you see a version number, you’re ready for the next step. If you get a “command not found” error, check that your npm global bin directory is in your system PATH. Run npm bin -g to find the path and add it to your shell profile.
Step 4 — Configure claude_desktop_config.json
This is the file Claude Desktop reads to know which MCP servers to connect to on startup. Open it in a text editor:
- Mac:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%Claudeclaude_desktop_config.json
Add the following block inside the mcpServers object. If the file is empty or doesn’t exist yet, create it with this structure:
{
"mcpServers": {
"wordpress": {
"command": "wordpress-mcp",
"args": [],
"env": {
"WORDPRESS_SITE_URL": "https://yoursite.com",
"WORDPRESS_USERNAME": "your_wp_username",
"WORDPRESS_APP_PASSWORD": "xxxx xxxx xxxx xxxx xxxx xxxx"
}
}
}
}
Replace the three values with your actual site URL, WordPress username, and the Application Password you generated in Step 2. The password format includes spaces as generated by WordPress — keep them in.
If you already have other MCP servers configured, add the "wordpress": {...} block alongside them inside the existing mcpServers object — don’t replace the whole file.
[IMAGE: A code editor showing the claude_desktop_config.json file with the WordPress MCP block filled in. Alt text: “claude_desktop_config.json configured with WordPress MCP server settings”]
Step 5 — Restart Claude Desktop and Test the Connection
Fully quit Claude Desktop — not just close the window — and reopen it. Claude Desktop reads the config file on startup, so a full restart is required for the MCP server to load.
Once it’s back open, start a new conversation and type:
List my 5 most recent WordPress posts.
If the connection is working, Claude will call the WordPress MCP tool and return a list of your recent posts with their titles, IDs, and statuses. You should also see a small tool icon or indicator in the Claude interface showing that the MCP server is active.
If you get an error or Claude says it can’t find WordPress tools, work through the troubleshooting section below before continuing.
Troubleshooting Common Issues
Claude doesn’t show any WordPress tools
The most common cause is a JSON syntax error in claude_desktop_config.json. Paste the file contents into a JSON validator (jsonlint.com works fine) and fix any missing commas, brackets, or quote mismatches. Restart Claude Desktop after fixing.
Authentication errors (401 or 403)
Double-check that WORDPRESS_USERNAME matches your exact WordPress login username (not your display name or email). The Application Password must be copied exactly as shown, including the spaces between character groups. Regenerate it if you’re unsure.
REST API blocked or returning 403
A security plugin is the most likely culprit. In Wordfence, go to Firewall → Blocking and check whether REST API endpoints are restricted. In iThemes Security, look under Site Tweaks → WordPress REST API and set it to “Allow All Access” or whitelist your server IP.
wordpress-mcp command not found
Run npm bin -g to find where npm installs global packages. Add that directory to your PATH in ~/.zshrc or ~/.bashrc, then restart your terminal and try again. Alternatively, use the full path to the binary in the "command" field of your config.
What to Do Next
Once the connection is confirmed, the next step is learning the workflow — how to structure conversations with Claude to get consistent, well-formatted posts out the other end. That’s covered in detail in How to Use Claude Desktop to Manage WordPress Content.
If you’d rather have this set up and calibrated for your site — with your voice guide, SEO rules, content templates, and publishing schedule already baked in — that’s what our AI Publishing Engine service does. We configure the full stack, test it against your WordPress setup, and hand it off ready to use.


