WordPress MCP Adapter and Abilities API: how to let AI agents in without opening a security hole
TL;DR: WordPress 6.9 ships an Abilities API, a standard way for core, plugins and themes to register things a site can do (for example "list posts" or "get site info") with a name, inputs and a permission check. The separate MCP Adapter exposes those abilities to AI clients through the Model Context Protocol (MCP), so an assistant can discover and call them. That is useful, and it also means an AI agent can act on your site with the permissions of whatever account it logs in as. The safe pattern is simple: a dedicated low-privilege user, read-only abilities first, real permission checks, a short allowlist, HTTPS, one application password per client and logs you actually read. Most small sites do not need any of this yet. If you do not use AI agents with your site, you can leave it off. This is general guidance, not a security audit.
What the Abilities API and MCP Adapter are
Abilities API. According to WordPress's developer documentation and articles about it, the server-side Abilities API arrived in WordPress 6.9. It lets code register an "ability": a named, described action with defined inputs and outputs and a permission callback. Registered abilities can also be listed and run through REST endpoints under the wp-abilities/v1 namespace. The point is a common catalogue of what a site can do, readable by both software and AI.
MCP. The Model Context Protocol is an open standard that lets AI clients talk to tools and data sources in a consistent way. An MCP server presents "tools" that a client can discover and call.
MCP Adapter. The WordPress MCP Adapter, introduced on the WordPress developer blog in February 2026, bridges the two. It takes abilities and presents them as MCP tools, so a compatible AI client can see what your site offers and call it. We have not been able to open every page of the official documentation from our test environment, so check the current README and release notes before you build on it, because the project is moving quickly.
In plain terms: the Abilities API describes what your site can do, the MCP Adapter lets AI assistants use that list, and WordPress's own permission system decides what a given login is allowed to do.
Do you need this at all?
Probably not today. It matters if you:
- Want an AI assistant to draft or update posts, manage products or pull reports directly on your site.
- Build plugins and want them to be controllable by AI tools.
- Run a client agency and want automation across many sites.
If you only use AI to write text in a separate chat window and paste it into WordPress, there is no MCP connection and nothing to secure. Some plugins may add MCP support on their own, so it is worth checking your plugin list. If you are not using it, the safest option is not to install or enable MCP-related plugins.
How the pieces fit together
- The client. An AI assistant or tool that speaks MCP.
- Authentication. The client signs in to your site as a WordPress user, typically with an application password sent over HTTPS. See our guide to WordPress REST API authentication methods.
- The adapter. It lists the abilities you have exposed as tools and routes calls to them.
- The ability. The code that runs. It carries its own permission callback.
- WordPress. Runs the action with the capabilities of the logged-in account.
This design has a useful property: an agent cannot do more than the account it signs in as, and cannot call abilities you have not exposed. Your safety depends on getting those two things right.
The real risks
One security write-up we reviewed summarises the issues well. They are not exotic.
Over-privileged accounts. If you connect an agent using an administrator account, the agent can do anything an administrator can: change settings, install plugins, delete content, create users. A mistake or a malicious instruction then has full power.
Weak permission callbacks. An ability that returns true for everyone, or checks only that the user is logged in, may let low-privilege accounts perform destructive actions. A permission callback should check the minimum capability needed for that action.
Prompt injection. AI models can be tricked by instructions hidden in content they read, such as a blog comment, a contact form message or a user profile. OWASP lists prompt injection first in its Top 10 for LLM applications. WordPress capability checks tell you whether an account may act. They do not tell you whether the action is a good idea, and an approval prompt does not stop instructions that are buried in content the agent processes.
Scope creep. Starting with a few read-only abilities and gradually adding write and delete abilities, without review, widens the blast radius and makes the audit trail murky.
Third-party abilities. Plugins can register their own abilities. Each one inherits your trust. A badly written or malicious plugin can expose actions you did not intend.
Credential leakage. An application password stored in a chat tool, a shared document or an untrusted desktop app is a login to your site. It travels as Basic Auth, so it must only ever be used over HTTPS.
Resource abuse. An agent in a loop can hammer your REST endpoints. On shared hosting that can hit CPU and entry-process limits. See hosting resource limits explained.
A safe setup, step by step
Treat the agent like a new temporary staff member you do not fully trust yet.
- Test on staging first. Never try a new agent integration on a live shop or a site with real customer data. Take a fresh backup before every session. Our guide to backing up WordPress and testing restores shows how.
- Create a dedicated user. Name it something like
ai-agent-readonly. Give it the lowest role that works, such as Subscriber or a custom role with only the capabilities needed. Never use your own admin login. - Start read-only. Expose abilities that retrieve information first, such as site details, post lists or order counts. Add write abilities one at a time, only when a real workflow needs them.
- Write real permission callbacks. If you build abilities yourself, check a specific capability such as
edit_postsormanage_woocommerce, not just "logged in". Avoid__return_truefor anything that changes or deletes data. - Keep a short allowlist. List every ability that is exposed, who asked for it and why. Remove anything not in use.
- Use application passwords, one per client. Create a separate password for each tool so you can revoke one without breaking the others. Revoke it when you stop using the tool.
- Force HTTPS. Application passwords are only safe over an encrypted connection. If you are not sure your site redirects correctly, see how to force HTTPS.
- Turn on two-factor for humans. Application passwords bypass interactive 2FA by design, so protect the accounts that can create them. See two-factor authentication methods compared.
- Add a human approval step for risky actions. Publishing, deleting, refunding or emailing customers should go through a person, not directly from an agent.
- Log and review. Know which ability was called, by which user, when and with what input.
What to ask before installing an AI or MCP plugin
- Who maintains it, and when was it last updated? Check the plugin page and the changelog.
- Which abilities or tools does it expose by default? Can you turn each off?
- Does it use the Abilities API with proper permission callbacks, or does it bypass WordPress capabilities?
- What data does it send to outside AI services? If personal data leaves your site, your DPDP notice has to say so. See what to include in a DPDP privacy notice.
- Does it create its own admin accounts or API keys?
- Can you uninstall it cleanly, and does it remove its credentials?
- Is it listed in a vulnerability database? Our guide to CVE databases and plugin disclosures shows how to check.
Be cautious with plugins that promise "full control of your site by AI" with a single click. Convenience and least privilege rarely go together.
Hosting and server considerations
- Rate limiting. Limit requests to REST endpoints, especially
wp-json, at the web server, firewall or CDN level, so a runaway agent cannot exhaust PHP workers. If you have blocked the REST API for security, expect an MCP connection to hit the problem described in WordPress REST API 403 errors. - IP allowlisting. If the agent runs from a fixed IP, restrict access to it. See IP allowlisting and geoblocking for WordPress.
- Isolation. Run experiments on a separate staging site or subdomain, not next to your production store.
- Where the agent runs. If you host your own agent, plan CPU and RAM properly. Our AI agent VPS requirements post covers sizing.
- Backups and restore. Make sure you can roll back quickly if an agent makes a bad change.
What to monitor
- New or changed users and roles.
- Application password creation and last-used dates in each user profile.
- Spikes of REST requests from one IP or user.
- Unexpected edits to posts, products or options.
- New plugins or abilities appearing without a change ticket.
A monthly review that takes ten minutes is better than perfect logging that nobody reads.
Common mistakes
- Using an administrator account. The biggest single error. Always create a dedicated limited user.
- Exposing every ability. Start narrow, not wide.
- Trusting approval prompts as a security layer. They do not stop instructions hidden in content the agent reads.
- Sharing one application password across tools. You cannot revoke one without breaking all.
- Testing on production. A stray instruction can modify live content or customer data.
- Forgetting that comments and form entries are untrusted input. An agent that reads them can be manipulated by them.
- Ignoring privacy law. Sending customer data to an outside AI service is processing under the DPDP Act, and your notice should say so.
- Never reviewing the allowlist. Abilities accumulate quietly as you install plugins.
FAQs
What is the WordPress Abilities API?
A server-side API introduced in WordPress 6.9 that lets code register named actions with inputs, outputs and permission checks, so software and AI tools can discover and call them in a standard way.
What is the WordPress MCP Adapter?
A project that turns registered abilities into Model Context Protocol tools, so an AI client can list and call them. Check the official repository and developer blog for the current status and requirements.
Is it safe to connect an AI agent to my WordPress site?
It can be, if you limit what the agent can do: a dedicated low-privilege user, read-only abilities to start, real permission checks, HTTPS and logging. It is not safe to hand it an administrator login.
Do I need the MCP Adapter?
Only if you want AI tools to act on your site directly. If you use AI in a separate chat window, you do not need it. Not installing it is the safest choice.
What is prompt injection and why does it matter here?
It is when hidden instructions in content an AI reads, such as a comment or form submission, steer the AI into doing something unintended. If the agent has powerful abilities, the damage can be real.
Should I use an application password?
Yes, one per client, over HTTPS, with a limited-role user. Revoke it when you stop using the tool. Remember that application passwords bypass interactive 2FA, so protect the accounts that can create them.
Will this slow down my site?
Not by itself. A busy or looping agent calling REST endpoints can use CPU and PHP workers, which matters on shared hosting. Rate limit and watch your resource usage.
Does this affect DPDP compliance?
Possibly. If personal data is sent to an outside AI service, that is processing you should disclose and secure. Treat it as part of your data map.
Conclusion
The Abilities API and MCP Adapter give WordPress a clean, standard way to let AI tools do real work on a site, which is exactly why they deserve a careful setup. Use a separate limited account, expose a short list of read-only abilities first, write proper permission checks, keep everything on HTTPS and look at the logs. Try it on staging with a fresh backup before you let an agent near production.
HostCloud gives Indian WordPress sites staging, backups and server-level controls that make this kind of experimentation much less risky. See the plans at https://hostcloud.in.
Sources: