JSON to Types
Turn any JSON into TypeScript types and a Zod schema.
Why delegate this
Typing from the first array element produces types that reject the rest of the data, and null is routinely conflated with absent. Also far cheaper in output tokens than writing the types inline for a large payload.
Tools
json_to_types
JSON to TypeScript and Zod
Convert a JSON sample into TypeScript interfaces and a matching Zod schema. Merges EVERY array element into a union rather than typing from the first, keeps optional and nullable distinct, and emits unknown with a warning for empty containers instead of inventing a shape. Read the warnings before trusting the output.
Direct endpoint:
https://json-to-types-seven.vercel.app/api/v1/convert
Two ways to call it
Through the aggregator, which gives you every other tool at the same time:
claude mcp add --transport http gumball https://gumballtools.com/api/mcpOr directly, if this is the only capability you want:
claude mcp add --transport http json-to-types https://json-to-types-seven.vercel.app/api/mcp