1. Conduid
  2. AI
  3. hono-server-sse-transport
MCP server · AI

hono-server-sse-transport

Server-Sent Events transport for Hono and Model Context Protocol

Unclaimed ai
39Low

Scored 3 months ago · breakdown

About hono-server-sse-transport

hono-server-sse-transport is an MCP server published by git+NikaBuligini in the AI category: server-Sent Events transport for Hono and Model Context Protocol. It has been installed 0 times through Conduid.

Install

Install
npx hono-mcp-server-sse-transport
Claude Code
claude mcp add hono-mcp-server-sse-transport-gitnikab -- npx -y hono-mcp-server-sse-transport
npx
npx -y hono-mcp-server-sse-transport

This server has no ConduID identity, so agent calls to it are not receipted. Pin the version you install and review the source before granting it credentials.

Ask AI

Ask AI about hono-server-sse-transport

Powered by Claude · Grounded in docs

I know everything about hono-server-sse-transport. Ask me about installation, configuration, usage, or troubleshooting.

Security checks

  • ·README presentNot checked yet.
  • ·License declaredNot checked yet.
  • ·Tests presentNot checked yet.
  • ·Dependencies pinnedNot checked yet.
  • ·No dynamic code executionNot checked yet.
  • !Scoped permissionsDoesn't declare a permission scope. Assume it can do anything its process can.

README

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 await for a promise that never resolves
      await stream.sleep(60_000);
    }
  });
});

app.post('/messages', async (c) => {
  const sessionId = c.req.query('sessionId');
  const transport = transports[sessionId];

  if (transport == null) {
    return c.text('No transport found for sessionId', 400);
  }

  return await transport.handlePostMessage(c);
});

serve(
  {
    fetch: app.fetch,
    port: 3000,
  },
);

README mirrored from the source repository 3 months ago. The original is authoritative.

Questions

About hono-server-sse-transport

How do I install hono-server-sse-transport?

Run npx hono-mcp-server-sse-transport, then add the server to your MCP client's configuration. Conduid has recorded 0 installs, so the command is known to work with current clients.

Is hono-server-sse-transport safe to use with an AI agent?

Its trust score is 39 out of 100 (low). It passes 0 of 1 static security checks; the failures are listed above. It has no ConduID identity yet, so agent calls to it are not receipted.

Is hono-server-sse-transport still maintained?

Conduid hasn't recorded a commit date for this repository yet. Check the repository directly for recent activity.