SkillTide Submit
Official description3 sourcesMCP servers3d ago
php-mcp/client

php-mcp/client

Core PHP implementation for the Model Context Protocol (MCP) Client
View on GitHub ↗Direct link · no redirect page
Source
collected from the abordage/awesome-mcp list · type: MCP server
Harvest history
first seen 2026-10-14 · last seen 2026-10-16 · seen 4× · listed by 3 sources
Score
score 303 · 3 sources · mcp
FAQ (answers come from our records)
How do I install it?
We did not find an install command for this repository (our install coverage is only about 4%). Check its README or releases page.
Who is it for?
We filed it under these tags: MCP 服务. The tags come from the entry itself, not a taxonomy we imposed.
Who maintains it?
first catalogued 2026-10-14;last seen 2026-10-16。There is no official certification or quality rating here — we record sources and dates only.
Third-party quality signals

PHP MCP Client

以下摘录自该仓库的 README(片段) · 在 GitHub 读完整 README →

**PHP MCP Client is a PHP library for interacting with servers that implement the Model Context Protocol (MCP).**
It provides a developer-friendly interface to connect to individual MCP servers using different transports (stdio, http+sse), manage the connection lifecycle, discover server capabilities (Tools, Resources, Prompts), and execute requests like calling tools or reading resources.
While utilizing asynchronous I/O internally via ReactPHP for robustness and handling features like server-sent events, the library offers **both** a straightforward **synchronous (blocking) API** for common use cases and an **asynchronous (Promise-based) API** for advanced control and concurrency.
This library aligns with the MCP specification's model where one client instance manages a stateful connection to one server.
Introduction to MCP
The Model Context Protocol (MCP) is an open standard designed to standardize how AI assistants and applications connect to external data sources, APIs, and tools (like codebases, databases, web browsers). It acts as a communication layer, enabling AI models (like Claude, or models integrated via frameworks like OpenAI's) to securely access and interact with context provided by different servers.
This client library allows your PHP application (acting as the "Host" in MCP terminology) to *consume* capabilities offered by one or more MCP servers.
Features
* **Client-per-Server Model:** Each Client instance manages a stateful connection to a single configured MCP server, aligning with the MCP specification.
* **Fluent Configuration:** Easy setup for each client instance using a Client::make()->with...() builder pattern.
* **Dual API:**
* **Synchronous Facade:** Interact with the server using straightforward, blocking methods (e.g., $client->listTools(), $client->callTool(...)) for simple integration.
* **Asynchronous API:** Access underlying Promise-based methods (e.g., $client->listToolsAsync(), $client->callToolAsync(...)) for concurrency and integration with async PHP applications.
* **Multiple Transports:** Built-in support for:
* stdio: Communicating with server processes via Standard Input/Output.
* http: Communicating with servers via HTTP POST and Server-Sent Events (SSE).
* **Explicit Connection Lifecycle:** Requires ->initialize() or ->initializeAsync() to connect and perform the handshake before making requests. Provides disconnect() / disconnectAsync().
* **Tool/Resource/Prompt Interaction:** Provides comprehensive methods (sync & async) to list available elements and execute requests like tools/call, resources/read, prompts/get.
* **PSR Compliance:** Integrates with standard PHP interfaces:
* PSR-3 (LoggerInterface): Integrate your application's logger.
* PSR-16 (SimpleCacheInterface): Optional caching for server definitions.
* PSR-14 (EventDispatcherInterface): Optional handling of server-sent notifications via events (requires async handling).
* **Robust Error Handling:** Specific exceptions for different failure modes.
* **Asynchronous Core:** Utilizes ReactPHP internally for non-blocking I/O.
Requirements
* PHP >= 8.1
* Composer
* *(For Stdio Transport)*: Ability to execute the server command.
* *(For Http Transport)*: Network access to the MCP server URL.
Installation
Install the package via Composer:
The necessary ReactPHP dependencies (event-loop, promise, stream, child-process, http) should be installed automatically.
Quick Start: Simple Synchronous Usage (Stdio)
This example connects to a local filesystem server running via npx.
Configuration
Configuration involves setting up:
1. **Client Identity:** Your application's name and version, passed directly to the builder.
2. **Client Capabilities:** Features your client supports using ClientCapabilities.
3. **Server Connection:** Details for the *single server* this client instance will connect to, using ServerConfig.
Source
awesome · https://github.com/php-mcp/client
Browse by field
MCP servers
added
yesterday

More in MCP servers

All 5,525 in MCP servers →

Filed under

Every tag opens the full list for that filter. Counts are the live catalogue figures.

Browse all fields →

← Back to index