Laravel Restify

v1.0.0APIsstable

Laravel API for Ai Agents and humans.

ailaravelmcpmcp-climcp-client
Share:
675
Stars
0
Downloads
0
Weekly
0/5

What is Laravel Restify?

Laravel Restify is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to laravel api for ai agents and humans.

Laravel API for Ai Agents and humans.

This server falls under the APIs category on MCPgee, the world's largest MCP server directory with 33,000+ servers.

Features

  • Laravel API for Ai Agents and humans.

Use Cases

REST API for AI agents and humans
Laravel integration
Flexible endpoint configuration
BinarCode

Maintainer

LicenseMIT
Languagephp
Versionv1.0.0
UpdatedMay 16, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx laravel-restify

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

How to Set Up and Use Laravel Restify

Laravel Restify is a PHP package that turns any Laravel application into a fully featured JSON:API-compliant REST API with zero boilerplate — it auto-generates list, create, retrieve, update, and delete endpoints for every Eloquent model you register. Originally built for human developers consuming REST APIs, it has been extended to serve AI agents that need structured data access to Laravel-backed systems. Teams use it to rapidly expose their existing Laravel models to both traditional frontends and LLM-powered agents via MCP.

Prerequisites

  • PHP 8.1 or higher with Composer installed
  • A Laravel 10 or 11 application
  • An MCP client capable of connecting to the generated REST API (e.g. via an HTTP MCP bridge)
  • Database configured in your Laravel .env file (MySQL, PostgreSQL, or SQLite)
1

Install the package via Composer

Add laravel-restify to your Laravel project using Composer. This pulls in the package and registers its service provider automatically.

composer require binaryk/laravel-restify
2

Run the setup command

Execute the Artisan setup command to publish configuration files and register the Restify service in your application.

php artisan restify:setup
3

Generate a repository for your model

Use the repository generator to create a Restify repository class for any Eloquent model. The --all flag generates all CRUD endpoints automatically.

php artisan restify:repository Post --all
4

Configure authentication and access

Edit config/restify.php to set your API prefix, authentication guards, and authorization policies. By default the API is mounted at /api/restify.

# In config/restify.php
'prefix' => 'api/restify',
'auth_middleware' => ['auth:sanctum'],
'default_per_page' => 15,
5

Access your auto-generated endpoints

Your Eloquent models are now accessible via the standard JSON:API endpoints. An AI agent or MCP proxy can call these URLs to query and manipulate data.

# List all posts
GET /api/restify/posts

# Create a post
POST /api/restify/posts

# Retrieve a specific post
GET /api/restify/posts/{id}

# Update a post
PUT /api/restify/posts/{id}

# Delete a post
DELETE /api/restify/posts/{id}
6

Connect via MCP (Claude Desktop)

Because Laravel Restify is a PHP package exposing HTTP endpoints rather than a native MCP binary, connect it to Claude Desktop through an HTTP-to-MCP bridge or the npx launcher if available.

{
  "mcpServers": {
    "laravel-restify": {
      "command": "npx",
      "args": ["laravel-restify"]
    }
  }
}

Laravel Restify Examples

Client configuration

Claude Desktop configuration to launch the Laravel Restify MCP bridge.

{
  "mcpServers": {
    "laravel-restify": {
      "command": "npx",
      "args": ["laravel-restify"]
    }
  }
}

Prompts to try

Example prompts for interacting with a Laravel application's data via AI agents.

- "List all posts from the Laravel API and summarize the titles"
- "Create a new post with the title 'AI Trends 2025' and the body I'll provide"
- "Find the post with id 42 and update its status to published"
- "Delete all draft posts from the database"

Troubleshooting Laravel Restify

401 Unauthorized errors when calling Restify endpoints

Ensure your auth_middleware in config/restify.php matches your application's authentication setup. For public APIs during development, you can temporarily remove the auth middleware from the config.

php artisan restify:setup fails with 'class not found'

Run composer dump-autoload after installation and ensure your .env file has APP_KEY set (run php artisan key:generate if needed). Clear the config cache with php artisan config:clear.

Generated endpoints return 404 for valid model routes

Confirm the repository class extends the correct base class and is registered in your RestifyServiceProvider or in the boot method of an AppServiceProvider. Run php artisan route:list | grep restify to verify routes are registered.

Frequently Asked Questions about Laravel Restify

What is Laravel Restify?

Laravel Restify is a Model Context Protocol (MCP) server that laravel api for ai agents and humans. It connects AI assistants to external tools and data sources through a standardized interface.

How do I install Laravel Restify?

Follow the installation instructions on the Laravel Restify GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.

Which AI clients work with Laravel Restify?

Laravel Restify works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.

Is Laravel Restify free to use?

Yes, Laravel Restify is open source and available under the MIT license. You can use it freely in both personal and commercial projects.

Browse More APIs MCP Servers

Explore all apis servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.

Quick Config Preview

{ "mcpServers": { "laravel-restify": { "command": "npx", "args": ["-y", "laravel-restify"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

Ready to use Laravel Restify?

Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.

33,000+ ServersFree & Open SourceStep-by-Step Guides