[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M77V4WA9N988GVFGHRFVX6QK":3,"skill-same:01M77V4WA9N988GVFGHRFVX6QK":46},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":27,"repositoryHtmlUrl":28,"repositoryHomepageUrl":6,"ownerHtmlUrl":29,"ownerBlogUrl":30,"ownerDescription":6,"updatedAt":31,"install":32,"resources":45},"01M77V4WA9N988GVFGHRFVX6QK","php-mcp-server-generator",null,"Generate a complete PHP Model Context Protocol server project with tools, resources, prompts, and tests using the official PHP SDK","Reihantt6\u002Fsns-myagent","Reihantt6","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F219822095?v=4","01M77KK94PV8B7C2D9XWXNS8DJ","Mohamad Reihan tegar prasetya","01M77KK958QFMTHYXGXFV7KZ79",2,"MIT","https:\u002F\u002Fgithub.com\u002FReihantt6\u002Fsns-myagent\u002Fblob\u002Fmain\u002Fagent\u002Fskills\u002Fphp-mcp-server-generator\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\ndescription: \"Generate a complete PHP Model Context Protocol server project with tools, resources, prompts, and tests using the official PHP SDK\"\n---\n# PHP MCP Server Generator\n\nYou are a PHP MCP server generator. Create a complete, production-ready PHP MCP server project using the official PHP SDK.\n\n## Project Requirements\n\nAsk the user for:\n1. **Project name** (e.g., \"my-mcp-server\")\n2. **Server description** (e.g., \"A file management MCP server\")\n3. **Transport type** (stdio, http, or both)\n4. **Tools to include** (e.g., \"file read\", \"file write\", \"list directory\")\n5. **Whether to include resources and prompts**\n6. **PHP version** (8.2+ required)\n\n## Project Structure\n\n```\n{project-name}\u002F\n├── composer.json\n├── .gitignore\n├── README.md\n├── server.php\n├── src\u002F\n│   ├── Tools\u002F\n│   │   └── {ToolClass}.php\n│   ├── Resources\u002F\n│   │   └── {ResourceClass}.php\n│   ├── Prompts\u002F\n│   │   └── {PromptClass}.php\n│   └── Providers\u002F\n│       └── {CompletionProvider}.php\n└── tests\u002F\n    └── ToolsTest.php\n```\n\n## File Templates\n\n### composer.json\n\n```json\n{\n    \"name\": \"your-org\u002F{project-name}\",\n    \"description\": \"{Server description}\",\n    \"type\": \"project\",\n    \"require\": {\n        \"php\": \"^8.2\",\n        \"mcp\u002Fsdk\": \"^0.1\"\n    },\n    \"require-dev\": {\n        \"phpunit\u002Fphpunit\": \"^10.0\",\n        \"symfony\u002Fcache\": \"^6.4\"\n    },\n    \"autoload\": {\n        \"psr-4\": {\n            \"App\\\\\\\\\": \"src\u002F\"\n        }\n    },\n    \"autoload-dev\": {\n        \"psr-4\": {\n            \"Tests\\\\\\\\\": \"tests\u002F\"\n        }\n    },\n    \"config\": {\n        \"optimize-autoloader\": true,\n        \"preferred-install\": \"dist\",\n        \"sort-packages\": true\n    }\n}\n```\n\n### .gitignore\n\n```\n\u002Fvendor\n\u002Fcache\ncomposer.lock\n.phpunit.cache\nphpstan.neon\n```\n\n### README.md\n\n```markdown\n# {Project Name}\n\n{Server description}\n\n## Requirements\n\n- PHP 8.2 or higher\n- Composer\n\n## Installation\n\n```bash\ncomposer install\n```\n\n## Usage\n\n### Start Server (Stdio)\n\n```bash\nphp server.php\n```\n\n### Configure in Claude Desktop\n\n```json\n{\n  \"mcpServers\": {\n    \"{project-name}\": {\n      \"command\": \"php\",\n      \"args\": [\"\u002Fabsolute\u002Fpath\u002Fto\u002Fserver.php\"]\n    }\n  }\n}\n```\n\n## Testing\n\n```bash\nvendor\u002Fbin\u002Fphpunit\n```\n\n## Tools\n\n- **{tool_name}**: {Tool description}\n\n## Development\n\nTest with MCP Inspector:\n\n```bash\nnpx @modelcontextprotocol\u002Finspector php server.php\n```\n```\n\n### server.php\n\n```php\n#!\u002Fusr\u002Fbin\u002Fenv php\n\u003C?php\n\ndeclare(strict_types=1);\n\nrequire_once __DIR__ . '\u002Fvendor\u002Fautoload.php';\n\nuse Mcp\\Server;\nuse Mcp\\Server\\Transport\\StdioTransport;\nuse Symfony\\Component\\Cache\\Adapter\\FilesystemAdapter;\nuse Symfony\\Component\\Cache\\Psr16Cache;\n\n\u002F\u002F Setup cache for discovery\n$cache = new Psr16Cache(new FilesystemAdapter('mcp-discovery', 3600, __DIR__ . '\u002Fcache'));\n\n\u002F\u002F Build server with discovery\n$server = Server::builder()\n    ->setServerInfo('{Project Name}', '1.0.0')\n    ->setDiscovery(\n        basePath: __DIR__,\n        scanDirs: ['src'],\n        excludeDirs: ['vendor', 'tests', 'cache'],\n        cache: $cache\n    )\n    ->build();\n\n\u002F\u002F Run with stdio transport\n$transport = new StdioTransport();\n\n$server->run($transport);\n```\n\n### src\u002FTools\u002FExampleTool.php\n\n```php\n\u003C?php\n\ndeclare(strict_types=1);\n\nnamespace App\\Tools;\n\nuse Mcp\\Capability\\Attribute\\McpTool;\nuse Mcp\\Capability\\Attribute\\Schema;\n\nclass ExampleTool\n{\n    \u002F**\n     * Performs a greeting with the provided name.\n     * \n     * @param string $name The name to greet\n     * @return string A greeting message\n     *\u002F\n    #[McpTool]\n    public function greet(string $name): string\n    {\n        return \"Hello, {$name}!\";\n    }\n    \n    \u002F**\n     * Performs arithmetic calculations.\n     *\u002F\n    #[McpTool(name: 'calculate')]\n    public function performCalculation(\n        float $a,\n        float $b,\n        #[Schema(pattern: '^(add|subtract|multiply|divide)$')]\n        string $operation\n    ): float {\n        return match($operation) {\n            'add' => $a + $b,\n            'subtract' => $a - $b,\n            'multiply' => $a * $b,\n            'divide' => $b != 0 ? $a \u002F $b : \n                throw new \\InvalidArgumentException('Division by zero'),\n            default => throw new \\InvalidArgumentException('Invalid operation')\n        };\n    }\n}\n```\n\n### src\u002FResources\u002FConfigResource.php\n\n```php\n\u003C?php\n\ndeclare(strict_types=1);\n\nnamespace App\\Resources;\n\nuse Mcp\\Capability\\Attribute\\McpResource;\n\nclass ConfigResource\n{\n    \u002F**\n     * Provides application configuration.\n     *\u002F\n    #[McpResource(\n        uri: 'config:\u002F\u002Fapp\u002Fsettings',\n        name: 'app_config',\n        mimeType: 'application\u002Fjson'\n    )]\n    public function getConfiguration(): array\n    {\n        return [\n            'version' => '1.0.0',\n            'environment' => 'production',\n            'features' => [\n                'logging' => true,\n                'caching' => true\n            ]\n        ];\n    }\n}\n```\n\n### src\u002FResources\u002FDataProvider.php\n\n```php\n\u003C?php\n\ndeclare(strict_types=1);\n\nnamespace App\\Resources;\n\nuse Mcp\\Capability\\Attribute\\McpResourceTemplate;\n\nclass DataProvider\n{\n    \u002F**\n     * Provides data by category and ID.\n     *\u002F\n    #[McpResourceTemplate(\n        uriTemplate: 'data:\u002F\u002F{category}\u002F{id}',\n        name: 'data_resource',\n        mimeType: 'application\u002Fjson'\n    )]\n    public function getData(string $category, string $id): array\n    {\n        \u002F\u002F Example data retrieval\n        return [\n            'category' => $category,\n            'id' => $id,\n            'data' => \"Sample data for {$category}\u002F{$id}\"\n        ];\n    }\n}\n```\n\n### src\u002FPrompts\u002FPromptGenerator.php\n\n```php\n\u003C?php\n\ndeclare(strict_types=1);\n\nnamespace App\\Prompts;\n\nuse Mcp\\Capability\\Attribute\\McpPrompt;\nuse Mcp\\Capability\\Attribute\\CompletionProvider;\n\nclass PromptGenerator\n{\n    \u002F**\n     * Generates a code review prompt.\n     *\u002F\n    #[McpPrompt(name: 'code_review')]\n    public function reviewCode(\n        #[CompletionProvider(values: ['php', 'javascript', 'python', 'go', 'rust'])]\n        string $language,\n        string $code,\n        #[CompletionProvider(values: ['performance', 'security', 'style', 'general'])]\n        string $focus = 'general'\n    ): array {\n        return [\n            [\n                'role' => 'assistant',\n                'content' => 'You are an expert code reviewer specializing in best practices and optimization.'\n            ],\n            [\n                'role' => 'user',\n                'content' => \"Review this {$language} code with focus on {$focus}:\\n\\n```{$language}\\n{$code}\\n```\"\n            ]\n        ];\n    }\n    \n    \u002F**\n     * Generates documentation prompt.\n     *\u002F\n    #[McpPrompt]\n    public function generateDocs(string $code, string $style = 'detailed'): array\n    {\n        return [\n            [\n                'role' => 'user',\n                'content' => \"Generate {$style} documentation for:\\n\\n```\\n{$code}\\n```\"\n            ]\n        ];\n    }\n}\n```\n\n### tests\u002FToolsTest.php\n\n```php\n\u003C?php\n\ndeclare(strict_types=1);\n\nnamespace Tests;\n\nuse PHPUnit\\Framework\\TestCase;\nuse App\\Tools\\ExampleTool;\n\nclass ToolsTest extends TestCase\n{\n    private ExampleTool $tool;\n    \n    protected function setUp(): void\n    {\n        $this->tool = new ExampleTool();\n    }\n    \n    public function testGreet(): void\n    {\n        $result = $this->tool->greet('World');\n        $this->assertSame('Hello, World!', $result);\n    }\n    \n    public function testCalculateAdd(): void\n    {\n        $result = $this->tool->performCalculation(5, 3, 'add');\n        $this->assertSame(8.0, $result);\n    }\n    \n    public function testCalculateDivide(): void\n    {\n        $result = $this->tool->performCalculation(10, 2, 'divide');\n        $this->assertSame(5.0, $result);\n    }\n    \n    public function testCalculateDivideByZero(): void\n    {\n        $this->expectException(\\InvalidArgumentException::class);\n        $this->expectExceptionMessage('Division by zero');\n        \n        $this->tool->performCalculation(10, 0, 'divide');\n    }\n    \n    public function testCalculateInvalidOperation(): void\n    {\n        $this->expectException(\\InvalidArgumentException::class);\n        $this->expectExceptionMessage('Invalid operation');\n        \n        $this->tool->performCalculation(5, 3, 'modulo');\n    }\n}\n```\n\n### phpunit.xml.dist\n\n```xml\n\u003C?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\u003Cphpunit xmlns:xsi=\"http:\u002F\u002Fwww.w3.org\u002F2001\u002FXMLSchema-instance\"\n         xsi:noNamespaceSchemaLocation=\"vendor\u002Fphpunit\u002Fphpunit\u002Fphpunit.xsd\"\n         bootstrap=\"vendor\u002Fautoload.php\"\n         colors=\"true\">\n    \u003Ctestsuites>\n        \u003Ctestsuite name=\"Test Suite\">\n            \u003Cdirectory>tests\u003C\u002Fdirectory>\n        \u003C\u002Ftestsuite>\n    \u003C\u002Ftestsuites>\n    \u003Ccoverage>\n        \u003Cinclude>\n            \u003Cdirectory suffix=\".php\">src\u003C\u002Fdirectory>\n        \u003C\u002Finclude>\n    \u003C\u002Fcoverage>\n\u003C\u002Fphpunit>\n```\n\n## Implementation Guidelines\n\n1. **Use PHP Attributes**: Leverage `#[McpTool]`, `#[McpResource]`, `#[McpPrompt]` for clean code\n2. **Type Declarations**: Use strict types (`declare(strict_types=1);`) in all files\n3. **PSR-12 Coding Standard**: Follow PHP-FIG standards\n4. **Schema Validation**: Use `#[Schema]` attributes for parameter validation\n5. **Error Handling**: Throw specific exceptions with clear messages\n6. **Testing**: Write PHPUnit tests for all tools\n7. **Documentation**: Use PHPDoc blocks for all methods\n8. **Caching**: Always use PSR-16 cache for discovery in production\n\n## Tool Patterns\n\n### Simple Tool\n```php\n#[McpTool]\npublic function simpleAction(string $input): string\n{\n    return \"Processed: {$input}\";\n}\n```\n\n### Tool with Validation\n```php\n#[McpTool]\npublic function validateEmail(\n    #[Schema(format: 'email')]\n    string $email\n): bool {\n    return filter_var($email, FILTER_VALIDATE_EMAIL) !== false;\n}\n```\n\n### Tool with Enum\n```php\nenum Status: string {\n    case ACTIVE = 'active';\n    case INACTIVE = 'inactive';\n}\n\n#[McpTool]\npublic function setStatus(string $id, Status $status): array\n{\n    return ['id' => $id, 'status' => $status->value];\n}\n```\n\n## Resource Patterns\n\n### Static Resource\n```php\n#[McpResource(uri: 'config:\u002F\u002Fsettings', mimeType: 'application\u002Fjson')]\npublic function getSettings(): array\n{\n    return ['key' => 'value'];\n}\n```\n\n### Dynamic Resource\n```php\n#[McpResourceTemplate(uriTemplate: 'user:\u002F\u002F{id}')]\npublic function getUser(string $id): array\n{\n    return $this->users[$id] ?? throw new \\RuntimeException('User not found');\n}\n```\n\n## Running the Server\n\n```bash\n# Install dependencies\ncomposer install\n\n# Run tests\nvendor\u002Fbin\u002Fphpunit\n\n# Start server\nphp server.php\n\n# Test with inspector\nnpx @modelcontextprotocol\u002Finspector php server.php\n```\n\n## Claude Desktop Configuration\n\n```json\n{\n  \"mcpServers\": {\n    \"{project-name}\": {\n      \"command\": \"php\",\n      \"args\": [\"\u002Fabsolute\u002Fpath\u002Fto\u002Fserver.php\"]\n    }\n  }\n}\n```\n\nNow generate the complete project based on user requirements!\n","# PHP MCP Server Generator\n\nYou are a PHP MCP server generator. Create a complete, production-ready PHP MCP server project using the official PHP SDK.\n\n## Project Requirements\n\nAsk the user for:\n1. **Project name** (e.g., \"my-mcp-server\")\n2. **Server description** (e.g., \"A file management MCP server\")\n3. **Transport type** (stdio, http, or both)\n4. **Tools to include** (e.g., \"file read\", \"file write\", \"list directory\")\n5. **Whether to include resources and prompts**\n6. **PHP version** (8.2+ required)\n\n## Project Structure\n\n```\n{project-name}\u002F\n├── composer.json\n├── .gitignore\n├── README.md\n├── server.php\n├── src\u002F\n│   ├── Tools\u002F\n│   │   └── {ToolClass}.php\n│   ├── Resources\u002F\n│   │   └── {ResourceClass}.php\n│   ├── Prompts\u002F\n│   │   └── {PromptClass}.php\n│   └── Providers\u002F\n│       └── {CompletionProvider}.php\n└── tests\u002F\n    └── ToolsTest.php\n```\n\n## File Templates\n\n### composer.json\n\n```json\n{\n    \"name\": \"your-org\u002F{project-name}\",\n    \"description\": \"{Server description}\",\n    \"type\": \"project\",\n    \"require\": {\n        \"php\": \"^8.2\",\n        \"mcp\u002Fsdk\": \"^0.1\"\n    },\n    \"require-dev\": {\n        \"phpunit\u002Fphpunit\": \"^10.0\",\n        \"symfony\u002Fcache\": \"^6.4\"\n    },\n    \"autoload\": {\n        \"psr-4\": {\n            \"App\\\\\\\\\": \"src\u002F\"\n        }\n    },\n    \"autoload-dev\": {\n        \"psr-4\": {\n            \"Tests\\\\\\\\\": \"tests\u002F\"\n        }\n    },\n    \"config\": {\n        \"optimize-autoloader\": true,\n        \"preferred-install\": \"dist\",\n        \"sort-packages\": true\n    }\n}\n```\n\n### .gitignore\n\n```\n\u002Fvendor\n\u002Fcache\ncomposer.lock\n.phpunit.cache\nphpstan.neon\n```\n\n### README.md\n\n```markdown\n# {Project Name}\n\n{Server description}\n\n## Requirements\n\n- PHP 8.2 or higher\n- Composer\n\n## Installation\n\n```bash\ncomposer install\n```\n\n## Usage\n\n### Start Server (Stdio)\n\n```bash\nphp server.php\n```\n\n### Configure in Claude Desktop\n\n```json\n{\n  \"mcpServers\": {\n    \"{project-name}\": {\n      \"command\": \"php\",\n      \"args\": [\"\u002Fabsolute\u002Fpath\u002Fto\u002Fserver.php\"]\n    }\n  }\n}\n```\n\n## Testing\n\n```bash\nvendor\u002Fbin\u002Fphpunit\n```\n\n## Tools\n\n- **{tool_name}**: {Tool description}\n\n## Development\n\nTest with MCP Inspector:\n\n```bash\nnpx @modelcontextprotocol\u002Finspector php server.php\n```\n```\n\n### server.php\n\n```php\n#!\u002Fusr\u002Fbin\u002Fenv php\n\u003C?php\n\ndeclare(strict_types=1);\n\nrequire_once __DIR__ . '\u002Fvendor\u002Fautoload.php';\n\nuse Mcp\\Server;\nuse Mcp\\Server\\Transport\\StdioTransport;\nuse Symfony\\Component\\Cache\\Adapter\\FilesystemAdapter;\nuse Symfony\\Component\\Cache\\Psr16Cache;\n\n\u002F\u002F Setup cache for discovery\n$cache = new Psr16Cache(new FilesystemAdapter('mcp-discovery', 3600, __DIR__ . '\u002Fcache'));\n\n\u002F\u002F Build server with discovery\n$server = Server::builder()\n    ->setServerInfo('{Project Name}', '1.0.0')\n    ->setDiscovery(\n        basePath: __DIR__,\n        scanDirs: ['src'],\n        excludeDirs: ['vendor', 'tests', 'cache'],\n        cache: $cache\n    )\n    ->build();\n\n\u002F\u002F Run with stdio transport\n$transport = new StdioTransport();\n\n$server->run($transport);\n```\n\n### src\u002FTools\u002FExampleTool.php\n\n```php\n\u003C?php\n\ndeclare(strict_types=1);\n\nnamespace App\\Tools;\n\nuse Mcp\\Capability\\Attribute\\McpTool;\nuse Mcp\\Capability\\Attribute\\Schema;\n\nclass ExampleTool\n{\n    \u002F**\n     * Performs a greeting with the provided name.\n     * \n     * @param string $name The name to greet\n     * @return string A greeting message\n     *\u002F\n    #[McpTool]\n    public function greet(string $name): string\n    {\n        return \"Hello, {$name}!\";\n    }\n    \n    \u002F**\n     * Performs arithmetic calculations.\n     *\u002F\n    #[McpTool(name: 'calculate')]\n    public function performCalculation(\n        float $a,\n        float $b,\n        #[Schema(pattern: '^(add|subtract|multiply|divide)$')]\n        string $operation\n    ): float {\n        return match($operation) {\n            'add' => $a + $b,\n            'subtract' => $a - $b,\n            'multiply' => $a * $b,\n            'divide' => $b != 0 ? $a \u002F $b : \n                throw new \\InvalidArgumentException('Division by zero'),\n            default => throw new \\InvalidArgumentException('Invalid operation')\n        };\n    }\n}\n```\n\n### src\u002FResources\u002FConfigResource.php\n\n```php\n\u003C?php\n\ndeclare(strict_types=1);\n\nnamespace App\\Resources;\n\nuse Mcp\\Capability\\Attribute\\McpResource;\n\nclass ConfigResource\n{\n    \u002F**\n     * Provides application configuration.\n     *\u002F\n    #[McpResource(\n        uri: 'config:\u002F\u002Fapp\u002Fsettings',\n        name: 'app_config',\n        mimeType: 'application\u002Fjson'\n    )]\n    public function getConfiguration(): array\n    {\n        return [\n            'version' => '1.0.0',\n            'environment' => 'production',\n            'features' => [\n                'logging' => true,\n                'caching' => true\n            ]\n        ];\n    }\n}\n```\n\n### src\u002FResources\u002FDataProvider.php\n\n```php\n\u003C?php\n\ndeclare(strict_types=1);\n\nnamespace App\\Resources;\n\nuse Mcp\\Capability\\Attribute\\McpResourceTemplate;\n\nclass DataProvider\n{\n    \u002F**\n     * Provides data by category and ID.\n     *\u002F\n    #[McpResourceTemplate(\n        uriTemplate: 'data:\u002F\u002F{category}\u002F{id}',\n        name: 'data_resource',\n        mimeType: 'application\u002Fjson'\n    )]\n    public function getData(string $category, string $id): array\n    {\n        \u002F\u002F Example data retrieval\n        return [\n            'category' => $category,\n            'id' => $id,\n            'data' => \"Sample data for {$category}\u002F{$id}\"\n        ];\n    }\n}\n```\n\n### src\u002FPrompts\u002FPromptGenerator.php\n\n```php\n\u003C?php\n\ndeclare(strict_types=1);\n\nnamespace App\\Prompts;\n\nuse Mcp\\Capability\\Attribute\\McpPrompt;\nuse Mcp\\Capability\\Attribute\\CompletionProvider;\n\nclass PromptGenerator\n{\n    \u002F**\n     * Generates a code review prompt.\n     *\u002F\n    #[McpPrompt(name: 'code_review')]\n    public function reviewCode(\n        #[CompletionProvider(values: ['php', 'javascript', 'python', 'go', 'rust'])]\n        string $language,\n        string $code,\n        #[CompletionProvider(values: ['performance', 'security', 'style', 'general'])]\n        string $focus = 'general'\n    ): array {\n        return [\n            [\n                'role' => 'assistant',\n                'content' => 'You are an expert code reviewer specializing in best practices and optimization.'\n            ],\n            [\n                'role' => 'user',\n                'content' => \"Review this {$language} code with focus on {$focus}:\\n\\n```{$language}\\n{$code}\\n```\"\n            ]\n        ];\n    }\n    \n    \u002F**\n     * Generates documentation prompt.\n     *\u002F\n    #[McpPrompt]\n    public function generateDocs(string $code, string $style = 'detailed'): array\n    {\n        return [\n            [\n                'role' => 'user',\n                'content' => \"Generate {$style} documentation for:\\n\\n```\\n{$code}\\n```\"\n            ]\n        ];\n    }\n}\n```\n\n### tests\u002FToolsTest.php\n\n```php\n\u003C?php\n\ndeclare(strict_types=1);\n\nnamespace Tests;\n\nuse PHPUnit\\Framework\\TestCase;\nuse App\\Tools\\ExampleTool;\n\nclass ToolsTest extends TestCase\n{\n    private ExampleTool $tool;\n    \n    protected function setUp(): void\n    {\n        $this->tool = new ExampleTool();\n    }\n    \n    public function testGreet(): void\n    {\n        $result = $this->tool->greet('World');\n        $this->assertSame('Hello, World!', $result);\n    }\n    \n    public function testCalculateAdd(): void\n    {\n        $result = $this->tool->performCalculation(5, 3, 'add');\n        $this->assertSame(8.0, $result);\n    }\n    \n    public function testCalculateDivide(): void\n    {\n        $result = $this->tool->performCalculation(10, 2, 'divide');\n        $this->assertSame(5.0, $result);\n    }\n    \n    public function testCalculateDivideByZero(): void\n    {\n        $this->expectException(\\InvalidArgumentException::class);\n        $this->expectExceptionMessage('Division by zero');\n        \n        $this->tool->performCalculation(10, 0, 'divide');\n    }\n    \n    public function testCalculateInvalidOperation(): void\n    {\n        $this->expectException(\\InvalidArgumentException::class);\n        $this->expectExceptionMessage('Invalid operation');\n        \n        $this->tool->performCalculation(5, 3, 'modulo');\n    }\n}\n```\n\n### phpunit.xml.dist\n\n```xml\n\u003C?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\u003Cphpunit xmlns:xsi=\"http:\u002F\u002Fwww.w3.org\u002F2001\u002FXMLSchema-instance\"\n         xsi:noNamespaceSchemaLocation=\"vendor\u002Fphpunit\u002Fphpunit\u002Fphpunit.xsd\"\n         bootstrap=\"vendor\u002Fautoload.php\"\n         colors=\"true\">\n    \u003Ctestsuites>\n        \u003Ctestsuite name=\"Test Suite\">\n            \u003Cdirectory>tests\u003C\u002Fdirectory>\n        \u003C\u002Ftestsuite>\n    \u003C\u002Ftestsuites>\n    \u003Ccoverage>\n        \u003Cinclude>\n            \u003Cdirectory suffix=\".php\">src\u003C\u002Fdirectory>\n        \u003C\u002Finclude>\n    \u003C\u002Fcoverage>\n\u003C\u002Fphpunit>\n```\n\n## Implementation Guidelines\n\n1. **Use PHP Attributes**: Leverage `#[McpTool]`, `#[McpResource]`, `#[McpPrompt]` for clean code\n2. **Type Declarations**: Use strict types (`declare(strict_types=1);`) in all files\n3. **PSR-12 Coding Standard**: Follow PHP-FIG standards\n4. **Schema Validation**: Use `#[Schema]` attributes for parameter validation\n5. **Error Handling**: Throw specific exceptions with clear messages\n6. **Testing**: Write PHPUnit tests for all tools\n7. **Documentation**: Use PHPDoc blocks for all methods\n8. **Caching**: Always use PSR-16 cache for discovery in production\n\n## Tool Patterns\n\n### Simple Tool\n```php\n#[McpTool]\npublic function simpleAction(string $input): string\n{\n    return \"Processed: {$input}\";\n}\n```\n\n### Tool with Validation\n```php\n#[McpTool]\npublic function validateEmail(\n    #[Schema(format: 'email')]\n    string $email\n): bool {\n    return filter_var($email, FILTER_VALIDATE_EMAIL) !== false;\n}\n```\n\n### Tool with Enum\n```php\nenum Status: string {\n    case ACTIVE = 'active';\n    case INACTIVE = 'inactive';\n}\n\n#[McpTool]\npublic function setStatus(string $id, Status $status): array\n{\n    return ['id' => $id, 'status' => $status->value];\n}\n```\n\n## Resource Patterns\n\n### Static Resource\n```php\n#[McpResource(uri: 'config:\u002F\u002Fsettings', mimeType: 'application\u002Fjson')]\npublic function getSettings(): array\n{\n    return ['key' => 'value'];\n}\n```\n\n### Dynamic Resource\n```php\n#[McpResourceTemplate(uriTemplate: 'user:\u002F\u002F{id}')]\npublic function getUser(string $id): array\n{\n    return $this->users[$id] ?? throw new \\RuntimeException('User not found');\n}\n```\n\n## Running the Server\n\n```bash\n# Install dependencies\ncomposer install\n\n# Run tests\nvendor\u002Fbin\u002Fphpunit\n\n# Start server\nphp server.php\n\n# Test with inspector\nnpx @modelcontextprotocol\u002Finspector php server.php\n```\n\n## Claude Desktop Configuration\n\n```json\n{\n  \"mcpServers\": {\n    \"{project-name}\": {\n      \"command\": \"php\",\n      \"args\": [\"\u002Fabsolute\u002Fpath\u002Fto\u002Fserver.php\"]\n    }\n  }\n}\n```\n\nNow generate the complete project based on user requirements!\n",{"description":7},"main","58843b159d7a4050d6b785a98b908cce505c0b92","agent\u002Fskills\u002Fphp-mcp-server-generator",0,"https:\u002F\u002Fgithub.com\u002FReihantt6\u002Fsns-myagent","https:\u002F\u002Fgithub.com\u002FReihantt6","reihsns.web.id","2026-08-19 20:08:18",{"source":8,"skillName":5,"commands":33,"prompt":43,"zipAvailable":44},[34,37,40],{"tool":35,"command":36},"npx","npx skills add Reihantt6\u002Fsns-myagent --skill php-mcp-server-generator",{"tool":38,"command":39},"bunx","bunx skills add Reihantt6\u002Fsns-myagent --skill php-mcp-server-generator",{"tool":41,"command":42},"pnpm","pnpm dlx skills add Reihantt6\u002Fsns-myagent --skill php-mcp-server-generator","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FReihantt6\u002Fsns-myagent\u002Fblob\u002Fmain\u002Fagent\u002Fskills\u002Fphp-mcp-server-generator\u002FSKILL.md",true,[],[47,54,61,68,75,82],{"skillNo":48,"name":49,"nameZh":6,"description":50,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":51,"categories":52,"keywords":53,"publishedAt":19},"01M77XDCYZ407XYMF2T4P6F7VT","youtube-transcript","Extract transcripts from YouTube videos. Use when the user asks for a transcript, subtitles, or captions of a YouTube video and provides a YouTube URL (youtube.com\u002Fwatch?v=, youtu.be\u002F, or similar). Supports output with or without timestamps.","https:\u002F\u002Fgithub.com\u002FReihantt6\u002Fsns-myagent\u002Fblob\u002Fmain\u002Fagent\u002Fskills\u002Fyoutube-transcript\u002FSKILL.md",[],[],{"skillNo":55,"name":56,"nameZh":6,"description":57,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":58,"categories":59,"keywords":60,"publishedAt":19},"01M77XD7PBC98J6MXGJJ2TJ8DX","youtube-thumbnail-design","YouTube thumbnail design with specific dimensions, contrast rules, and mobile preview optimization. Covers safe zones, text placement, face expression psychology, and A\u002FB testing. Use for: YouTube thumbnails, video cover images, click-through optimization. Triggers: youtube thumbnail, thumbnail design, video thumbnail, click through rate, ctr optimization, youtube cover, video cover image, thumbnail maker, thumbnail tips, youtube design, video preview image","https:\u002F\u002Fgithub.com\u002FReihantt6\u002Fsns-myagent\u002Fblob\u002Fmain\u002Fagent\u002Fskills\u002Fyoutube-thumbnail-design\u002FSKILL.md",[],[],{"skillNo":62,"name":63,"nameZh":6,"description":64,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":65,"categories":66,"keywords":67,"publishedAt":19},"01M77XD2541C8HXJ6RHYZP4NGJ","youtube-short-maker","Make YouTube Shorts that hold attention with Pexo — vertical 9:16, fast-paced, hook in the first 3 seconds. Describe your topic and Pexo writes the script, generates the shots, picks the models, and assembles a finished Short with music and captions. Use for YouTube Shorts: \"youtube short\", \"make a youtube short\", \"shorts video\", \"short-form video\". NOT for long-form or landscape video.","https:\u002F\u002Fgithub.com\u002FReihantt6\u002Fsns-myagent\u002Fblob\u002Fmain\u002Fagent\u002Fskills\u002Fyoutube-short-maker\u002FSKILL.md",[],[],{"skillNo":69,"name":70,"nameZh":6,"description":71,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":72,"categories":73,"keywords":74,"publishedAt":19},"01M77XCXKVSYK7KTZ3PQBVVGFD","xcode-project-setup","Safely modifies Xcode projects (.pbxproj) to add Swift Packages and link files. Use this skill whenever an iOS project needs dependencies installed (e.g. Firebase, Alamofire).","https:\u002F\u002Fgithub.com\u002FReihantt6\u002Fsns-myagent\u002Fblob\u002Fmain\u002Fagent\u002Fskills\u002Fxcode-project-setup\u002FSKILL.md",[],[],{"skillNo":76,"name":77,"nameZh":6,"description":78,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":79,"categories":80,"keywords":81,"publishedAt":19},"01M77XCR1DV8ZQK2NHWKVY4EWX","x402","Set up Browser Use Cloud payments with x402 — pay per request from a crypto wallet (USDC on Base mainnet), no signup or API key. Two setups it works out up front — \"just use it\" (set up a wallet so you or Claude Code can run cloud browser tasks paid from the wallet — Claude writes and runs throwaway scripts, nothing touches your codebase) or \"build it in\" (install the SDK and write the key + code into your project). Walks through wallet setup, funding, .env, and a ~$1 test run. Use when the user asks about x402, pay-per-use, USDC payments, or wants Browser Use Cloud without an API key. For the free-tier signup (reverse-CAPTCHA → API key), use `browser-use cloud signup` or the `cloud` skill instead.","https:\u002F\u002Fgithub.com\u002FReihantt6\u002Fsns-myagent\u002Fblob\u002Fmain\u002Fagent\u002Fskills\u002Fx402\u002FSKILL.md",[],[],{"skillNo":83,"name":84,"nameZh":6,"description":85,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":86,"categories":87,"keywords":88,"publishedAt":19},"01M77XCMD3R3ZBZQQSW6E0793B","x-twitter-scraper","Build GitHub Copilot workflows with Xquik X API SDKs, REST endpoints, hosted Apify Actor runs, MCP tools, TweetClaw OpenClaw plugin installs, signed webhooks, tweet search, user lookup, follower exports, media actions, and agent automation.","https:\u002F\u002Fgithub.com\u002FReihantt6\u002Fsns-myagent\u002Fblob\u002Fmain\u002Fagent\u002Fskills\u002Fx-twitter-scraper\u002FSKILL.md",[],[]]