One Laravel repo, two APIs: humans get REST, AI agents get MCP
Laravel Restify auto-generates both JSON:API endpoints and Model Context Protocol servers from a single Eloquent repository definition.

What it does
Laravel Restify is a package that wraps your Eloquent models in a repository class and, from that one definition, spits out full JSON:API endpoints for regular developers and MCP (Model Context Protocol) tool definitions for AI agents. Same validation rules, same authorization policies, same search and filtering—both audiences eat from the same kitchen.
The interesting bit
The MCP angle is the twist. Instead of bolting on an AI integration later, Restify treats MCP as a first-class output format alongside JSON:API. Add a HasMcpTools trait and your repository suddenly exposes structured tool schemas that agents like Claude can discover and call. The README’s “one codebase, two outputs” pitch is actually demonstrated with concrete request/response examples, which is rarer than you’d think.
Key highlights
- JSON:API spec-compliant CRUD auto-generated from a
Repositoryclass with an#[Model]attribute - MCP server generation via
HasMcpToolstrait; tool schemas include pagination, search, sort, and per-field filters - Laravel policies and Sanctum auth apply uniformly to both human and AI consumers
- GraphQL support mentioned but not detailed in the README
- Optional dev companion package
laravel-restify-boostfor AI-assisted scaffolding - Commercial starter templates available at restifytemplates.com
Caveats
- GraphQL support is listed as a key feature but receives no documentation or examples in the README
- MCP setup requires a separate
config/ai.phpregistration step that’s easy to miss; the “optional” label undersells its importance if you actually want MCP - The “Boost” companion package and commercial templates are prominently linked, so the ecosystem has a funnel
Verdict
Worth a look if you’re building Laravel APIs today and want to future-proof against AI agent consumption without maintaining two parallel interfaces. Skip it if you’re not on Laravel, or if you need fine-grained control over your API formats—this is opinionated scaffolding, not a blank canvas.