Menu

1 / 5

Zod vs Valibot vs ArkType for MCP Tool Schemas

DEV Community: typescript·Waseem Anjum·9 days ago
#LBnGw0Re
#devtotypescript#devto#dev#schema#arktype
Reading 0:00
15s threshold

Cross-posted from my blog. The original, with any updates, lives on fabwaseem.com .

When I built the NestJS MCP server earlier this week, I used Zod for the tool schemas without thinking about it, because every SDK example does. Then I noticed the v2 TypeScript SDK types inputSchema as "any Standard Schema that can also emit JSON Schema", and the docstring names Zod 4, Valibot and ArkType. So today I wrote the same tool schema in all three, registered them on one MCP server, and measured what actually changes.

Short version: all three work. The differences that mattered were in the JSON Schema the model sees, how each one treats a datetime with a +05:00 offset, cold start, bundle size, and one ArkType setting that made the same schema about 18x slower.

What I ran

Everything is on one shared 8 vCPU Xeon VM with 16 GB, on November 7, 2026:

Node.js 24.22.1

zod 4.6.7, valibot 1.5.0 with @valibot/to-json-schema 1.8.0, arktype 2.2.9

@modelcontextprotocol/server and @modelcontextprotocol/client 2.4.0,…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.