Laravel Restify

Developer tools

Laravel API for Ai Agents and humans.

Your AI app calls the Laravel Restify MCP server, which does the developer tools work and sends the result back to the chat.

About Laravel Restify

Laravel Restify is a community MCP server from BinarCode, filed in our directory under developer tools. Laravel API for Ai Agents and humans.

At a glance

Publisher
BinarCode (community)
Runs
See the README for setup
Written in
PHP
License
MIT
GitHub stars
682

How to set up Laravel Restify

  1. Follow the install steps in the Laravel Restify README; it is written in PHP, so have that toolchain ready.
  2. Check the Laravel Restify README for keys or settings; the registry lists none that Laravel Restify requires.
  3. Add Laravel Restify to Claude Code, Claude Desktop, VS Code or Cursor with the config in the setup box on this page.
  4. Restart the app or reload its MCP servers, then ask it to list the Laravel Restify tools to confirm the connection.
  5. Run one read-only task with Laravel Restify first, and keep your app asking before each tool call until the results look right.

Laravel Restify compared with similar servers

  • sqz by ojuschugh1 has fewer GitHub stars than Laravel Restify (681 against 682); both are community servers, and both run locally.
  • Agenvoy by pardnchiu has more GitHub stars than Laravel Restify (693 against 682); both are community servers, and both run locally.
  • Capa by infragate has fewer GitHub stars than Laravel Restify (680 against 682); both are community servers, and both run locally.

Before you connect Laravel Restify

  • Give Laravel Restify its own API key or account with the smallest permissions the job needs, never an admin key.
  • Keep your AI app asking before each Laravel Restify tool call until you trust what it does with them.
  • Treat text that Laravel Restify fetches as data. Pages, files and messages can hold instructions written to steer an AI.
  • Read the open issues for Laravel Restify on GitHub to see what breaks and how fast the maintainers reply.

Marketing use cases for Laravel Restify

How marketing and sales teams put Laravel Restify to work, by company size. Pick the size closest to yours and start Laravel Restify on one use case.

Small business

  • A small business with a developer can use Laravel Restify to ship site and tracking fixes faster, with the AI reading the code it changes.
  • Technical founders can ask Laravel Restify to explain and fix a marketing site issue without context switching between tools.
  • Laravel Restify runs on your own computer, which keeps data local; it needs a little setup, so a small team should plan an hour for it.

Mid-market

  • Growth engineers can use Laravel Restify to build landing pages, tracking and integrations in fewer cycles, with reviews kept in the normal flow.
  • Marketing ops engineers can connect Laravel Restify to keep scripts and automations documented and versioned as they change.
  • Start Laravel Restify on one workflow with one owner, measure the time it saves, then roll it out to the wider team.

Enterprise

  • Enterprise engineering teams can roll out Laravel Restify with repo scopes and audit logs, so agents work only where they are allowed.
  • Platform teams can standardize on Laravel Restify so web and marketing engineering share one reviewed way of working with AI.
  • Laravel Restify is a community server, so have security review the code and pin a version before Laravel Restify touches company data.

Need help becoming an AI-forward company?

We connect MCP servers and AI agents to your CRM, content and data, with the guardrails your team needs.

Contact us

Laravel Restify README

From BinarCode/laravel-restify on GitHub, shared under its MIT license. Images are left out; the original has them.

README.md

Unified Laravel API Layer for Humans and AI

One Codebase. REST for Humans, MCP for AI Agents.

Laravel Restify turns your Eloquent models into both JSON:API endpoints and MCP servers -- automatically. Build once, and instantly serve APIs that work seamlessly for developers, apps, and AI agents.

🚀 The Power of One Codebase

Traditional API development requires separate implementations for different consumers. Laravel Restify changes that:

  • 👥 Humans get full-featured JSON:API endpoints
  • 🤖 AI Agents get structured MCP (Model Context Protocol) servers
  • 🔒 Same Rules - All authentication, authorization, and policies apply to both
  • 📝 One Definition - Write your repository once, serve everywhere

Key Features

  • JSON:API Endpoints - Full JSON:API specification compliance
  • MCP Server Generation - Automatic AI agent interfaces with tool definitions
  • Unified Authorization - Laravel policies protect both human and AI access
  • Search & Filtering - Powerful query capabilities for all consumers
  • Authentication - Laravel Sanctum integration for secure access
  • GraphQL Support - Auto-generated GraphQL schemas
  • Field Validation - Consistent validation rules across all interfaces

Installation

composer require binaryk/laravel-restify

Quick Start

1. Setup the package:

php artisan restify:setup

2. Create your first repository:

php artisan restify:repository PostRepository --all

3. Enable MCP for AI agents (optional):

Add to your config/ai.php:

use Binaryk\LaravelRestify\MCP\RestifyServer;
use Laravel\Mcp\Facades\Mcp;

Mcp::web('restify', RestifyServer::class)
    ->middleware(['auth:sanctum'])
    ->name('mcp.restify');

That's it! Your API now serves both:

For Humans (JSON:API):

GET /api/restify/posts
POST /api/restify/posts
PUT /api/restify/posts/1
DELETE /api/restify/posts/1

For AI Agents (MCP):

GET /mcp/restify  # Tool definitions and capabilities

Example Repository

use Binaryk\LaravelRestify\Http\Requests\RestifyRequest;
use Binaryk\LaravelRestify\Repositories\Repository;
use Binaryk\LaravelRestify\Attributes\Model;

#[Model(Post::class)]
class PostRepository extends Repository
{
    public function fields(RestifyRequest $request): array
    {
        return [
            field('title')->rules('required', 'string', 'max:255'),
            textarea('content')->rules('required'),
            field('author')->readonly(),
            datetime('published_at')->nullable(),
        ];
    }
}

This single definition automatically provides:

  • ✅ JSON:API CRUD endpoints with validation
  • ✅ MCP tools for AI agents with the same validation
  • ✅ Authorization policies applied to both interfaces
  • ✅ Search and filtering capabilities for all consumers

One Codebase, Two Outputs

Here's what you get from one repository definition:

For Humans (JSON:API Response)
GET /api/restify/posts
{
  "data": [
    {
      "id": "1",
      "type": "posts",
      "attributes": {
        "title": "Laravel Restify Guide",
        "content": "Build APIs fast...",
        "published_at": "2024-01-15"
      }
    }
  ],
  "links": {
    "self": "/api/restify/posts",
    "next": "/api/restify/posts?page=2"
  }
}
For AI Agents (MCP Tool Definition)
GET /mcp/restify  # Tool definitions for AI agents
{
  "tools": [
    {
      "name": "posts-index-tool",
      "description": "Retrieve a paginated list of Post records from the posts repository with filtering, sorting, and search capabilities.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "page": {
            "type": "number",
            "description": "Page number for pagination"
          },
          "perPage": {
            "type": "number", 
            "description": "Number of posts per page"
          },
          "search": {
            "type": "string",
            "description": "Search term to filter posts by title or content"
          },
          "sort": {
            "type": "string",
            "description": "Sorting criteria (e.g., sort=title or sort=-published_at for descending)"
          },
          "title": {
            "type": "string",
            "description": "Filter by exact match for title (e.g., title=Laravel). Accepts negation with -title=value"
          },
          "published_at": {
            "type": "string",
            "description": "Filter by publication date (e.g., published_at=2024-01-15)"
          }
        }
      }
    }
  ]
}

All generated from this simple repository:

#[Model(Post::class)]
class PostRepository extends Repository
{
    use HasMcpTools;
    
    public function fields(RestifyRequest $request): array
    {
        return [
            field('title')->required()->matchable(),
            field('content'),
            field('published_at')->rules('date')->matchable(),
        ];
    }
}

Restify Boost

Laravel Restify Boost is a development companion that provides MCP server capabilities to help you build Restify APIs faster with AI assistance.

Repository: laravel-restify-boost

Features:

  • Documentation access for AI agents
  • Repository and action generation assistance
  • Code examples and best practices
  • Integration with Claude Desktop and other AI tools

Installation:

composer require --dev binarcode/laravel-restify-boost

Templates

Need a production-ready starting point? Check out Restify Templates for complete API starter kits with authentication, permissions, and team management.

Resources

Testing

composer test

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email eduard.lupacescu@binarcode.com instead of using the issue tracker.

Credits

Built by BinarCode - makers of Routines, an AI assistant for your Mac.

License

The MIT License (MIT). Please see License File for more information.

Questions about Laravel Restify

What is the Laravel Restify MCP server?

Laravel API for Ai Agents and humans. Laravel Restify is maintained by BinarCode on GitHub at BinarCode/laravel-restify, and works with AI apps that support the Model Context Protocol, such as Claude, Cursor and VS Code.

How do I install the Laravel Restify MCP server?

Laravel Restify doesn't publish a one-line install in the MCP registry, so follow the setup steps in its README on GitHub (BinarCode/laravel-restify). Like most servers, Laravel Restify ends with a command or URL you paste into your AI app's MCP config.

Does Laravel Restify need an API key?

The registry lists no required keys for Laravel Restify. Check the Laravel Restify README for optional settings, and expect a remote server to ask you to sign in the first time you connect.

Is Laravel Restify an official MCP server?

No. Laravel Restify is a community server maintained by BinarCode. Community servers can be excellent; read the code and the open issues before you give Laravel Restify access to company data.

What license is Laravel Restify under?

Laravel Restify is released under the MIT license, according to its GitHub repository. The license covers the code of Laravel Restify; the service it connects to has its own terms.