TL;DR: A WordPress site can be an MCP server, so Claude, ChatGPT, Gemini or Cursor can read and change it directly. The connection is the easy part. The part that matters is what the AI is allowed to touch. We bound access to WordPress roles (read, write and delete per area, all off by default), used OAuth 2.1 with PKCE instead of pasted API keys, and logged every call with the exact permission that allowed it. You can check any WordPress MCP server from the terminal with mcpc, and I show how below.
Every AI app I use can write a product description. Almost none of them can save one. They draft it, I copy it, I open wp-admin, I paste it, I click Update. Then I do it again for the next product.
The fix exists now. WordPress supports the Model Context Protocol (MCP) through the official MCP Adapter and the Abilities API in WordPress 6.9. Your site exposes tools, and an AI client calls them.
But here's the thing that kept bugging me. Every "connect your AI to WordPress" guide I read ended with one token that could do everything. On a live store, that's one confident wrong answer away from repricing the catalogue or publishing a draft nobody approved.
So we built AI Gateway around one question: what is this AI actually allowed to do? This post is the developer tour of the three decisions that answer it.
Decision 1: permissions belong to the role, not the token
WordPress already has a model for "who can do what": roles. We used it instead of inventing a new one.
Each area of the site gets three separate switches: read, write and delete. The free plugin has 41 areas (posts, pages, products, orders, coupons and so on). PRO adds 6 more.
Three rules make this work:
- Deny by default. A new role starts with zero access.
- Hidden means hidden. If a role can't use a tool, the AI doesn't even see it in the tool list. It can't try what it can't see.
- Set once. The policy follows the role, so it holds for every AI app anyone in that role connects.
That second rule turned out to matter more than I expected. When I connected to our own store with a connection limited to a few areas, the server listed 53 tools. The free plugin alone has 147. Everything outside those 53 simply isn't there from the AI's point of view.
Decision 2: OAuth 2.1, not application passwords
I didn't want anyone pasting a WordPress application password into a third-party tool. So clients connect the way modern MCP clients already expect:
- dynamic client registration, then OAuth 2.1 with PKCE (S256 only)
- the redirect address has to match exactly
- access tokens expire after one hour
- a person approves every app on a consent screen, and can cut it off in one click
In practice it looks like this. You copy one URL from the plugin:
...and paste it into your AI app. In Claude that's a custom connector:
The server also publishes the standard discovery document, so a client can find the auth server and scopes without any setup:
curl -s https://1teamsoftware.com/.well-known/oauth-protected-resource/wp-json/ai-gateway/mcp
{"resource":"https://1teamsoftware.com/wp-json/ai-gateway/mcp",
"authorization_servers":["https://1teamsoftware.com"],
"bearer_methods_supported":["header"],
"scopes_supported":["mcp.site.read","mcp.reports.read","mcp.products.read","mcp.products.write", "..."]}
Each scope is one cell of the role matrix. mcp.products.write means "write" on "products". Nothing more.
Decision 3: an audit log that names the permission
When a price changes, "who did that?" needs a real answer. Every row records the user, the AI app, the object touched, and the exact matrix cell that allowed the call:
Two details I care about here. Argument names get logged, never their values, so customer data stays out of the log. And refused calls are logged too, marked denied. If an AI keeps trying something it isn't allowed to do, you'll see it.
Checking a WordPress MCP server from the terminal
You don't need a chat app to see if a server works. I use mcpc, a command-line MCP client that runs the OAuth flow and keeps a named session.
Log in once (this opens the consent screen in your browser), then connect:
mcpc login https://your-site.com/wp-json/ai-gateway/mcp --profile mysite
mcpc connect https://your-site.com/wp-json/ai-gateway/mcp @mysite --profile mysite
See what your role is allowed to see:
mcpc @mysite tools-list
Tools (53):
* `1teamsoftware-ai-gateway-get-site-info ()` [read-only, idempotent]
* `1teamsoftware-ai-gateway-search (query?:str)` [read-only, idempotent]
...
Call a read-only tool:
mcpc @mysite tools-call 1teamsoftware-ai-gateway-get-site-info
{
"name": "1TeamSoftware",
"url": "https://1teamsoftware.com",
"description": "Free and Premium WooCommerce Plugins | 1TeamSoftware"
}
Two checks I'd run on any WordPress MCP server, ours or someone else's:
-
Call it with no token. The MCP endpoint should answer
401, not data. - Connect as a low-privilege role and read the tool list. If a shop manager sees delete tools you never granted, the server trusts the token, not the role.
What I actually verified
Everything in the terminal section above ran against our own live store, 1teamsoftware.com, on November 23, 2026: the OAuth login, the 53-tool list, and eleven read-only calls (site info, search, products, posts, media, categories, plugins and the undo history). All of them came back clean.
I did not run write calls for this post. It's a live store and I wasn't going to edit real products to make a screenshot. The undo history did show a real product edit made through the plugin the day before, so writes go through and get recorded. But I didn't trigger one myself here.
Trade-offs: what this doesn't do
- It's only as safe as the roles you give out. If you hand an AI an administrator role with everything switched on, the matrix won't save you. Start with read only.
- Undo is PRO. The free version has all 147 tools and the full matrix. The Undo button on single changes and the bulk-edit preview are in PRO.
- Your site has to be reachable over HTTPS. Claude and ChatGPT connect from their own servers, so a local site needs a tunnel. Cursor and coding agents on your machine don't.
- It's not a hosted service. There's no relay in the middle, which is the point, but it also means your server handles the load. A busy AI session is real traffic.
Why not just use application passwords?
You can. For a personal blog where you're the only user, it's fine.
It stops being fine once more than one person connects an AI, or once the site takes money. Then you want three things a plain token doesn't give you: a limit per role, a consent step you can revoke, and a log that says which permission allowed which change.
Try it
The free version is on the product page. Nothing is exposed until you switch it on, so you can turn on read for one area, connect one AI, and watch it work on your own site. Then run the two checks above and see if you agree with the model.
If you're building or running a WordPress MCP server yourself, I'm curious how you handle permissions. Per role, per token, or something else?
Further reading
- AI Gateway product page: free version, PRO features and the full tool list
- mcpc on GitHub: the command-line MCP client used above
- Model Context Protocol: the spec itself
- WordPress MCP Adapter: the official adapter AI Gateway is built on




Top comments (1)
"Hidden means hidden" is underrated. A tool the model can't see is one it can't be talked into calling, and it also shrinks the prompt, which helps tool choice. Deny-by-default per role plus a log line with the exact permission that allowed each call is the same shape I use in my own orchestrator: default-deny policy, then an audit entry for every allow. Question: when a role loses write on products mid-session, does the tool list refresh for an already connected client, or only on reconnect?