Show HN: PHP MCP SDK (github.com)

🤖 AI Summary
A new PHP SDK implementing the Model Context Protocol (MCP) has been released, providing a first-class way for PHP apps to connect LLMs with external data sources, tools and agentic workflows. The library targets PHP 8.1+, is async-first (built on Amphp), type-safe (enums, union types, strict typing), and ships with multiple transports (STDIO, HTTP streaming, WebSocket), OAuth2/PKCE support, and production-focused features like comprehensive error handling, logging and monitoring. It’s designed to slot into existing ecosystems—PSR-compliant (PSR-4/7/12/15) and offering integrations/examples for Laravel and Symfony—so PHP backends can orchestrate LLM tool calls, build agents, and expose MCP servers to desktop or cloud LLM clients. For developers this means drop-in composer installation (dalehurley/php-mcp-sdk), examples and fully tested demos (Hello World, weather client, file reader, agentic demos, CMS, API gateway, etc.), and an API ready for multi-agent coordination and LLM-powered tool calling (including OpenAI integrations). Key technical takeaways: non-blocking I/O via Amphp, support for multiple transports and OAuth authentication, PSR interoperability for middleware and HTTP tooling, and automated testing of docs/examples. The SDK lowers the friction for building secure, production-grade MCP servers and clients in PHP, accelerating adoption of tool-using LLMs in PHP-driven systems.
Loading comments...
loading comments...