Vovk.ts makes your Next.js app agent-ready: every procedure is also an MCP tool, a typed client method and an OpenAPI operation. See the guide.
Vovk.ts adds an API layer on top of Next.js App Router Route Handlers. Its unit is the procedure: a typed function with its schema. From one procedure, Vovk.ts derives the HTTP endpoint, the local .fn() call, the type-safe client, the OpenAPI document and the AI tool with execute. You don't write a separate contract or glue code.
Requirements: Node.js 24.15+ (or Bun 1.4+, Deno 2.9+), Next.js 15+ and TypeScript 5.5+
🧩 Plain Next.js: its routing, streaming, proxy.js and auth patterns, and deployment targets work as usual
🏗️ NestJS-style Controller → Service → Repository layers on top of Route Handlers, without the DI container or a custom server
📝 No separate contract: the schema comes from your controller code, so you don't maintain it by hand
🤖 AI tools from your API: controllers and generated RPC modules can become AI tools with an input schema and execute
⚡ Segments: split the API into parts, each with its own config and its own serverless function
✅ Typed requests with procedure(...): { params, query, body }
🔗 Third-party OpenAPI schemas as modules of the same client and tools (OpenAPI mixins)
What it looks like
A procedure is a typed, validated function. Define its inputs and output with procedure, and call it on the server for SSR/PPR, server actions or AI tool calls: