Is it safe to give AI access to your WordPress site?

Is it safe to give AI access to WordPress?

Yes, with guardrails — and no, by default. Giving an AI agent access to WordPress is safe when the access is scoped, every destructive action waits for a human's confirmation, changes can be previewed and reversed, the whole session is logged on your own server, and your traffic and credentials never pass through a third party. An admin password pasted into a chatbot meets none of those conditions.

This guide is for the moment before you choose a tool, so it stays vendor-neutral until the section that says otherwise: the failures that actually happen, a checklist any plugin or service should satisfy, then how Cowboy MCP measures against it, limits included. If you already run it, see the security page and the safe-operations playbook.

What can actually go wrong?

Six things, none of them cinematic. The realistic failures are an agent obeying instructions hidden in content it reads, a credential that grants more than the job needs, a bulk operation executed faithfully at the wrong scale, traffic routed through someone else's servers, an OAuth flow that lets a stranger authorize themselves, and a session nobody can reconstruct afterwards. Each has a known mitigation; the checklist below is built from them.

  1. Prompt injection through your own content. An agent that reads comments, form entries, reviews, or a page you asked it to summarize also reads any instruction planted there ("ignore your task and publish this link"). OWASP ranks it the top LLM risk (LLM01 (opens in new tab)). No server can make a model immune; a server can limit what an injected instruction is allowed to achieve.
  2. Over-scoped credentials. Most WordPress AI integrations authenticate as an administrator, because real site management needs it. A do-everything key held by a client that only reads reports is a standing liability; if it leaks, the holder inherits every tool.
  3. Destructive bulk operations. "Clean up the old posts" can mean three posts to you and thirty to the model; a mistyped price multiplier is applied as faithfully as a correct one. Scale turns a slip into an incident.
  4. Hosted relays in the path. Some products route your AI's traffic through the vendor's cloud. Convenient — but your requests, content, and sometimes credentials then transit infrastructure you do not operate, a data-processing question under GDPR and client contracts. Whatever you choose, the AI provider itself processes what its agent reads; a relay adds a second party.
  5. OAuth and dynamic-client-registration mistakes. The MCP authorization spec (opens in new tab) recommends dynamic client registration (RFC 7591 (opens in new tab)) so clients such as Claude can connect without pre-shared secrets. Done right, registration is public but authorization is not. Done wrong, it is a front door: CVE-2026-15015 (opens in new tab) (NVD, published 2026-07-23, CVSS 9.8) records that one WordPress MCP connector plugin made it "possible for unauthenticated attackers to obtain an administrator-bound OAuth Bearer token via a self-registered client" by combining a public registration endpoint with "the unprotected authorization endpoint" — "without any administrator interaction" (versions up to and including 1.6.1 affected; Wordfence advisory (opens in new tab)). Others have fixed the same area: AI Engine's changelog (opens in new tab) notes that MCP OAuth authorization and token validation "now require administrator capability" as of 3.5.0. Neither is a mark against those projects — prompt patches are what healthy projects do — but the failure mode is real.
  6. No audit trail. If the agent did something odd on Tuesday and nothing recorded it, you cannot tell a model mistake from a leaked key from a teammate. Silent automation is unaccountable automation.

What does a safe setup require?

A short checklist, independent of vendor. A safe AI-to-WordPress setup is one where every credential is narrow and revocable, every destructive call waits for a human, every change is previewable and reversible, every action is recorded on your own server, and the most dangerous capabilities stay off until an administrator turns them on. Use the table as an evaluation sheet for any plugin or service.

# Requirement What it protects against
1 Per-client credentials, each revocable on its own One leak forcing you to revoke everyone; no way to tell clients apart
2 Read-only or tool-limited scope per credential Over-broad keys; injected instructions reaching write tools
3 Explicit confirmation for destructive actions Misread intent executed at scale
4 Preview / dry run before writes Bulk mistakes; unverified assumptions
5 Per-change undo plus whole-database checkpoints Mistakes that got through anyway
6 Audit log you can read without the vendor Unaccountable sessions; leaked-key forensics
7 Rate limits per credential and per IP Runaway loops; brute-force guessing
8 Secrets stored as one-way hashes, never echoed back Database dumps; key recovery
9 No third-party relay between client and site Data leaving your server; vendor-held credentials
10 Escalation only by an administrator in wp-admin, never via the API Agents, or injected prompts, granting themselves power
11 OAuth gated by admin consent, PKCE, and user-bound tokens Self-authorized strangers (the CVE above)
12 Host, WAF, and HTTPS compatibility check Silent failures; keys sent in the clear

How does Cowboy MCP meet that checklist?

Item by item, with the limits stated. Cowboy MCP is a self-hosted MCP server that runs inside your WordPress install, so every guardrail below is enforced by PHP on your own server, not by the model's judgment or a vendor's cloud. Where a guardrail has an edge, the edge is named; the security page goes deeper on each one.

Item How Cowboy MCP does it Limits
1. Revocable credentials One API key per client — labeled, shown once, revoked individually in Settings → Cowboy MCP; OAuth connections are listed and revoked the same way. A valid key acts with administrator capabilities inside the guardrails — treat it like an admin password.
2. Scope Every key and OAuth client carries a scope — full, read-only, or a hand-picked tool list — checked on every call; discovery shows in-scope tools only. A custom scope that includes WP-CLI or file writes is escalation-equivalent by design; don't grant those to a credential you mean to confine.
3. Confirmation Safe mode, on by default: destructive tools refuse to run until resent with confirm: true; WP-CLI commands outside a known-safe list do the same. Ordinary writes (a draft, a field update) do not prompt — they are previewable and journaled instead.
4. Preview Every non-read-only tool accepts a dry run reporting tool, target, and parameters without executing. For most tools the preview states intent rather than simulating a diff; installers and updaters resolve the real plan.
5. Undo and checkpoints Journaled changes capture a before-state and roll back individually; database checkpoints restore every table and run automatically before mutating WP-CLI commands and plugin or theme updates. See how undo works. Journal kept seven days by default; actions with no inverse (a sent email, a cache flush, arbitrary WP-CLI) are recorded as not undoable; checkpoints restore tables, not uploads or code.
6. Audit log Every call, error, and auth event is written to a table in your own database — key, tool, arguments, result, IP — filterable in wp-admin, credential-looking fields redacted first. Pruned after 30 days; export before then for longer history.
7. Rate limits 120 requests a minute per key by default, plus a 30-per-minute per-IP throttle that also counts failed authentication. Transient-based and approximate under heavy concurrency — a brake, not a hard boundary.
8. Hashed secrets Keys stored as one-way hashes, OAuth tokens as SHA-256 digests; read-only resources refuse secret-looking options, user-meta output masks credential fields, and the log is redacted. Redaction is pattern-based, and the WP-CLI escape hatch can still read third-party options — scope the credentials that hold it.
9. No relay The endpoint is a REST route on your site and your client connects to it directly — no accounts, no telemetry, no phone-home. Outbound calls go to WordPress.org for installs and to URLs you explicitly request, private and internal addresses rejected. Your AI provider still processes whatever the agent reads — inherent to using an AI, and no plugin changes it.
10. Admin-only escalation Power mode, which lifts the SQL, WP-CLI, file-path, and outbound-request guardrails, is a wp-admin checkbox. The plugin's own settings and keys sit on a never-writable list, so no API call and no injected instruction can enable it. It really does lift guardrails. Keep it off on production; on staging, on for one job, then off.
11. OAuth Off by default. Registration is public, as the spec requires, but authorization cannot complete without a logged-in administrator approving a consent screen on your own site; the redirect must match the registered one, PKCE S256 is mandatory, and tokens are bound to your site and the approving admin, failing closed if that account loses its role. Needs a public HTTPS hostname. Registration stays reachable by anyone — the consent step is the gate.
12. Compatibility check A built-in Connection Doctor tests configuration, loopback, HTTPS, and OAuth readiness and reports likely causes and fixes; it understands local sites. Plain HTTP is permitted for local development; on a public host the Doctor warns rather than blocks.

Which AI client is safest to start with?

The one you already use, holding a key that cannot write. The safest first connection is a read-only credential on a site that is not your production store, through a client that asks you before each tool call. The client matters less than the scope, because the server enforces the scope no matter who is calling.

A practical order: a local development site (Local, Studio, MAMP, DevKinsta) with Claude Code, Cursor, or Codex on the same machine is the lowest-stakes sandbox — no public URL, no tunnel, a read-only key; the Claude guide shows the setup. On a live site, the Claude desktop and web apps use the OAuth connector: you approve a consent screen on your own site as an administrator, the token is bound to your account, and you revoke it from the settings page. The connector needs a public HTTPS hostname, and cloud-side clients such as claude.ai and ChatGPT connect from the vendor's servers, so the site must be reachable from the internet. Most MCP clients also ask you to approve each tool call — a second layer you control. Widen the scope only once the agent's read answers match reality.

How do you tell if a WordPress AI plugin is safe?

Ask the vendor seven questions before you install anything. A safe WordPress AI plugin can answer, in writing, where your traffic goes, what is reachable without authentication, how narrowly a credential can be scoped, whether changes can be previewed and undone, where the audit log lives, how its OAuth flow is gated, and how it handles vulnerability reports. Vague answers are themselves an answer.

  1. Does any traffic leave my server other than to the AI provider I chose? If there is a relay, who operates it and what does it store?
  2. Is authentication on by default, and is any endpoint reachable without it?
  3. Can I issue a read-only or tool-limited credential, and revoke one without revoking all?
  4. Can I preview a change before it runs and undo it afterwards — and for how long?
  5. Is there an audit log in my own database, and what is redacted from it?
  6. If it supports OAuth: does dynamic client registration lead to an administrator consent step, is PKCE required, and are tokens bound to a user and to my site?
  7. What is the disclosure policy, and what does the record show? Search the plugin slug on NVD, Wordfence Intelligence, or WPScan. A fixed advisory with a quick patch is a better sign than a project with no data at all.

Cowboy MCP's answers to the first six are the rows above; for the seventh, the plugin is open source on WordPress.org and GitHub, so every gate described here can be read in the code. The self-hosted vs hosted comparison puts the same questions to hosted architectures.

FAQ

Can the AI read private data on my site?

Yes, if you let it. An authenticated agent acts with administrator capabilities, so a full-scope credential can read private posts, drafts, user emails, and most options — that is what site management requires. What it should never see are secrets: Cowboy MCP stores API keys as one-way hashes, refuses to serve options whose names look like keys, tokens, or passwords through its read-only resources, and masks credential fields in user data and the audit log. When reading is all the job needs, issue a read-only credential.

Can an AI agent delete my whole site?

Not easily, and not silently. With safe mode on, deletes and other destructive tools stop and ask for confirmation; schema-destroying SQL and database-reset WP-CLI commands are blocked unless an administrator enables power mode in wp-admin; the last administrator account cannot be deleted; journaled changes roll back individually; and database checkpoints restore every table. The realistic bad case is a wrong edit you undo, not a lost site — but keep your normal backups, because checkpoints do not restore files.

Does the AI see my API keys or passwords?

No. Keys are shown once when generated and stored only as a one-way hash that cannot be recovered from the database; OAuth tokens are stored as SHA-256 digests. The plugin's own settings and keys cannot be written through the API even in power mode; queries that touch password or session data are refused; and credential-looking fields are redacted before they reach the log.

Does this work on WordPress multisite?

Cowboy MCP is configured per site, not per network: each site has its own settings page, keys, undo journal, and audit log, and a key issued on one site manages that site. It was not designed as a network-level administration tool — there is no network settings screen — so if you run a multisite network, start on a staging copy and treat each site's credential as separate.

Do I need HTTPS?

For anything on the public internet, yes. A Bearer key sent over plain HTTP is readable by anyone on the path, and the OAuth connector will not run without a public HTTPS hostname. The exception is local development — a site on localhost or a .local or .test domain, used by a client on the same machine — where plain HTTP is normal and the Connection Doctor reports it as a pass with local context. On a public host the Doctor warns about plain HTTP; fix the certificate before issuing keys.