dazz / php-mcp-tools
fill description
dev-main
2025-03-24 21:50 UTC
Requires
- php: >=8.2
- php-llm/mcp-sdk: dev-main
Requires (Dev)
- php-cs-fixer/shim: ^3.73.1
- phpstan/phpstan: ^2.1.10
- phpstan/phpstan-webmozart-assert: ^2.0
- phpunit/phpunit: ^11.5.15
- rector/rector: ^2.0.10
This package is auto-updated.
Last update: 2025-04-24 21:58:08 UTC
README
PHP MCP Tools is a collection of utilities for managing and automating PHP projects with Composer. It provides tools to analyze dependencies, check for outdated packages, and streamline project maintenance.
The Model Context Protocol (MCP) is an open protocol that enables seamless integration between LLM applications and external data sources and tools. Whether you're building an AI-powered IDE, enhancing a chat interface, or creating custom AI workflows, MCP provides a standardized way to connect LLMs with the context they need.
Installation
composer require dazz/php-mcp-tools
Requirements
- PHP 8.2 or higher
- Composer (optional)
- Symfony CLI (optional)
- Pie (optional)
Usage
When used with php-llm/llm-chain-bundle
llm_chain: services: _defaults: autowire: true autoconfigure: true # ... Dazz\PhpMcpTools\Tool\Random: ~ Dazz\PhpMcpTools\Tool\Composer: arguments: $projectDir: '%kernel.project_dir%'
Tools
Random
random_number
- Get a random number between min and max
- Inputs:
min
(int): min numbermax
(int): max number
- Returns: A random number between min and max
Composer
-
composer_exists
- Check if composer executable is existing
- Returns: composer executable exists
-
composer_execute
- Execute a composer command
- Inputs:
command
(string): the command to executeoptions
(array): additional options for the commandarguments
(array): additional arguments for the commandcaptureStdErr
(bool): whether to capture stderr output