Download the PHP package friendsofhyperf/mcp without Composer

On this page you can find all versions of the php package friendsofhyperf/mcp. 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

Model Context Protocol for Hyperf

Latest Stable Version Total Downloads License

friendsofhyperf/mcp 是一个基于 Hyperf 框架的 Model Context Protocol 服务器实现,帮助您创建和管理 MCP 服务,用于构建智能 AI 助手交互系统。

简介

Model Context Protocol (MCP) 是一种用于 AI 模型和应用程序之间交互的协议,friendsofhyperf/mcp 为 Hyperf 框架提供了完整的 MCP 服务器实现,支持:

安装

通过 Composer 安装:

配置

安装完成后,执行以下命令发布配置文件:

配置文件位于 config/autoload/mcp.php

快速开始

创建工具

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

创建资源

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

创建 Prompt

使用 #[Prompt] 注解创建 Prompt:

运行服务

通过 HTTP 服务器运行

MCP 服务会自动注册到 Hyperf 的 HTTP 服务器中。启动 Hyperf HTTP 服务器:

然后可以通过配置的 SSE 端点(如 /sse)访问 MCP 服务。

通过命令行运行

您也可以在命令行模式下运行 MCP 服务:

工具包介绍

MCP 服务器提供以下主要功能:

  1. 工具 (Tools): 可以通过注解方式定义工具,供 AI 模型调用来执行特定操作。
  2. 资源 (Resources): 定义资源处理器,用于获取系统资源。
  3. 提示 (Prompts): 定义提示处理器,用于与 AI 模型交互。

架构

核心组件:

VS Code 扩展

项目包含 .vscode/mcp.json 配置文件,可用于配置 VS Code MCP 扩展。您可以在此文件中自定义 MCP 服务器配置。

开发和测试

代码风格修复

静态分析

运行测试

贡献

欢迎提交 Pull Request 或创建 Issue 来完善此项目。

协议

本项目采用 MIT 许可证。


All versions of mcp with dependencies

PHP Build Version
Package Version
Requires php Version >=8.1
huangdijia/mcp-sdk-php Version ^0.1.0
hyperf/command Version ~3.1.0
hyperf/event Version ~3.1.0
hyperf/framework Version ~3.1.0
hyperf/http-server Version ~3.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 contains the following files

Loading the files please wait ....