modelcontextprotocol avatar

Calculator

modelcontextprotocol/php-sdkOfficial

The MCP PHP SDK provides a framework-agnostic API for building Model Context Protocol servers and clients in PHP, enabling developers to expose application functionality (tools, resources, and prompts) to AI agents or connect to MCP servers from PHP applications. The SDK offers both server and client implementations with capabilities including executable tools, data resources, resource templates, prompt templates, and server-initiated communication features like logging and progress notifications. Developed collaboratively by the PHP Foundation and Symfony project, it provides multiple registration methods for MCP capabilities, including attribute-based discovery and builder patterns.

GitHub stars
1.5K
tool
1
last updated
Jan 28, 2026

Tools

1 tools

Public tool metadata for what this MCP can expose to an agent.

addAdds two numbers.

Adds two numbers.

No parameter schema in public metadata yet.

Sponsors

Readme

MCP PHP SDK

Latest Version CI PHP Version License

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).


View the full README on GitHub

Details

Repository
github.com/modelcontextprotocol/php-sdk

More from modelcontextprotocol