Download the PHP package ldkafka/yii3-mcp-server without Composer

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

Yii3 MCP Server

Build AI-powered tools for your Yii3 application with Model Context Protocol

PHP Version Yii Version

A framework for building Model Context Protocol (MCP) servers in Yii3 applications. Enable AI assistants like GitHub Copilot to interact with your application through custom tools.


What is MCP?

Model Context Protocol is an open protocol that enables AI assistants to interact with external tools and data sources. Think of it as an API for AI - instead of REST endpoints for humans, MCP provides a standardized way for AI to:


Features

Quick Start

1. Install via Composer

2. Copy Configuration Templates

Configure based on your Yii3 app structure:

Note: The standard yiisoft/app template uses config/console/ for console commands and config/common/di/ for DI configuration.

Or manually edit config/console/commands.php (for yiisoft/app template):

3. Configure DI Container

Create config/common/di/mcp.php (for yiisoft/app template):

For custom tool registration, optionally create config/di-console.php to define tool dependencies.

4. Install Optional Dependencies (If Using Database Tools)

5. Configure Database (Optional - For MySQL Query Tool)

Create config/environments/dev/params.local.php:

Then edit config/environments/dev/params.php to load it:

Add to .gitignore:

6. Set APP_ENV (Yii3 Framework Requirement)

Create .env in project root:

Or for Docker environments, add fallback to yii entry point (before autoload):

7. Rebuild Config Cache

8. Verify Installation

You should see mcp:serve in the command list.

9. Run the Server

10. Create Your Own Tools

The power of this framework is in creating custom tools by implementing McpToolInterface:

Then register your tool in config/common/di/mcp.php:

See docs/CREATING_TOOLS.md for detailed guide.

11. Integrate with Your Editor

Add to VS Code settings.json:

That's it! Your AI assistant can now use your tools.


Example: Database Query Tool

The package includes MysqlQueryTool as a reference implementation:

Ask Copilot: "What tables are in the database?" and it will use this tool automatically!


Creating Custom Tools

Implement McpToolInterface:

Register in DI:


Documentation

📖 Editor Integration - VS Code, Docker, WSL, SSH setup
📖 Creating Tools - Build custom tools guide
📖 Installation - Detailed setup instructions
📖 Deployment - Production deployment strategies
📖 Examples - Complete working examples


Deployment Scenarios

Local Development

Docker

WSL (Windows)

See EDITOR_INTEGRATION.md for more scenarios.


Security

Read-Only by Default: The example MysqlQueryTool enforces read-only operations:

Recommendations:


Requirements


Architecture


Contributing

Contributions are welcome! Please:

  1. Fork the repository
  2. Create a feature branch
  3. Add tests for new features
  4. Submit a pull request

License

This project is licensed under the BSD-3-Clause License.


Support


Credits

Built with ❤️ for the Yii3 community.


Ready to empower your AI assistant? Install now and start building custom tools!


All versions of yii3-mcp-server with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
yiisoft/yii-console Version ^2.0
symfony/console Version ^6.0|^7.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 ldkafka/yii3-mcp-server contains the following files

Loading the files please wait ...