技能潮 SkillTide 提交收录
官方说明3 个来源MCP 服务3 天前
php-mcp/client

php-mcp/client

Core PHP implementation for the Model Context Protocol (MCP) Client
在 GitHub 查看 ↗直链 · 无中转页
来源明细
收录自 abordage/awesome-mcp 榜单(我们从中收集的条目之一) · 条目类型:MCP 服务
收录与活跃
收录于 2026-10-14 · 最近见到 2026-10-16 · 共见到 4 次 · 被 3 个来源列出
评分构成
综合分 303 · 3 个来源 · mcp
常见问题(答案都来自我们的记录)
怎么安装?
我们【没有】从该仓库取到安装命令(我们的 install 覆盖率只有约 4%)。请看它的 README 或 releases 页。
它适合谁 / 用来做什么?
我们把它归在这些标签下: MCP 服务。标签来自条目自身,不是我们强加的分类。
谁维护它、还在更新吗?
我们收录于 2026-10-14;最近见到 2026-10-16。这里没有"官方认证"或"质量评级"——我们只记录来源与时间。
第三方质量标记

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.
来源
awesome · https://github.com/php-mcp/client
按领域浏览
MCP 服务
收录于
昨天

更多MCP 服务

查看MCP 服务全部 5,525 条 →

所属领域与标签

每个标签都能点进去看同类的全部条目。数字是当前库里的真实条数。

浏览全部领域 →

← 返回索引