MCP.so
ログイン

MCP Server transport for Hono applications

@NikaBuligini

基本情報

カテゴリ

その他

ライセンス

MIT license

トランスポート

stdio

作者

NikaBuligini

MCP Server transport for Hono applications について

概要はまだありません

MCP Server transport for Hono applications の設定

標準の設定はありません

このサーバーの README には解析可能な MCP 設定ブロックが含まれていません。インストール手順はリポジトリをご確認ください。

リポジトリ

MCP Server transport for Hono applications のツール

ツール一覧はまだありません

この掲載には表示できるツール一覧がまだありません。サーバーにツールがないという意味ではありません。対応機能はプロジェクトのドキュメントをご確認ください。

ツールは README から自動的に抽出されます。メンテナーは ## Tools という見出しの下に記載することで、このタブに反映できます。

概要

What is MCP Server transport for Hono applications?

This project provides a transport layer for connecting MCP Server to Hono applications using Server-Sent Events (SSE). It is a workaround because the official MCP TypeScript SDK is designed for Express and does not work directly with Hono. It is intended for developers who want to run MCP Server on Hono while waiting for official SDK support.

How to use MCP Server transport for Hono applications?

Install the package with pnpm add -D hono-mcp-server-sse-transport. Then import SSETransport and use it in a Hono app with streamSSE for the /sse endpoint and a /messages endpoint that handles POST requests. A lookup object stores transports by sessionId to support multiple simultaneous connections.

Key features of MCP Server transport for Hono applications

  • Provides a drop‑in SSETransport class for Hono apps
  • Supports multiple simultaneous MCP connections via sessionId lookup
  • Works as a temporary solution until official Hono support arrives
  • Inspired by the pull request in the official MCP SDK
  • Integrates with @hono/node-server and hono/streaming

Use cases of MCP Server transport for Hono applications

  • Running an MCP server with Hono instead of Express
  • Adding AI tool execution to Hono web applications
  • Building SSE‑based MCP transports in Hono environments

よくある質問

1

How does this differ from the official MCP SDK?

The official SDK uses Express and does not work with Hono because headers are added after the response is sent. This transport adapts the MCP server connection to Hono’s streaming API.

2

What are the runtime dependencies?

You need `@hono/node-server` and `hono/streaming` (part of Hono). The transport itself is installed via `hono-mcp-server-sse-transport`.

3

Are there any known limitations?

Yes, to keep the SSE connection alive you must call `stream.sleep(60_000)` (or await a promise that never resolves) inside the loop after connecting the MCP server.

4

What transport protocols does it use?

It uses SSE for server‑sent events and a POST endpoint (`/messages`) for receiving client messages. Session IDs are passed as query parameters.

5

Is authentication handled by this transport?

No. The README does not describe any built‑in authentication. You can add your own middleware to the Hono routes if needed.

コメント

「その他」の他のコンテンツ