cd /news/ai-tools/agentback-ai-native-api-mcp-framewor… Β· home β€Ί topics β€Ί ai-tools β€Ί article
[ARTICLE Β· art-28504] src=agentback.dev β†— pub= topic=ai-tools verified=true sentiment=↑ positive

AgentBack: AI-native API/MCP framework for agents

AgentBack, an AI-native API and MCP framework for building agent services, has been released as an alpha, ESM-only package requiring Node 22.13+ and TypeScript 6. Built on LoopBack 4's dependency-injection core, it allows developers to define a single Zod schema that automatically generates REST endpoints, MCP tools, OpenAPI docs, typed clients, and validation, eliminating contract drift. The framework includes machine-actionable errors, agent-readable documentation, and built-in support for auth, metering, and observability.

read3 min views4 publishedJun 15, 2026

Proven DI core

A hierarchical Context

of Binding

s with @inject

, providers, interceptors, extension points, and tag-based discovery β€” ported from LoopBack 4.

Dependency injection β†’ Agent-native, end to end

AgentBack gives your REST endpoints, MCP tools, OpenAPI docs, typed clients, and validation one Zod contract β€” one schema, every boundary. Agents consume that surface with machine-actionable errors, /llms.txt

, and MCP tools; and because there's a single source of truth, a coding agent can author the whole surface from it without drift. Built on LoopBack 4's proven dependency-injection core, rebuilt for ESM and Node 22.

alpha Β· ESM-only Β· Node 22.13+ Β· TypeScript 6

One artifact, many views

Declare a schema once, on the decorator. The framework derives every other representation from it β€” so a coding agent adds a surface in one edit and nothing drifts.

z.infer

type/openapi.json

, rendered in Swagger UI /llms.txt

Positioning

Most stacks keep the runtime contract, the service contract, and the agent contract in three hand-synchronized places.

Stack Runtime contract Service contract Agent/tool contract
Express + raw Zod Hand-wired Zod Hand-written OpenAPI Hand-written manifest
tRPC Zod TypeScript-only Custom adapter
NestJS class-validator Swagger decorators Custom adapter
FastAPI Pydantic OpenAPI from same models Custom adapter
AgentBack Zod OpenAPI from same Zod MCP from same Zod

What's in the box

A hierarchical Context

of Binding

s with @inject

, providers, interceptors, extension points, and tag-based discovery β€” ported from LoopBack 4.

REST and MCP servers are components over the same container. Run either, or both from one process β€” controllers and tool classes are just bindings.

Stable codes, per-field issues, the violated schema, retryability, and remediation hints β€” the same machine-actionable envelope on REST and MCP.

confirm:

payload-bound confirmation tokens and idempotency:

key replay, declared on the route or tool that must not run twice.

@price('$0.001') meters a route or tool; the price gate refuses unpaid calls with an x402/MPP challenge. Stripe metered billing from the same usage log.

TypeScript consumers import the same schemas and get typed calls plus runtime validation β€” the client never imports a running server.

Every tool definition costs context-window tokens on every connection. toolCostReport

token-prices the MCP surface before agents pay for it.

Auth (JWT, OAuth 2.1), authorization voters, health probes, Prometheus metrics, OpenTelemetry, rate limiting, validated config β€” all as DI components.

Documentation

Three ideas carry the whole framework: everything is a binding in a context, schemas live once on the decorator, and servers are components.

For coding agents AgentBack ships an agent skill that teaches Claude Code, Codex, Cursor, and 20+ other agents the conventions that aren't guessable from type signatures β€” schema-on-decorator, the slot-0 input bundle, the DI container. One Zod schema is the only source of truth, so an agent adds a route, its MCP tool, and its docs in a single edit without drift. The docs are agent-readable too β€”

[/llms.txt](llms.txt),
[/llms-full.txt](llms-full.txt), and a markdown mirror of

every page β€” so the agent reads the framework the way it reads your API.

Built with AgentBack

Not a snippet β€” a real service. agentback-demo

is a Weather server where one Zod schema set is served over stdio, authenticated HTTP, and a dev console. It's the shape a coding agent and the skill produce: one contract fanning out to REST, MCP, a typed client, and docs, with nothing kept in sync by hand.

One Zod schema set, served three ways β€” stdio, authenticated HTTP, and a dev console. Backed by the free Open-Meteo API.

AgentError

, /llms.txt

, tool-cost reportQuick start

AgentBack is in alpha β€” the end-to-end examples work and the API surface is still moving. Clone the repo and run a working REST, MCP, or hybrid app, each with its explorer UI.

── more in #ai-tools 4 stories Β· sorted by recency
── more on @agentback 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain β€” perfect for shipping the agent you just read about.

$git push zahid main
β†’ Live at https://your-agent.zahid.host βœ“
Get free account β†’ Pricing
from €0/mo Β· no card required
LIVE [news/agentback-ai-native-…] indexed:0 read:3min 2026-06-15 Β· β€”