From 670f0d8f186f7843bde2fb3ada1ff90af4c6f7a8 Mon Sep 17 00:00:00 2001 From: Mark Roberts Date: Mon, 14 Jul 2025 22:01:15 +0200 Subject: [PATCH] docs: update README.md - ensure zod is installed - import zod in the mcp handler's route - add AuthInfo import to withMcpAuth example --- README.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index d56da64..9c14a69 100644 --- a/README.md +++ b/README.md @@ -5,13 +5,13 @@ A Vercel adapter for the Model Context Protocol (MCP), enabling real-time commun ## Installation ```bash -npm install mcp-handler @modelcontextprotocol/sdk +npm install mcp-handler @modelcontextprotocol/sdk zod@^3 # or -yarn add mcp-handler @modelcontextprotocol/sdk +yarn add mcp-handler @modelcontextprotocol/sdk zod@^3 # or -pnpm add mcp-handler @modelcontextprotocol/sdk +pnpm add mcp-handler @modelcontextprotocol/sdk zod@^3 # or -bun add mcp-handler @modelcontextprotocol/sdk +bun add mcp-handler @modelcontextprotocol/sdk zod@^3 ``` ## Next.js Usage @@ -19,6 +19,7 @@ bun add mcp-handler @modelcontextprotocol/sdk ```typescript // app/api/[transport]/route.ts import { createMcpHandler } from "mcp-handler"; +import { z } from "zod"; const handler = createMcpHandler( (server) => { server.tool( @@ -159,6 +160,7 @@ The MCP adapter supports the [MCP Authorization Specification](https://modelcont ```typescript // app/api/[transport]/route.ts +import type { AuthInfo } from "@modelcontextprotocol/sdk/server/auth/types.js"; import { createMcpHandler, withMcpAuth } from "mcp-handler"; // Create your handler as normal