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.
| package | what | you need it for |
|---|---|---|
onedef | the contract, implement, createClient, the local() and http() transports, errors | always |
@onedef/orpc | toNextHandlers, toFetchHandler, generateOpenApi; /client → rpc() | REST, RPC and OpenAPI, and the HTTP client |
@onedef/mcp | createMcpHandler, serveMcpStdio, protectedResourceMetadata; /app → mcpApp(), launch() | an MCP server and MCP Apps |
@onedef/next | withOnedef; /server → serveMcpApp(); /mcp-app → defineMcpApp() | MCP Apps built by Next.js |
@onedef/cli | runCli with login / logout / whoami, toSkillMarkdown | a CLI |
@onedef/query | createQueryUtils | TanStack Query |
@onedef/store | implementStore, memoryStore; /fs → fsStore; /redis → redisStore | persistence written for you |
@onedef/process | runsIn, memoryRunStore | processes |
@onedef/docs | writeMintlifySite | a generated API docs site |
@onedef/elicitation-workflow | createWorkflow, workflowRuns, run stores; /mcp → registerWorkflowTool; /redis → redisRunStore | MCP 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.