LM

logiscape/mcp-sdk-php

Developer tools

Эта страница переведена автоматически. Технические детали смотрите в оригинале. Открыть оригинал

368 stars 53 forks Качество 64 Тренд 33MIT

logiscape/mcp-sdk-php — это кандидат на MCP-сервер, импортированный из https://github.com/logiscape/mcp-sdk-php.

Обзор

logiscape/mcp-sdk-php — это кандидат на MCP-сервер, импортированный из https://github.com/logiscape/mcp-sdk-php.

Обзор (машинный перевод)

Этот пакет предоставляет PHP-SDK для протокола Model Context Protocol. Основная цель этого проекта — предоставить как MCP-сервер, так и MCP-клиент на чистом PHP, что упростляет его использование в хостинговых средах PHP/Apache/cPanel с типичными серверными конфигурациями.

Обзор

Этот PHP SDK реализует полную спецификацию MCP, что облегчает выполнение:

  • Создавать MCP-клиенты, которые могут подключаться к любому MCP-серверу
  • Создавать MCP-серверы, которые предоставляют ресурсы, запросы и инструменты
  • Используйте стандартные транспорты, такие как stdio и HTTP
  • Взаимодействовать с пирами на любой спецификационной версии от 2024-11-05 до 2026-07-28 — согласование версий встроено в

Этот SDK предлагает два основных преимущества для сообществ разработчиков MCP и PHP:

  • Этот SDK имеет 100% процент сдачи соответствующих обязательных тестов соответствия MCP — базовая линия стабильного трека пуста — и дополнительно запускает набор черновой дорожки, валидирующий обновление спецификации 2026-07-28. См. Тестирование соответствия.

  • SDK может продемонстрировать как функциональный MCP-клиент, так и MCP-сервер с помощью одной команды Composer. См. пример с веб-клиентом.

Новинка во второй версии

версия 2 построена вокруг двух основных функций — поддержки MCP с первого дня

Эта страница переведена автоматически. Технические детали смотрите в оригинале.

README

Показан фрагмент оригинального README. Открыть оригинал.

Model Context Protocol SDK for PHP

This package provides a PHP SDK for the Model Context Protocol. The primary goal of this project is to provide both an MCP server and an MCP client using pure PHP, making it easy to use in PHP/Apache/cPanel hosting environments with typical server configurations.

Overview

This PHP SDK implements the full MCP specification, making it easy to:

  • Build MCP clients that can connect to any MCP server
  • Create MCP servers that expose resources, prompts and tools
  • Use standard transports like stdio and HTTP
  • Interoperate with peers on any spec revision from 2024-11-05 through 2026-07-28 — version negotiation is built in

This SDK offers two major advantages for the MCP and PHP developer communities:

  • This SDK features a 100% pass rate on the applicable required MCP Conformance Tests — the stable-track baseline is empty — and additionally runs the draft-track suite validating the 2026-07-28 spec update. See Conformance Testing.

  • The SDK can demonstrate both a functional MCP client and MCP server with a single Composer command. See the Webclient Example.

New in v2

v2 is built around two headline features — day-one support for the MCP 2026-07-28 “stateless core” spec revision, and full support for the MCP Apps extension — delivered without giving up compatibility with any earlier revision:

  • 2026-07-28 stateless core — no initialize handshake, no session ids: every request is self-contained, which is exactly the model that fits typical PHP web hosting (a fresh process per request). Includes server/discover, caching hints, request-metadata headers, subscriptions/listen streams, and multi-round-trip input gathering.
  • Dual-era negotiation — servers detect each request’s era and clients probe-then-fall-back automatically, so one codebase serves both modern (2026-07-28) and legacy (2024-11-05 … 2025-11-25) peers concurrently.
  • Tasks extension (SEP-2663) — long-running tool calls return a task handle that clients poll, cancel, and feed input to; backed by a file-based store that works on shared hosting. See the Tasks guide.
  • MCP Apps extension (SEP-1865) — attach a host-rendered HTML UI to a tool with one ->ui(...) call. See the Apps guide.

The complete inventory — including OAuth 2.1 hardening, typed errors, and the feature-lifecycle deprecation registry — is in the CHANGELOG; API differences from v1 are covered in the

Открыть полный README на GitHub

Установка

This server does not publish a one-line install command.

Open the repository installation guide Новичок в MCP? Начните с руководства на mcpskill.org →