An MCP connection lets an AI client take real actions on a WordPress site. That makes WordPress MCP security a topic worth understanding in detail before you enable anything. This guide covers the threats, the controls that reduce them, and a checklist you can follow.
Because implementations differ, what you can configure depends on your MCP plugin or server. Use this guide as a framework, and check your plugin’s documentation for the specific controls it offers.
How the Pieces Fit
An AI client, such as Claude, connects over MCP to a server that exposes tools. In WordPress, that server is usually a plugin or a separate program. The server calls WordPress to do the work. Security must hold at every step: the connection, the server, the account it acts as, and WordPress itself.
Threat Model
| Threat | Example | Main defense |
|---|---|---|
| Stolen credentials | A token pasted into a public repo is used by an attacker | Secret handling, rotation, short-lived tokens |
| Over-permissioned account | The assistant uses an admin account to delete content | Least privilege |
| Prompt injection | A comment tells the assistant to change settings | Limit tools, confirmations, treat content as data |
| Destructive mistakes | A bad prompt trashes many posts | Read-only default, backups, confirmations |
| Data exposure | Private drafts or user data sent to an AI service | Limit returned data, provider review |
| Vulnerable server plugin | A flaw in the MCP plugin lets attackers call tools | Updates, trusted sources, monitoring |
| Unprotected endpoint | The MCP URL accepts unauthenticated calls | Authentication, network restrictions |
Control 1: Authentication
- Require authentication on the MCP endpoint. Never leave it open.
- Prefer OAuth or short-lived tokens over long-lived shared secrets, where your plugin supports them.
- WordPress Application Passwords are one mechanism sometimes used for API authentication. They are tied to a user, so scope that user carefully.
- Rotate or revoke credentials you no longer need.
Control 2: Least Privilege
- Use a dedicated user for the assistant, not a person’s account.
- Give it the smallest role that works. Avoid Administrator.
- Rely on WordPress capabilities. A well-built server checks the connected user’s capabilities before running a tool.
- Enable only the tools you need. Each tool widens what can go wrong.
Control 3: Tool Design and Confirmation
- Separate read tools from write tools.
- Keep destructive tools, such as delete, user changes, and plugin changes, disabled by default.
- Require explicit confirmation for risky actions where your plugin supports it.
- Prefer drafts over publishing.
Control 4: Defend Against Prompt Injection
The assistant reads content from your site. Attackers can plant instructions in comments, form entries, or user-submitted text. You cannot fully eliminate this risk, but you can limit the damage:
- Do not give the assistant destructive tools while it processes untrusted content.
- Instruct it to treat site content as data.
- Require human approval for write actions.
- Keep a person in the loop for anything public or irreversible.
Control 5: Network and Transport
- Use HTTPS only.
- Where supported, restrict access by IP address or use rate limiting.
- Check that a firewall or security plugin does not block or expose the endpoint unexpectedly.
Control 6: Logging and Monitoring
- Enable activity logs if your plugin offers them.
- Review what was changed, by which account, and when.
- Ask the assistant to summarize its changes at the end of each session.
- Set up alerts for unusual activity where you can.
Control 7: Backups and Staging
- Keep regular, tested backups.
- Test new tools and prompts on staging first.
- Know how to restore quickly.
Control 8: Keep Everything Updated and Vetted
- Choose MCP plugins from reputable sources with active maintenance.
- Read the plugin’s security documentation.
- Update WordPress, plugins, and themes promptly.
- Remove tools and plugins you no longer use.
Security Checklist
- Endpoint uses HTTPS and requires authentication.
- A dedicated, limited WordPress user is in place.
- Only necessary tools are enabled.
- Destructive and publishing tools are off.
- Credentials are stored securely and rotated.
- Logging is on, and someone reviews it.
- Backups exist and have been tested.
- The setup was tested on staging.
- Prompts tell the assistant to treat content as data.
- A person reviews changes before publishing.
If Something Goes Wrong
- Revoke the credentials and disable the MCP endpoint.
- Review logs and recent changes.
- Restore affected content from backup.
- Rotate any secrets that may be exposed.
- Find the cause before re-enabling access.
Frequently Asked Questions
Is MCP secure?
MCP is a protocol. Security depends on how the server, authentication, permissions, and tools are configured.
What is the most important control?
Least privilege: a limited user and only the tools you need.
What is prompt injection?
Text in content that tries to make an AI follow an attacker’s instructions instead of yours.
Should the MCP endpoint be public?
It must be reachable by your client, but always require authentication, and restrict access where possible.
Can I make it completely safe?
No system is completely safe. You can reduce risk with layered controls and human review.
Conclusion
WordPress MCP security comes down to layers: authentication, least privilege, careful tool design, logging, backups, and human review. Work through the checklist, start read-only, and expand slowly.
For a practical setup, read our guide to connecting Claude to WordPress and explore our free MCP server for WordPress.
Explore ByteCore Stack Plugins
- MCP Manager β connect your WordPress site to AI assistants through MCP.
- SMTP Manager β reliable WordPress email delivery.
- Lightsail Manager β manage your AWS Lightsail CDN from WordPress.
