Skip to content

Commit 592125c

Browse files
authored
docs: update README.md (#81)
- ensure zod is installed - import zod in the mcp handler's route - add AuthInfo import to withMcpAuth example
1 parent a535d12 commit 592125c

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

README.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff 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
2121
import { createMcpHandler } from "mcp-handler";
22+
import { z } from "zod";
2223
const 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";
162164
import { createMcpHandler, withMcpAuth } from "mcp-handler";
163165

164166
// Create your handler as normal

0 commit comments

Comments
 (0)