How to connect your WordPress site to Cursor
Cursor can operate your live WordPress site from the same editor where you build the theme or plugin — reading the PHP error log, clearing caches, and moving content without leaving your project. Install the free Cowboy MCP plugin, generate an API key under Settings → Cowboy MCP, and add one block to ~/.cursor/mcp.json to register your site as a remote MCP server. New to MCP? Start with the WordPress MCP server guide.
What can Cursor do on your live WordPress site once it's connected?
Once connected, Cursor works the live site with real tools — not just code in your local project. From the same editor you can read the production error log to debug a fatal, run WP-CLI, clear object caches and transients after a deploy, and sync or bulk-edit posts and WooCommerce products. Cowboy MCP exposes 137 WordPress tools that Cursor calls directly over HTTPS.
How do you connect Cursor to WordPress in three steps?
Connecting takes three steps and one config block. Install the Cowboy MCP plugin, generate an API key under Settings → Cowboy MCP, then add a small JSON block to ~/.cursor/mcp.json pointing Cursor at your site. Because Cursor is an API-key client, it authenticates with that key over an HTTP Bearer header — there's no OAuth sign-in and no extension to install.
- 1
Install the free plugin
In WordPress, go to Plugins → Add New, search for Cowboy MCP, and click Install then Activate.
- 2
Generate an API key
Open Settings → Cowboy MCP, name a key on the Connection tab, and generate it — it's shown once, so copy it now.
- 3
Add the server to Cursor
Add the block below to ~/.cursor/mcp.json (create the file if it doesn't exist), swap in your site and key, then reload Cursor.
Then reload Cursor and open Settings → MCP — your site should appear with a green status dot.
Why doesn't Cursor need an extension or a local bridge to reach WordPress?
Cursor supports MCP servers natively, and many MCP integrations still run a local Node.js process that proxies requests to a remote service. Cowboy MCP needs none of that. The MCP endpoint is a standard WordPress REST route at /wp-json/cowboy-mcp/v1/endpoint, so Cursor connects to your site directly over HTTPS — no Cursor extension, no npm install, and nothing extra to keep running. The plugin is itself the MCP server.
That also means the same endpoint serves every MCP client — Claude Code, Claude Desktop and claude.ai, Codex — so the site you wire into Cursor is ready for whatever editor or agent you reach for next. Only the config block differs per client.
Is it safe to run Cursor against your live production site?
Yes, with the same guardrails the plugin applies to every client. Safe mode is on by default, so destructive tools ask before they run. Any write can be previewed as a dry run, every change lands in an undo journal you can roll back, and requests are rate-limited to 120 per minute. Give Cursor its own API key you can revoke — it all runs on your own server. More on security →
Questions, answered.
Does Cursor need a plugin or extension for this?
No. Cursor speaks MCP natively, so there's no Cursor extension to install and no Node.js bridge to run. You add one server block to Cursor's config file, and the Cowboy MCP plugin on your WordPress site is the server Cursor connects to over HTTPS.
Where does the MCP config go?
In ~/.cursor/mcp.json in your home folder — create the file if it doesn't exist, add the Cowboy MCP server block with your site's endpoint URL and API key, then reload Cursor. It appears under Cursor Settings → MCP with a green status dot once connected.
Can Cursor edit theme files on my live site?
Yes. Cowboy MCP exposes file tools, so Cursor can read and write theme and plugin files on the connected site, run WP-CLI, and read the PHP error log to debug. Safe mode asks before destructive actions, and every change lands in an undo journal you can roll back.
Is this safe to use on production?
Yes, with care. Safe mode is on by default, writes can be previewed as a dry run, requests are rate-limited, and every change is written to an audit log you can review. Take a database checkpoint before big changes, and give Cursor its own API key you can revoke.
Ready to connect Cursor to your WordPress site?
Install the free, open-source Cowboy MCP plugin, generate an API key, and drop one block into ~/.cursor/mcp.json — Cursor is operating your site minutes later. It works on any self-hosted WordPress site running version 6.2 or newer on PHP 8.0+. Building with a different tool? The same site connects to Claude Code and the Claude desktop and web apps too.