refactor(examples): inline SDK calls in every story; isolate machinery; add shape-check#2363
Merged
Merged
Conversation
|
1365f18 to
87c8651
Compare
87c8651 to
1044192
Compare
@modelcontextprotocol/client
@modelcontextprotocol/codemod
@modelcontextprotocol/server
@modelcontextprotocol/server-legacy
@modelcontextprotocol/express
@modelcontextprotocol/fastify
@modelcontextprotocol/hono
@modelcontextprotocol/node
commit: |
1044192 to
ae3a873
Compare
37ca17e to
4ab6856
Compare
d250721 to
bef0edf
Compare
bef0edf to
c2508e9
Compare
…y to @mcp-examples/shared + scripts/examples/
c2508e9 to
1e73950
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Inline
serveStdio/createMcpHandler/toNodeHandler/Client/transport construction explicitly in every example story; isolate runner machinery from the example code.Motivation and Context
Examples are compiled documentation — when the SDK API changes, 25 compile errors flag 25 doc pages. Hiding the transport setup behind
runServerFromArgs/connectFromArgsdefeats that. Users browsingexamples/should see exactly what they'd write.How Has This Been Tested?
run:examples65/65 legs, typecheck, lint (incl. newno-restricted-importspublic-only rule), docs:check.Breaking Changes
None.
Types of changes
Checklist
Additional context
parseExampleArgs/check/runClient/siblingPath→@mcp-examples/shared(workspace package, clearly scaffolding).scripts/examples/run-examples.ts.examples/eslint.config.mjs: bans@modelcontextprotocol/core,*/src/*,*/dist/*, and the deleted harness — examples can only reach the published surface.examples/harness.tsdeleted;examples/CONTRIBUTING.mdgains a "Canonical shape" section.