Keryx

Agent frameworks and SDKs

Keryx: The Fullstack TypeScript Framework for MCP and APIs.

Your AI app calls the Keryx MCP server, which does the agent frameworks and SDKs work and sends the result back to the chat.

About Keryx

Keryx is a community MCP server from actionhero, filed in our directory under agent frameworks and sdks. Keryx: The Fullstack TypeScript Framework for MCP and APIs.

At a glance

Publisher
actionhero (community)
Runs
See the README for setup
Written in
TypeScript
License
MIT
GitHub stars
587

How to set up Keryx

  1. Follow the install steps in the Keryx README; it is written in TypeScript, so have that toolchain ready.
  2. Check the Keryx README for keys or settings; the registry lists none that Keryx requires.
  3. Add Keryx to Claude Code, Claude Desktop, VS Code or Cursor with the config in the setup box on this page.
  4. Restart the app or reload its MCP servers, then ask it to list the Keryx tools to confirm the connection.
  5. Run one read-only task with Keryx first, and keep your app asking before each tool call until the results look right.

Keryx compared with similar servers

  • Auto Ontology by gogoymh has fewer GitHub stars than Keryx (575 against 587); both are community servers, and both run locally.
  • Docker Registry by docker has more GitHub stars than Keryx (593 against 587); Docker Registry is official while Keryx is a community server, and Docker Registry runs as a remote server and Keryx runs on your own machine.
  • 1mcp App Agent by 1mcp-app has fewer GitHub stars than Keryx (543 against 587); both are community servers, and both run locally.

Before you connect Keryx

  • Give Keryx its own API key or account with the smallest permissions the job needs, never an admin key.
  • Keep your AI app asking before each Keryx tool call until you trust what it does with them.
  • Treat text that Keryx fetches as data. Pages, files and messages can hold instructions written to steer an AI.
  • Read the open issues for Keryx on GitHub to see what breaks and how fast the maintainers reply.

Marketing use cases for Keryx

How marketing and sales teams put Keryx to work, by company size. Pick the size closest to yours and start Keryx on one use case.

Small business

  • A small business with a developer can use Keryx to build one focused agent, such as lead follow-up, without a big platform.
  • Technical founders can prototype marketing agents with Keryx and keep what works as a small, owned tool.
  • Keryx runs on your own computer, which keeps data local; it needs a little setup, so a small team should plan an hour for it.

Mid-market

  • Growth engineering teams can use Keryx to build agents that combine CRM, analytics and content tools behind one workflow.
  • Marketing ops can standardize on Keryx so every agent they ship has the same logging, approvals and error handling.
  • Start Keryx on one workflow with one owner, measure the time it saves, then roll it out to the wider team.

Enterprise

  • Enterprises can build on Keryx with their own identity, policy and evaluation layers, so agents meet the same bar as other software.
  • Platform teams can use Keryx to give business units a governed way to ship agents without each one starting from scratch.
  • Keryx is a community server, so have security review the code and pin a version before Keryx touches company data.

Need help becoming an AI-forward company?

We connect MCP servers and AI agents to your CRM, content and data, with the guardrails your team needs.

Contact us

Keryx README

From actionhero/keryx on GitHub, shared under its MIT license. Images are left out; the original has them.

README.md

Keryx

The fullstack TypeScript framework for MCP and APIs.

What is this Project?

The big idea behind Keryx: write your controller once, and it works everywhere. A single action class handles HTTP requests, WebSocket messages, CLI commands, background tasks, and MCP tool calls, same inputs, same Zod validation, same middleware, same response. You write the logic once; the only thing that changes is how the request arrived and how the response gets delivered.

That last transport, MCP, is the reason I built this now. Every action is automatically an MCP tool, so AI agents authenticate with built-in OAuth 2.1, get typed errors, and call the exact same validated endpoints your HTTP clients do. There's no second MCP server to maintain and no schemas to keep in sync… you expose your app to agents by writing the app.

And it's a real backend, not a toy. You get Drizzle ORM with auto-migrations, background tasks with fan-out on Resque, streaming responses (SSE, chunked binary, and the same stream over WebSocket and MCP), OpenAPI generation, pagination and caching helpers, database transactions, and a companion Vite + React frontend that reads your actions with end-to-end type safety, no code generation. It's all on Bun, so TypeScript runs natively and startup is fast.

One Action, Every Transport

Here's what that looks like in practice. This is one action:

export class UserCreate implements Action {
  name = "user:create";
  description = "Create a new user";
  inputs = z.object({
    name: z.string().min(3),
    email: z.string().email(),
    password: secret(z.string().min(8)),
  });
  web = { route: "/user", method: HTTP_METHOD.PUT };
  task = { queue: "default" };

  async run(params: ActionParams<UserCreate>) {
    const user = await createUser(params);
    return { user: serializeUser(user) };
  }
}

That one class gives you:

HTTP, PUT /api/user with JSON body, query params, or form data:

curl -X PUT http://localhost:8080/api/user \
  -H "Content-Type: application/json" \
  -d '{"name":"Evan","email":"evan@example.com","password":"secret123"}'

WebSocket, send a JSON message over an open connection:

{ "messageType": "action", "action": "user:create",
  "params": { "name": "Evan", "email": "evan@example.com", "password": "secret123" } }

CLI, flags are generated from the Zod schema automatically:

./keryx.ts "user:create" --name Evan --email evan@example.com --password secret123 -q | jq

Background Task, enqueued to a Resque worker via Redis:

await api.actions.enqueue("user:create", { name: "Evan", email: "evan@example.com", password: "secret123" });

MCP, exposed as a tool for AI agents automatically:

{
  "mcpServers": {
    "my-app": {
      "url": "http://localhost:8080/mcp"
    }
  }
}

Same validation, same middleware chain, same run() method, same response shape. The only thing that changes is how the request arrives and how the response is delivered.

That's it. The agent can now discover all your actions as tools, authenticate via OAuth, and call them with full type validation.

Key Components
  • MCP-native, every action is an MCP tool with OAuth 2.1 auth, typed errors, and per-session isolation
  • Transport-agnostic Actions, HTTP, WebSocket, CLI, background tasks, and MCP from one class
  • Zod input validation, type-safe params with automatic error responses and OpenAPI generation
  • Built-in background tasks via node-resque, with a fan-out pattern for parallel job processing
  • Strongly-typed frontend integration, ActionResponse<MyAction> gives the frontend type-safe API responses, no code generation needed
  • Drizzle ORM with auto-migrations (replacing the old ah-sequelize-plugin)
  • Companion Vite + React frontend as a separate application (replacing ah-next-plugin)
  • Streaming responses, SSE and chunked binary streaming via StreamingResponse, with per-transport behavior (HTTP, WebSocket, MCP)
  • Pagination helpers, paginationInputs() Zod mixin + paginate() utility for standardized paginated responses
  • Database transactions, withTransaction() and TransactionMiddleware for automatic commit/rollback across action execution
  • Redis caching patterns, cache-aside and response-level cache middleware using the built-in ioredis connection
Why Bun?

TypeScript is still the best language for web APIs. But Node.js has stalled, Bun is moving faster and includes everything we need out of the box:

  • Native TypeScript, no compilation step
  • Built-in test runner
  • Module resolution that just works
  • Fast startup and an excellent packager
  • fetch included natively, great for testing

Project Structure

  • root, a slim package.json wrapping the workspaces. bun install and bun dev work here, but you need to cd into each workspace for tests.
  • packages/keryx, the framework package (publishable)
  • example/backend, the example backend application
  • example/frontend, the example Vite + React frontend
  • docs, the documentation site

Quick Start

Create a new project:

bunx keryx new my-app
cd my-app
cp .env.example .env
bun install
bun dev

Requires Bun, PostgreSQL, and Redis. See the Getting Started guide for full setup instructions (including running without Postgres or Redis for quick prototypes).

Developing the framework itself

If you're contributing to Keryx, clone the monorepo instead:

git clone https://github.com/actionhero/keryx.git
cd keryx
bun install
cp example/backend/.env.example example/backend/.env
cp example/frontend/.env.example example/frontend/.env
bun dev

Commits and PR titles must follow Conventional Commits (feat(mcp): ..., fix(web): ...). bun install installs a commit-msg hook that checks this, and CI checks PR titles.

Production Builds

bun compile
# set NODE_ENV=production in .env
bun start

Databases and Migrations

We use Drizzle as the ORM. Migrations are derived from schemas, edit your schema files in schema/*.ts, then generate and apply:

cd example/backend && bun run migrations
# restart the server, pending migrations auto-apply

Actions, CLI Commands, and Tasks

Unlike the original ActionHero, we've removed the distinction between actions, CLI commands, and tasks. They're all the same thing now. You can run any action from the CLI, schedule any action as a background task, call any action via HTTP or WebSocket, and expose any action as an MCP tool for AI agents. Same input validation, same responses, same middleware.

Web Actions

Add a web property to expose an action as an HTTP endpoint. Routes support :param path parameters and RegExp patterns, the route lives on the action itself, no separate routes.ts file:

web = { route: "/user/:id", method: HTTP_METHOD.GET };
WebSocket Actions

Enabled by default. Clients send JSON messages with { messageType: "action", action: "user:create", params: { ... } }. The server validates params through the same Zod schema and sends the response back over the socket. WebSocket connections also support channel subscriptions for real-time PubSub.

CLI Actions

Enabled by default. Every action is registered as a CLI command via Commander. The Zod schema generates --flags and --help text automatically:

./keryx.ts "user:create" --name evan --email "evantahler@gmail.com" --password password -q | jq

The -q flag suppresses logs so you get clean JSON. Use --help on any action to see its params.

Task Actions

Add a task property to schedule an action as a background job. A queue is required, and frequency is optional for recurring execution:

task = { queue: "default", frequency: 1000 * 60 * 60 }; // every hour
MCP Actions

When the MCP server is enabled (MCP_SERVER_ENABLED=true), every action is automatically registered as an MCP tool. AI agents and LLM clients (Claude Desktop, VS Code, etc.) can discover and call your actions through the standard Model Context Protocol. Actions can also be exposed as MCP resources (URI-addressed data) and prompts (named templates) via mcp.resource and mcp.prompt.

Action names are converted to valid MCP tool names by replacing : with - (e.g., user:create becomes user-create). The action's Zod schema is converted to JSON Schema for tool and prompt parameter definitions.

To exclude an action from MCP tools:

mcp = { tool: false };

To expose an action as an MCP resource or prompt:

// Resource, clients fetch this by URI
mcp = { tool: false, resource: { uri: "myapp://status", mimeType: "application/json" } };

// Prompt, clients invoke this as a named template
mcp = { tool: false, prompt: { title: "Greeting" } };

OAuth 2.1 with PKCE is used for authentication, MCP clients go through a browser-based login flow, and subsequent tool calls carry a Bearer token tied to the authenticated user's session.

Fan-Out Tasks

A parent task can distribute work across many child jobs using api.actions.fanOut() for parallel processing. Results are collected automatically in Redis. See the Tasks guide for full API and examples.

Streaming Responses

Actions can stream data by returning a StreamingResponse. The framework handles SSE, chunked binary, and cross-transport behavior automatically:

async run(params: { prompt: string }) {
  const sse = StreamingResponse.sse();

  (async () => {
    try {
      for await (const token of callLLM(params.prompt)) {
        sse.send(token, { event: "token" });
      }
      sse.close();
    } catch (e) {
      sse.sendError(String(e));
    }
  })();

  return sse;
}

Over HTTP this is native SSE; over WebSocket each chunk becomes an incremental message; over MCP chunks are forwarded as logging messages. See the Streaming guide for full details.

A Note on ActionHero

If you've used ActionHero, Keryx will feel familiar, it's the spiritual successor. I built ActionHero years ago to take the best ideas from Rails and Node.js and shove them together, and I still believe in those ideas… but the framework needed a fresh start on Bun, Zod, and Drizzle, with first-class MCP support instead of something bolted on later. Keryx is that restart.

If you're coming from ActionHero, the biggest changes are: unified controllers (actions = tasks = CLI commands = MCP tools), separate frontend and backend applications, Drizzle ORM in place of Sequelize, and MCP as a first-class transport. See the full migration guide for details.

Production Deployment

Each application has its own Dockerfile, and a docker-compose.yml runs them together. You probably won't use this exact setup in production, but it shows how the pieces fit together.

Run keryx build at image build time. It pre-generates the OpenAPI response schemas into .cache/swagger-schemas.json so the server doesn't have to derive them from your action return types on every boot:

COPY . .
RUN cd backend && bun keryx.ts build
CMD ["bun", "keryx.ts", "start"]

See the deployment guide for details.

Documentation

Full docs at keryxjs.com, including:

Questions about Keryx

What is the Keryx MCP server?

Keryx: The Fullstack TypeScript Framework for MCP and APIs. Keryx is maintained by actionhero on GitHub at actionhero/keryx, and works with AI apps that support the Model Context Protocol, such as Claude, Cursor and VS Code.

How do I install the Keryx MCP server?

Keryx doesn't publish a one-line install in the MCP registry, so follow the setup steps in its README on GitHub (actionhero/keryx). Like most servers, Keryx ends with a command or URL you paste into your AI app's MCP config.

Does Keryx need an API key?

The registry lists no required keys for Keryx. Check the Keryx README for optional settings, and expect a remote server to ask you to sign in the first time you connect.

Is Keryx an official MCP server?

No. Keryx is a community server maintained by actionhero. Community servers can be excellent; read the code and the open issues before you give Keryx access to company data.

What license is Keryx under?

Keryx is released under the MIT license, according to its GitHub repository. The license covers the code of Keryx; the service it connects to has its own terms.