Serverdex · build · PHP
Build an MCP server in PHP
1. Install the PHP SDK
package: mcp/sdkcomposer require mcp/sdkThe official SDK repository: modelcontextprotocol/php-sdk.
2. The shape of a minimal server
start from this APIuse Mcp\Server\Server;
use Mcp\Server\Transport\StdioTransport;
Server::builder()
->setServerInfo('Calculator', '1.0.0')
->build()
->run(new StdioTransport());This is the starting API, not a full program — the complete, always-current walkthrough is the official quickstart. Define your tools, then connect a transport (stdio for local, HTTP for remote). Read on 1 December 2026; confirm the current version in the quickstart.
3. Real PHP MCP servers to learn from
most-starred in our index · open source
ARelaticle
relaticleProduction-ready
Open-source CRM your AI agents can write to: companies, people, opportunities, tasks and notes.
Registry1.9k 4d agoAGPL-3.0
ATryPost
trypostitProduction-ready
Run social media with agents. Connect over MCP to plan, write, and post to every network.
Registry1.5k 9d agoAGPL-3.0
ASynaplan
metadistProduction-ready
Self-hosted AI workspace: semantic RAG document search, long-term memory, and AI chat via MCP.
Live1.6k tokRegistry1.1k 10 9d agoApache-2.0
ASolidInvoice
SolidInvoiceProduction-ready
Create and send invoices and quotes, manage clients, and track payments in SolidInvoice.
Live5.1k tokRegistry994 41 6d agoMIT
AZelta
FinAegisProduction-ready
Zelta MCP server. Exposes 10 tools for wallet, payment status and transaction data over OAuth 2.1.
Registry213 todayApache-2.0
AEmail Inbox API + Sending by Sendmux
SendmuxProduction-ready
AI email inbox and sending tools with attachments, search, live events, and webhooks.
Registry54 7d agoMIT
See all PHP MCP servers, or the best-maintained across every language.
4. Connect it, then get it found
Point a client at your server to try it — the client matrix shows which clients support what. When it works, list it on Serverdex: a free listing is a server page with a link back to us, in front of developers choosing MCP servers. Want it live now without the link? Priority Review ($9, one-time) does that.
Questions people ask
- What's the official way to build an MCP server in PHP?
- Use the official PHP SDK, mcp/sdk. Install it (composer require mcp/sdk), construct a server, register your tools, and connect a transport. The full, always-current walkthrough is the official quickstart; the snippet here shows the shape. Read from the SDK's repository on 1 December 2026.
- Is the PHP SDK production-ready?
- Tier 3 — experimental, partial or specialised; fine to build on, with sharper edges. Tier 3 SDK — considered experimental until its first major release.
- How do I test and connect my PHP server?
- Run it over stdio and point a client at it. Serverdex's client matrix shows which clients support what; most developers start with Claude Desktop or an IDE client. Once it answers, list it on Serverdex so others find it.