Skip to content

sep(SEP-2643): Structured Authorization Denials - #2643

Draft
monmohan wants to merge 42 commits into
modelcontextprotocol:mainfrom
monmohan:sep-structured-authorization-denials
Draft

monmohan wants to merge 42 commits into
modelcontextprotocol:mainfrom
monmohan:sep-structured-authorization-denials

Conversation

@monmohan

@monmohan monmohan commented Apr 24, 2026 •

Copy link
Copy Markdown

Motivation and Context

This SEP defines a transport-agnostic authorization denial envelope for the Model Context Protocol. The envelope complements transport-level authorization challenges (HTTP WWW-Authenticate with Protected Resource Metadata), carrying a failure classification, a remediation posture, a retry correlation handle, and an extensible set of structured remediation hints for cases the transport cannot easily express.

This SEP defines three remediation hint types, organised into two use cases. The first covers denials the client's credential cannot resolve, where remediation establishes server-side state instead. In one the user completes an approval at a URL, composed with MCP URL-mode elicitation over multi-round-trip requests. In the other the decision is reached out of band by a reviewer, a policy engine or a ticketing system, composed with the Tasks extension. The second use case covers denials requiring a new credential that carries broader authorization, described through OAuth scopes, Rich Authorization Requests (RFC 9396), or a short-lived credential issued for a single transaction such as a payment initiation.

Further remediation hint types can be defined in follow-on SEPs without changes to the envelope.

How Has This Been Tested?

This has been reviewed in the MCP Fine-Grained Authorization Working Group over multiple review cycles, and discussed in the Auth Interest Group.
Discord: MCP FGA WG channel, Auth IG discussion

Breaking Changes

This SEP is fully backward compatible. Existing OAuth clients and libraries do not need to change as the envelope is additive.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Checklist

  • I have read the MCP Documentation
  • My code follows the repository's style guidelines
  • New and existing tests pass locally
  • I have added appropriate error handling
  • I have added or updated documentation as needed

Additional context

Status: Draft — awaiting sponsor. Will coordinate with FGA WG Lead to update this
AI Assistance Disclosure:: This SEP was written by the author with AI assistance for editorial review (grammar, structural arrangement etc.)

@monmohan
monmohan requested review from a team as code owners April 24, 2026 11:22
@monmohan monmohan changed the title SEP: Structured Authorization Denials (initial draft) SEP-2643: Structured Authorization Denials Apr 24, 2026
@localden localden added proposal SEP proposal without a sponsor. SEP labels Apr 24, 2026
monmohan and others added 9 commits May 13, 2026 15:56
Co-authored-by: Nate Barbettini <nathanaelb@gmail.com>
Removes Use Case 3 (additional short-lived
  credentials) and its related artifacts (Motivation modelcontextprotocol#4, credentialDisposition envelope field, UC3-specific Security Implications
  subsection, abstract "three scenarios" framing). Adds a Rationale subsection "Future Extensions: Multi-Token Management"
  pointing to the planned authorization_hint and usage_semantics extension of draft-zehavi-oauth-rar-metadata and complementary WG
  work on client-side multi-credential handling.

Addresses PR review threads L60, L62, L64, L300.

Copy link
Copy Markdown

The draft's separation of remediation/correlation from authority, and its requirement for fresh evaluation on retry, align with the boundary we are testing in MCP2, an independent project.

Following the discussion above, could the conformance scenario catalog include:

  • A retained authorizationContextId with credentials that no longer authorize the operation: the handle cannot restore authority.
  • A retry whose actor, target, or parameters fall outside the resulting grant's scope: evaluate the actual operation. A changed parameter that remains within scope is not automatically a denial.
  • For a backend that explicitly models delegated authority, an ancestor revoked or superseded during remediation: evaluate that declared chain's current status. This is not a proposed cascade between independent OAuth grants.

MCP2's clean-room tests provide related backend examples for bounded delegation, superseded ancestors, actor/policy mismatches, and extension metadata that cannot override core checks. They do not exercise SEP-2643's wire flow or establish interoperability. Our upstream adoption policy also treats correlation metadata and workflow approval as insufficient, on their own, to authorize execution.

Would these be useful inputs to the Authorization IG's conformance work, with the backend-specific delegation assumption made explicit?

AI assistance disclosure: Codex inspected the linked specifications and MCP2 sources and drafted and posted this comment at my direction. The proposed cross-SEP scenarios have not been executed.

@wato12

wato12 commented Oct 1, 2026 •

Copy link
Copy Markdown

Building on the incident-response example from @NeoXFortress and @yaron-zehavi's reply: Yaron's answer (UC2 applies and the client obtains a token with elevated authority) works when the client acts for a user who is present. There's a neighbouring case it doesn't cover, and it comes up constantly with fleets of headless coding agents.

The caller holds a credential delegated for one bounded unit of work, close to the "mission" Yaron mentions. It calls a tool outside that work. A remedy exists: the delegating principal can widen the mission or issue a new one. But the agent must not obtain that authority itself, whether through step-up, RAR or UC2. That is exactly the escalation the delegation is meant to prevent.

The current postures don't fit:

  • available with hints invites the agent to self-escalate.
  • unavailable claims there's no remedy.
  • undisclosed comes closest, but the explanation lands in content, which means in the model's context. A model told "ask for X" tends to try.

A strawman: a fourth posture, e.g. principal_required, meaning "a remedy exists but is outside the requester's authority". It would carry no hints, the client wouldn't retry or reauthorize, and the denial would go to the user or operator rather than only to the model. It's different from the task hint, which gets one call approved. This one needs a new delegation for the work itself.

@monmohan, would you see this as in scope for 2643, or as a follow-on SEP? Happy to draft text either way. And thanks for driving this.

@StratedgeWorkflowSystems

StratedgeWorkflowSystems commented Oct 14, 2026 •

Copy link
Copy Markdown

On @NeoXFortress's retry question and @wato12's point on principal_required: payment systems already solved both of these for single-payment credentials (payments.initiate), and the same rules map cleanly here.

1. Changed parameters on retry. Binding authorization details to the payee and amount works well when the retry is identical. Where implementations usually drift is when a retried call changes the amount or payee slightly and a server treats it as "still within range." Under PSD2 dynamic linking (Art. 5(1)(d)), any change to the amount or payee invalidates the approval code outright. For single-payment remediation, making that explicit—any change to payee or amount requires a fresh approval, while standing range limits belong to a separate grant type—keeps resource servers from guessing.

2. Approver independence. When a payment or high-risk action hits a policy threshold and routes to an out-of-band task for review, the server should enforce that the approver identity on the completed task is distinct from both the agent and the initiating user. Otherwise the same principal who triggered the threshold can approve their own escalated request.

@yaron-zehavi

yaron-zehavi commented Oct 15, 2026 •

Copy link
Copy Markdown

Building on the incident-response example from @NeoXFortress and @yaron-zehavi's reply: Yaron's answer (UC2 applies and the client obtains a token with elevated authority) works when the client acts for a user who is present. There's a neighbouring case it doesn't cover, and it comes up constantly with fleets of headless coding agents.

The caller holds a credential delegated for one bounded unit of work, close to the "mission" Yaron mentions. It calls a tool outside that work. A remedy exists: the delegating principal can widen the mission or issue a new one. But the agent must not obtain that authority itself, whether through step-up, RAR or UC2. That is exactly the escalation the delegation is meant to prevent.

The current postures don't fit:

  • available with hints invites the agent to self-escalate.
  • unavailable claims there's no remedy.
  • undisclosed comes closest, but the explanation lands in content, which means in the model's context. A model told "ask for X" tends to try.

A strawman: a fourth posture, e.g. principal_required, meaning "a remedy exists but is outside the requester's authority". It would carry no hints, the client wouldn't retry or reauthorize, and the denial would go to the user or operator rather than only to the model. It's different from the task hint, which gets one call approved. This one needs a new delegation for the work itself.

@monmohan, would you see this as in scope for 2643, or as a follow-on SEP? Happy to draft text either way. And thanks for driving this.

I think adding principal_required is not needed.
The available response indicating required escalation does not assume the agent obtains the authority without a (human) principal's approval, and is not limited to attended flows (human presence) either.

When elevated authority is required through a new OAuth request, the authorization server can contact the principal even when the flow is unattended, to achieve "human in the loop".
This may be done using an OpenID Connect CIBA (https://openid.net/specs/openid-client-initiated-backchannel-authentication-core-1_0.html), or by leveraging the Deferred Token Response draft (https://datatracker.ietf.org/doc/draft-ietf-oauth-deferred-token-response/).

For example the agent could request the elevated authority using a token exchange.
The authorization server uses the subject token as a handle to the principal, requests their approval and provides the agent a handle to poll for user's response.

@yaron-zehavi

Copy link
Copy Markdown

On @NeoXFortress's retry question and @wato12's point on principal_required: payment systems already solved both of these for single-payment credentials (payments.initiate), and the same rules map cleanly here.

1. Changed parameters on retry. Binding authorization details to the payee and amount works well when the retry is identical. Where implementations usually drift is when a retried call changes the amount or payee slightly and a server treats it as "still within range." Under PSD2 dynamic linking (Art. 5(1)(d)), any change to the amount or payee invalidates the approval code outright. For single-payment remediation, making that explicit—any change to payee or amount requires a fresh approval, while standing range limits belong to a separate grant type—keeps resource servers from guessing.

When a remediation response guides requesting a token that is intended for single-use such as a PSD2 payment, the resource server must not include authorization_reference. That is the signal to the client not to cache and reuse that token.
See https://www.ietf.org/archive/id/draft-ietf-oauth-rar-metadata-remediation-00.html#name-remediation-of-failures-due:

"The resource server SHALL NOT include this attribute (authorization_reference) when tokens issued for the provided authorization_details are intended for single-use only"

2. Approver independence. When a payment or high-risk action hits a policy threshold and routes to an out-of-band task for review, the server should enforce that the approver identity on the completed task is distinct from both the agent and the initiating user. Otherwise the same principal who triggered the threshold can approve their own escalated request.

I'm not sure this is always true, for example think about a principal granting an agent a token to act OBO principal with read authority. At user's request, agent attempts high risk action, which fails requiring remediation. Same principal is involved to approve. This is a classic step-up flow, not something to automatically always reject.

@monmohan

Copy link
Copy Markdown
Author

would you see this as in scope for 2643, or as a follow-on SEP?

@wato12 I agree with @yaron-zehavi's reply that principal_required isn't needed, in 2643 or as a follow-on, because the existing shapes already cover this case.

available says a remedy exists and the client may pursue it. It doesn't mean the agent gets the authority on its own. When the remedy is a new token, the authorization server decides whether to issue it and who has to approve first. With a deferred token response it can route the request to the delegating principal, or to whoever its policy names, and the token comes back only to the agent that asked. Where the approver is the user the agent already acts for, the agent can also start CIBA for that user.

The remedy also doesn't have to be a new token. You mentioned that the task hint only gets one call approved. The task holds one call, but what the approval grants is up to the server. For a client that supports Tasks, the MCP server can hold the call and route the decision to a person or a workflow, for example an incident commander approving four hours of break-glass access. The agent's token never changes, and later calls are evaluated against the server's current state, so the grant covers the calls that follow.

In the task case the resource server makes the decision, and in the token case the authorization server does. In neither case does the agent grant itself anything.

@dsp-ant
dsp-ant marked this pull request as draft November 6, 2026 15:05
@dsp-ant dsp-ant added the wg-support-needed Needs support from a working or interest group before it can progress. label Nov 6, 2026 — with Claude

dsp-ant commented Nov 6, 2026

Copy link
Copy Markdown
Member

Hey @monmohan,

thank you for putting this up. We are changing how we are handling contributions (yet to be documented well). For SEPs to be accepted, they will have to go through the relevant group, in this case the Authorization Interest Group and its fine-grained authorization work. I took the freedom to move this to draft for now. It can be opened again once we have moved this through the Authorization Interest Group.


Generated by Claude Code

@monmohan

monmohan commented Nov 7, 2026

Copy link
Copy Markdown
Author

Thanks @dsp-ant, that makes sense.

For context, this SEP has already been through the Auth IG once. @nbarbettini posted it to #auth-ig in July, where @mcguinness and some other folks reviewed it, and several of the current sections came out of that review. Before that it was developed in the Fine-Grained Authorization working group, whose channel the Auth IG re-charter has since folded into #auth-ig.

@nbarbettini is now posting an updated summary in #auth-ig so the group can catch up on the changes since July and weigh in. I'll update the PR description to link the #auth-ig discussion.

@nbarbettini

Copy link
Copy Markdown
Contributor

Hey @monmohan,

thank you for putting this up. We are changing how we are handling contributions (yet to be documented well). For SEPs to be accepted, they will have to go through the relevant group, in this case the Authorization Interest Group and its fine-grained authorization work. I took the freedom to move this to draft for now. It can be opened again once we have moved this through the Authorization Interest Group.

@dsp-ant Ack, we are actively discussing it in the auth IG. Bringing it to the WG meeting today :)

Co-authored-by: Nate Barbettini <nathanaelb@gmail.com>
@mintlify

mintlify Bot commented Nov 15, 2026 •

Copy link
Copy Markdown

Preview approval required

This pull request comes from a fork, so Mintlify won't build a preview until someone with write access approves commit df8d661.

Approve preview

A JSON-RPC error now carries the envelope in a _meta object inside
error.data, and it uses the error code -31403. The placement table has
a column for resources/read and prompts/get, and the challenge row
allows a JSON-RPC error next to the challenge. A new Open Questions
section asks where the envelope goes in an error and whether the code
moves into the MCP range.

This commit also makes other fixes and addresses review comments from
Nate and Yaron.
…orization-denials

# Conflicts:
#	docs/seps/index.mdx
@monmohan monmohan changed the title SEP-2643: Structured Authorization Denials sep(SEP-2643): Structured Authorization Denials Nov 15, 2026
@axeldunkel

Copy link
Copy Markdown

A deployment report from a gateway that ships such denials already - with two questions on the current text (0544b15).

I maintain ToolMesh, a MCP gateway (open source, Apache 2.0). Since v0.5.0 a refused call tells the agent what would allow it: a kit, which is a set of tools granted for a limited time. The agent asks for the kit with a tool call, 'request_grant({kit, reason, ttl})', and gets back a request fingerprint and a link to an approval page which he passes on. A person (not necessarily the user at the client) approves there and signs with their own key. Then the agent sends the very same call again - and now it passes, because the state on the server has changed.

  1. Clients that declare neither 'elicitation.url' nor Tasks get 'undisclosed', with the remedy in 'content'. In our flow the agent does act on that 'content' and the retry AFTER the approval is the unchanged request - which 'undisclosed' forbids. So what is intended here: is 'available' without hints meant to cover a remedy that is described in 'content'? Or should the retry rule only apply as long as the remedy has not been carried out?

  2. The gateway also has a code execution tool: one 'tools/call' runs a script that makes several backend calls and each of them is authorised on its own. If one is refused the script gets the refusal as a value and can continue. So the response is a partial execution and may not carry the envelope. Is this the intended outcome for tools of this kind?

Repository: https://github.com/DunkelCloud/ToolMesh

The tasks/get examples now carry resultType, and all three task examples carry createdAt, lastUpdatedAt and ttlMs, as SEP-2663 requires.

On tools/call, the server has no interaction to offer when the denied request did not declare the capability that the remedy needs, not only when it declared neither capability.
The client MUST NOT retry the request unchanged until it learns that the remediation is complete. Without this, undisclosed blocked the retry after the fix and behaved like unavailable.
@monmohan

Copy link
Copy Markdown
Author

@axeldunkel thanks for the deployment report, this is really useful.

  1. undisclosed with the remedy in content is the intended shape for your flow, not available without hints. You were right that the retry rule blocked the retry after the approval, though. I've changed it: the client must not retry the unchanged request until it learns the remediation is complete, so that retry is fine now.
  2. I think the current rule serves tools like this well. The envelope means the call didn't run, and retrying the whole script would repeat the backend calls that already succeeded. So the refusal stays a value inside the script's result, and the agent can get the grant and then run only what's left. Happy to hear other views on this one.

@axeldunkel

Copy link
Copy Markdown

@monmohan thanks - that was quick. The new wording does cover our flow: the agent learns that the approval is done (from the person or by asking the gateway what he may call now) and then sends the very same request again.

On 2 I do agree. Running the whole script again would repeat the backend calls which have already succeeded - so the refusal as a value inside the result is the right outcome for tools of this kind.

@faceWang753

This comment was marked as spam.

A new Additional Details section says that the specification continues
as the Actionable Denials extension in ext-auth PR 43, with the
identifier io.modelcontextprotocol/actionable-denials.
@monmohan

Copy link
Copy Markdown
Author

The specification text now continues as the Actionable Denials extension in ext-auth, in draft PR modelcontextprotocol/ext-auth#43. Please add review comments on the text there.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

proposal SEP proposal without a sponsor. SEP wg-support-needed Needs support from a working or interest group before it can progress.

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.