Loading Now

WordPress REST API vs MCP: Application Passwords, OAuth and When You Need Each

WordPress offers two methods for integrating AI: the REST API using an Application Password or an MCP plugin that authenticates via OAuth. Both methods can enable AI functionalities on your website. The crucial difference lies in the credentials provided: their capabilities, duration, and the records they generate.

If you are exploring AI assistants for WordPress, this article discusses the practical differences between MCP and API: whether to continue with the existing REST API password your AI can utilise or introduce an MCP plugin that assigns access levels and maintains a log of changes. We will start with an overview, followed by five specific scenarios illustrating the key differences.

A Comparative Overview of the Two Options

Application Passwords are integrated into the WordPress core since version 5.6. You can create them per user on the profile screen, with each password validating REST API requests over HTTPS. Notably, if XML-RPC is enabled, these passwords can also substitute for the accountโ€™s actual password when interacting with that legacy API. For further details, refer to the REST API authentication guide.

MCP (Model Context Protocol) is an open-source standard designed to link AI applications with external systems. Unlike an API that reveals endpoints for code calls, an MCP server exposes named tools with descriptions for an AI client to discover and utilise, often built on top of an existing API. For Servers accessible via HTTP, its optional authorisation framework is based on OAuth 2.1 and advocates using short-lived access tokens. If youโ€™re new to this acronym, learn more about what MCP signifies in WordPress.

On WordPress, the MCP pathway is facilitated by a plugin like Easy MCP AI. This plugin operates on your site: the AI authenticates using OAuth on a consent interface, each connection is assigned an access level according to your choice (no more than what the corresponding WordPress account can perform), and each access token remains valid for one hour.

Easy MCP AI is developed by Themeisle, the team managing this blog.

The statement “MCP is merely another API” holds some truth, since many MCP Servers are built upon existing APIs. What differentiates these two approaches on a WordPress site is the credential type, its scope, and the audit trail it generates:

Concept graphic: an unlabeled key with expiry next to a labelled, timed MCP pass with an access level.
REST API + Application PasswordMCP plugin (Easy MCP AI)
CredentialA password generated for a specific user accountAn OAuth connection approved on a consent screen
CapabilitiesAll actions the user can perform via the REST API; per-password scopeLimited by the access level selected and the permissions of the associated WordPress account
DurationNo expiry; valid until revokedAccess tokens last for 1 hour and can be renewed; refresh tokens are valid for 30 days and can be revoked at any time
Site Audit TrailKeeps post revisions along with a Last Used date and IPRecords revisions, maintains an audit log for each call, and tracks every write operation
Plugin Removal ImpactContinues to function; embedded in WordPress coreConnections and data will be deleted
Designed ForScripts, applications, and fixed workflowsAI clients managing the site

Your AI Can Utilise the REST API

Chat applications capable of executing code, such as claude.ai and ChatGPT, can invoke your REST API directly by entering an Application Password into the chat. Thereโ€™s no plugin installation or new protocol to master: simply generate the password, paste it, and outline the task. For connecting Claude to your site without entering a password, refer to how Claude connectors function.

The real consideration arises from the credential type. The unscoped nature of that password means the chat can perform any actions allowed by the account through the REST API. It lacks expiry and remains in the chat history. When the task concludes, WordPress retains a record of changes made by the AI beyond standard post revisions: the only trace of the password is the Last Used date and IP, and multiple applications sharing a single password will overwrite each other’s history.

Claude.ai has even recommended revoking an Application Password after it has been shared in a chat, a prudent suggestion that requires users to remember to act accordingly.

NOTE: An Application Password lacks access to wp-admin, which may seem reassuring. However, via the REST API, it retains the ability to execute any task allowed by its user account. Handle it with the same caution as you would a real password.

You Operate a WooCommerce Store

Raw REST calls perform precisely what they state, including unintended outcomes. The WooCommerce product endpoint can replace an entire category list if you send updated categories, meaning asking AI to add a product into a category could unintentionally remove existing ones unless they’re included in the request.

The category tool in Easy MCP AI adds a category while retaining pre-existing categories for the product. Furthermore, each write operation via this tool appears in the change history, complete with the tool used, timestamp, and the user account, retained for 30 days by default, allowing you to track AI modifications and their timings.

Easy MCP AI change history showing two AI edits to one post, along with the tool and account utilised.

You Use Automation Tools like n8n, Zapier, or Scripts

If your workflow is repetitive and involves AI decision-making, the REST API along with an Application Password is ideal. For inspiration, check out these WordPress Zapier recipes.

PRO TIP: Set up a dedicated user account specifically for automation tasks, assigning it the lowest role necessary for functionality. This will ensure that if the password is leaked, it can only execute actions permitted by that role.

Granting AI Access to Others

Occasionally, a writer, virtual assistant, or client may require AI access on your site. When using an Application Password, the credentials give that person full access corresponding to their user role, with no current means to limit a single password; WordPress indicates that scoping is anticipated in โ€œfuture releases.โ€

Conversely, Easy MCP AI allows for this through its consent interface. Each connection can be assigned an access level: Full Access, Match a Role (like Editor or Author), Read-Only, or Custom, with none exceeding the capabilities of the WordPress account behind it. An optional approval setting can pause destructive actions until a user’s authorisation is received, and you can revoke connections without altering any passwords. Additionally, the plugin prevents the creation of Application Passwords via its tools since a new password would persist longer than the connection and circumvent the tool listing.

Easy MCP AI consent interface exhibiting the four access levels: Full Access, Match a Role, Read-Only, and Custom.

When You Cease Using It

An Application Password is a part of the WordPress core, meaning that removing any associated plugin retains its functionality. It persists until revoked via the userโ€™s Edit User or Profile screen, either individually or through the โ€œRevoke All Application Passwordsโ€ option.

Application Passwords list under Users > Profile: contains name, creation and last used dates, with a revoke link for each password.

In contrast, uninstalling Easy MCP AI results in the deletion of its connections and data, with its endpoint returning a 404 error, invalidating all tokens associated with it.

When to Prefer the REST API

Certain scenarios are better suited to the straightforward REST approach:

  • You need something that varies from run to run, which can be addressed with a fixed request.
  • You are a developer working within an agent that can execute code and prefer to compose requests manually.
  • Any plugin might already be installed on the site.

This choice is not necessarily permanent; Easy MCP AI provides REST read and write functionalities, meaning an MCP connection can still make a standard REST call when appropriate.

Quick Decision Guide

A summary for various situations:

ScenarioREST API + Application PasswordMCP Plugin
Your chat app can execute codeOperational now with a pasted password; remember to revoke it afterwardsOAuth via the siteโ€™s consent interface, as well as an access level and a record
Editing WooCommerce storesThe product endpoint may replace category lists; include existing ones in the requestA category tool that preserves existing categories, alongside a detailed record of every write operation
Established AutomationsThe suitable tool; utilise a dedicated lower-role user for securityAlso viable via Easy MCP AIโ€™s REST read and write capabilities
Access for writers, VAs, or clientsGrants the full role without any option for narrowing itChoose an access level on the consent interface; can be revoked at any time
Seamless ExitRevoke passwords individually or revoke all associated with a userUninstalling the plugin removes its connections altogether

Regardless of your chosen route, the checklist remains straightforward: understand the extent of what the credentials permit, how long they remain active, and the records they generate. If the MCP method aligns with your siteโ€™s needs, explore server-plugins/”>the top WordPress MCP server plugins. What setup are you currently using? Please share your insights in the comments!

Congratulations! Youโ€™ve reached the conclusion of the article!

Share this content:


Discover more from Qureshi

Subscribe to get the latest posts sent to your email.

Discover more from Qureshi

Subscribe now to keep reading and get access to the full archive.

Continue reading