Canonical: https://botbento.com/blog/mcp-oauth-refresh-token-client-gap/
Format: Markdown representation of the public HTML page.

[Home](/) / [Blog](/blog/)

FIELD NOTES / 4 MIN READ

# Your Bot's MCP Token Expired. Will the Client Actually Refresh It?

MCP's authorization model is built on OAuth 2.1, and OAuth 2.1 has no standard way for a client to demand a refresh token. A recent MCP spec addition (SEP-2207) explains why major clients weren't even asking for one, and is explicit that asking doesn't guarantee getting one. If your bot's MCP connection depends on silent token refresh, test that specific client-and-server pairing before you rely on it.

By BotBento Editorial · Published 2026-12-03 · Updated 2026-12-03

AI-assisted editorial: researched and drafted with AI using the primary sources linked below. Check the cited evidence and any stated test scope. Illustrative examples are not measured product results. [Editorial policy](/editorial/).

## In this article

- [What Happens When Your Bot's MCP Token Expires](#the-short-answer)
- [Why Refresh Isn't the Default You'd Expect](#why-not-automatic)
- [An Illustrative Walkthrough](#worked-example)
- [What to Check Before You Trust a Long-Running Connection](#check-before-you-rely-on-it)
- [The Decision](#the-decision)[Read as Markdown ](/text/blog/mcp-oauth-refresh-token-client-gap/index.md)

## Key takeaways

- Plain OAuth 2.1 gives the authorization server full discretion over whether to issue a refresh token at all; MCP's SEP-2207 guidance explicitly says a client MUST NOT assume one will be issued even if it asks.
- The gap SEP-2207 addresses is real: before this guidance, major MCP clients weren't requesting refresh tokens via the offline\_access scope because they had no standard way to know whether the authorization server expected it.
- Don't infer refresh behavior from the spec alone. Force an access token to expire during setup and watch what your specific client does: silent renewal, a re-auth prompt, or a dead connection.

## What Happens When Your Bot's MCP Token Expires

The honest answer is: it depends, and the spec won't tell you in advance. MCP's authorization model runs on OAuth 2.1, and in plain OAuth 2.1 there is no standard mechanism for a client to explicitly request a refresh token at all — the authorization server decides whether to issue one, based on the client's registered capabilities and its own policy.

A newer piece of MCP guidance, SEP-2207, tries to close that gap by letting clients opt in through the OIDC offline\_access scope. But it is just as explicit about the limit: a client that advertises support for refresh tokens and even requests the offline\_access scope still must not assume it will get one. The authorization server keeps full discretion.

Sources: [SEP-2207: OIDC-Flavored Refresh Token Guidance - Model Context Protocol](https://modelcontextprotocol.io/seps/2207-oidc-refresh-token-guidance).

## Why Refresh Isn't the Default You'd Expect

Before SEP-2207, the problem wasn't that MCP forbade refresh tokens — it's that nobody had a reliable signal for when to ask for one. Major MCP clients, named explicitly in the proposal, including Cursor, Claude and VS Code, weren't requesting refresh tokens through the offline\_access scope because they had no way to know whether a given authorization server supported it, expected it, or required it.

SEP-2207 gives clients a path: advertise refresh\_token in their grant\_types client metadata, and when the authorization server's own metadata lists offline\_access in scopes\_supported, add that scope to the authorization request. On the server side, MCP servers acting as OAuth resource servers are told not to list offline\_access themselves, because that scope is a client-to-authorization-server concern, not something the protected resource should be dictating.

Separately, the current MCP authorization specification does put one hard requirement on the authorization server once a refresh token exists: for public clients, it must rotate refresh tokens on every use, issuing a new one and invalidating the old one. That's a security property of tokens that are issued, not a promise that one will be issued in the first place.

Sources: [SEP-2207: OIDC-Flavored Refresh Token Guidance - Model Context Protocol](https://modelcontextprotocol.io/seps/2207-oidc-refresh-token-guidance), [modelcontextprotocol/docs/specification/2026-07-28/basic/authorization/security-considerations.mdx](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/main/docs/specification/2026-07-28/basic/authorization/security-considerations.mdx).

## An Illustrative Walkthrough

Picture a small-team bot that connects to a remote MCP server in front of a CRM, authenticating through OAuth. This is illustrative, not a measured result. The authorization server issues a short-lived access token — say, thirty minutes — and the bot's MCP client completes the authorization code flow with PKCE, gets a 200, and starts calling tools.

Thirty minutes in, the access token expires. What happens next splits into two branches. If the client advertised refresh\_token support in its metadata, and the authorization server's scopes\_supported included offline\_access, and the client added that scope during authorization, there's a reasonable chance a refresh token came back with the original grant — and the client can quietly exchange it for a new access token without interrupting the routine.

If any one of those conditions didn't hold — the client never asked, the authorization server doesn't support the OIDC convention, or the authorization server simply chose not to issue one — there is no refresh token to use. The next tool call gets a 401, and the bot's routine stalls until whatever human owns that connection re-authenticates through the browser flow again. Nothing in the spec guarantees which branch you land on for a given client-and-server pair; it's a property of that specific combination, not of MCP as a whole.

Sources: [SEP-2207: OIDC-Flavored Refresh Token Guidance - Model Context Protocol](https://modelcontextprotocol.io/seps/2207-oidc-refresh-token-guidance).

## What to Check Before You Trust a Long-Running Connection

Because refresh is a property of the specific client and authorization server you're using, not of MCP in the abstract, the only reliable move is to test it directly rather than assume it from documentation or marketing copy.

If you're building or operating your own remote MCP server that other people's MCP clients will connect to, check your authorization server's advertised scopes\_supported and grant\_types\_supported against what SEP-2207 expects, and confirm you rotate refresh tokens for public clients as the current specification's security considerations require.

If you're building a server specifically for Claude's connector ecosystem, Anthropic's own documentation sets concrete timing expectations on your endpoints: discovery and registration requests get ten seconds to respond, and refresh requests get thirty — and it notes that Claude does not support a machine-to-machine client\_credentials grant, offering Anthropic-held, consent-gated credentials as the alternative for that case.

- Force an access token to expire in a test environment and watch what your client does next — silent renewal, a visible re-auth prompt, or a hard failure
- Check whether your authorization server lists offline\_access in scopes\_supported, and whether your client's grant\_types metadata includes refresh\_token
- Never treat 'the client requested a refresh token' as 'the client has a refresh token' — the authorization server can still say no
- If you operate the MCP server, confirm refresh tokens rotate on every use for public clients, per the current specification's security considerations
- Build an alert for the 401-after-expiry case into your bot's routine monitoring rather than discovering it the first time a scheduled task goes quiet

Sources: [SEP-2207: OIDC-Flavored Refresh Token Guidance - Model Context Protocol](https://modelcontextprotocol.io/seps/2207-oidc-refresh-token-guidance), [modelcontextprotocol/docs/specification/2026-07-28/basic/authorization/security-considerations.mdx](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/main/docs/specification/2026-07-28/basic/authorization/security-considerations.mdx), [Authentication for connectors - Claude.ai Documentation](https://claude.com/docs/connectors/building/authentication).

## The Decision

Don't build a routine that assumes a long-lived MCP connection will quietly renew itself. Treat silent refresh as something you verify for your exact client-and-authorization-server pairing, not something you inherit from the protocol. If your test shows the connection dies cleanly at token expiry, that's a known failure mode you can alert on. If it shows silent renewal, you still don't know that holds for a different authorization server or a future client update — recheck it when either side changes.

## Primary sources

Sources checked 2026-12-03. Standards and product documentation can change; follow the linked version when implementing.

- [SEP-2207: OIDC-Flavored Refresh Token Guidance - Model Context Protocol](https://modelcontextprotocol.io/seps/2207-oidc-refresh-token-guidance) — Model Context Protocol
- [modelcontextprotocol/docs/specification/2026-07-28/basic/authorization/security-considerations.mdx](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/main/docs/specification/2026-07-28/basic/authorization/security-considerations.mdx) — Model Context Protocol
- [Authentication for connectors - Claude.ai Documentation](https://claude.com/docs/connectors/building/authentication) — Anthropic

BotBento is in development. [Suggest a correction](/contact/).
