/.well-known/oauth-protected-resource Web access log Triage: informational

/.well-known/oauth-protected-resource in Your Logs: MCP OAuth Discovery

Published

The metadata requests an MCP client makes to learn whether a server wants OAuth and where to sign in, as the MCP authorization rules prescribe. A 404 tells the client the server needs no OAuth; scanners also ask for the same files on any web server.

What it looks like

198.51.100.12 - - [23/Nov/2026:10:14:03 +0000] "GET /.well-known/oauth-protected-resource/mcp HTTP/1.1" 404 162 "-" "node"
198.51.100.12 - - [23/Nov/2026:10:14:03 +0000] "GET /.well-known/oauth-protected-resource HTTP/1.1" 404 162 "-" "node"
198.51.100.12 - - [23/Nov/2026:10:14:04 +0000] "GET /.well-known/oauth-authorization-server HTTP/1.1" 404 162 "-" "node"
203.0.113.40 - - [22/Nov/2026:19:02:51 +0000] "GET /.well-known/openid-configuration HTTP/1.1" 404 162 "-" "python-httpx/0.28.1"

On our own server, the 30 days to 23 November 2026

607

requests · about 20 a day

46

source addresses

Most requested variantsRequests
/.well-known/oauth-protected-resource214
/.well-known/oauth-protected-resource/mcp183
/.well-known/oauth-authorization-server120
/.well-known/oauth-authorization-server/mcp58
/.well-known/openid-configuration32

LogTriage's production API server (Hetzner, Germany): port 22 open to the internet, key-only since 6 October 2026 (password and keyboard-interactive authentication off); nginx in front of the API on ports 80 and 443. Paths as requested, query strings dropped and identifiers redacted; counted weekly from the nginx access log. More in the monthly attack report; which free blocklists already list these attackers is measured in the IP blocklist report, and you can check the addresses in your own log.

What the request is

These are metadata requests. RFC 9728 defines a well-known document in which a protected resource, such as an API, says which authorization servers issue tokens for it, at /.well-known/oauth-protected-resource; for a resource with a path, the path goes after it. RFC 8414 defines the matching document for an authorization server at /.well-known/oauth-authorization-server, and OpenID Connect uses /.well-known/openid-configuration for the same job.

MCP builds on both. Its authorization server discovery rules say MCP clients use the metadata URL from the WWW-Authenticate header of a 401 when there is one, and otherwise must construct and request the well-known URIs in order: the path form first, so an endpoint at /public/mcp is looked up at /.well-known/oauth-protected-resource/public/mcp, then the root form. Clients then fetch the authorization server’s metadata from several well-known locations in turn. The same specification says authorization is optional for MCP implementations, so a server can answer none of these and still work.

Our own server shows what that looks like for an MCP endpoint at /mcp that needs no OAuth. In 30 days it received around six hundred of these requests from a few dozen addresses (counts above): the root oauth-protected-resource form most often, then its /mcp form, the authorization-server forms with and without /mcp, and a smaller number for openid-configuration.

Who sends it

On an MCP server, mostly MCP clients: assistants, agent frameworks built on the MCP SDKs and other tools that connect to MCP servers, following the discovery rules above whenever they connect. A server that people add to their assistants therefore sees these paths requested again and again by the same kinds of client.

On a server that hosts no MCP endpoint and no identity provider, the same requests can only be scanners, which ask for openid-configuration and the OAuth paths on any web server to find identity providers and APIs.

Is your server exposed?

Look at what these requests received:

# Discovery requests and the statuses they got
grep -E '"GET /\.well-known/(oauth-protected-resource|oauth-authorization-server|openid-configuration)' /var/log/nginx/access.log \
  | awk '{print $9, $7}' | sort | uniq -c | sort -rn

# What your server actually serves at each of them
for p in oauth-protected-resource oauth-protected-resource/mcp oauth-authorization-server openid-configuration; do
  printf '%s ' "$p"; curl -s -o /dev/null -w '%{http_code}\n' "https://mcp.example.com/.well-known/$p"
done

If your MCP server uses no OAuth, every one of these should be a 404. If it does use OAuth, the protected-resource document should name your authorization server, and the authorization-server metadata belongs on that server; a 200 that returns a framework’s default page, an internal configuration or someone else’s issuer is a misconfiguration to fix. The MCP rules require clients to reject authorization-server metadata whose issuer differs from the address it was fetched for, so a wrong document breaks sign-in rather than quietly working.

How to block it

Do not block it if you run an MCP server: a client that cannot read the metadata cannot connect when OAuth is required, and when it is not required the 404 is the answer the client needs. Make that 404 cheap and keep it out of the access log:

# MCP server without OAuth: answer the discovery paths with a plain 404
location ^~ /.well-known/oauth-protected-resource { access_log off; return 404; }
location ^~ /.well-known/oauth-authorization-server { access_log off; return 404; }

If your server does use OAuth, serve the protected-resource document at both the root and the path form, so clients that build either URL find it:

location = /.well-known/oauth-protected-resource      { default_type application/json; alias /etc/mcp/oauth-protected-resource.json; }
location = /.well-known/oauth-protected-resource/mcp  { default_type application/json; alias /etc/mcp/oauth-protected-resource.json; }

On a server that is not an MCP server or an identity provider, these are ordinary scanner probes; the 404 is enough. The other MCP-related paths in the same log, /mcp and /sse, are explained on the MCP endpoint probe page.

Probes that arrive with it

Detect it

MITRE ATT&CK: T1595

Frequently Asked Questions

Why does my server get requests for /.well-known/oauth-protected-resource?
An MCP client is checking whether your MCP server requires OAuth. The MCP authorization rules have clients read the Protected Resource Metadata of RFC 9728, either from the address in a 401's WWW-Authenticate header or, without one, from well-known paths built from the server's URL. The path form with your endpoint path after it comes first, then the plain path.
Our MCP server has no login. Should these requests get a 404?
Yes. Authorization is optional for MCP servers. With no metadata and no 401 from the MCP endpoint, the client has nothing to sign in to and calls your tools without a token. Serving an empty or invented metadata document instead would send the client looking for an authorization server that does not exist.
Why does the client also ask for oauth-authorization-server and openid-configuration?
Those are the metadata of an authorization server, RFC 8414 and OpenID Connect discovery. When a client finds no resource metadata it may try the server's own origin as the authorization server, and the MCP rules list several well-known paths to try in turn, including path-inserted forms such as /.well-known/oauth-authorization-server/mcp.
Are these requests ever an attack?
The requests themselves only read public metadata. Scanners ask for openid-configuration on every web server to find identity providers, which is the only explanation on a server with no MCP endpoint. What matters is your answer, so check that a 200 for any of these paths returns the document you meant to publish and nothing internal.

See what else is probing your server

Drop an nginx or Apache access log into the free browser analyzer: secret-file sweeps, exploit probes, scanners and credential stuffing are grouped by source with the evidence lines, and every known probe links back here. Nothing is uploaded.

Investigating something right now? LogTriage checks every address in the file against threat intelligence and writes the incident report: 10 analyses a month free. The incident pack adds the in-depth AI analysis and files up to 100 MB: 25 analyses for $19, one payment, no subscription. Pricing

How this page was made. The official definitions, field names and examples on it are copied by script from the sources it links and re-checked against them on every build. The counts come from the logs of our own internet-facing server, refreshed weekly. The investigation advice was drafted with AI from those sources and passed a separate review before publishing. What is checked, and how · found a mistake? [email protected]