Download the PHP package ronydebnath/mcp-sdk without Composer
On this page you can find all versions of the php package ronydebnath/mcp-sdk. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download ronydebnath/mcp-sdk
More information about ronydebnath/mcp-sdk
Files in ronydebnath/mcp-sdk
Package mcp-sdk
Short Description A Laravel package for building AI-driven conversational applications with real-time streaming, secure authentication, and flexible memory management.
License MIT
Informations about the package mcp-sdk
MCP SDK for Laravel
A Laravel package for interacting with Model Context Protocol (MCP) servers and implementing MCP servers.
Installation
You can install the package via composer:
The package will automatically register its service provider.
You can publish the config file with:
This will create a config/mcp.php file in your config directory.
Configuration
The package configuration file includes settings for both client and server functionality:
Using the MCP Client
Using Dependency Injection
Using the Facade
Sending Multiple Messages
Using Streaming
Using the MCP Server
Setting Up Routes
Add the following route to your routes/api.php:
Registering Message Handlers
Using Authentication
The package includes built-in authentication support:
Clients can authenticate using either:
-
Bearer token in the Authorization header:
- Token as a query parameter:
Handling Streaming Requests
The server automatically handles streaming requests when the client sets the Accept: text/event-stream header. The server will:
- Create a new session or use an existing one
- Send an initial connection message
- Stream response chunks as they become available
- Maintain the session for the duration of the connection
Memory and Context Management
The package includes memory and context management for maintaining conversation state:
Using Memory
Using Context
Using Progress Tracking
Testing
Security
If you discover any security related issues, please email hello[at]ronydebnath.com instead of using the issue tracker.
License
The MIT License (MIT). Please see License File for more information.
All versions of mcp-sdk with dependencies
illuminate/contracts Version ^12.0
illuminate/support Version ^12.0
illuminate/http Version ^12.0
illuminate/routing Version ^12.0
illuminate/config Version ^12.0
guzzlehttp/guzzle Version ^7.0
symfony/http-foundation Version ^7.0