New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

@hono/mcp

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@hono/mcp

MCP Middleware for Hono

latest
Source
npmnpm
Version
0.2.5
Version published
Weekly downloads
100K
-1.62%
Maintainers
1
Weekly downloads
 
Created
Source

Hono MCP (Model Context Protocol)

Connect Hono to a Model Context Protocol (MCP) server over HTTP Streaming Transport.

Streamable HTTP Transport

import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js'
import { StreamableHTTPTransport } from '@hono/mcp'
import { Hono } from 'hono'

const app = new Hono()

// Your MCP server implementation
const mcpServer = new McpServer({
  name: 'my-mcp-server',
  version: '1.0.0',
})

// Initialize the transport
const transport = new StreamableHTTPTransport()

app.all('/mcp', async (c) => {
  if (!mcpServer.isConnected()) {
    // Connect the mcp with the transport
    await mcpServer.connect(transport)
  }

  return transport.handleRequest(c)
})

export default app

Auth

The simplest way to setup MCP Auth when using 3rd party auth providers.

import { Hono } from 'hono'
import { simpleMcpAuthRouter } from '@hono/mcp'

const app = new Hono()

app.route(
  '/',
  simpleMcpAuthRouter({
    issuer: '[auth provider domain]',
    resourceServerUrl: new URL('http://localhost:3000/mcp'),
  })
)

// ...
// Logic to connect with the transport

For implementing custom auth, check out the docs - https://honohub.dev/docs/hono-mcp

Author

Aditya Mathur https://github.com/mathuraditya724

License

MIT

FAQs

Package last updated on 30 Mar 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts