DEV Community

Cover image for PHP Meets AI: The Official MCP SDK Adds Support for the Stateless 2026-07-28 Spec
exakat, static analysis for PHP
exakat, static analysis for PHP

Posted on AI-assisted

PHP Meets AI: The Official MCP SDK Adds Support for the Stateless 2026-07-28 Spec

Web development and AI keep moving closer together, and PHP is part of that. On July 28, 2026, the Model Context Protocol (MCP) shipped its latest specification, 2026-07-28. The official PHP SDK, available at github.com/modelcontextprotocol/php-sdk, has been adding support for it. PHP developers can now build MCP servers and clients that work with both the new stateless protocol and earlier revisions.

What is MCP?

The Model Context Protocol is an open standard for connecting AI applications to external tools and data sources. An MCP server exposes capabilities such as tools, resources, and prompts. An MCP client, usually part of an AI application, discovers and uses them. This lets an AI assistant work with your files, databases, and APIs through one common interface instead of a custom integration for each.

MCP specifications are named by release date rather than version number. The 2026-07-28 release is the fifth spec release and one of the most significant so far.

What's New in the 2026-07-28 Specification?

The headline change is a stateless protocol core. MCP was previously a stateful, bidirectional protocol. Every connection began with an initialize handshake, and remote servers tracked sessions with an Mcp-Session-Id header. The new revision removes both, so every request is self-contained. Any server instance behind a load balancer can handle any request, without sticky routing or a shared session store.

Other notable changes include:

  • Multi Round-Trip Requests (MRTR): a way to gather input mid-call without holding a stream open.
  • Header-based routing: new Mcp-Method and Mcp-Name headers let gateways route and meter traffic without parsing request bodies.
  • Cacheable list results: list and read responses can carry freshness and cache-scope hints.
  • Authorization hardening: closer alignment with production OAuth 2.0 and OpenID Connect deployments.
  • An extensions framework: capabilities such as Tasks and MCP Apps can now evolve on their own timeline.
  • A formal deprecation policy: implementers get clearer guarantees about how long features will be supported.

This is a breaking change to the wire protocol, so SDKs need to support both the new revision and older peers during the transition.

PHP MCP for the world

PHP runs about 70% of websites whose server-side language is known (W3Techs), from custom business applications to WordPress, Drupal, and sites built on frameworks like Laravel and Symfony.

A stateless protocol also suits how PHP usually runs. In PHP's typical model, each request is handled independently and nothing is shared between requests. Under the older, session-based protocol, that model needed workarounds. Under 2026-07-28, it simply fits.

About the Official PHP SDK

The official SDK was announced in September 2025. It was built by the PHP Foundation, Anthropic's MCP team, and the Symfony team, and it consolidated earlier community work, including the PHP-MCP project, into one trusted implementation. The Symfony team leads maintenance, with Kyrian Obikwelu of PHP-MCP as a maintainer. The first release was server-only, and client support was added later.

The SDK includes:

  • A framework-agnostic API: it works in any PHP application. Integrations already exist for Symfony, Drupal, API Platform, CakePHP, Nette, and Kirby.
  • Server building blocks: you can expose your PHP code and data as tools, resources, resource templates, and prompts.
  • A client SDK: your PHP applications can connect to and talk to MCP servers.
  • Transports: STDIO for local servers and Streamable HTTP for remote ones.
  • Sessions and authorization: these cover the older, session-based protocol revisions as well as authorization support for HTTP servers.
  • Support for both protocol eras: the initialize-handshake revisions and the stateless 2026-07-28 revision.
  • Conformance tracking: the SDK is tested weekly against the official MCP Conformance Test Framework.

A Note on Maturity

The SDK is still pre-1.0. The latest release at the time of writing is v0.8.1, and the project describes itself as experimental until its first major release. Its 2026-07-28 conformance scores are measured against alpha versions of the test framework, so they will change as new test scenarios are published. Work on individual parts of the new spec is tracked openly in the repository's issues.

As with any library, review the defaults before you deploy to production. That includes HTTP settings such as CORS headers.

Get Started

Install the SDK with Composer:

composer require mcp/sdk
Enter fullscreen mode Exit fullscreen mode

Documentation is available at php.sdk.modelcontextprotocol.io, and the code, examples, and roadmap are in the official repository:

👉 github.com/modelcontextprotocol/php-sdk
👉 Announcing the Official PHP SDK for MCP
👉 Get started with PHP MCP SDK

The SDK is still maturing, and the maintainers welcome feedback, bug reports, documentation fixes, and framework integrations. With the 2026-07-28 spec, the protocol now matches how PHP applications already run.

Top comments (0)