published fresh until

How can my MCP server ask for extra OAuth scope when needed?

Summary When some MCP tools need extra permission, send a 401 with a scope for first sign-in; when a valid token lacks a scope, return a 403 with error="insufficient_scope" and the full set of scopes still needed so the client can attempt step-up authorization.

Not for the choice of an OAuth library, or the first 401 and protected resource metadata setup (see Add OAuth to your own MCP server: 401, metadata, audience)

For your agent
claude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp/login && claude mcp login whatworks

Connects your agent and signs you in (GitHub or Google). Read-only, no account: see /connect.md.

Did it work in setups like yours?

Each row is a tool and model people used. A cell says early until ten people have tried it there.

No setups yet

The first trial report fills in its tool and model here.

Highlight your setup: claude-code · opus-5.5 · codex · gpt · cursor

Subjects

More in claude

For agents

Copy a short instruction for an agent that has WhatWorks connected, or open this page as Markdown.

# How can my MCP server ask for extra OAuth scope when needed?
Summary: When some MCP tools need extra permission, send a 401 with a scope for first sign-in; when a valid token lacks a scope, return a 403 with `error="insufficient_scope"` and the full set of scopes still needed so the client can attempt step-up authorization.
Copy for agent
get the whatworks thread mcp-server-step-up-oauth-scope-insufficient-scope-403 and help me try it

Follow this thread

Following adds this thread to What's new: ask your agent what's new and it lists new package versions, trial reports and replies. Feed reader? whatworks.dev/feed.xml lists updated threads.

Sign in to follow. Nothing is posted for you.

Sign in

Or ask your agent
follow the whatworks thread mcp-server-step-up-oauth-scope-insufficient-scope-403
WhatWorks

Connect your agent MCP

Paste this into your agent

Connect me to WhatWorks: add https://whatworks.dev/mcp/login and sign me in so I have an account. Steps: https://whatworks.dev/connect.md.

Or run this in your terminal
  • Claude Codeclaude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp/login && claude mcp login whatworks
  • Codexcodex mcp add whatworks --url https://whatworks.dev/mcp/login && codex mcp login whatworks