Open source · MIT · version 0.1

Turn your APIs into tools AI assistants can use

Describe an HTTP API in a short YAML file, or write tools in TypeScript, and Kervan serves them as an MCP server that your AI client, such as Claude Code, can call.

Create a project
npm create kervan@latest my-server
Documentation
How Kervan works, in one lineYour kervan.yaml spec or TypeScript code goes into Kervan, which checks and limits every call and serves the tools over MCP, on stdio or HTTP, to your AI client, such as Claude Code.Your spec or codekervan.yaml or TypeScriptKervanchecks and limits each callMCP toolsover stdio or HTTPAI clientsuch as Claude Code How Kervan works, step by stepYour kervan.yaml spec or TypeScript code goes into Kervan, which checks and limits every call and serves the tools over MCP, on stdio or HTTP, to your AI client, such as Claude Code.Your spec or codekervan.yaml or TypeScriptKervanchecks and limits each callMCP toolsover stdio or HTTPAI clientsuch as Claude Code

This is all it takes

TypeScript

server.ts
import { createApp, z } from "@kervan/core"
import { serve } from "@kervan/transport/node"

const app = createApp({ name: "weather", version: "0.1.0" })
app.tool("get_current_weather", {
  description: "Current temperature (°C) and wind speed (km/h) at a latitude and longitude.",
  input: z.object({ lat: z.number(), lon: z.number() }),
  handler: async ({ lat, lon }) => {
    const url = `https://api.open-meteo.com/v1/forecast?latitude=${lat}&longitude=${lon}&current=temperature_2m,wind_speed_10m`
    return JSON.stringify((await (await fetch(url)).json()).current)
  },
})

await serve(app)

YAML

kervan.yaml
specVersion: 1
name: weather
version: 0.1.0
tools:
  - name: get_current_weather
    description: Current temperature (°C) and wind speed (km/h) at a latitude and longitude.
    input: { type: object, properties: { lat: { type: number }, lon: { type: number } }, required: [lat, lon] }
    http:
      url: https://api.open-meteo.com/v1/forecast
      query: { latitude: "{{input.lat}}", longitude: "{{input.lon}}", current: "temperature_2m,wind_speed_10m" }
    output: { select: "current" }
npx kervan@latest dev server.ts (or kervan.yaml)
kervan> tools
  get_current_weather  Current temperature (°C) and wind speed (km/h) at a latitude and longitude.

The tool an AI client sees. Next: the quickstart.

Why Kervan

  • Safe by default

    Spec tools reach public addresses only, keep secrets out of results, errors and logs, and every call has a timeout.

  • YAML or TypeScript

    Describe HTTP tools in YAML, or write them in TypeScript on the official MCP SDK; both get the same checks.

  • Current MCP

    Speaks the stateless MCP 2026-07-28 revision, and serves clients of the 2025 revisions from the same app.

Kervan Studio, optional

A self-hosted web UI to manage servers, secrets, users and logs. The framework works without it.