The Hono for MCP

Ship MCP Servers That Actually Scale

Stop reinventing auth, rate limiting, and middleware for every MCP server. One framework, composable by default, production-ready from day one.

12 Built-in features
137 Tests passing
v0.7 Latest

Batteries Included

Everything between the request and your handler -- handled.

  • swap_horiz Dual Transport STDIO + Streamable HTTP. Same code.
  • layers Middleware Pipeline Composable onion model, like Koa.
  • shield OAuth2 Auth JWT/Bearer + RFC 9728 metadata.
  • key OIDC Presets GitHub, Google, Auth0 -- one line.
  • settings YAML + Env Config File config, env overrides at deploy.
  • speed Concurrency Backpressure: sleep, queue, or reject.
  • timer Rate Limiting Sliding window, per-client isolation.
  • check_circle Schema Validation JSON Schema via ajv at registration.
  • monitoring Observability OTel spans + Prometheus /metrics.
  • widgets MCP Apps Serve interactive UIs via ui:// scheme.
  • lock CORS Allowlist Origin allowlist with wildcard warnings.
  • upload_file Body Size Limit maxBodyBytes with 413 JSON-RPC errors.
  • block IP Rate Limit Per-IP 429 + Retry-After on HTTP layer.
  • badge Session Propagation sessionId flows into middleware context.
  • enhanced_encryption HMAC Signing SHA-256 sign/verify + anti-replay for PostMessage.
  • security CSP Injection Auto-inject Content-Security-Policy in MCP Apps.

SDK vs Framework

The official SDK gives you the protocol. This gives you the production stack.

Official SDK @casys/mcp-server
MCP protocol
Middleware pipeline
OAuth2 / JWT auth
Rate limiting
Schema validation
Streamable HTTP + SSE Manual Built-in
Concurrency control
OpenTelemetry tracing
Prometheus metrics
MCP Apps (UI resources) Manual Built-in
CORS allowlist
Body size limit (413)
IP rate limiting (429)
Session propagation
HMAC message signing
CSP injection
YAML + Env config
Deno + Node.js Node only Both

5 Lines to Production

No boilerplate. No config ceremony. Register a tool, call start(), ship it.

import { ConcurrentMCPServer } from "@casys/mcp-server";

const server = new ConcurrentMCPServer({
  name: "my-server",
  version: "1.0.0",
});

server.registerTool(
  { name: "greet", description: "Greet a user",
    inputSchema: { type: "object",
      properties: { name: { type: "string" } },
      required: ["name"] } },
  ({ name }) => \`Hello, \${name}!\`,
);

await server.start();

Your Server, Your Rules

Every request flows through a composable middleware chain. Need auth? Drop it in. Rate limiting? One line. Custom logic? Slot it anywhere.

Ready When You Are

One command. Works with Deno and Node.js. Published on JSR, the modern JavaScript registry.

Deno
deno add jsr:@casys/mcp-server
npm
npx jsr add @casys/mcp-server
Built with Deno JSR