You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The first Laravel API library for Ai Agents and Humans with the same codebase.
10
+
# Unified Laravel API Layer for Humans and AI
11
11
12
-
Restify is a customizable Laravel [JSON:API](https://jsonapi.org) and MCP Server library.
12
+
**One Codebase. REST for Humans, MCP for AI Agents.**
13
13
14
-
<div>
15
-
<ahref="https://restifytemplates.com">
16
-
<imgalt="Save weeks of API development"src="/docs-v2/static/starter-kit.png">
17
-
</a>
18
-
</div>
14
+
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.
19
15
20
-
## ⚡ Laravel Restify Templates - Save Weeks of Development
16
+
## 🚀 The Power of One Codebase
21
17
22
-
Looking to 10x your API development speed? Check out our production-ready API templates at [RestifyTemplates.com](https://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.
18
+
Traditional API development requires separate implementations for different consumers. Laravel Restify changes that:
23
19
24
-
## Installation
20
+
-**👥 Humans** get full-featured JSON:API endpoints
21
+
-**🤖 AI Agents** get structured MCP (Model Context Protocol) servers
22
+
-**🔒 Same Rules** - All authentication, authorization, and policies apply to both
23
+
-**📝 One Definition** - Write your repository once, serve everywhere
24
+
25
+
## Key Features
26
+
27
+
-**JSON:API Endpoints** - Full [JSON:API](https://jsonapi.org) specification compliance
28
+
-**MCP Server Generation** - Automatic AI agent interfaces with tool definitions
29
+
-**Unified Authorization** - Laravel policies protect both human and AI access
30
+
-**Search & Filtering** - Powerful query capabilities for all consumers
31
+
-**Authentication** - Laravel Sanctum integration for secure access
GET /mcp/restify# Tool definitions and capabilities
74
78
```
75
79
76
-
```bash
77
-
DELETE: http://laravel.test/api/restify/dreams/1
78
-
```
80
+
## Example Repository
79
81
80
-
## 🤖 AI-Powered Development with MCP
82
+
```php
83
+
use Binaryk\LaravelRestify\Http\Requests\RestifyRequest;
84
+
use Binaryk\LaravelRestify\Repositories\Repository;
85
+
use Binaryk\LaravelRestify\Attributes\Model;
81
86
82
-
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.
87
+
#[Model(Post::class)]
88
+
class PostRepository extends Repository
89
+
{
90
+
public function fields(RestifyRequest $request): array
> **🔥 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.
102
+
This single definition automatically provides:
103
+
- ✅ JSON:API CRUD endpoints with validation
104
+
- ✅ MCP tools for AI agents with the same validation
105
+
- ✅ Authorization policies applied to both interfaces
106
+
- ✅ Search and filtering capabilities for all consumers
85
107
86
-
**Quick Setup (2 steps):**
108
+
## One Codebase, Two Outputs
87
109
88
-
1.**Add the trait to your Repository:**
89
-
```php
90
-
use Binaryk\LaravelRestify\MCP\Concerns\HasMcpTools;
110
+
Here's what you get from one repository definition:
91
111
92
-
class PostRepository extends Repository
112
+
### For Humans (JSON:API Response)
113
+
```bash
114
+
GET /api/restify/posts
115
+
```
116
+
117
+
```json
93
118
{
94
-
use HasMcpTools; // ✨ This enables MCP for this resource
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.
Configure your AI agent (Claude Desktop, etc.) to use the MCP server for enhanced Laravel Restify development assistance.
219
+
Need a production-ready starting point? Check out [Restify Templates](https://restifytemplates.com) for complete API starter kits with authentication, permissions, and team management.
132
220
133
-
## Usage
221
+
## Resources
134
222
135
-
See the [official documentation](https://restify.binarcode.com).
223
+
-**[Documentation](https://restify.binarcode.com)** - Complete guides and API reference
224
+
-**[Demo Repository](https://github.com/BinarCode/restify-demo)** - Working example
Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.
146
-
147
233
## Contributing
148
234
149
235
Please see [CONTRIBUTING](CONTRIBUTING.md) for details.
150
236
151
-
###Security
237
+
## Security
152
238
153
-
If you discover any security related issues, please email [email protected]or [message me on twitter](https://twitter.com/LupacescuEuard)instead of using the issue tracker.
239
+
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
154
240
155
241
## Credits
156
242
@@ -160,5 +246,4 @@ If you discover any security related issues, please email eduard.lupacescu@binar
160
246
161
247
## License
162
248
163
-
The MIT License (MIT). Please see [License File](LICENSE.md) for more information.
164
-
249
+
The MIT License (MIT). Please see [License File](LICENSE.md) for more information.
0 commit comments