We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
1.2.5
Darwin M3Pro.local 24.4.0 Darwin Kernel Version 24.4.0: Wed Mar 19 21:17:32 PDT 2025; root:xnu-11417.101.15~1/RELEASE_ARM64_T6030 arm64
import express from "express"; import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js"; import { SSEServerTransport } from "@modelcontextprotocol/sdk/server/sse.js"; import { z } from "zod"; const app = express(); const server = new McpServer( { name: "example-server", version: "1.0.0", }, { capabilities: {}, } ); // Add an addition tool server.tool("add", { a: z.number(), b: z.number() }, async ({ a, b }) => ({ content: [{ type: "text", text: String(a + b) }], })); let transport: SSEServerTransport | null = null; app.get("/sse", (req, res) => { transport = new SSEServerTransport("/messages", res); server.connect(transport); }); app.post("/messages", (req, res) => { if (transport) { transport.handlePostMessage(req, res); } }); app.listen(3000);
No response bun run main.ts will not be able to access /sse npx tsx main.ts is normal
No response
The text was updated successfully, but these errors were encountered:
This was fixed by #18804 and is present in bun v1.2.9
v1.2.9
Sorry, something went wrong.
Unfortunately, I found a bug that will cause some programs to fail to connect and not respond.
No branches or pull requests
What version of Bun is running?
1.2.5
What platform is your computer?
Darwin M3Pro.local 24.4.0 Darwin Kernel Version 24.4.0: Wed Mar 19 21:17:32 PDT 2025; root:xnu-11417.101.15~1/RELEASE_ARM64_T6030 arm64
What steps can reproduce the bug?
What is the expected behavior?
No response
bun run main.ts will not be able to access /sse
npx tsx main.ts is normal
What do you see instead?
No response
Additional information
No response
The text was updated successfully, but these errors were encountered: