1. Go to this page and download the library: Download ymwl/think8-mcp library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
namespace app\mcp;
use think\App;
use ymwl\think8mcp\MCP\Tools\ToolInterface;
class AddonInfoTool implements ToolInterface
{
public function __construct(private App $app) {}
public function getName(): string
{
return 'get_addon_info';
}
// ... 其余接口方法
}