Skip to content

Building MCP Servers with the Official PHP SDK

Avatar of Tobias Nyholm Tobias Nyholm

Large language models are frozen at training time. They don't know your users, your inventory, or anything that happened last week. The Model Context Protocol (MCP) is the open specification that lets AI clients like Claude, ChatGPT, or JetBrains AI discover and call your application's tools, resources, and prompts to fill in the missing context.

In this talk, we'll introduce MCP from the wire up: JSON-RPC 2.0, the `initialize` handshake, the stdio and HTTP transports, and the three primitives (prompts, resources, tools). We'll then walk through the new official PHP `mcp-sdk`, co-built by the Symfony AI initiative, Anthropic, and the PHP Foundation. A `ServerBuilder` plus a `#[McpTool]` attribute on a plain class is enough to expose a tool.

For Symfony users, the bundle integration is the payoff: secure your MCP route with `security.yaml`, inject `Security` to read the authenticated user from inside a tool, and skip OAuth 2.1 when you control the client. A live debug session with Anthropic's MCP Inspector closes the loop.

Delivered in English
Room:
Symfony

Thursday, June 11, 2026 at 16:45 PM – 17:30 PM