logiscape/mcp-sdk-php

Model Context Protocol SDK for PHP

What it solves

This project provides a PHP implementation of the Model Context Protocol (MCP), allowing PHP developers to integrate their applications with AI models. It specifically addresses the challenge of running MCP servers and clients in typical PHP web hosting environments (like Apache or cPanel) where processes are often short-lived and stateless.

How it works

The SDK implements the full MCP specification, supporting both client and server roles. It uses standard transports like stdio and HTTP to communicate. A key feature is its "stateless core" support (spec revision 2026-07-28), which removes the need for an initialization handshake and session IDs, making it ideal for the request-response cycle of web hosting.

Who it’s for

PHP developers who want to build AI-powered tools, resources, and prompts that can be accessed by LLM-based clients, or build PHP applications that act as MCP clients to connect to other MCP servers.

Highlights

  • Stateless Core Support: Optimized for PHP web hosting by eliminating session IDs and handshakes for every request.
  • Dual-Era Negotiation: Automatically handles compatibility between modern (2026-07-28) and legacy (2024-11-05) MCP specifications.
  • MCP Apps Extension: Allows developers to attach host-rendered HTML UIs to tools with a single method call.
  • Tasks Extension: Supports long-running tool calls via a file-based store, enabling polling and cancellation on shared hosting.
  • Conformance Tested: Maintains a high pass rate on official MCP Conformance Tests.
  • CURL and JSON support: Built for PHP 8.1+ with minimal external dependencies.

관련

  • 프로젝트
  • 프로젝트
  • 프로젝트
  • 프로젝트
  • 프로젝트