Download the PHP package friendsofhyperf/mcp-server without Composer

On this page you can find all versions of the php package friendsofhyperf/mcp-server. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package mcp-server

MCP Server

Latest Stable Version Total Downloads License

MCP Server 是一个基于 Hyperf 框架的 Model Context Protocol (MCP) 服务器实现,提供了完整的 MCP 协议支持,包括工具、资源和提示管理功能。

🚀 特性

📋 要求

📦 安装

⚙️ 配置

发布配置文件

配置示例:

🔧 使用

1. 创建工具

使用 #[McpTool] 注解创建工具:

2. 创建资源

使用 #[McpResource] 注解创建资源:

3. 创建提示

使用 #[McpPrompt] 注解创建提示:

4. 启动服务器

MCP 服务器会自动:

🏗️ 架构

核心组件

关键特性

  1. 多服务器支持 - 支持在单个应用中运行多个 MCP 服务器实例
  2. 灵活的传输层 - 支持 STDIO 和 HTTP 传输协议
  3. 会话管理 - 支持内存和 Redis 会话存储
  4. 自动发现 - 基于注解的自动组件发现和注册
  5. 事件驱动 - 集成 Hyperf 事件系统

🔌 扩展

自定义会话存储

实现 SessionInterface 接口:

自定义处理器

实现请求和通知处理器:

🧪 测试

📝 配置选项

配置项 类型 默认值 说明
enabled bool true 是否启用服务器
name string 'MCP Server' 服务器名称
version string '1.0.0' 服务器版本
description string 'A MCP server.' 服务器描述
protocol_version string '2024-11-05' MCP 协议版本
pagination_limit int 100 分页限制
logger string - 日志服务名称
capabilities array - 服务器能力配置
session.ttl int 3600 会话 TTL(秒)
discovery.scan_dirs array ['.', 'src', 'app'] 自动发现扫描目录
discovery.exclude_dirs array ['vendor', 'tests'] 排除的扫描目录
router.path string '/mcp' HTTP 路由路径
router.options array [] 路由中间件等选项
command.signature string 'mcp:stdio' 命令行工具签名
command.description string 'Run MCP stdio server.' 命令行工具描述

🤝 贡献

欢迎提交 Issue 和 Pull Request!

  1. Fork 项目
  2. 创建特性分支 (git checkout -b feature/AmazingFeature)
  3. 提交更改 (git commit -m 'Add some AmazingFeature')
  4. 推送到分支 (git push origin feature/AmazingFeature)
  5. 打开 Pull Request

📄 许可证

本项目采用 MIT 许可证。详见 LICENSE 文件。

🔗 相关链接

📞 支持


All versions of mcp-server with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
ext-redis Version *
hyperf/command Version ~3.1.0
hyperf/context Version ~3.1.0
hyperf/di Version ~3.1.0
hyperf/framework Version ~3.1.0
hyperf/http-server Version ~3.1.0
hyperf/redis Version ~3.1.0
mcp/sdk Version ^0.1.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package friendsofhyperf/mcp-server contains the following files

Loading the files please wait ...