Turn your API into
tools agents trust.
Contrakt scans your Next.js routes, generates a live contract, detects schema drift, and outputs MCP tools — all from your existing code.
01 — Scan
Your code is the documentation.
Point Contrakt at your Next.js project. It reads your route handlers and infers every type, param, and response — no annotations, no decorators, no separate schema file.
Read the docs02 — MCP
One command. Every agent.
Run contrakt mcp and get a machine-readable tool manifest. Agents using Claude, Cursor, or Codex can call your endpoints directly — without you writing a single wrapper.
View MCP docs{
"schema_version": "1.0",
"name": "storefront-api",
"tools": [
{
"name": "create_order",
"description": "Place a new order",
"inputSchema": {
"required": ["product_id"],
"properties": {
"product_id": { "type": "string" },
"quantity": { "type": "integer" },
"currency": { "type": "string" }
}
}
}
]
}03 — Drift
Break it in code. Not in production.
Run contrakt check in CI. Every deploy is compared against the last contract. New required fields, renamed params, changed shapes — caught before agents encounter them.
CI integration guide04 — Registry
Publish once. Discovered forever.
Push your contract to the registry. Agents and developers find your API, inspect its schema, and subscribe to change notifications — without asking you.
Browse registry