Laravel Restify
Laravel API for Ai Agents and humans.
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
Maintainer
Works with
Installation
Manual Installation
npx laravel-restifyConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
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)
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-restifyRun the setup command
Execute the Artisan setup command to publish configuration files and register the Restify service in your application.
php artisan restify:setupGenerate 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 --allConfigure 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,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}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.
Laravel Restify Alternatives — Similar APIs Servers
Looking for alternatives to Laravel Restify? Here are other popular apis servers you can use with Claude, Cursor, and VS Code.
Kong
★ 43.4k🦍 The API and AI Gateway
API Mega List
★ 5.4kThis GitHub repo is a powerhouse collection of APIs you can start using immediately to build everything from simple automations to full-scale applications. One of the most valuable API lists on GitHub—period. 💪
Fetch
★ 5.4kFetch web content and convert to markdown for AI consumption
Fusio
★ 2.1kSelf-Hosted API Management for Builders
Korean Law
★ 1.8k국가법령정보MCP v4.0 | 법제처 41개 API → 17개 MCP 도구. 법령·판례·조례 검색 + LLM 환각 방지 인용검증 + 조문 영향 그래프(impact_map) + 시점 비교 자동 diff(time_travel) + 시민 5단계 실행 가이드(action_plan) | 41 Korean legal APIs → 17 MCP tools
RuleGo
★ 1.5k⛓️RuleGo is a lightweight, high-performance, embedded, next-generation component orchestration rule engine framework for Go.
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.
Set Up Laravel Restify in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
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.