Download the PHP package yangmingzhi/thinkphp-boost without Composer

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

ThinkPHP Boost

为 ThinkPHP 8.x 项目提供 MCP (Model Context Protocol) Server 功能,让 AI 工具(Claude Code、Cursor、Windsurf 等)能够理解并操作你的 ThinkPHP 项目。


简介

ThinkPHP Boost 是一个受 laravel-boost 启发的工具包。它在你的 ThinkPHP 项目中内嵌一个 MCP Server,通过 stdio 传输层与 AI 工具通信,让 AI 能够:

技术栈:


安装

1. 通过 Composer 安装

ThinkPHP 8.x 会自动发现并注册服务提供者(通过 composer.json 中的 extra.think.services),无需手动配置。

2. 发布配置文件(可选)

配置文件位于包内的 config/boost.php,ThinkPHP 会自动加载。如需自定义,复制到项目 config/ 目录:

3. 验证安装


配置 AI 工具的 MCP 连接

Claude Code 配置

在 ThinkPHP 项目根目录创建 .mcp.json

Cursor 配置

在 ThinkPHP 项目根目录创建 .cursor/mcp.json

Windsurf 配置

在 ThinkPHP 项目根目录创建 .windsurf/mcp_config.json

开启调试模式

args 中添加 --debug 选项,调试信息会输出到 STDERR(不影响 MCP 通信):


可用工具列表

AI 工具连接后,可使用以下 MCP 工具:

get_routes

列出 ThinkPHP 应用的所有注册路由。

参数:

返回示例:


get_database_schema

查询数据库表结构,包括字段名、类型、可空性、默认值和注释。

参数:

使用示例:


run_think_command

执行 php think 命令。传入 command: "list" 可查看所有可用命令。

参数:

使用示例:

安全限制(默认禁止的命令):serveclearoptimizebuildboost:serve


get_logs

读取 ThinkPHP 运行时日志(runtime/log 目录)。

参数:

使用示例:


配置文件说明

config/boost.php


注意事项

  1. PHP 版本要求:需要 PHP 8.1 或更高版本,利用了枚举、只读属性、命名参数等新特性。

  2. 数据库配置get_database_schema 工具需要项目配置了有效的数据库连接(.envconfig/database.php)。若数据库未配置,工具会返回友好的错误提示,不会导致 Server 崩溃。

  3. 路由加载get_routes 工具会尝试加载 route/ 目录下的路由文件。如果路由文件中有依赖请求上下文的代码(如 request()),可能无法完整解析。

  4. 安全性run_think_command 工具内置了命令黑名单机制。请根据实际情况在配置文件中扩展 forbidden 列表,防止 AI 执行危险操作。

  5. STDOUT/STDERR 分离:MCP 协议要求 JSON-RPC 响应必须从 STDOUT 输出,任何日志或调试信息必须写入 STDERR。ThinkPHP Boost 严格遵守此规则,保证与所有 MCP 客户端的兼容性。

  6. 进程管理php think boost:serve 是一个常驻进程,AI 工具负责管理其生命周期。退出 AI 工具时,MCP Server 进程也会随之终止。

License

MIT


All versions of thinkphp-boost with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
topthink/framework Version ^8.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 yangmingzhi/thinkphp-boost contains the following files

Loading the files please wait ...