Bun SSE Transport for MCPServer

tigranbs
GitHub
Server-Sent EventsReal-time CommunicationBun

Loading subscription status...

💡 Description

This package provides a Bun-specific implementation of Server-Sent Events (SSE) transport for MCP servers. It uses the SSE protocol for real-time one-way communication from the server to the client, and handles client-to-server communication via HTTP POST requests.

📝 JSON Entries

{
  "mcpServers": [
    {
      "Bun SSE Transport for MCP": {
        "env": {
          "PORT": "3000"
        },
        "args": [
          "/messages"
        ],
        "command": "server.connect(transport);"
      }
    }
  ]
}

🛠️ Tools

Bun@modelcontextprotocol/sdk

Features

  • Built specifically for the Bun runtime
  • Implements the MCP transport interface
  • Manages SSE connections with appropriate headers
  • Handles incoming JSON-RPC messages
  • Simple integration with Bun.serve

💬 Example Queries

  • How does the server establish an SSE connection?
  • What is the endpoint for posting messages to the server?