Download the PHP package innoge/laravel-mcp without Composer
On this page you can find all versions of the php package innoge/laravel-mcp. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download innoge/laravel-mcp
More information about innoge/laravel-mcp
Files in innoge/laravel-mcp
Package laravel-mcp
Short Description A package for developing MCP Servers with Laravel.
License MIT
Homepage https://github.com/innoge/laravel-mcp
Informations about the package laravel-mcp
Laravel MCP (Model Context Protocol)
A Laravel package that implements the Model Context Protocol (MCP), enabling seamless communication between your Laravel application and AI assistants or other systems through a standardized API. Please note that this package is still in development and not yet ready for production use.
Installation
You can install the package via composer:
Basic Usage
Setting Up an MCP Server
This package currently only supports creating MCP servers via the STDIO transport. HTTP transport is not supported yet but will be added in the future.
Create a command to serve your MCP server:
Resources
Resources allow you to expose your application's data models through the MCP protocol. The package provides two types of resource providers:
-
EloquentResourceProvider: Expose Eloquent models
- InMemoryResourceProvider: Expose custom data structures or non-Eloquent data
Tools
Tools define actions that can be performed through the MCP protocol:
-
Built-in Example Tools:
HelloTool
: A simple hello world exampleClockTool
: Returns the current time
- Custom Tools: Create your own by implementing the
ToolInterface
Creating a Tool
Tools are the core functionality of MCP, allowing AI assistants to interact with your Laravel application. They provide a way to execute specific actions in your application through a well-defined interface.
Real-world examples of MCP tools include:
- Database Operations: Create, read, update, or delete records
- External API Integration: Make API calls to third-party services
- File Management: Upload, download, or process files
- Authentication: Verify user credentials or generate tokens
- Reporting: Generate reports or export data
- Email/Notification: Send messages to users
Example Tool:
Testing your MCP Server
Use Modelcontext Protocol Inspector to test the MCP server:
Adding your MCP Server to Claude Desktop
Edit your Claude Desktop config file:
~/Library/Application Support/Claude/claude_desktop_config.json
Add your MCP server to the config file:
Now you can use your MCP server in Claude Desktop. Please note that Claude currently does not use MCP resources. If you want to access data of your application you can use tool calls.
Testing
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
- Tim Geisendoerfer
- All Contributors
License
The MIT License (MIT). Please see License File for more information.
All versions of laravel-mcp with dependencies
spatie/laravel-package-tools Version ^1.16
illuminate/contracts Version ^10.0||^11.0||^12.0