php-llm/mcp-bundle
最新稳定版本:0.1
Composer 安装命令:
composer require php-llm/mcp-bundle
包简介
Symfony integration bundle for Model Context Protocol (via php-llm/mcp-sdk)
README 文档
README
Important
PHP LLM becomes Symfony AI - this project moved to github.com/symfony/ai. Please use the new repository for all future development, issues, and contributions. Thanks for your contributions - we hope to see you at Symfony AI!
Symfony integration bundle for Model Context Protocol using the unofficial PHP SDK php-llm/mcp-sdk library.
Currently only supports tools as server via Server-Sent Events (SSE) and STDIO.
Installation
composer require php-llm/mcp-bundle
Usage
At first, you need to decide whether your application should act as a MCP server or client. Both can be configured
in the mcp section of your config/packages/mcp.yaml file.
Act as Server
Currently only supports tools.
To use your application as an MCP server, exposing tools to clients like Claude Desktop,
you need to configure in the client_transports section the transports you want to expose to clients.
You can use either STDIO or SSE.
Act as Client
Not implemented yet.
To use your application as an MCP client, integrating other MCP servers, you need to configure the servers you want to
connect to. You can use either STDIO or Server-Sent Events (SSE) as transport methods.
You can find a list of example Servers in the MCP Server List.
Tools of those servers are available in your LLM Chain Bundle configuration and usable in your chains.
Configuration
mcp: app: 'app' # Application name to be exposed to clients version: '1.0.0' # Application version to be exposed to clients # Configure this application to act as an MCP server # Currently exposes tools registered in LLM Chain client_transports: stdio: true # Enable STDIO via command sse: true # Enable Server-Sent Event via controller # Configure MCP servers to be used by this application # Not implemented yet servers: name: transport: 'stdio' # Transport method to use, either 'stdio' or 'sse' stdio: command: 'php /path/bin/console mcp' # Command to execute to start the client arguments: [] # Arguments to pass to the command sse: url: 'http://localhost:8000/sse' # URL to SSE endpoint of MCP server
php-llm/mcp-bundle 适用场景与选型建议
php-llm/mcp-bundle 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 225 次下载、GitHub Stars 达 14, 最近一次更新时间为 2025 年 03 月 31 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 php-llm/mcp-bundle 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 php-llm/mcp-bundle 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 225
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 14
- 点击次数: 21
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-03-31