A demonstration repository showcasing the capabilities of Laravel Restify - a unified API layer for both humans and AI agents.
This repository demonstrates how Laravel Restify transforms your Eloquent models into powerful APIs that serve both traditional JSON:API endpoints and MCP (Model Context Protocol) servers for AI agents - all from one codebase.
- User Management - Complete CRUD operations for users
- Organization Management - Hierarchical organization structure
- Contact Management - Contact records with relationships
- Authentication - Laravel Sanctum integration
- MCP Server - AI agent compatibility out of the box
- ✅ JSON:API Endpoints - Full specification compliance
- ✅ MCP Server Generation - Automatic AI agent interfaces
- ✅ Unified Authorization - Same policies for humans and AI
- ✅ Search & Filtering - Powerful query capabilities
- ✅ Field Validation - Consistent rules across interfaces
- ✅ Relationships - Complex model relationships
-
Clone and Install
git clone https://github.com/BinarCode/restify-demo.git cd restify-demo composer install -
Setup Environment
cp .env.example .env php artisan key:generate php artisan migrate --seed
-
Serve the Application
php artisan serve
-
Explore the APIs
- JSON:API:
http://localhost:8000/api/restify/users - MCP Server:
http://localhost:8000/mcp/restify
- JSON:API:
# Get all users GET /api/restify/users # Create a user POST /api/restify/users Content-Type: application/vnd.api+json { "data": { "type": "users", "attributes": { "name": "John Doe", "email": "john@example.com" } } }The same repositories automatically provide MCP tools for AI agents:
# Get available tools GET /mcp/restify # AI agents can use tools like: # - users-index-tool # - users-store-tool # - organizations-index-tool # - contacts-index-tool- Laravel Restify - Main package repository
- Documentation - Complete guides and API reference
- BinarCode - The company behind Laravel Restify
- Restify Templates - Production-ready starter kits
This is a demo repository. For contributing to Laravel Restify itself, please visit the main repository.
This demo is open-sourced software licensed under the MIT license.