Skip to content

Conversation

@ochafik
Copy link

@ochafik ochafik commented Dec 13, 2025

Summary

Updates 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.

Changes

  • examples/basic-server-preact/server.ts
  • examples/basic-server-solid/server.ts
  • examples/basic-server-svelte/server.ts
  • examples/basic-server-vue/server.ts

Test plan

  • npm install - dependencies installed successfully
  • npm run build - all examples build successfully
  • npm test - unit tests pass

🤖 Generated with Claude Code

jonathanhefner and others added 6 commits December 13, 2025 21:21
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 jonathanhefner force-pushed the basic-examples-multi-framework branch from 7157f65 to 6eb0eaa Compare December 18, 2025 18:37
@jonathanhefner jonathanhefner force-pushed the basic-examples-multi-framework branch from 6eb0eaa to 05c226a Compare January 8, 2026 16:29
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