Follow Discord
Sweep 20 Nov 2026 · 19:55Z Build v2.1.330 547 read Stable v2.1.323 Latest v2.1.330 Next v2.1.330 Feeds RSS JSON llms.txt llms-full.txt Unofficial
One change · mcp

Authorization changeddocs/draft/tools/inspector/authorization

Nearest release: v2.1.295, published 5 hours after upstream edited the page. Shown because the two are within 24 hours of each other. Nothing here says the release caused the edit.

Upstream edited this page at 8 Oct 2026 12:58 UTC, give or take a minute or two: the time comes from Anthropic’s own sitemap rather than from a commit. This site recorded the change at 24 Oct 2026 11:07 UTC.

Upstream edited
Recorded here
Lines+10added
Lines−10removed
From line 2 where the diff opens
First seen 26 Aug 2026 this site's first read of the page
Recorded edits7to this page, all time

The whole hunk

from line 2, old and new numbered
/
lines
from line 2
22 
33> How the MCP Inspector performs OAuth, re-authorizes mid-session, and shares tokens between its clients
44 
5Remote MCP servers usually require authorization. The Inspector implements the full [authorization](/specification/latest/basic/authorization.md) flow in all three clients, sharing the resulting tokens on disk so a login done once is usable everywhere.
5Remote MCP servers usually require authorization. The Inspector implements the full [authorization](https://modelcontextprotocol.io/specification/latest/basic/authorization.md) flow in all three clients, sharing the resulting tokens on disk so a login done once is usable everywhere.
66 
77## The flow, end to end
88 
from line 17
1717 
1818The Inspector fetches the server's [protected-resource and
1919authorization-server
20metadata](/specification/latest/basic/authorization/authorization-server-discovery.md)
20metadata](https://modelcontextprotocol.io/specification/latest/basic/authorization/authorization-server-discovery.md)
2121to learn the endpoints and the supported grants.
2222 
2323**3. Register or identify the client**
from line 24
2424 
2525The Inspector identifies itself to the authorization server through
2626whichever mechanism is configured: [dynamic client
27registration](/specification/latest/basic/authorization/client-registration.md#dynamic-client-registration),
27registration](https://modelcontextprotocol.io/specification/latest/basic/authorization/client-registration.md#dynamic-client-registration),
2828a pre-registered static client (`--client-id` / `--client-secret`), a
2929[Client ID Metadata
30Document](/specification/latest/basic/authorization/client-registration.md#client-id-metadata-documents)
30Document](https://modelcontextprotocol.io/specification/latest/basic/authorization/client-registration.md#client-id-metadata-documents)
3131(`--client-metadata-url`), or an [enterprise-managed
32IdP](/extensions/auth/enterprise-managed-authorization.md).
32IdP](https://modelcontextprotocol.io/extensions/auth/enterprise-managed-authorization.md).
3333 
3434**4. Authorize in the browser**
3535 
from line 87
8787| - | - |
8888| `~/.mcp-inspector/storage/oauth.json` | Non-secret OAuth state (discovery metadata, PKCE verifiers, granted scope, public client ids), keyed by canonicalized server URL. Written owner-only. |
8989| `~/.mcp-inspector/storage/client.json` | Install-level client settings (client metadata URL, enterprise IdP). The same file the web client's **Client Settings** dialog writes. |
90| The server's `oauth` block in the [catalog file](/docs/draft/tools/inspector/configuration.md#catalog-file-format) | Per-server client id/secret, scopes, the enterprise-managed flag, and the [step-up](#mid-session-re-authorization) policy. |
90| The server's `oauth` block in the [catalog file](https://modelcontextprotocol.io/docs/draft/tools/inspector/configuration.md#catalog-file-format) | Per-server client id/secret, scopes, the enterprise-managed flag, and the [step-up](#mid-session-re-authorization) policy. |
9191 
92The path to `oauth.json` is resolved in order: `MCP_INSPECTOR_OAUTH_STATE_PATH`, then `<MCP_STORAGE_DIR>/oauth.json` (see [Environment variables](/docs/draft/tools/inspector/configuration.md#environment-variables)), then the default above. All three clients resolve it the same way. Command-line `--client-id` / `--client-secret` / `--client-metadata-url` override `client.json`.
92The path to `oauth.json` is resolved in order: `MCP_INSPECTOR_OAUTH_STATE_PATH`, then `<MCP_STORAGE_DIR>/oauth.json` (see [Environment variables](https://modelcontextprotocol.io/docs/draft/tools/inspector/configuration.md#environment-variables)), then the default above. All three clients resolve it the same way. Command-line `--client-id` / `--client-secret` / `--client-metadata-url` override `client.json`.
9393 
94The secrets themselves (access and refresh tokens, client secrets, registration access tokens, and IdP session tokens) are not in `oauth.json`. They go to the [secret store](/docs/draft/tools/inspector/configuration.md#where-secrets-are-stored), which is the OS keychain when one is reachable. `MCP_INSPECTOR_PERSIST_TOKENS` limits which acquired tokens are kept: `all` (default), `access` (no refresh tokens), or `none` (re-authorize every run). See [Secret store variables](/docs/draft/tools/inspector/configuration.md#secret-store-variables).
94The secrets themselves (access and refresh tokens, client secrets, registration access tokens, and IdP session tokens) are not in `oauth.json`. They go to the [secret store](https://modelcontextprotocol.io/docs/draft/tools/inspector/configuration.md#where-secrets-are-stored), which is the OS keychain when one is reachable. `MCP_INSPECTOR_PERSIST_TOKENS` limits which acquired tokens are kept: `all` (default), `access` (no refresh tokens), or `none` (re-authorize every run). See [Secret store variables](https://modelcontextprotocol.io/docs/draft/tools/inspector/configuration.md#secret-store-variables).
9595 
9696## Mid-session re-authorization
9797 
from line 110
110110 
111111## Non-interactive and CI runs
112112 
113Interactive OAuth requires a TTY on **stdin or stderr**, or [`MCP_AUTO_OPEN_ENABLED=true`](/docs/draft/tools/inspector/configuration#environment-variables). Redirecting stderr into a pipe, as in `2>&1 | tee`, still works because stdin stays a TTY. When neither is true, which is the normal CI shape, the CLI fails fast with `auth_required` rather than waiting up to fifteen minutes for a callback nobody will complete.
113Interactive OAuth requires a TTY on **stdin or stderr**, or [`MCP_AUTO_OPEN_ENABLED=true`](https://modelcontextprotocol.io/docs/draft/tools/inspector/configuration#environment-variables). Redirecting stderr into a pipe, as in `2>&1 | tee`, still works because stdin stays a TTY. When neither is true, which is the normal CI shape, the CLI fails fast with `auth_required` rather than waiting up to fifteen minutes for a callback nobody will complete.
114114 
115115For CI, be explicit:
116116 
from line 143
143143 --wait-for-auth 120 --method tools/list
144144```
145145 
146The `deepLink` in the handoff block navigates a browser straight to a *connected* Inspector; see [Deep links](/docs/draft/tools/inspector/web.md#deep-links).
146The `deepLink` in the handoff block navigates a browser straight to a *connected* Inspector; see [Deep links](https://modelcontextprotocol.io/docs/draft/tools/inspector/web.md#deep-links).
147147 
148148> [!NOTE]
149149>
Feedback