What LiteSpeed Cache Did With Our WordPress MCP and OAuth Paths: A Header Check

Table of our November 7, 2026 header check: the homepage, a post and the REST index were LiteSpeed cache hits; the posts endpoint, the MCP endpoint (401) and three OAuth/OpenID discovery addresses returned no-cache.

Written by

in

·

Our WordPress MCP security checklist lists three addresses we excluded from LiteSpeed’s page cache so that AI assistants can sign in and call the site’s MCP endpoint. A list of exclusions shows what we configured. It does not show what the cache actually does with each address.

So on November 7, 2026, shortly after 9 a.m. Korea time, we requested each address and read the response headers.

The setup we tested

  • LiteSpeed Cache 7.9.3 and Easy MCP AI 2.2.2, as listed by WordPress on November 7.
  • Three entries under LiteSpeed’s Do Not Cache URIs, recorded when they were added on October 23: /wp-json/easy-mcp-ai/, /.well-known/oauth- and /.well-known/openid-configuration. We did not reopen that settings screen for this post.
  • Requests were sent from a page on the same site using GET fetch() calls with credentials: 'omit' and cache: 'no-store'. No cookies were sent. Each address in the table was requested twice in a row; the two ?rest_route= forms discussed later were requested once each.

How to read LiteSpeed’s cache headers

LiteSpeed’s documentation describes the headers we looked at. X-LiteSpeed-Cache: miss means the page was not yet cached and has now been stored; hit on a later request means it was served from the cache. X-LiteSpeed-Cache-Control: no-cache means the server built the response on the spot and intentionally did not serve it from the cache.

What the response headers showed for each path

AddressStatusLiteSpeed headers (both requests)Cache-Control header
Homepage and a published post200X-LiteSpeed-Cache: hitnone
/wp-json/ (REST index)200X-LiteSpeed-Cache: hitnone
/wp-json/wp/v2/posts?per_page=1200X-LiteSpeed-Cache-Control: no-cacheno-cache, must-revalidate, max-age=0, no-store, private
/wp-json/easy-mcp-ai/v1/mcp (MCP endpoint)401X-LiteSpeed-Cache-Control: no-cacheno-store, no-cache, must-revalidate, private
/.well-known/oauth-protected-resource200X-LiteSpeed-Cache-Control: no-cacheno-store
/.well-known/oauth-authorization-server200X-LiteSpeed-Cache-Control: no-cacheno-store
/.well-known/openid-configuration200X-LiteSpeed-Cache-Control: no-cacheno-store
Requests sent without cookies on November 7, 2026 (Korea time).

The MCP endpoint’s 401 is expected for a request with no token. Its response included this header:

WWW-Authenticate: Bearer resource_metadata="https://aipilotinvest.com/.well-known/oauth-protected-resource"

That is the pointer the MCP authorization specification requires: an MCP client that gets a 401 reads that address, finds the authorization server listed there, and then fetches the server’s /.well-known/oauth-authorization-server document. Those two discovery files are what our /.well-known/oauth- entry is meant to keep out of the cache.

Three details in the results

The REST index is cached

/wp-json/, the public list of the site’s REST routes, came back as a cache hit. LiteSpeed’s documentation says its Cache REST API option is on by default and that REST responses are kept for 604,800 seconds (one week) by default. When we requested the same index as /?rest_route=/, the first response was a miss with X-LiteSpeed-Cache-Control: public,max-age=604800, which is consistent with REST caching being on at that default. We did not open the setting to confirm it.

The posts route, by contrast, was not cached. We did not establish why one REST route was cached and the other was not.

The responses also carried standard cache directives

The unauthenticated MCP response and the three discovery responses included Cache-Control: no-store, in addition to LiteSpeed’s no-cache directive. We also requested the MCP endpoint in its other form, /?rest_route=/easy-mcp-ai/v1/mcp. LiteSpeed compares Do Not Cache entries with the request’s URI, and that URI does not contain /wp-json/easy-mcp-ai/, so our first entry should not match it. It still came back 401 with no-cache. Our test cannot say which mechanism produced each no-cache result, so we cannot say whether the exclusions are doing the work or only backing something else up.

One sign-in address is outside all three entries

The authorization server document lists the authorization endpoint as https://aipilotinvest.com/easy-mcp-ai/authorize, which does not start with /wp-json/ or /.well-known/. Requested without cookies, it redirected to the WordPress login page, and that login page came back with no-cache. The browser does not let a script read the headers of the redirect itself, and we did not test a signed-in authorization flow.

A later Codex curl GET check at 9:09–9:10 a.m. Korea time could inspect the redirect itself: it returned 302 with X-LiteSpeed-Cache-Control: no-cache and Cache-Control: no-cache, no-store, must-revalidate, max-age=0. That check also used no cookies or token.

What this check shows, and what it does not

  • It shows how the server answered requests without cookies at one point in time. A signed-in request, a request with a token, or a request after a plugin update could be handled differently.
  • It does not show whether connections have ever failed because of caching. We have no record of such a failure, and we did not try to cause one.
  • The exclusion entries are taken from our setup record. Easy MCP AI’s own diagnostic, last run on October 23, reported for its caching check: “Its own exclusion rules already cover this plugin’s endpoints.”

How to run the same header check with curl

To make a comparable unauthenticated GET check, use a terminal with curl and a POSIX-compatible shell. Replace the example URLs with the actual discovery and MCP endpoint URLs for your site, then run each command twice. These commands discard the body and display selected response headers. They send no cookies or token and do not follow redirects. They are a separate client check, not an exact replay of our browser request.

curl -sS -D - -o /dev/null 'https://example.com/.well-known/oauth-protected-resource' | grep -i -E '^HTTP/|^location:|^www-authenticate:|^x-litespeed|^cache-control:'
curl -sS -D - -o /dev/null 'https://example.com/.well-known/oauth-authorization-server' | grep -i -E '^HTTP/|^location:|^www-authenticate:|^x-litespeed|^cache-control:'
curl -sS -D - -o /dev/null 'https://example.com/wp-json/your-mcp-plugin/actual-endpoint' | grep -i -E '^HTTP/|^location:|^www-authenticate:|^x-litespeed|^cache-control:'
  1. Record the status and the full cache-header names. In this LiteSpeed check, X-LiteSpeed-Cache-Control: no-cache indicates a dynamically served response; an X-LiteSpeed-Cache: miss followed by hit indicates caching. Standard Cache-Control: no-cache instead requires revalidation before reuse; it is not the same as no-store. Missing LiteSpeed headers alone do not establish whether a response was cached.
  2. Read the authorization server metadata and list its endpoints. Inspect the logged-out GET routes relevant to discovery and browser sign-in, including any outside your exclusion entries. Do not treat a GET to a token or other POST endpoint as a test of its normal operation.
  3. Request your MCP endpoint in both forms, /wp-json/... and /?rest_route=..., because a URI-based exclusion may match only one of them.
  4. Check whether REST caching is on, and request any other plugin REST routes you depend on.
  5. Repeat the check after updating the cache plugin or the MCP plugin.

Found an error? Please tell us through the Contact page.

Sources