File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -5,20 +5,21 @@ A Vercel adapter for the Model Context Protocol (MCP), enabling real-time commun
55## Installation
66
77``` bash
8- npm install mcp-handler @modelcontextprotocol/sdk
8+ npm install mcp-handler @modelcontextprotocol/sdk zod@^3
99# or
10- yarn add mcp-handler @modelcontextprotocol/sdk
10+ yarn add mcp-handler @modelcontextprotocol/sdk zod@^3
1111# or
12- pnpm add mcp-handler @modelcontextprotocol/sdk
12+ pnpm add mcp-handler @modelcontextprotocol/sdk zod@^3
1313# or
14- bun add mcp-handler @modelcontextprotocol/sdk
14+ bun add mcp-handler @modelcontextprotocol/sdk zod@^3
1515```
1616
1717## Next.js Usage
1818
1919``` typescript
2020// app/api/[transport]/route.ts
2121import { createMcpHandler } from " mcp-handler" ;
22+ import { z } from " zod" ;
2223const handler = createMcpHandler (
2324 (server ) => {
2425 server .tool (
@@ -159,6 +160,7 @@ The MCP adapter supports the [MCP Authorization Specification](https://modelcont
159160
160161``` typescript
161162// app/api/[transport]/route.ts
163+ import type { AuthInfo } from " @modelcontextprotocol/sdk/server/auth/types.js" ;
162164import { createMcpHandler , withMcpAuth } from " mcp-handler" ;
163165
164166// Create your handler as normal
You can’t perform that action at this time.
0 commit comments