Skip to content

[Doc] State the HTTP status of a require_scopes! failure on the modern path - #597

Merged
koic merged 1 commit into
modelcontextprotocol:mainfrom
koic:state_the_modern_status_of_a_require_scopes_failure
Oct 13, 2026
Merged

koic merged 1 commit into
modelcontextprotocol:mainfrom
koic:state_the_modern_status_of_a_require_scopes_failure

Conversation

@koic

@koic koic commented Oct 12, 2026

Copy link
Copy Markdown
Member

Motivation and Context

The Authorization page said that a require_scopes! failure inside a handler leaves the HTTP status at 200. That holds on the legacy path and on a modern response streamed as SSE, but a modern response returned as JSON carries the status the transport gives every -32600, which is 400. The prose and the Response Reference row now say so.

How Has This Been Tested?

Documentation only. The mapping is StreamableHTTPTransport#modern_http_status, which answers 400 for the codes in MODERN_BAD_REQUEST_CODES, -32600 among them, and the existing transport tests cover it.

Breaking Changes

None.

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

…ern path

## Motivation and Context

The Authorization page said that a `require_scopes!` failure inside a handler leaves the HTTP status at 200.
That holds on the legacy path and on a modern response streamed as SSE, but a modern response returned as JSON
carries the status the transport gives every `-32600`, which is 400. The prose and the Response Reference row now
say so.

## How Has This Been Tested?

Documentation only. The mapping is `StreamableHTTPTransport#modern_http_status`, which answers 400 for the codes
in `MODERN_BAD_REQUEST_CODES`, `-32600` among them, and the existing transport tests cover it.

## Breaking Changes

None.
@koic
koic merged commit 2527cba into modelcontextprotocol:main Oct 13, 2026
11 checks passed
@koic
koic deleted the state_the_modern_status_of_a_require_scopes_failure branch October 13, 2026 15:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant