Skip to content

docs: update JS SDK docs for 1.0 - #78

Merged
xiaoyijun merged 6 commits into
masterfrom
xiaoyijun-docs-js-sdk-v1
Sep 1, 2026
Merged

docs: update JS SDK docs for 1.0#78
xiaoyijun merged 6 commits into
masterfrom
xiaoyijun-docs-js-sdk-v1

Conversation

@xiaoyijun

@xiaoyijun xiaoyijun commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Summary

Updates the JS SDK portions of the docs site for the mcp-auth 1.0 release (mcp-auth/js#50, published as 1.0.0-beta.1 on the latest dist-tag). mcp-auth 1.0 targets the MCP TypeScript SDK v2 (@modelcontextprotocol/server): the SDK now ships the HTTP layer of MCP authorization itself, and mcp-auth supplies the two inputs it asks you to bring — a token verifier and your auth metadata.

Docs

  • Get started (docs/README.mdx): rewritten for the 1.0 API — install with the @modelcontextprotocol/server peer dependency, protectedResourceMetadata declaration, SDK metadata helpers + requireBearerAuth wiring (fetch-native and Express tabs), and getAuthInfo in tools. Points MCP SDK v1 users to mcp-auth@0.2.

  • Configure MCP Auth (configure-server/mcp-auth.mdx): rewritten around the new config shape — on-demand discovery vs. fetchServerConfig, wire-format (snake_case) metadata, full protectedResourceMetadata options, and serving the discovery documents via the SDK helpers. The #other-ways anchor is preserved.

  • Configure Bearer auth (configure-server/bearer-auth.mdx): rewritten around the SDK's requireBearerAuth + getBearerAuthOptions, always-on audience validation (RFC 8707), per-tool scopes via getAuthInfo, jwtVerifyOptions, and an opaque-token (introspection) custom-verifier example.

  • New migration guide (docs/migrate-to-v1.mdx, added to the sidebar): the v0.2 → 1.0 table and breaking-changes walkthrough from feat!: rewrite mcp-auth for MCP SDK v2 (1.0) js#50.

  • Tutorials (whoami, todo-manager): server code rebuilt on MCP SDK v2 (@modelcontextprotocol/express / node adapters), matching the new sample servers. The whoami tutorial now returns the verified JWT claims (no userinfo round-trip) and adds the Logto API resource step required for audience-bound tokens; provider/RBAC/VS Code sections are otherwise unchanged.

  • Landing page: _get-started-code.mdx snippet updated to the 1.0 API; spec links now use the latest spec URL. The "How about the MCP SDKs?" section is rewritten to the 1.0 positioning — the SDK ships the HTTP auth layer, mcp-auth brings the verifier + metadata, and the section lists the five verifier pitfalls mcp-auth handles by default (replacing the outdated "bridges the gap" narrative). The subheader now announces 1.0. New translation IDs fall back to English until translations regenerate.

  • Practice-informed pass (after migrating a production MCP server — Logto Cloud's — to mcp-auth 1.0): tutorials reordered so whoami comes first (sidebar + navbar), wiring code deduplicated across Get started / Configure Server (the configure pages now frame the "two halves" and link to Get started for full wiring), the todo-manager tutorial's duplicated Logto steps and considerations collapsed, the Get started provider section condensed to the two requirements that matter in practice, a Hono pointer added, McpAuthInfo.token documented for downstream API calls, and the migration guide moved after Provider Guides.

Generated content

  • docs/references/js regenerated with typedoc from mcp-auth 1.0.0-beta.1 (new pages: getAuthInfo, McpAuthInfo, ProtectedResourceMetadataConfig, …; removed 0.2-only pages).
  • Stale i18n copies of the generated JS reference are deleted so locales fall back to English until the translation workflow regenerates them — the old copies linked to removed pages and broke the localized builds. Prose translations are untouched and will be updated by the usual content-generation workflow.

Verification

  • pnpm build passes for all locales (broken-links check is throw).
  • pnpm lint / pnpm typecheck pass for the touched files (the 3 pre-existing MDX parsing errors in provider-guides/* are unchanged on master).

🤖 Generated with Claude Code

Rewrite the Get started, Configure Server, and tutorial pages for
mcp-auth 1.0 on the MCP TypeScript SDK v2, add a v0.2 -> 1.0 migration
guide, regenerate the JS API reference from 1.0.0-beta.1, and drop the
stale i18n copies of the generated reference so locales fall back to
English until translations are regenerated.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Aug 31, 2026

Copy link
Copy Markdown

Deploying mcp-auth-docs with  Cloudflare Pages  Cloudflare Pages

Latest commit: a3cd8a9
Status: ✅  Deploy successful!
Preview URL: https://6e5a6f66.mcp-auth-docs.pages.dev
Branch Preview URL: https://xiaoyijun-docs-js-sdk-v1.mcp-auth-docs.pages.dev

View logs

xiaoyijun and others added 5 commits August 31, 2026 17:46
Replace the outdated "bridges the gap" narrative: the MCP SDK v2 ships
the HTTP authorization layer itself, and mcp-auth supplies the token
verifier and auth metadata it asks you to bring. List the five verifier
pitfalls mcp-auth handles by default, and announce 1.0 in the subheader.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Apply lessons from migrating Logto Cloud's MCP server to mcp-auth 1.0:
put the whoami tutorial before todo-manager (sidebar and navbar),
deduplicate wiring code between Get started and the Configure Server
pages, collapse the todo-manager tutorial's repeated Logto steps and
considerations, condense the Get started provider section to the two
requirements that matter in practice, add a Hono pointer and document
McpAuthInfo.token, and move the migration guide after Provider Guides.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Logto now onboards MCP clients without pre-registration through dynamic
apps (Client ID Metadata Documents). Update the provider list entry and
the DCR guidance with CIMD, and point the Logto guide and tutorials at
the two onboarding paths.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@xiaoyijun
xiaoyijun enabled auto-merge (squash) September 1, 2026 02:31
@xiaoyijun
xiaoyijun merged commit 428d54b into master Sep 1, 2026
2 checks passed
@xiaoyijun
xiaoyijun deleted the xiaoyijun-docs-js-sdk-v1 branch September 1, 2026 02:41
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.

2 participants