Skip to Content
onedef

Packages

What each package does, and when you need it.

Install only what you use. Everything depends on onedef except @onedef/elicitation-workflow, which stands on its own.

packagewhatyou need it for
onedefthe contract, implement, createClient, the local() and http() transports, errorsalways
@onedef/orpctoNextHandlers, toFetchHandler, generateOpenApi; /client → rpc()REST, RPC and OpenAPI, and the HTTP client
@onedef/mcpcreateMcpHandler, serveMcpStdio, protectedResourceMetadata; /app → mcpApp(), launch()an MCP server and MCP Apps
@onedef/nextwithOnedef; /server → serveMcpApp(); /mcp-app → defineMcpApp()MCP Apps built by Next.js
@onedef/clirunCli with login / logout / whoami, toSkillMarkdowna CLI
@onedef/querycreateQueryUtilsTanStack Query
@onedef/storeimplementStore, memoryStore; /fs → fsStore; /redis → redisStorepersistence written for you
@onedef/processrunsIn, memoryRunStoreprocesses
@onedef/docswriteMintlifySitea generated API docs site
@onedef/elicitation-workflowcreateWorkflow, workflowRuns, run stores; /mcp → registerWorkflowTool; /redis → redisRunStoreMCP tools that ask and continue, with or without onedef

Schemas are any Standard Schema validator with JSON Schema support: zod 4.2 or later, valibot or arktype. Nothing to register.

Runtimes: the server pieces are plain fetch handlers, so they run on Node, Bun, Deno and Cloudflare Workers. @onedef/next needs Next.js 16.