Skip to content

docs(examples): index missing server and client examples in README#1988

Closed
GopalGB wants to merge 1 commit intomodelcontextprotocol:mainfrom
GopalGB:fix/examples-readme-missing-entries
Closed

docs(examples): index missing server and client examples in README#1988
GopalGB wants to merge 1 commit intomodelcontextprotocol:mainfrom
GopalGB:fix/examples-readme-missing-entries

Conversation

@GopalGB
Copy link
Copy Markdown

@GopalGB GopalGB commented Apr 30, 2026

Summary

Several runnable example files exist in examples/server/src/ and examples/client/src/ but are not listed in the example index tables in their respective README.md files. Users browsing the example READMEs cannot discover them without scanning the directories directly.

This PR adds one row per missing example to the existing tables. No code changes.

Why

The README example index is the canonical entry point. Examples that are not listed effectively don't exist for new users — every other example has a row, and the missing ones cover commonly requested scenarios (custom schema validators, custom protocol versions, simple bearer auth).

Changes

examples/server/README.md

Added rows for:

  • src/arktypeExample.ts — ArkType / Standard Schema input validation
  • src/valibotExample.ts — Valibot + @valibot/to-json-schema validation
  • src/customProtocolVersion.ts — supporting protocol versions not yet in the SDK

examples/client/README.md

Added rows for:

  • src/simpleTokenProvider.ts — minimal AuthProvider for pre-configured tokens
  • src/dualModeAuth.ts — same authProvider option for host-managed and OAuth flows
  • src/customMethodExample.ts — vendor-prefixed (acme/search) custom method client

Excluded

Files that are intentionally not standalone runnable examples are not added:

  • serverGuide.examples.ts / clientGuide.examples.ts — snippet sources synced into docs/
  • inMemoryEventStore.ts — supporting module imported by the streamable HTTP examples
  • customMethodExample.ts (server side) — spawned by the client example via stdio

How to test

  • View examples/server/README.md and examples/client/README.md and confirm the new rows render as part of the existing tables.
  • Confirm all relative links in the new rows resolve to existing files.

Several runnable example files were not listed in the README index
tables, leaving them undiscoverable through the canonical entry point:

Server:
- arktypeExample.ts (ArkType / Standard Schema)
- valibotExample.ts (Valibot + @valibot/to-json-schema)
- customProtocolVersion.ts (custom protocol-version fallback)

Client:
- simpleTokenProvider.ts (minimal AuthProvider)
- dualModeAuth.ts (host-managed vs OAuth provider)
- customMethodExample.ts (vendor-prefixed methods + progress)

Adds one row per example to the existing tables. No code changes.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@GopalGB GopalGB requested a review from a team as a code owner April 30, 2026 02:13
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Apr 30, 2026

⚠️ No Changeset found

Latest commit: c36781b

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
Copy link
Copy Markdown

pkg-pr-new Bot commented Apr 30, 2026

Open in StackBlitz

@modelcontextprotocol/client

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

@modelcontextprotocol/server

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

@modelcontextprotocol/express

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

@modelcontextprotocol/fastify

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

@modelcontextprotocol/hono

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

@modelcontextprotocol/node

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

commit: c36781b

@GopalGB
Copy link
Copy Markdown
Author

GopalGB commented Apr 30, 2026

Closing this on reflection — too lightweight (drive-by docs/typo). Will follow up with a substantive code fix in a separate PR. Apologies for the noise.

@GopalGB GopalGB closed this Apr 30, 2026
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