This example demonstrates how to build a Model Context Protocol (MCP) server using Hono, a lightweight web framework, and deploy it to Vercel. The server exposes mathematical operation tools (add, subtract, multiply, divide) that can be consumed by MCP clients.
To connect your MCP client to the server, use: https://hono-mcp-demo.vercel.app/mcp
You can also visit https://hono-mcp-demo.vercel.app in your browser.
The Model Context Protocol (MCP) is an open protocol that standardizes how applications provide context to Large Language Models (LLMs). This example shows how to create an MCP server that exposes tools as HTTP endpoints.
mcp-handler
library for easy MCP server creationTo develop locally:
npm installvc dev
open http://localhost:3000
To build locally:
npm installvc build
To deploy:
npm installvc deploy
/
- Welcome endpoint with server information/mcp/*
- MCP protocol endpoint for tool executionThe server exposes the following MCP tools:
Once deployed, you can connect to this MCP server from any MCP-compatible client by pointing to the /mcp
endpoint. The server handles the MCP protocol transport and tool execution automatically.