Download the PHP package mcp/sdk without Composer

On this page you can find all versions of the php package 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 sdk

MCP PHP SDK

Latest Version CI PHP Version

The official PHP SDK for the Model Context Protocol (MCP). It provides a framework-agnostic API for implementing MCP servers and clients in PHP — tools, resources, prompts, STDIO and HTTP transports, sessions, authorization, and both protocol eras (the initialize handshake and the stateless 2026-07-28 revision).

This project represents a collaboration between the PHP Foundation and the Symfony project. It adopts development practices and standards from the Symfony project, including Coding Standards and the Backward Compatibility Promise.

Until the first major release, this SDK is considered experimental, please see the roadmap for planned next steps and features.

Protocol Conformance

Measured weekly against the MCP Conformance Test Framework, as passing checks out of total. The 2026-07-28 scores run against the framework's alpha releases, so they move as upstream publishes new scenarios.

Revision Server Client
2026-07-28 Server conformance 2026-07-28 Client conformance 2026-07-28
2025-11-25 Server conformance 2025-11-25 Client conformance 2025-11-25

Installation

Build a server

A server is a plain PHP class plus three lines of wiring:

The setDiscovery() call needs symfony/finder:

The walkthrough in First server explains each piece, and Try it with the Inspector shows it running.

Build a client

See Connecting to a server for timeouts, and Server-initiated requests for the handlers that answer requests from the server.

Documentation

The full documentation is published at php.sdk.modelcontextprotocol.io.

External Resources

PHP Libraries Using the MCP SDK

Building something on top of the SDK? Open a pull request to add it to this list.

Contributing

We are passionate about supporting contributors of all levels of experience and would love to see you get involved in the project. Start by reporting issues or sending pull requests. See CONTRIBUTING.md for development setup, coding standards, and what to run before opening a PR.

Credits

The starting point for this SDK was the PHP-MCP project, initiated by Kyrian Obikwelu, and the Symfony AI initiative. We are grateful for the work done by both projects and their contributors, which created a solid foundation for this SDK.

License

This project is licensed under the Apache License, Version 2.0 for new contributions, with existing code under the MIT License — see the LICENSE file for details.


All versions of sdk with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
ext-fileinfo Version *
opis/json-schema Version ^2.4
php-http/discovery Version ^1.20
phpdocumentor/reflection-docblock Version ^5.6 || ^6.0
psr/clock Version ^1.0
psr/container Version ^1.0 || ^2.0
psr/event-dispatcher Version ^1.0
psr/http-client Version ^1.0
psr/http-factory Version ^1.1
psr/http-message Version ^1.1 || ^2.0
psr/http-server-handler Version ^1.0
psr/http-server-middleware Version ^1.0
psr/log Version ^1.0 || ^2.0 || ^3.0
symfony/deprecation-contracts Version ^2.5 || ^3.0
symfony/uid Version ^5.4 || ^6.4 || ^7.3 || ^8.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 mcp/sdk contains the following files

Loading the files please wait ...