---
name: "Build MCP servers and clients for PHP applications with the official PHP SDK"
slug: "build-mcp-servers-and-clients-for-php-applications-with-the-official-php-sdk"
description: "Use the official Model Context Protocol PHP SDK to expose PHP application capabilities as MCP tools, resources, and prompts for agent workflows."
github_stars: 1479
verification: "security_reviewed"
source: "https://github.com/modelcontextprotocol/php-sdk"
author: "Model Context Protocol / The PHP Foundation collaborators"
publisher_type: "foundation"
category: "Library & API Reference"
framework: "MCP"
tool_ecosystem:
  github_repo: "modelcontextprotocol/php-sdk"
  github_stars: 1479
---

# Build MCP servers and clients for PHP applications with the official PHP SDK

Use the official Model Context Protocol PHP SDK to expose PHP application capabilities as MCP tools, resources, and prompts for agent workflows.

## Prerequisites

PHP, Composer, MCP-compatible host/client

## Installation

Use the upstream install or setup path that matches your environment:
- composer require mcp/sdk

Basic usage or getting-started notes:
- bash
- ## Overview
- The MCP PHP SDK provides both **server** and **client** implementations for the Model Context Protocol, enabling you to:

- Source: https://github.com/modelcontextprotocol/php-sdk
- Extracted from upstream docs: https://raw.githubusercontent.com/modelcontextprotocol/php-sdk/HEAD/README.md

## Documentation

- https://github.com/modelcontextprotocol/php-sdk

## Source

- [Agent Skill Exchange](https://agentskillexchange.com/skills/build-mcp-servers-and-clients-for-php-applications-with-the-official-php-sdk/)
