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.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package mcp-sdk

Latest Version on Packagist

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:

  1. Bearer token in the Authorization header:

  2. 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:

  1. Create a new session or use an existing one
  2. Send an initial connection message
  3. Stream response chunks as they become available
  4. 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

PHP Build Version
Package Version
Requires php Version ^8.1
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
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package ronydebnath/mcp-sdk contains the following files

Loading the files please wait ...