@arbol-ai/maximus
Maximus builds organization-scoped APIs on Cloudflare Workers that people and AI agents call alike. Each route is a file that declares its handler and its contract once, and the same Worker serves it over HTTP with an OpenAPI 3.1 document, as an MCP tool when the route names one, and over native RPC to the Workers you allow.
bun create maximus my-api
// routes/v1/notes/[noteId].get.ts
import { defineHandler, UuidSchema } from '@arbol-ai/maximus';
import { NoteSchema } from '#src/notes.ts';
/** GET /api/v1/notes/{noteId}, also the MCP tool get_note: one note of the caller's organization. */
export default defineHandler(
async ({ input, notes, fail }) => {
const note = await notes.find(input.noteId);
if (!note) {
return fail('NOTE_NOT_FOUND');
}
return note;
},
{
description: 'Read one note of the organization by its id.',
input: { noteId: UuidSchema },
output: NoteSchema,
failures: ['NOTE_NOT_FOUND'],
mcp: { name: 'get_note' },
}
);
This package is the framework. Its root entry holds routes and operations, TypeBox schemas, tokens and
scopes, the error catalog and the HTTP handler with its OpenAPI document; each optional capability is an
entry of its own, such as @arbol-ai/maximus/mcp, /workers or /postgres, and a Worker carries only the
entries it imports. The package installs the maximus command and ships the Maximus skill for coding agents
in skills/maximus/. maximus() from @arbol-ai/maximus/vite makes vite.config.ts a project's one
configuration.
- Getting started
- Concepts
- Package exports, every entry
- CLI, the
maximuscommand - All documentation
Released under the MIT License.