|
| 1 | +--- |
| 2 | +title: Model Context Protocol (MCP) |
| 3 | +menuTitle: MCP Docs CLI |
| 4 | +category: MCP |
| 5 | +position: 1 |
| 6 | +--- |
| 7 | + |
| 8 | +Laravel Restify provides seamless integration with the Model Context Protocol (MCP), allowing AI agents to interact with your REST API resources through structured tool interfaces. This enables powerful AI-driven data access and manipulation while maintaining security and control. |
| 9 | + |
| 10 | +## MCP Server for Laravel Restify Developers |
| 11 | + |
| 12 | +In addition to MCP integration within your Laravel Restify applications, we provide a dedicated **MCP server for developers** that enhances the development experience when working with Laravel Restify APIs. |
| 13 | + |
| 14 | +**Repository**: [https://github.com/BinarCode/laravel-restify-mcp](https://github.com/BinarCode/laravel-restify-mcp) |
| 15 | + |
| 16 | +### Developer MCP Server Features |
| 17 | + |
| 18 | +The Laravel Restify MCP server provides AI agents with powerful development tools: |
| 19 | + |
| 20 | +- **📚 Documentation Access**: Query Laravel Restify documentation directly from your AI agent |
| 21 | +- **🏗️ Repository Generation**: Create new repositories with proper structure and conventions |
| 22 | +- **⚡ Action Creation**: Generate custom actions for your API resources with validation and best practices |
| 23 | +- **🔍 Getter Development**: Build custom getters for specialized data retrieval operations |
| 24 | +- **💡 Code Examples**: Get contextual code examples and implementation guidance |
| 25 | +- **🎯 Best Practices**: Receive Laravel Restify best practices and architectural guidance |
| 26 | + |
| 27 | +### Installation & Setup |
| 28 | + |
| 29 | +#### Install the MCP Server |
| 30 | + |
| 31 | +```bash |
| 32 | +composer require --dev binarcode/laravel-restify-mcp |
| 33 | +``` |
| 34 | + |
| 35 | +#### Configure AI Agents |
| 36 | + |
| 37 | +Configure your AI agent (Claude Desktop, Cursor, etc.) to use the MCP server: |
| 38 | + |
| 39 | +```json |
| 40 | +{ |
| 41 | + "mcpServers": { |
| 42 | + "laravel-restify": { |
| 43 | + "command": "laravel-restify-mcp", |
| 44 | + "args": [] |
| 45 | + } |
| 46 | + } |
| 47 | +} |
| 48 | +``` |
| 49 | + |
| 50 | +#### Usage Examples |
| 51 | + |
| 52 | +Once configured, your AI agent can help with: |
| 53 | + |
| 54 | +**Creating Repositories:** |
| 55 | +``` |
| 56 | +AI: Create a PostRepository with title, content, and author fields |
| 57 | +``` |
| 58 | + |
| 59 | +**Generating Actions:** |
| 60 | +``` |
| 61 | +AI: Create a PublishPostAction that validates publish dates and notifies subscribers |
| 62 | +``` |
| 63 | + |
| 64 | +**Building Getters:** |
| 65 | +``` |
| 66 | +AI: Generate a PostAnalyticsGetter that returns engagement metrics for date ranges |
| 67 | +``` |
| 68 | + |
| 69 | +**Documentation Queries:** |
| 70 | +``` |
| 71 | +AI: How do I implement field validation in Laravel Restify? |
| 72 | +AI: Show me examples of custom repository authorization |
| 73 | +``` |
0 commit comments