MCP with Hono

A starter example for using Hono with Netlify to add serverless MCP to your project.


Model Context Protocol (MCP)

MCP is a lightweight protocol built to allow AI agents/clients to interact with servers to provide dynamic content, prompting, and tool calling. This is very important for websites wanting to provide a great agent experience (AX) through allowing agents to work dynamically with information and capabilities on the server.

Hono

Hono is a modern, ultrafast, and lightweight web framework designed for building web applications and APIs across various JavaScript runtimes. Built entirely on Web Standards, Hono emphasizes performance, simplicity, and cross-platform compatibility.​

Try out this example

Using an MCP Client

Provide the following configuration to your MCP client. After connecting, you will see the tools, prompts, resources, etc. available to the agent.

{
  "mcpServers": {
    "hono-mcp": {
      "command": "npx",
      "args": [
        "mcp-remote@next",
        "https://mcp-example-hono.netlify.app/mcp"
      ]
    }
  }
}

Using the MCP Inspector

MCP comes with an inspector tool for testing the server locally or remotely. Run the following command in your terminal to use the inspector. After connecting, you will see the tools, prompts, resources, etc. available to the agent.

npx @modelcontextprotocol/inspector npx mcp-remote@next https://mcp-example-hono.netlify.app/mcp

Deploy your own

A great place to start is to clone and deploy your own copy of this example. You can do that by clicking the button below.

Deploy to Netlify

Clicking the button will clone this example from the examples repo and deploy it as a new site on Netlify


More information