Get the latest tech news

From OpenAPI spec to MCP: How we built Xata's MCP server


Learn how we built an OpenAPI-driven MCP server using Kubb, custom code generators, and Vercel’s Next.js MCP adapter.

Building an MCP server means exposing a set of “tools” (operations) that a Large Language Model (LLM) can call to perform tasks, for example, fetching data or triggering actions via your backend. Writing an MCP server entirely by hand for a large API would be a massive time sink, manually crafting each tool’s schema and handler is tedious and error-prone, especially when a well-defined OpenAPI spec already exists. Kubb can generate TypeScript types, API clients, React Query hooks, Zod validators, MSW handlers, and even MCP integration code, all from an OpenAPI spec.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of mcp

mcp

Photo of MCP server

MCP server

Photo of Xata

Xata

Related news:

News photo

GitHub MCP exploited: Accessing private repositories via MCP

News photo

Trading with Claude, and writing your own MCP server

News photo

MCP Will Be Built Into Windows To Make an 'Agentic OS' - Bringing Security Concerns