fix: use factory pattern and shared server-utils for session handling - #1
Open
ochafik wants to merge 6 commits into
Conversation
Demonstrates MCP App SDK usage with Vue 3, providing framework parity alongside the existing React and vanilla JS examples. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Demonstrates MCP App SDK usage with Svelte, providing parity with the existing basic-server-react and basic-server-vue examples. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Demonstrates MCP App SDK usage with Preact, providing another lightweight framework option alongside the existing React, Vue, and Svelte examples. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Demonstrates MCP App SDK usage with Solid.js, providing another reactive framework option alongside the existing React, Vue, Svelte, and Preact examples. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Link each framework name to its official GitHub repo in basic examples list - Shorten React server name from "React-based" to "React" for consistency 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Update new framework examples (Vue, Svelte, Preact, Solid) to match the session handling fixes from PR #115: - Replace global McpServer instance with createServer() factory function - Use shared startServer() utility instead of inline Express setup - Add --stdio support for each server - Move RESOURCE_URI to module scope Each HTTP session now gets its own McpServer instance because McpServer only supports one transport at a time. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
jonathanhefner
force-pushed
the
basic-examples-multi-framework
branch
from
December 18, 2025 18:37
7157f65 to
6eb0eaa
Compare
jonathanhefner
force-pushed
the
basic-examples-multi-framework
branch
from
January 8, 2026 16:29
6eb0eaa to
05c226a
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.
Summary
Updates new framework examples (Vue, Svelte, Preact, Solid) to match the session handling fixes from PR #115:
createServer()factory functionstartServer()utility instead of inline Express setup--stdiosupport for each serverRESOURCE_URIto module scopeEach HTTP session now gets its own
McpServerinstance becauseMcpServeronly supports one transport at a time.Changes
examples/basic-server-preact/server.tsexamples/basic-server-solid/server.tsexamples/basic-server-svelte/server.tsexamples/basic-server-vue/server.tsTest plan
npm install- dependencies installed successfullynpm run build- all examples build successfullynpm test- unit tests pass🤖 Generated with Claude Code