@ufo-soft/caelus-mcp
A caelus registry as an MCP server. Each command becomes a tool and each parameter a field of its input schema, all derived from the registry, via the official MCP TypeScript SDK.
sh
npm install @ufo-soft/caelus @ufo-soft/caelus-mcp @modelcontextprotocol/sdk zodFor a server a host spawns, stdio serves the registry on the process's stdin and stdout:
ts
import { stdio } from '@ufo-soft/caelus-mcp'
await stdio(registry, { name: 'todo', version: '1.0.0' })sh
claude mcp add todo -- node todo.jsstdio resolves when the host disconnects, after every request already received has been answered. Handlers must not write to stdout: that is the protocol's channel.
For any other transport, mcp returns the SDK's McpServer with the tools registered, for the app to connect:
ts
import { mcp } from '@ufo-soft/caelus-mcp'
await mcp(registry, { name: 'todo', version: '1.0.0' }).connect(transport)stringandintegerparameters are required;booleanis optional and false by default. The same rules as@ufo-soft/caelus-cli.- An
okoutcome is one text block: its data as a string or JSON, orokwhen there is none. - A
failedoutcome is its reason, marked as an error.
The SDK and zod are peer dependencies, so the app's copies are the ones used.