Merged
Conversation
Move stdio/HTTP transport handling into `server-utils.ts` so example servers only need to call `startServer(createServer)`. Switch HTTP transport to stateless mode and remove legacy SSE endpoints. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Copy `server-utils.ts` into each example's `src/` directory so examples can be used standalone without the shared directory. Updates imports from `"../shared/server-utils.js"` to `"./src/server-utils.js"`. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add dedicated `integration-server` example (duplicated from `basic-server-react`) to preserve E2E testing capabilities while allowing `basic-server-react` to be simplified as a minimal example. Changes: - Add `examples/integration-server` exercising SDK communication APIs - Update E2E tests to use `integration-server` instead of `basic-server-react` and `basic-server-vanillajs` - Use server name labels instead of indices for more robust test selection - Remove `basic-react.png` and `basic-vanillajs.png` golden snapshots 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
- Clarify comments - Return plain text from `get-time` tool instead of JSON - Remove simulated cleanup delay from `onteardown` 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
commit: |
ochafik
approved these changes
Dec 19, 2025
Contributor
ochafik
left a comment
There was a problem hiding this comment.
I'd either keep server-utils.ts next to server.ts (making src/ an app-only folder) or move server.ts to src/, but not a blocker :-)
| description: "Returns the current server time as an ISO 8601 string.", | ||
| inputSchema: {}, | ||
| _meta: { [RESOURCE_URI_META_KEY]: RESOURCE_URI }, | ||
| _meta: { [RESOURCE_URI_META_KEY]: resourceUri }, |
Contributor
There was a problem hiding this comment.
note: _meta: { ui: { resourceUri } } is the new cool
4 tasks
ochafik
added a commit
that referenced
this pull request
Dec 19, 2025
Update golden screenshots for basic-react and basic-vanillajs after the tool output was simplified from JSON to plain text in #182. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Merged
ochafik
added a commit
that referenced
this pull request
Jan 8, 2026
* feat: publish example servers to npm Make example MCP App servers publishable to npm under the @modelcontextprotocol scope: - server-basic-react - server-basic-vanillajs - server-budget-allocator - server-cohort-heatmap - server-customer-segmentation - server-scenario-modeler - server-system-monitor - server-threejs - server-wiki-explorer Changes: - Remove `private: true` from example package.json files - Add proper npm metadata (description, repository, license, files) - Update ext-apps dependency from relative to ^0.2.2 - Copy server-utils.ts into each package for standalone use - Add publish-examples job to npm-publish.yml workflow The examples will be published automatically when a GitHub release is created, after the main SDK package is published. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * feat: publish examples with pkg-pr-new for PR testing * feat: export createServer from example servers * style: format integration-server/server.ts 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * fix: update e2e snapshots for basic-server examples Update golden screenshots for basic-react and basic-vanillajs after the tool output was simplified from JSON to plain text in #182. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * merge * refactor: update sheet-music-server and video-resource-server to new publishing pattern - Move server-utils.ts from src/ to root level - Add npm publishing metadata (scoped name, repository, license, files) - Change ext-apps dependency from local to versioned ^0.2.2 - Update server.ts to handle stdio mode inline * update package-lock * fix: update package-lock.json for renamed server packages * feat: add NASA public domain video to video-resource-server Added 'nasa-earth' option - NASA ISS Earth observations (6.4MB). Source: archive.org/details/NASA-Ultra-High-Definition (public domain) * fix: add default videoId for video-resource-server * fix: use existing bunny-1mb as default video, remove nasa-earth * refactor: update new framework examples to publishing pattern Add publishing metadata for: - @modelcontextprotocol/server-basic-preact - @modelcontextprotocol/server-basic-solid - @modelcontextprotocol/server-basic-svelte - @modelcontextprotocol/server-basic-vue Changes: - Move server-utils.ts from src/ to root - Add npm publishing metadata - Update ext-apps dep to versioned ^0.2.2 - Add stdio mode support in main() * fix: add missing @rollup/rollup-win32-arm64-msvc to optionalDependencies This fixes the Windows ARM64 CI build failure caused by npm's optional dependency bug. The package.json was missing this platform-specific rollup binding. --------- Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: Olivier Chafik <ochafik@anthropic.com>
jonathanhefner
added a commit
to jonathanhefner/mcp-ext-apps
that referenced
this pull request
Jan 9, 2026
PR modelcontextprotocol#184 accidentally removed/reverted educational comments from `basic-server-react` and `basic-server-vanillajs` that were established in PR modelcontextprotocol#182. This restores consistency with the other basic-server examples (Vue, Svelte, Preact, Solid). Changes: - Add back the three-comment pattern explaining two-part registration - Restore full tool description ("as an ISO 8601 string") - Change vanillajs to return plain text instead of JSON (matching modelcontextprotocol#182) - Use local `resourceUri` variable instead of top-level constant Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
jonathanhefner
added a commit
to jonathanhefner/mcp-ext-apps
that referenced
this pull request
Jan 12, 2026
PR modelcontextprotocol#184 accidentally removed/reverted educational comments from `basic-server-react` and `basic-server-vanillajs` that were established in PR modelcontextprotocol#182. This restores consistency with the other basic-server examples (Vue, Svelte, Preact, Solid). Changes: - Add back the three-comment pattern explaining two-part registration - Restore full tool description ("as an ISO 8601 string") - Change vanillajs to return plain text instead of JSON (matching modelcontextprotocol#182) - Use local `resourceUri` variable instead of top-level constant Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
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.
Several related commits:
shared/server-utils.ts, centralizing logic for both HTTP and stdio transportsserver-utils.tsintegration-serverexample for E2E testing, allowing divergence from simplifiedbasic-server-*examplesbasic-server-*examples