Bun SSE Transport for MCP
bun-mcp-sse-トランスポート
Bun を使用したモデル コンテキスト プロトコル (MCP) の Server-Sent Events (SSE) トランスポート実装。
概要
このパッケージは、MCPサーバー向けのBun固有のSSEトランスポート実装を提供します。SSEプロトコルを用いたサーバーからクライアントへのリアルタイムの一方向通信を可能にし、クライアントからサーバーへの通信はHTTP POSTリクエストを介して処理されます。
Related MCP server: MCP Server with SSE and Bearer Authentication
主な特徴
Bunランタイム専用に構築
MCPトランスポートインターフェースを実装する
適切なヘッダーを使用してSSE接続を管理します
受信したJSON-RPCメッセージを処理します
Bun.serveとのシンプルな統合
クイック使用方法
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
import { BunSSEServerTransport } from "bun-mcp-sse-transport";
// Create SSE transport
const transport = new BunSSEServerTransport("/messages");
// Connect to MCP server
const server = new McpServer({ name: "MyServer", version: "1.0.0" });
server.connect(transport);
// Set up Bun HTTP server
Bun.serve({
port: 3000,
routes: {
"/sse": () => transport.createResponse(),
"/messages": (req) => transport.handlePostMessage(req)
}
});仕組み
クライアントが
/sseに接続すると、サーバーはSSE接続を作成します。サーバーはクライアントがメッセージをPOSTするエンドポイントURLを送信します。
クライアントはエンドポイントURLにJSON-RPCメッセージを送信します。
サーバーはこれらのメッセージを受信し、MCPサーバーに渡します。
MCPサーバーはメッセージを処理し、SSE接続を介して応答を送信します。
この実装は、MCP 標準に準拠しながら、Bun のストリーミング機能を活用して効率的なリアルタイム通信を実現します。
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
A Model Context Protocol server for Wix AI tools
Enable secure connectivity between Sentry issues and debugging data, and LLM clients, using a Model Context Protocol (MCP) server.
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
Model Context Protocol server for the Apideck Unified API. Connect any MCP-compatible agent framework to 100+ accounting systems, HRIS platforms, file storage providers, and more through one integration. More information https://www.apideck.com/mcp-server
Related MCP Servers
AlicenseNot gradedqualityCmaintenanceImplements a Model Context Protocol server using Server-Sent Events for real-time communication with OAuth 2.1 integration via Ory Network, enabling secure AI model communication with authentication and client management.Apache 2.0- -licenseNot gradedqualityNot gradedmaintenanceA TypeScript implementation of a Model Context Protocol server that uses Server-Sent Events for real-time communication and Bearer Token authentication to enable secure interaction with LLM clients like Claude Desktop.-
- -licenseNot gradedqualityNot gradedmaintenanceA TypeScript implementation of a Model Context Protocol server that enables real-time communication with LLM clients using Server-Sent Events (SSE) for transport and Bearer Token authentication for security.-
- FlicenseNot gradedqualityNot gradedmaintenanceA Model Context Protocol (MCP) server implementation that uses Server-Sent Events (SSE) to enable real-time, server-pushed updates between AI models and tools over HTTP connections.1-