php-sdk  by modelcontextprotocol

Build Model Context Protocol (MCP) servers and clients with PHP

Created 2 months ago
959 stars

Top 38.4% on SourcePulse

GitHubView on GitHub
Project Summary

This PHP SDK provides a framework-agnostic API for implementing Model Context Protocol (MCP) servers and clients. Developed in collaboration with the PHP Foundation and Symfony, it aims to standardize MCP server development in PHP, offering a robust foundation for AI and distributed systems integration.

How It Works

The SDK leverages a framework-agnostic design, allowing integration into diverse PHP environments. It adopts development practices and standards from the Symfony project, including its Coding Standards and Backward Compatibility Promise, ensuring a high level of code quality and maintainability.

Quick Start & Requirements

Installation is via Composer: composer require mcp/sdk. Due to the lack of tagged releases, minimum-stability: "dev" and prefer-stable: true must be added to composer.json. The project includes several working examples, such as 01-discovery-stdio-calculator and 03-manual-registration-stdio, demonstrating common usage patterns. Official documentation is available.

Highlighted Details

  • Developed in collaboration with the PHP Foundation and Symfony project.
  • Adopts Symfony's development practices, coding standards, and BC promise.
  • Includes examples for stdio and HTTP transports, and discovery mechanisms.
  • Roadmap includes support for pagination, schema validation, and multiple MCP specification versions.

Maintenance & Community

Maintained collaboratively by the PHP Foundation and the Symfony project, signaling strong community backing and adherence to established PHP development standards. The project actively encourages contributions to help stabilize the SDK, with a clear call to action via the issue tracker.

Licensing & Compatibility

Licensed under the permissive MIT License, allowing for broad compatibility and commercial use. Its framework-agnostic nature enhances compatibility across different PHP projects.

Limitations & Caveats

The SDK is currently considered experimental, with ongoing work to merge components from Symfony's MCP SDK and PHP-MCP. This means code paths may not be fully tested, and duplicate or dead code might exist. Stability is expected to improve with future releases.

Health Check
Last Commit

3 days ago

Responsiveness

Inactive

Pull Requests (30d)
33
Issues (30d)
31
Star History
962 stars in the last 30 days

Explore Similar Projects

Starred by Chip Huyen Chip Huyen(Author of "AI Engineering", "Designing Machine Learning Systems"), Jason Knight Jason Knight(Director AI Compilers at NVIDIA; Cofounder of OctoML), and
10 more.

awesome-mcp-servers by punkpeye

1.5%
70k
Curated list of Model Context Protocol (MCP) servers
Created 9 months ago
Updated 2 days ago
Feedback? Help us improve.