To connect Cursor to WordPress via the Model Context Protocol (MCP), you choose an MCP server that bridges the two, configure it in Cursor’s MCP settings, and then verify access by running a test command that lists your WordPress posts or site info. This article walks you through the server options, the setup steps, and the verification process so you can start using AI-assisted content management directly from your editor.
Background: What Is MCP and Why Use It with WordPress?
The Model Context Protocol (MCP) is an open standard that lets AI assistants like Cursor connect to external tools and data sources. For WordPress, an MCP server acts as a translator: it exposes WordPress actions (create post, edit page, fetch comments) as tools that Cursor’s AI can call. Instead of copying content from the editor to the WordPress dashboard, you can instruct Cursor to “create a draft post with these headings” and it will do it directly via the MCP server.
This is particularly useful for content-heavy workflows—drafting, updating, and managing multiple posts without leaving your code editor. It also enables AI to pull in existing site data (e.g., “summarize my last 10 posts”) to inform new content.
How to Choose an MCP Server for WordPress
There are several MCP servers for WordPress, each with different strengths. Your choice depends on your technical comfort and security needs.
- Official WordPress MCP server (by Automattic): A community-supported server that runs locally via
npx. It uses WordPress REST API and requires an application password. Good for developers who want a simple, scriptable setup. - Third-party servers (e.g., wordpress-mcp by a developer): Often add features like media upload or custom post type support. Check the GitHub repo for maintenance status and security reviews.
- Remote hosted servers: Some services offer a cloud-hosted MCP endpoint. These are easier to set up but require you to trust the provider with your site credentials.
For most users, the official server is the safest starting point because it’s actively maintained and follows WordPress standards. If you need more features, look for a server with a clear security audit and recent commits.
Step-by-Step Setup in Cursor
Once you’ve chosen a server, here’s how to configure it in Cursor:
- Generate a WordPress application password: In your WordPress dashboard, go to Users → Profile → Application Passwords. Create one with a name like “Cursor MCP”. Copy the password (you won’t see it again).
- Install the MCP server: If using the official server, run
npx @automattic/mcp-server-wordpressin your terminal to verify it starts. This will typically ask for your site URL and application password. - Open Cursor’s MCP settings: Go to Settings → MCP (or use the command palette and search “MCP”). Click “Add New MCP Server”.
- Enter the server details: Choose “command” as the type, then paste the command you used to start the server (e.g.,
npx @automattic/mcp-server-wordpress). You may need to include environment variables for the URL and password, depending on the server’s instructions. - Save and enable: After adding, toggle the server on. Cursor will attempt to connect and list the available tools.
Verifying Access: What to Check
Verification confirms that Cursor can actually talk to your WordPress site. Here’s what to do:
- Check the MCP panel: In Cursor’s MCP settings, the server should show a green dot or “Connected” status. If it shows an error, read the log—it often points to a wrong URL or bad token.
- Run a test tool: In a Cursor chat window, type a command like “List the titles of my last 5 posts” or “Get site info”. If the server is working, Cursor will call the MCP tool and display the results.
- Try a write operation (carefully): Ask Cursor to “Create a draft post titled ‘Test’ with a short paragraph”. Then check your WordPress dashboard to see if the draft appeared. If it did, your access is fully verified.
If the read test works but the write test fails, the issue is usually permissions—your application password may not have the right capabilities (e.g., it might be read-only).
Common Problems and Fixes
- Connection refused: The server isn’t running. Make sure you started it in a terminal and that the port is not blocked.
- 401 Unauthorized: Your application password is wrong or missing. Double-check the password (spaces are removed when you paste it).
- 404 Not Found: The server is running but the WordPress REST API is disabled or the site URL is incorrect. Ensure your site has the REST API enabled (most do by default).
- Timeout: WordPress site is slow or the server is on a different network. Try increasing the timeout in Cursor’s MCP settings or use a local server for the MCP to reduce latency.
- Tool not found: The server version doesn’t support the tool you’re trying to use. Check the server’s documentation for available tools.
Security and Safety Considerations
Connecting an AI editor to your WordPress site introduces risk. Always use an application password, not your main login password. Restrict that password to the minimum capabilities needed (e.g., edit posts, but not delete users). If you’re using a third-party server, review its code for any data exfiltration—never use a server that sends your site data to unknown endpoints. Also, be aware that AI can make mistakes; always review changes before publishing. For sites with multiple users, consider using a staging site for testing.
Alternatives to MCP
If MCP setup feels too complex, you have alternatives:
- WordPress REST API directly: Use Cursor’s built-in HTTP tool to call the API manually. This gives you full control but requires writing curl commands.
- Zapier or IFTTT: These can connect Cursor (via webhooks) to WordPress, but they are less flexible for complex content generation.
- Copy-paste workflow: The simplest—generate content in Cursor, then paste it into WordPress. No setup, but no direct integration.
Frequently Asked Questions
Do I need a plugin on WordPress to use MCP?
No, the official MCP server uses the built-in REST API, so no plugin is required. Some third-party servers may ask for a companion plugin for extra features, but it’s not essential for basic operations.
Can I use MCP with WordPress.com (hosted) sites?
Yes, but you need to enable application passwords in your WordPress.com account settings. The REST API is available on all plans, but some endpoints (like plugin management) are restricted on lower tiers.
What if Cursor doesn’t show the MCP tools after connecting?
Try restarting Cursor, or toggle the MCP server off and on. If that fails, check the server’s console output for errors—it might be failing to authenticate.
Is MCP safe to use with a production site?
It can be, but you should test on a staging site first. Use a dedicated application password with limited permissions, and avoid giving the AI access to destructive actions like deleting posts or users.
Can I use MCP with other AI editors like VS Code?
Yes, MCP is an open standard, and VS Code (with the Cline or Continue extensions) supports it. The setup is similar—you configure the same server URL and token.
Related
Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.
More cards in this drawer
- Create Folder for Selected Item on Mac: Full Guide
- Data Center Location Questions for AI Workloads
- How to Choose an Amplifier for Magico A3 Speakers
- How to Ban a Player from Your FiveM Server
- Pokemon Go Friend Codes: How to Add & Use Them33.33 XP/day
- Google Algorithm Change: Original Reporting Boost