Skip to content

docs(client): correct SEP attribution on insecure-token-endpoint check - #2767

Open
flipslidersand wants to merge 1 commit into
modelcontextprotocol:mainfrom
flipslidersand:fix/doc-insecure-token-endpoint-sep-attribution
Open

docs(client): correct SEP attribution on insecure-token-endpoint check#2767
flipslidersand wants to merge 1 commit into
modelcontextprotocol:mainfrom
flipslidersand:fix/doc-insecure-token-endpoint-sep-attribution

Conversation

@flipslidersand

Copy link
Copy Markdown

Summary

InsecureTokenEndpointError and assertSecureTokenEndpoint both cite SEP-2207 as the normative source for the non-TLS token endpoint requirement. SEP-2207 is "OIDC-Flavored Refresh Token Guidance" — it specifies offline_access scope handling and says nothing about TLS at the token endpoint.

The correct normative source is the MCP authorization spec, which incorporates OAuth 2.1 §1.5:

All the OAuth protocol URLs … MUST use the https scheme except for loopback interface redirect URIs.

This PR replaces the incorrect SEP-2207 citation with MCP authorization spec, OAuth 2.1 §1.5 in both affected doc comments. No behaviour changes.

Files changed

  • packages/client/src/client/authErrors.tsInsecureTokenEndpointError doc comment
  • packages/client/src/client/auth.tsassertSecureTokenEndpoint doc comment

Note: other SEP-2207 references in auth.ts (lines ~1093, ~1122, ~2507) are about offline_access scope handling and are correct — those are untouched.

Fixes #2766

🤖 Generated with Claude Code

InsecureTokenEndpointError and assertSecureTokenEndpoint attributed the
non-TLS token endpoint check to SEP-2207.  SEP-2207 ("OIDC-Flavored
Refresh Token Guidance") specifies offline_access scope handling and says
nothing about TLS requirements.

The actual normative source for the HTTPS requirement is the MCP
authorization spec, which incorporates OAuth 2.1 §1.5 ("All the OAuth
protocol URLs … MUST use the https scheme except for loopback interface
redirect URIs").

Replace the incorrect SEP-2207 citation with "MCP authorization spec,
OAuth 2.1 §1.5" in both affected doc comments.  The behaviour is
unchanged; only the attribution is corrected.

Fixes modelcontextprotocol#2766

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@flipslidersand
flipslidersand requested a review from a team as a code owner September 7, 2026 15:45
@changeset-bot

changeset-bot Bot commented Sep 7, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 024ca09

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@pkg-pr-new

pkg-pr-new Bot commented Sep 7, 2026

Copy link
Copy Markdown

Open in StackBlitz

@modelcontextprotocol/client

npm i https://pkg.pr.new/@modelcontextprotocol/client@2767

@modelcontextprotocol/codemod

npm i https://pkg.pr.new/@modelcontextprotocol/codemod@2767

@modelcontextprotocol/core

npm i https://pkg.pr.new/@modelcontextprotocol/core@2767

@modelcontextprotocol/server

npm i https://pkg.pr.new/@modelcontextprotocol/server@2767

@modelcontextprotocol/server-legacy

npm i https://pkg.pr.new/@modelcontextprotocol/server-legacy@2767

@modelcontextprotocol/express

npm i https://pkg.pr.new/@modelcontextprotocol/express@2767

@modelcontextprotocol/fastify

npm i https://pkg.pr.new/@modelcontextprotocol/fastify@2767

@modelcontextprotocol/hono

npm i https://pkg.pr.new/@modelcontextprotocol/hono@2767

@modelcontextprotocol/node

npm i https://pkg.pr.new/@modelcontextprotocol/node@2767

commit: 024ca09

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 024ca09068

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

/**
* SEP-2207: refuse to send credentials to a non-TLS, non-loopback token endpoint.
* Refuses to send credentials to a non-TLS, non-loopback token endpoint
* (MCP authorization spec, OAuth 2.1 §1.5).

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Do not cite §1.5 for loopback token endpoints

For a token endpoint such as http://127.0.0.1/token, this function permits the request, but OAuth 2.1 §1.5 limits its HTTP exception specifically to loopback-interface redirect URIs, not token endpoints. The new attribution therefore still presents the implemented loopback-token-endpoint exception as an OAuth 2.1 requirement; cite a normative source that actually permits this exception, or describe it as an SDK-specific policy.

Useful? React with 👍 / 👎.

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.

Doc comments misattribute the token-endpoint TLS check to SEP-2207 (which is OIDC refresh / offline_access)

1 participant