Get the FREE Ultimate OpenClaw Setup Guide →

hono

MCP server from mattzcarey/hono-mcp-server

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio mattzcarey-hono-mcp-server npx -y mattzcarey-hono-mcp-server

How to use

This MCP server exposes your Hono-based API endpoints as MCP tools. By wrapping your Hono routes with registerTool, each route can be described as an MCP tool with input and output schemas, enabling MCP clients to discover, validate, and invoke your API in a standardized way. The server optionally supports a codemode, which instead exposes generic search and execute capabilities for dynamic API interaction when you enable Cloudflare Worker Loader integration. Use the example in the README to annotate routes with inputSchema and outputSchema so MCP clients can validate inputs and parse outputs automatically. Start by wiring up your Hono app with mcp(app, { name, version, ... }) and then run the server through the MCP launcher to publish the tools at the /mcp endpoint by default.

How to install

Prerequisites:

  • Node.js and npm installed on your machine.

Install and run the MCP server:

  1. Install Node.js from https://nodejs.org if you don’t already have it.

  2. Use npx to run the MCP server package (no global install required):

    npx -y mattzcarey-hono-mcp-server

  3. Alternatively, install locally in your project and run via your package.json scripts:

    npm install --save-dev mattzcarey-hono-mcp-server

    // In your start script or an npm script you define node ./node_modules/mattzcarey-hono-mcp-server/dist/index.js

  4. Ensure your Hono app files export the configured MCP wrapper as shown in the README, e.g. export default mcp(app, { name: "Users API", version: "1.0.0" });

  5. If you plan to use codemode, ensure Cloudflare Worker Loader is set up and include the wrangler.jsonc configuration as described in the README.

Additional notes

Tips and common issues:

  • When using registerTool with inputSchema/outputSchema, the MCP server will enforce validation and provide typed data to the handlers via c.req.valid('json').
  • If you enable codemode, you’ll override the default per-route tools with dynamic search/execute tools; ensure Cloudflare Worker Loader bindings are configured (wrangler.jsonc shown in README).
  • The MCP endpoint typically defaults to /mcp; you can customize this via the mcpPath option when wrapping your app.
  • If your tool descriptions or schemas change, regenerate or refresh the MCP configuration to keep clients in sync.
  • For npm package naming, the server is started through the package name and the exact command may vary by release; consult the package's registry for the latest run instructions.

Related MCP Servers

Sponsor this space

Reach thousands of developers