binaryk/laravel-restify

Laravel REST API helpers

9.11.3 2025-08-22 09:55 UTC

This package is auto-updated.

Last update: 2025-08-24 12:06:40 UTC


README

Build Status Total Downloads Latest Stable Version License

The first fully customizable Laravel JSON:API builder with MCP and GraphQL support. "CRUD" and protect your resources with 0 (zero) extra line of code.

Save weeks of API development

⚡ Laravel Restify Templates - Save Weeks of Development

Looking to 10x your API development speed? Check out our production-ready API templates at RestifyTemplates.com. Get complete authentication, roles & permissions, team management, and more - all built on Laravel Restify. Zero configuration needed. Deploy in minutes instead of weeks.

Installation

You can install the package via composer:

composer require binaryk/laravel-restify

Playground

You can find a playground in the Restify Demo GitHub repository.

Videos

If you are a visual learner, checkout our video course for the Laravel Restify.

Quick start

Setup package:

php artisan restify:setup

Generate repository:

php artisan restify:repository Dream --all

Now you have the REST CRUD over dreams and this beautiful repository:

Now you can go into Postman and check it out:

GET: http://laravel.test/api/restify/dreams
POST: http://laravel.test/api/restify/dreams
GET: http://laravel.test/api/restify/dreams/1
PUT: http://laravel.test/api/restify/dreams/1
DELETE: http://laravel.test/api/restify/dreams/1

🤖 AI-Powered Development with MCP

Transform your existing Laravel Restify API into an MCP-enabled powerhouse in minutes! Laravel Restify's Model Context Protocol integration allows AI agents to interact directly with your API resources through structured tool interfaces.

🔥 Transform Your API in Minutes! Add one trait to your Repository class and register one route - that's it! Your entire API becomes AI-agent accessible with full security and authorization intact.

Quick Setup (2 steps):

  1. Add the trait to your Repository:
use Binaryk\LaravelRestify\MCP\Concerns\HasMcpTools;

class PostRepository extends Repository
{
    use HasMcpTools; // ✨ This enables MCP for this resource
}
  1. Register the MCP server in routes/ai.php:
use Laravel\Mcp\Facades\Mcp;
use Binaryk\LaravelRestify\MCP\RestifyServer;

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

That's it! Your API is now AI-agent ready with automatic tool generation for CRUD operations, actions, and getters.

Restify Boost

Laravel Restify provides an MCP (Model Context Protocol) server designed for developers working with Laravel Restify APIs. This server enables AI agents to access documentation, create repositories, actions, and getters through structured tools.

Repository: https://github.com/BinarCode/laravel-restify-boost

Features

  • Documentation Access: Query Laravel Restify documentation directly
  • Repository Generation: Create new repositories with proper structure
  • Action Creation: Generate custom actions for your API resources
  • Getter Development: Build custom getters for data retrieval
  • Code Examples: Get contextual code examples and best practices

Installation

composer require --dev binarcode/laravel-restify-boost
php artisan restify-boost:install

Usage with AI Agents

Configure your AI agent (Claude Desktop, etc.) to use the MCP server for enhanced Laravel Restify development assistance.

Usage

See the official documentation.

Testing

composer test

Changelog

Please see CHANGELOG for more information what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security

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

Credits

License

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