Inicio - Documentación - POM AI - 09 MCP - Start here - Choose an authentication method

Choose an authentication method

Every MCP call must authenticate. OAuth provides per-client grants; an API key shares the configured service user across its connections.

The two methods

OAuth Bearer token API key
Sent as Authorization: Bearer … X-POM-AI-MCP-API-Key: …
Acts as The user who approved the authorization The configured service user, if any
Scopes Whatever was granted, up to all eight No per-client OAuth scope grant
Can write With the required scopes, capabilities and gates With a configured service user, capabilities and gates
Setup Automatic, through discovery Manual, one shared key
Revoke Per client, or reset all Revoke the single key
Expiry Access token 1 hour, refresh token 30 days None until revoked

Both can be enabled or disabled independently under Settings → POM AI → MCP server, and both are on by default.

Send one, not both

A request carrying both an Authorization: Bearer header and an API key header is rejected outright with an ambiguity error. Configure the client with exactly one method.

This is a real trap when switching methods: a client that keeps a stale header from the previous configuration fails with a confusing message. Clear the old one.

Prefer OAuth

OAuth is the better choice in almost every case:

  • It acts as a real user, so WordPress capabilities apply naturally and the audit trail names a person.
  • It supports per-client scopes, including read-only grants independent of other clients.
  • It is scoped per client, so you can revoke one assistant without affecting others.
  • Tokens expire. An access token lasts an hour and refreshes for up to thirty days.
  • It requires explicit human approval on a consent screen.
  • It needs no manual setup. A compatible client discovers the server, registers itself and completes the flow.

Use it unless something specific prevents it. See OAuth with PKCE.

When an API key makes sense

  • The client cannot do OAuth.
  • You need a manually configured integration with a dedicated service user.
  • A monitoring or reporting tool needs to query site state.

API keys can write when their service user has the required capabilities and the relevant gates are open. For read-only access, keep gates closed and restrict the service user’s capabilities. All clients sharing the key also share its permissions and revocation.

See Use an API key.

What authentication does not decide

Authenticating tells the server who is calling. It does not by itself allow anything:

  1. OAuth scopes — an OAuth token must carry the scopes each tool requires.
  2. Capabilities — the acting WordPress user must hold the capability.
  3. Write gates — the relevant gate must be open.
  4. Input schema — arguments must satisfy the tool's schema.

All four are checked. See MCP security model.

Choosing the acting user

With OAuth this is the most consequential decision in the whole setup, because the assistant inherits that user's capabilities.

Approving as an administrator gives an assistant administrator reach over content, options, theme settings and the catalogue. That may be what you want for a structural task on staging. It is rarely what you want permanently.

Consider a dedicated WordPress user holding only the capabilities the work needs, and approve the authorization while logged in as that user.

With API keys, the acting user is set by Service user ID in the MCP settings. The standard transport permits some reads without a service user. WordPress MCP Adapter requires a valid service user with read for every connection.

Managing account-connected agents

When using the POM account MCP, open My Account → POM AI Management → AI site connections → Authorized agents. Revoke agent access removes only the selected client's grants for your account, including refresh credentials and pending authorization codes. Connected websites and other agents keep their access. An operation already dispatched may finish; returning requires fresh OAuth authorization.

This account control is separate from a destination's Reset OAuth, which removes every OAuth client and token on that destination. Account MCP uses its account scopes and OAuth only; the table above describes a site's standard authentication choices.

Disabling a method

Turn off Enable OAuth or Enable API key auth to shut a door completely. A request using a disabled method is refused with an explicit error rather than falling back to the other.

Turning off the method you are not using is a cheap reduction in surface area.

Next