Cover image
Try Now
2025-04-14

🐉快速,PHP构建MCP服务器的方法

3 years

Works with Finder

6

Github Watches

0

Github Forks

6

Github Stars

🐉 The fast, PHP way to build MCP servers

The Model Context Protocol (MCP) is a new, standardized way to provide context and tools to your LLMs, and pronskiy/mcp makes building MCP servers simple and intuitive.

Create tools, expose resources, define prompts, and connect components with clean PHP code.

Installation

With composer:

composer require pronskiy/mcp

Usage

require 'vendor/autoload.php';

$server = new \Pronskiy\Mcp\Server('simple-mcp-server');

$server
    ->tool(
        'add-numbers',
        'Adds two numbers together',
        fn(float $num1, float $num2) => "The sum of {$num1} and {$num2} is " . ($num1 + $num2)
    )
    ->tool(
        'multiply-numbers',
        'Multiplies two numbers',
        fn(float $num1, float $num2) => "The product of {$num1} and {$num2} is " . ($num1 * $num2)
    )
;

$server->run();

Credits

License

The MIT License (MIT). Please see License File for more information.

相关推荐

  • av
  • 毫不费力地使用一个命令运行LLM后端,API,前端和服务。

  • 1Panel-dev
  • 🔥1Panel提供了直观的Web接口和MCP服务器,用于在Linux服务器上管理网站,文件,容器,数据库和LLMS。

  • rulego
  • ⛓️Rulego是一种轻巧,高性能,嵌入式,下一代组件编排规则引擎框架。

  • WangRongsheng
  • 🧑‍🚀 llm 资料总结(数据处理、模型训练、模型部署、 o1 模型、mcp 、小语言模型、视觉语言模型)|摘要世界上最好的LLM资源。

  • Byaidu
  • PDF科学纸翻译带有保留格式的pdf -基于ai完整保留排版的pdf文档全文双语翻译

  • hkr04
  • 轻巧的C ++ MCP(模型上下文协议)SDK

  • sigoden
  • 使用普通的bash/javascript/python函数轻松创建LLM工具和代理。

  • RockChinQ
  • 😎简单易用、🧩丰富生态 -大模型原生即时通信机器人平台| 适配QQ / 微信(企业微信、个人微信) /飞书 /钉钉 / discord / telegram / slack等平台| 支持chatgpt,deepseek,dify,claude,基于LLM的即时消息机器人平台,支持Discord,Telegram,微信,Lark,Dingtalk,QQ,Slack

  • lasso-security
  • 基于插件的网关,可协调其他MCP,并允许开发人员在IT企业级代理上构建。

  • modelscope
  • 开始以更轻松的方式开始构建具有LLM授权的多代理应用程序。

    Reviews

    3.5 (13)
    Avatar
    user_W9TXWYTw
    2025-04-23

    I have been using MCP for a while now, and it has exceeded all my expectations. Created by Pronskiy, this product is incredibly user-friendly and efficient. The interface is smooth, and the functionality is exactly what I needed. I highly recommend MCP to anyone looking for a reliable tool.

    Avatar
    user_Sgz6MNO4
    2025-04-23

    I've been using mcp by Pronskiy, and it has transformed the way I handle tasks. The interface is intuitive and the performance is stellar. It's a must-have tool that boosts productivity and simplifies workflows. Highly recommended for anyone looking to streamline their processes.

    Avatar
    user_lqfi8ekW
    2025-04-23

    I've been using mcp by Pronskiy and it's been a fantastic experience. The seamless integration and user-friendly interface have made it an essential tool in my daily workflow. Highly recommend it for anyone looking for a reliable and efficient application.

    Avatar
    user_xEUOdL39
    2025-04-23

    As a dedicated user of the mcp application, I am thoroughly impressed by its efficiency and user-friendly interface. Developed by Pronskiy, mcp simplifies complex functions while ensuring a seamless experience. Its intuitive design and language support make it accessible and highly functional. Highly recommend it for anyone seeking a robust and effective solution!

    Avatar
    user_XdSH0Ht6
    2025-04-23

    As a dedicated user of mcp, I must say that this application has significantly streamlined my daily tasks. Pronskiy has developed an intuitive platform that is both user-friendly and efficient. The seamless navigation and welcoming interface make it a pleasure to use. Highly recommended!

    Avatar
    user_xaBFOWu8
    2025-04-23

    As a dedicated user of MCP, I have found it to be an outstanding application developed by Pronskiy. The interface is intuitive and efficient, making it easy to navigate and use. It stands out for its reliability and comprehensive features, which have significantly improved my productivity. Highly recommended for anyone looking to streamline their workflow!

    Avatar
    user_e1i7b2lK
    2025-04-23

    MCP is an outstanding application created by Pronskiy that offers a seamless and user-friendly experience. As a loyal user, I appreciate its intuitive design and robust functionality. Whether for personal or professional use, this app consistently delivers top-notch performance. For anyone looking for a reliable solution, I highly recommend MCP.

    Avatar
    user_Dmmdde3R
    2025-04-23

    I've been using the MCP application by Pronskiy, and it's truly impressive. The user interface is intuitive, making it easy for anyone to get started without a steep learning curve. The features are well-thought-out, catering perfectly to my needs. I highly recommend it to anyone looking for a reliable and efficient app.

    Avatar
    user_gGVmDRxh
    2025-04-23

    As a dedicated user of MCP, I can confidently say it has significantly streamlined my workflows. Created by Pronskiy, this tool excels in efficiency and usability, making complex tasks more manageable. Whether you are a novice or an expert, MCP caters to all levels of expertise with its intuitive interface and robust features. Highly recommended!

    Avatar
    user_fG3weI0E
    2025-04-23

    As an avid user of the mcp app, I must say that it has exceeded my expectations in every way. The user interface is intuitive, making it easy to navigate and utilize all its fantastic features. The commitment of its creator, Pronskiy, shines through in the app's performance and reliability. If you're looking for a top-notch solution, I highly recommend giving mcp a try!

    Avatar
    user_TIhPpZOB
    2025-04-23

    MCP is an incredible application that has significantly improved my productivity. Created by Pronskiy, this tool is easy to navigate and supports multiple languages, making it accessible to a wide range of users. The user interface is intuitive, and the start-up guide is very welcoming. Highly recommend MCP to anyone looking to optimize their workflow!

    Avatar
    user_gsKE79kC
    2025-04-23

    I've been using mcp developed by pronskiy for a while now, and it's absolutely fantastic. The application is user-friendly and highly efficient for my needs. The design and functionality are seamless, making it a joy to use every day. Highly recommended!

    Avatar
    user_YE3wKweL
    2025-04-23

    As an avid user of MCP, I can confidently say it's a game-changer. Developed by Pronskiy, this tool has streamlined my workflows and boosted efficiency significantly. Its seamless integration and user-friendly interface make it a must-have for anyone looking to optimize their tasks. I highly recommend giving MCP a try!