| 开发者 | februality |
|---|---|
| 更新时间 | 2026年10月21日 12:40 |
| 捐献地址: | 去捐款 |
| PHP版本: | 8.0 及以上 |
| WordPress版本: | 7.1 |
| 版权: | GPLv2 or later |
| 版权网址: | 版权信息 |
"More access than any other MCP offers, easy to use, LOVE the change journal and the checkpoints - safe if you break something, without having to run back ups on the host or yet another plugin." - a WordPress.org reviewerAsk in plain language - "publish these three drafts," "why is the checkout page 500-ing," "bump every Summer Sale price 20%," "clear the cache and re-check site health" - and your agent gets it done. Most WordPress AI plugins let an assistant write blog posts; Cowboy MCP lets your agent actually run the site, including WP-CLI, files, the database, error logs and diagnostics. Try it without installing: click Live Preview above for a throwaway WordPress Playground site with Cowboy MCP active. What is a WordPress MCP server? MCP (Model Context Protocol) is the open standard AI assistants use to work with other software. A WordPress MCP server gives Claude, ChatGPT or any MCP-capable agent a set of typed, permission-checked actions on your site - publish a post, update a product, fix an error - instead of you copy-pasting between a chat window and wp-admin. Cowboy MCP is that server, installed like any other plugin. What you can do with it
wp-content, and take site snapshots before big changes.cowboy-mcp/* ability (with safe mode, the audit log and undo still in front), and abilities other plugins register become tools for your agent.cowboy_discover and cowboy_run) and finds the rest on demand, so a big toolset never crowds its context.
--header.
Connect Claude to WordPress (claude.ai and Claude Desktop)
No terminal: click Add to Claude on the Connections tab and approve the sign-in on your own site. Needs a public HTTPS site.
Connect ChatGPT to WordPress
ChatGPT connects with the same one-click sign-in from a Business, Enterprise or Edu workspace on the web (Pro: read-only); it needs a public HTTPS site.
"type": "streamableHttp"; Zed takes url and headers under context_servers.
Connect Codex CLI
codex mcp add your-site --url https://yoursite.com/wp-json/cowboy-mcp/v1/endpoint
Codex opens your browser to sign in; headless, add --bearer-token-env-var COWBOY_MCP_API_KEY and export your key.
Connect Gemini CLI
gemini mcp add -s user -t http your-site https://yoursite.com/wp-json/cowboy-mcp/v1/endpoint
Start gemini and run /mcp auth your-site to sign in; headless, use an API key with --header.
Opencode and other MCP clients
Cowboy MCP is a standard Streamable HTTP MCP server (JSON-RPC 2.0): point Opencode, LibreChat or your own agent at /wp-json/cowboy-mcp/v1/endpoint. Opencode signs in with OAuth; others send an Authorization: Bearer header.
Local development sites
Local, Studio, MAMP, DevKinsta, wp-env, Docker: terminal and IDE tools sign in on this computer with no public URL, and Claude Desktop uses the mcp-remote bridge. Cloud apps such as claude.ai and ChatGPT need a public HTTPS address.
Secure by design: built for live sites
wp-content, and last-administrator protection. Power mode lifts some for rare jobs; only a human can switch it on in wp-admin.--header "Authorization: Bearer YOUR_API_KEY" to the first line instead of running the second.
Claude desktop / web (no terminal): click Add to Claude on the Connections tab (Claude opens with your site already filled in; browser sign-in is switched on for you) and approve with one click. (Requires a public HTTPS site; on a local site use the mcp-remote bridge shown on the Connections tab.)
Every other client: the Connections tab shows a ready-to-copy setup for each, and cowboymcp.com has step-by-step guides.A plugin that lets AI assistants act on your site through the Model Context Protocol (MCP), the open standard Claude, ChatGPT, Cursor and other agents use to call external tools. Cowboy MCP turns your WordPress site into one of those tools, so your agent can publish, edit, update and fix things directly instead of telling you what to click.
Click Open ChatGPT on the ChatGPT panel of the Connections tab in Cowboy MCP; it copies your connection link. In ChatGPT on the web, go to Plugins, click Add > Add custom MCP server, paste the link as the Server URL, keep OAuth, acknowledge the risk warning and click Create as a plugin. Approve the sign-in on your site as an administrator, install the plugin, then pick it from the + menu in a chat (or type @ and its name). It needs a Business, Enterprise or Edu workspace (Pro: read-only) and a public HTTPS site.
For the Claude desktop and web apps, click Add to Claude on the Connections tab and approve the one-click sign-in - no terminal needed. For Claude Code, run the two lines shown ready to copy on the Connections tab and sign in in your browser - no key to copy, and no switch to flip: Claude Code and Codex identify themselves with a Client ID Metadata Document (the current MCP standard). For headless or CI use, generate an API key there instead.
Yes. Every tool, every integration and every safety feature is in this free plugin, licensed GPL-2.0. There is no Pro tier, no credit system and no usage cap beyond the per-key rate limit you set yourself.
It is built so a mistake can be reversed. Keys are hashed and shown once, requests are rate-limited, destructive actions need confirmation, changes can be previewed with a dry run, and every action is written to an audit log. Content, options, users, media deletions, menus, terms, comments, WooCommerce objects, SEO meta, revisions, events, Gutenberg and Site Editor edits, Beaver Builder and SiteOrigin layouts, search-replace runs and plugin or theme installs, updates and deletions are journaled and can be undone individually or as a batch - seven days by default - and database checkpoints roll every site table back to an earlier moment. Things with no inverse - a sent email, a cache flush, an arbitrary WP-CLI command, an outbound HTTP request - are recorded as not undoable rather than pretended otherwise; take a checkpoint first when you ask for those.
Yes. Every API key and every OAuth connection carries a scope: full access, read-only, or a custom list of allowed tools, chosen when the key is created or the connection is approved. Safe mode adds confirmation for destructive tools on top, and the most powerful operations stay locked behind Power mode, which only an administrator can enable in wp-admin.
No. Publishing content and running your store work through plain conversation. The developer tools (WP-CLI, files, database) are there when you want them, and gated behind safe mode until you say go.
Any MCP-compatible client over Streamable HTTP - including Claude Code, the Claude desktop and web apps, ChatGPT, Perplexity, Grok, the Gemini app, Meta Muse and Muse Code, Cursor, VS Code with GitHub Copilot, Windsurf, Cline, Zed, Codex CLI, Gemini CLI, Opencode, n8n, OpenClaw and Hermes Agent.
Yes. When WooCommerce is active, 40 store tools light up: products and variations, orders and refunds, coupons, customers, stock, shipping zones, tax rates, payment gateways, and sales reports - so your agent can run the store, not just describe it.
Yes. When The Events Calendar is active, your agent can create and edit events, venues and organizers, and trash or delete events (venues and organizers are removed with the standard delete-post tool). With Events Calendar Pro it can also manage recurring events - edit a whole series or cancel a single date. Editing one occurrence on its own stays in wp-admin. Changes are undoable, and permanent deletes take a database checkpoint first.
Yes. Terminal tools like Claude Code, Cursor, Codex and Gemini CLI run on the same computer as your local site, so they sign in with OAuth in your browser - no public URL needed. An API key works too, for headless use. Claude Desktop connects through a small local bridge (mcp-remote); the Connections tab detects local sites and shows the ready-to-copy config. Only the cloud-side apps - claude.ai and ChatGPT - require a public HTTPS address, because they connect from the vendor's servers; a tunnel works for temporary testing, but be aware it exposes your whole dev site while it runs.
Hosting-level MCP servers mostly manage the hosting account - sites, DNS, backups - and WordPress.com's MCP reaches a self-hosted site only through a paid Jetpack plan. Cowboy MCP works inside the site itself, on any host, for free: content, WooCommerce, users, plugins, diagnostics, with undo and an audit log. They can run side by side.
You don't need to. The Abilities API (WordPress 6.9+) and the official MCP Adapter are a framework: plugins register abilities, and the adapter exposes whatever was registered. Cowboy MCP is a complete, turnkey MCP server with its own toolset, safety layer, undo, audit log, scoping, OAuth connector and Connection Doctor, and it runs on WordPress 6.2 or later without Composer or Node.js. On 6.9+ it registers its tools as abilities, so the adapter can use them too - you can run both side by side.
Novamira is built for development and staging copies and gives the agent a PHP shell. Cowboy MCP is built for live sites: typed tools, safe mode, undo, database checkpoints and an audit log, all free, installed from WordPress.org. See the full Cowboy MCP vs Novamira comparison.
Yes - that is what it is built for. Your agent can write and edit theme and plugin code in wp-content, run WP-CLI, and read the error log to fix what it broke. Every PHP file is syntax-checked before it lands, and mu-plugins (which WordPress recovery mode cannot pause) stays off-limits unless an administrator turns on Power mode - so a cut-off or broken payload cannot take the site down. Take a database checkpoint first (or let auto-checkpoint do it), and every change lands in the undo journal - so vibe coding a live site does not have to be a leap of faith.
No telemetry and no phone-home - your data stays on your server. The only outbound connections are to WordPress.org, when your agent installs or updates plugins and themes, plus any HTTP requests you explicitly ask your agent to make. There is no hosted relay and no account with us; your AI client connects to your site directly.
Yes, both ways, on WordPress 6.9 or newer. Every allowed tool is registered as a cowboy-mcp/* ability, so wp ability run, the core Abilities REST endpoint, the official MCP Adapter and the AI plugin's Abilities Explorer all reach it - and every call still goes through safe mode, dry run, the audit log and the undo journal. Callers need an administrator account; wp_cli and wp_write_file are only exposed while Power mode is on. In the other direction, abilities registered by other plugins appear as tools for your agent; they run their own permission checks and are not undoable. Both directions have a switch under Settings. Request formats and examples: Cowboy MCP 1.6.4 release notes.
Cowboy MCP is built for single sites and is not network-aware. On a multisite network, activate it on each site you want an agent to manage (not network-wide) and generate keys on that site; its plugin tools do recognise network-activated plugins when activating or deactivating.
Start with the Connection Doctor on the Connections tab. It tests HTTPS, the REST API, OAuth discovery and common host blockers (Cloudflare bot rules, ModSecurity-style firewalls, LiteSpeed caching of /wp-json/), names the exact problem and gives you a fix. The most common cases:
content field arrived as an empty {}; the affected tools now also return structured output. Thanks to @kuzey2004 for the report and testing.wp_list_directory with recursive: true no longer fails with an exception.