loaditout.ai
SkillsPacksTrendingLeaderboardAPI DocsBlogSubmitRequestsCompareAgentsXPrivacyDisclaimer
{}loaditout.ai
Skills & MCPPacksBlog

hono-mcp-server-sse-transport

MCP Tool

NikaBuligini/hono-mcp-server-sse-transport

SSE Transport for MCP servers in Hono applications

Install

$ npx loaditout add NikaBuligini/hono-mcp-server-sse-transport

Platform-specific configuration:

.claude/settings.json
{
  "mcpServers": {
    "hono-mcp-server-sse-transport": {
      "command": "npx",
      "args": [
        "-y",
        "hono-mcp-server-sse-transport"
      ]
    }
  }
}

Add the config above to .claude/settings.json under the mcpServers key.

About

MCP Server transport for Hono applications
Overview

This project provides a transport for Hono application that needs to connect to MCP Server. An official TypeScript SDK is designed to be used with express. If you try and follow their instructions but change express with hono, you will find that it's not going to work. Even if you set HttpBinding as an env (see an example from @hono/node-server), it still doesn't work as some headers are being added to a response after it's sent.

This implementation is inspired by the following pull request

You can use this transport until there is a proper support for Hono in the official SDK.

Getting started
Installation
pnpm add -D hono-mcp-server-sse-transport
Usage
import { Hono } from 'hono';
import { serve } from '@hono/node-server';
import { streamSSE } from 'hono/streaming';
import { SSETransport } from 'hono-mcp-server-sse-transport';
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';

const mcpServer = new McpServer(
  {
    name: 'your-mcp-server-name',
    version: '1.0.0',
  },
  {
    capabilities: {
      tools: {},
    },
  },
);

// here you add your tools
// ...

const app = new Hono();

// to support multiple simultaneous connections we have a lookup object from
// sessionId to transport
const transports: { [sessionId: string]: SSETransport } = {};

app.get('/sse', (c) => {
  return streamSSE(c, async (stream) => {
    const transport = new SSETransport('/messages', stream);

    transports[transport.sessionId] = transport;

    stream.onAbort(() => {
      delete transports[transport.sessionId];
    });

    await mcpServer.connect(transport);

    while (true) {
      // This will keep the connection alive
      // You can also awai

Tags

modelcontextprotocolmcphono

Reviews

Loading reviews...

Quality Signals

Quality Score3500
28
Stars
0
Installs
Last updated331 days ago
Security: AREADME

Safety

Risk Levelmedium
Data Access
read
Network Accessnone

Details

Sourcenpm
Last commit5/22/2025
View on GitHub→

Embed Badge

[![Loaditout](https://loaditout.ai/api/badge/NikaBuligini/hono-mcp-server-sse-transport)](https://loaditout.ai/skills/NikaBuligini/hono-mcp-server-sse-transport)