AK

actionhero/keryx

API development공식

이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요. 원문 보기

46 stars 5 forks 품질 75 트렌드 35MIT

Keryx: MCP 및 API를 위한 Fullstack TypeScript Framework

개요

MCP 및 API를 위한 Fullstack TypeScript 프레임워크. Keryx 뒤에 큰 아이디어: 단일 작업 클래스는 HTTP 요청, WebSocket 메시지, CLI 명령, 배경 작업 및 MCP 도구 호출을 처리 - 동일한 입력, 같은 Zod 유효성 검사, 같은 미들웨어, 같은 응답. 당신은 논리를 한 번 작성; 변경 유일한 것은 요청이 도착하고 응답이 전달되는 방법이다. 그 마지막 교통 - MCP - 내가 지금 구축 한 이유입니다. 모든 작업은 자동으로 MCP 도구이므로 AI 에이전트는 내장 된 OAuth 2.1, 입력 오류를 얻을, 정확한 동일한 유효 엔드 포인트 HTTP 클라이언트를 호출. 두 번째 MCP 서버가 유지하고 동기화를 유지하기 위해 스키마가 없습니다 ... 앱을 작성하여 에이전트에 노출합니다. 그리고 그것은 진짜 백엔드, 장난감.

개요(AI 번역)

MCP 및 API를 위한 Fullstack TypeScript 프레임워크.

이 프로젝트는 무엇입니까?

Keryx 뒤에 큰 아이디어 : ** 한 번 컨트롤러를 묶고, 어디서나 작동합니다. ** 단일 작업 클래스는 HTTP 요청, WebSocket 메시지, CLI 명령, 배경 작업 및 MCP 도구 호출을 처리 - 동일한 입력, 동일한 Zod 유효성 검사, 동일한 미들웨어, 동일한 응답. 당신은 논리를 한 번 작성; 변경 유일한 것은 요청이 도착하고 응답이 전달되는 방법이다.

그 마지막 교통 - MCP - 내가 지금 구축 한 이유입니다. 모든 작업은 자동으로 MCP 도구이므로 AI 에이전트는 내장 된 OAuth 2.1, 입력 오류를 얻을, 정확한 동일한 유효 엔드 포인트 HTTP 클라이언트를 호출. 두 번째 MCP 서버가 유지하고 동기화를 유지하기 위해 스키마가 없습니다 … 앱을 작성하여 에이전트에 노출합니다.

그리고 그것은 진짜 백엔드, 장난감.

이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요.

README

원문 README의 일부입니다. 원문 보기.

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) {
    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":"[email protected]","password":"secret123"}'

WebSocket — send a JSON message over an open connection:

{ "messageType": "action", "action": "user:create",
  "params": { "name": "Evan", "email": "[email protected]", "password": "secret123" } }

CLI — flags are generated from the Zod schema automatically:

./keryx.ts "user:create" --name Evan --email [email protected] --password secret123 -q | jq

Background Task — enqueued to a Resque worker via Redis:

GitHub에서 전체 README 보기

설치

This server does not publish a one-line install command.

Open the repository installation guide MCP 초보자라면? mcpskill.org 가이드부터 시작하세요 →

설정

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