.fyi
SkillsMCPPluginsSubagents

Browse by category

DevOps & CI/CD SkillsProductivity & Workflow SkillsOther SkillsProduct & Project Management SkillsDocumentation & Knowledge SkillsCode Review & Refactor SkillsBackend & APIs SkillsAgent Meta & Communication SkillsResearch SkillsSecurity SkillsUX UI & Design SkillsTesting & QA SkillsSee all →

Every Claude Code skill, MCP server, plugin and subagent in one directory. Searchable, comparable, and one command from installed. Live stats from GitHub, npm and PyPI.

We're on Product HuntYour agent's app storeCheck it out →
Agent SkillsMCP ServersPluginsSubagentsCoding Agents
CollectionsOfficial publishersGlossaryFAQBlogSearchSavedFeedback
PrivacyTermsllms.txtSitemap

made with ♥ · © 2026 aaaa.fyi

Independent project · real data from public registries

…/php-mcp/server
home/mcp-servers/php-mcp/server
php-mcp avatar

server

byphp-mcp· 1 MCP server

Stars

854

Forks

64

Category

AI Agents & MCP

View on GitHub

TL;DR

A comprehensive PHP SDK for building [Model Context Protocol (MCP)](https://modelcontextprotocol.io/introduction) servers. Create production-ready MCP servers in PHP with modern architecture, extensive testing, and flexible transport options.

How to install server?

php-mcp/server
$git clone https://github.com/php-mcp/server

Installs into the current project.

›Prefer a prompt? Paste this to your agent

Install & use

Install server by running `git clone https://github.com/php-mcp/server`, then use it for the current task and follow its documentation at https://github.com/php-mcp/server.

Files · 1

View on GitHub
README.md
1# PHP MCP Server SDK
2 
3[![Latest Version on Packagist](https://img.shields.io/packagist/v/php-mcp/server.svg?style=flat-square)](https://packagist.org/packages/php-mcp/server)
4[![Total Downloads](https://img.shields.io/packagist/dt/php-mcp/server.svg?style=flat-square)](https://packagist.org/packages/php-mcp/server)
5[![Tests](https://img.shields.io/github/actions/workflow/status/php-mcp/server/tests.yml?branch=main&style=flat-square)](https://github.com/php-mcp/server/actions/workflows/tests.yml)
6[![License](https://img.shields.io/packagist/l/php-mcp/server.svg?style=flat-square)](LICENSE)
7 
8**A comprehensive PHP SDK for building [Model Context Protocol (MCP)](https://modelcontextprotocol.io/introduction) servers. Create production-ready MCP servers in PHP with modern architecture, extensive testing, and flexible transport options.**
9 
10This SDK enables you to expose your PHP application's functionality as standardized MCP **Tools**, **Resources**, and **Prompts**, allowing AI assistants (like Anthropic's Claude, Cursor IDE, OpenAI's ChatGPT, etc.) to interact with your backend using the MCP standard.
11 
12## 🚀 Key Features
13 
14- **🏗️ Modern Architecture**: Built with PHP 8.1+ features, PSR standards, and modular design
15- **📡 Multiple Transports**: Supports `stdio`, `http+sse`, and new **streamable HTTP** with resumability
16- **🎯 Attribute-Based Definition**: Use PHP 8 Attributes (`#[McpTool]`, `#[McpResource]`, etc.) for zero-config element registration
17- **🔧 Flexible Handlers**: Support for closures, class methods, static methods, and invokable classes
18- **📝 Smart Schema Generation**: Automatic JSON schema generation from method signatures with optional `#[Schema]` attribute enhancements
19- **⚡ Session Management**: Advanced session handling with multiple storage backends
20- **🔄 Event-Driven**: ReactPHP-based for high concurrency and non-blocking operations
21- **📊 Batch Processing**: Full support for JSON-RPC batch requests
22- **💾 Smart Caching**: Intelligent caching of discovered elements with manual override precedence
23- **🧪 Completion Providers**: Built-in support for argument completion in tools and prompts
24- **🔌 Dependency Injection**: Full PSR-11 container support with auto-wiring
25- **📋 Comprehensive Testing**: Extensive test suite with integration tests for all transports
26 
27This package supports the **2025-03-26** version of the Model Context Protocol with backward compatibility.
28 
29## 📋 Requirements
30 
31- **PHP** >= 8.1
32- **Composer**
33- **For HTTP Transport**: An event-driven PHP environment (CLI recommended)
34- **Extensions**: `json`, `mbstring`, `pcre` (typically enabled by default)
35 
36## 📦 Installation
37 
38```bash
39composer require php-mcp/server
40```
41 
42> **💡 Laravel Users**: Consider using [`php-mcp/laravel`](https://github.com/php-mcp/laravel) for enhanced framework integration, configuration management, and Artisan commands.
43 
44## ⚡ Quick Start: Stdio Server with Discovery
45 
46This example demonstrates the most common usage pattern - a `stdio` server using attribute discovery.
47 
48**1. Define Your MCP Elements**
49 
50Create `src/CalculatorElements.php`:
51 
52```php
53<?php
54 
55namespace App;
56 
57use PhpMcp\Server\Attributes\McpTool;
58use PhpMcp\Server\Attributes\Schema;
59 
60class CalculatorElements
61{
62 /**
63 * Adds two numbers together.
64 *
65 * @param int $a The first number
66 * @param int $b The second number
67 * @return int The sum of the two numbers
68 */
69 #[McpTool(name: 'add_numbers')]
70 public function add(int $a, int $b): int
71 {
72 return $a + $b;
73 }
74 
75 /**
76 * Calculates power with validation.
77 */
78 #[McpTool(name: 'calculate_power')]
79 public function power(
80 #[Schema(type: 'number', minimum: 0, maximum: 1000)]
81 float $base,
82
83 #[Schema(type: 'integer', minimum: 0, maximum: 10)]
84 int $exponent
85 ): float {
86 return pow($base, $exponent);
87 }
88}
89```
90 
91**2. Create the Server Script**
92 
93Create `mcp-server.php`:
94 
95```php
96#!/usr/bin/env php
97<?php
98 
99declare(st

Preview

php-mcp/serverphp-mcp/server

# PHP MCP Server SDK

[![Latest Version on Packagist](https://img.shields.io/packagist/v/php-mcp/server.svg?style=flat-square)](https://packagist.org/packages/php-mcp/server)

[![Total Downloads](https://img.shields.io/packagist/dt/php-mcp/server.svg?style=flat-square)](https://packagist.org/packages/php-mcp/server)

[![Tests](https://img.shields.io/github/actions/workflow/status/php-mcp/server/tests.yml?branch=main&style=flat-square)](https://github.com/php-mcp/server/actio

Repophp-mcp/server
TypeMCP Servers
CategoryAI Agents & MCP
UpdatedAug 2025
LicenseMIT
First seenJul 27, 2026

Tags

MCP

Related

6 picks
Type
  1. langchain-ai avatarlangchain-mcp-adaptersMake Anthropic Model Context Protocol (MCP) tools compatible with LangChain and LangGraph agents.MCP ServersJul 20267.0M3.6k
  2. openclaw avatarmcporterTypeScript runtime and CLI for connecting to configured Model Context Protocol servers.MCP ServersJul 20262.5M4.8k
  3. sparfenyuk avatarmcp-proxyA MCP server which proxies requests to a remote MCP server over streamable HTTP or SSE.MCP ServersJul 20262.2M2.7k
  4. sooperset avatarmcp-atlassianThe Model Context Protocol (MCP) Atlassian integration is an open-source implementation that bridges Atlassian products (Jira and Confluence) with AI language models following Anthropic's MCP specification.MCP ServersJul 20261.7M5.6k
  5. open-webui avataropen-webuiOpen WebUIMCP ServersJul 20261.4M147k
  6. dyoshikawa avatarrulesyncUnified AI rules management CLI tool that generates configuration files for various AI development toolsMCP ServersJul 2026889k1.3k