Cowboy MCP

Cowboy MCP

Open-source WordPress plugin that turns any site into a Streamable HTTP MCP server. Manage posts, WooCommerce, and more from Claude Code, Codex, or Cursor โ€” no Node.js

Category
Visit Server

README

Cowboy MCP ๐Ÿค  โ€” WordPress MCP Server for AI Coding Agents

Cowboy MCP is a WordPress plugin that turns any WordPress site into a Model Context Protocol (MCP) server over Streamable HTTP, so AI coding agents like Claude Code, Codex, and Cursor can manage it โ€” in plain English.

Version WordPress PHP License

Website: cowboymcp.com ยท Download: latest release

Connect any MCP client that speaks Streamable HTTP over a single authenticated endpoint and manage posts, pages, plugins, themes, users, media, WooCommerce, and much more.


Why Cowboy MCP?

  • Built for coding agents, not chat UIs โ€” designed for terminal-based workflows with Claude Code, Codex, Cursor, and any Streamable HTTP MCP client.
  • No Node.js proxy โ€” the MCP endpoint is served natively from WordPress. Unlike adapter-based approaches that run a separate Node bridge to expose remote HTTP, there's nothing extra to install or keep running.
  • 131 tools across core + popular plugins โ€” full content CRUD plus deep integrations for WooCommerce, ACF, Elementor, Wordfence, UpdraftPlus, and cache plugins.
  • Secure by default โ€” bcrypt-hashed API keys (shown once), per-key rate limiting, safe mode for destructive operations, and an always-on audit log.
  • Zero dependencies โ€” native WordPress APIs, no Composer, no npm, no build step. Works even on hosts without WP-CLI or shell_exec().

Highlights

  • Single REST endpoint โ€” JSON-RPC 2.0 over Streamable HTTP at /wp-json/cowboy-mcp/v1/endpoint (MCP 2025-06-18 spec)
  • 131 tools โ€” full CRUD for posts, pages, CPTs, taxonomies, comments, options, users, media, plus database queries, WP-CLI, diagnostics, and conditional tools for popular plugins
  • 17 read-only resources, 4 resource templates, and 8 workflow prompts with argument auto-completion
  • Secure by default โ€” bcrypt-hashed API keys, per-key rate limiting, safe mode for destructive operations, and an always-on audit log
  • Self-hosted auto-updates โ€” new versions appear in your WordPress updates screen, served straight from GitHub Releases
  • Zero dependencies โ€” no Composer, no npm, no build step, no CDN. Native WordPress APIs, so it works even on hosts without WP-CLI or shell_exec().

Requirements

  • WordPress 6.2+
  • PHP 8.0+

Installation

The plugin is distributed via GitHub Releases (not the WordPress.org directory).

  1. Download cowboy-mcp.zip from the latest release.
  2. In WordPress: Plugins โ†’ Add New โ†’ Upload Plugin, choose the zip, and Install Now.
  3. Activate the plugin.
  4. Go to Settings โ†’ Cowboy MCP and click Generate API Key. Copy the key โ€” it is shown only once.

Once installed, the plugin keeps itself up to date through the normal WordPress updates screen.

Connecting an agent

Claude Code

claude mcp add --transport http wordpress \
  https://yoursite.com/wp-json/cowboy-mcp/v1/endpoint \
  --header "Authorization: Bearer YOUR_API_KEY"

Codex

Set the key as an environment variable:

export COWBOY_MCP_API_KEY="YOUR_API_KEY"

Then add to ~/.codex/config.toml:

[mcp_servers.wordpress]
url = "https://yoursite.com/wp-json/cowboy-mcp/v1/endpoint"
bearer_token_env_var = "COWBOY_MCP_API_KEY"

Any MCP client supporting Streamable HTTP with a Bearer token works the same way.

Capabilities

Tools

Core tools are always available. Plugin-integration tools register only when the matching plugin is active.

Domain Tools Examples
Core 42 posts/pages/CPT CRUD, taxonomies, comments, plugins, themes, options, users, media, DB query/write, WP-CLI, search-replace, site info, site health, 9 diagnostics, batch execution, audit log
WooCommerce 40 products & variations, orders & refunds, customers, coupons, tax/shipping/gateway settings, sales reports
Wordfence 17 scans, IP/country blocks, firewall, live traffic, activity log, settings
UpdraftPlus 10 list/trigger/restore/delete backups, settings, logs, schedules
ACF 9 field groups, field CRUD, repeater operations
Elementor 7 templates, page content, global styles, widgets
Cache 4 provider detect, flush, preload, settings (WP Rocket / LiteSpeed / W3TC)
SEO 1 provider detection (Yoast / Rank Math)
Forms 1 provider detection (WPForms / Gravity Forms / CF7)
Total 131 with every integration active

Resources

17 read-only resources (site info, recent posts, plugin/theme lists, WooCommerce summaries, Wordfence status, and more) plus 4 resource templates:

wordpress://posts/{id}
wordpress://options/{name}
wordpress://plugins/{slug}
wordpress://users/{id}

Prompts

8 guided workflow prompts: wordpress-site-audit, content-migration, seo-optimization, woocommerce-store-setup, troubleshoot-issue, bulk-content-update, security-hardening, performance-optimization.

FAQ

What is a WordPress MCP server?

A WordPress MCP server exposes your site's management capabilities through the Model Context Protocol โ€” the open standard AI agents use to call tools. Cowboy MCP implements one as a plugin: it serves a single Streamable HTTP endpoint that lets agents like Claude Code read, create, update, and delete WordPress content securely.

How do I connect Claude Code to WordPress?

Install Cowboy MCP, generate an API key under Settings โ†’ Cowboy MCP, then run claude mcp add --transport http wordpress https://yoursite.com/wp-json/cowboy-mcp/v1/endpoint --header "Authorization: Bearer YOUR_API_KEY". Claude Code can then manage posts, plugins, themes, WooCommerce, and more by calling Cowboy MCP's tools over the MCP protocol.

Does Cowboy MCP work with WooCommerce?

Yes. When WooCommerce is active, Cowboy MCP registers 40 extra tools for products and variations, orders and refunds, customers, coupons, tax/shipping/gateway settings, and sales reports โ€” using WooCommerce's own CRUD classes rather than raw SQL. Tools for ACF, Elementor, Wordfence, UpdraftPlus, and cache plugins register automatically the same way.

Do I need Node.js or WP-CLI?

No. Cowboy MCP serves the MCP endpoint natively from WordPress with zero external dependencies โ€” no Node.js bridge, no Composer, no build step. It uses core WordPress APIs, so it works even on managed hosts that disable shell_exec() or lack WP-CLI. WP-CLI remains an optional power-user escape hatch when present.

Is it safe to give an AI agent access to my site?

You're granting real control, so Cowboy MCP is built defensively. API keys are bcrypt-hashed and shown once, every request is rate-limited, safe mode requires explicit confirmation for destructive actions, and every tool call is recorded in an audit log. Sensitive options, dangerous SQL, and SSRF attempts are blocked by default.

Which AI agents are supported?

Any MCP client that supports Streamable HTTP with a Bearer token โ€” including Claude Code, Codex, and Cursor. The same endpoint works across clients: point the agent at your site's URL and supply the API key. More agents add MCP support regularly.

Security

You are granting an AI agent significant control over your site. Cowboy MCP is built to keep that safe:

  • Authentication โ€” API keys are bcrypt-hashed (wp_hash_password()) and never stored in plain text. Keys are shown once at generation and can be revoked individually.
  • Rate limiting โ€” per-key, per-minute window (default 120/min).
  • Safe mode (on by default) โ€” destructive tools (delete posts, drop tables, write-mode WP-CLI, etc.) require an explicit confirm: true.
  • Dry run โ€” non-read-only tools accept a dry_run parameter to preview changes.
  • Audit log โ€” every tool call, error, and auth event is recorded in a database table with automatic 30-day pruning. Sensitive fields are redacted.
  • Guardrails โ€” option blocklist for sensitive settings, SQL blocklist for dangerous DDL, WP-CLI command blocklist, SSRF protection on outbound requests, wp-content path confinement for file ops, and self-delete protection.

Power mode

An admin-only, opt-in setting (off by default) that lifts a curated set of hard guardrails for advanced users (WP-CLI/SQL blocklists, sensitive-option writes, path confinement, SSRF protection). It can only be enabled by a human in wp-admin โ€” the agent can never enable it through the API.

Power mode never lifts credential protections: writes to API keys / plugin settings and other credential options stay blocked, secret-touching DB queries stay blocked, result/secret redaction stays on, and self-delete protection remains.

Configuration

Settings live under Settings โ†’ Cowboy MCP (cowboy_mcp_settings option):

Setting Default Purpose
enabled true Master on/off switch for the MCP endpoint
safe_mode true Require confirm: true for destructive tools
power_mode false Lift curated guardrails (admin-only opt-in)
allowed_tools all Restrict which tools are exposed
log_requests false Also mirror audit entries to error_log()
rate_limit 120 Requests per key, per minute

Updates

Cowboy MCP self-updates from GitHub Releases. It fetches a small JSON manifest from COWBOY_MCP_UPDATE_URL (default https://cowboymcp.com/updates/cowboy-mcp.json, overridable in wp-config.php), compares versions, and serves the release zip โ€” all through WordPress's native update system. Auto-updates are owner-opt-in and fail closed: any manifest/network error simply means "no update," never a fatal.

Extensibility

Two filters let you customize the tool surface:

// Add custom tool definitions.
add_filter( 'cowboy_mcp_tools', function ( $tools ) { /* โ€ฆ */ return $tools; } );

// Block specific tools per request.
add_filter( 'cowboy_mcp_tool_allowed', function ( $allowed, $tool_name ) { /* โ€ฆ */ return $allowed; }, 10, 2 );

Architecture

A single-endpoint MCP server built on the WordPress REST API. No autoloader โ€” classes are required from the entry point; tools are split into lazily-loaded domain files under includes/tools/.

cowboy-mcp.php          Entry point โ€” constants, requires, lifecycle hooks
includes/
  class-mcp-transport.php   REST route, JSON-RPC dispatch, sessions
  class-mcp-auth.php        API keys, Bearer validation, rate limiting
  class-mcp-tools.php       Tool registry, dispatch, dry-run/safe-mode gating
  class-mcp-resources.php   Read-only resources + templates
  class-mcp-prompts.php     Workflow prompts
  class-mcp-updater.php     Self-hosted updater
  class-mcp-audit-log.php   DB-backed audit log
  class-mcp-security.php    Shared guardrails (blocklists, redaction, power mode)
  tools/                    Domain tool files (core, woocommerce, acf, โ€ฆ)
admin/
  class-mcp-admin.php       Settings page

License

GPL-2.0-or-later. Cowboy MCP is free software.

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured