Skip to content

docs: add mcp-use to Hono integrations - #902

Merged
yusukebe merged 1 commit into
honojs:mainfrom
tonxxd:fix/add-mcp-use-hono-docs
Aug 31, 2026
Merged

docs: add mcp-use to Hono integrations#902
yusukebe merged 1 commit into
honojs:mainfrom
tonxxd:fix/add-mcp-use-hono-docs

Conversation

@tonxxd

@tonxxd tonxxd commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Adds mcp-use to Hono's Server / Adapter integrations.

mcp-use lets Hono apps expose MCP tools and interactive MCP App views through
the Fetch-compatible MCPServer.fetch() handler.

// index.ts
import { Hono } from "hono";
import { MCPServer } from "mcp-use";
import { z } from "zod";

const mcp = new MCPServer({
  name: "hono-mcp-example",
  version: "1.0.0",
});

mcp.tool(
  {
    name: "greet",
    description: "Greet a person",
    inputSchema: z.object({ name: z.string() }),
    outputSchema: z.object({ message: z.string() }),
    view: { name: "greeting" },
  },
  async ({ name }) => ({
    content: [{ type: "text", text: `Hello, ${name}!` }],
    structuredContent: { message: `Hello, ${name}!` },
  }),
);

const app = new Hono();
app.all("/mcp/*", (c) => mcp.fetch(c.req.raw));

export default app;

The tool's view is defined at views/greeting/view.tsx:

import { useToolContext } from "mcp-use/react";

export default function GreetingView() {
  const view = useToolContext<"greet">();

  if (view.status !== "ready") return <p>Loading...</p>;

  return <h2>{view.toolOutput.message}</h2>;
}

See the Hono integration example
and MCP Apps documentation.

I added the link to the repo (10.5k stars) which uses hono underneath but maybe the link to the integration doc page might be more relevant

@yusukebe yusukebe left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@yusukebe

Copy link
Copy Markdown
Member

@tonxxd

mcp-use seems to be great! Thanks!

@yusukebe
yusukebe merged commit cb76a7e into honojs:main Aug 31, 2026
2 checks passed
@tonxxd

tonxxd commented Sep 1, 2026

Copy link
Copy Markdown
Contributor Author

Lovely!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants