Scaffold production-ready PHP MCP server projects with tools, resources, prompts, and tests.
Works with
Generates complete project structure with composer.json, server.php, and PSR-4 autoloading configured for the official PHP SDK
Supports three transport types (stdio, HTTP, or both) and includes attribute-based tool, resource, and prompt definitions with schema validation
Provides templated examples for simple tools, validated parameters, enum-based operations, static resources, and dynamic re
AI-first code editor with Composer
Before installing skills in Cursor, ensure your development environment meets these requirements:
node --versionphp-mcp-server-generatorExecute the skills CLI command in your project's root directory to begin installation:
Fetches php-mcp-server-generator from github/awesome-copilot and configures it for Cursor.
The CLI shows a list of agents. Use arrow keys and space to select Cursor:
Confirm successful installation by checking the skill directory location:
Restart Cursor to activate php-mcp-server-generator. Access via /php-mcp-server-generator in your agent's command palette.
We perform automated surface-level scans (Gen AI Scanner, Socket, Snyk) during installation. These checks detect common vulnerabilities but do not guarantee complete security. Always review skill source code and verify the publisher's reputation before production use.
Skills execute code in your environment. Always review source, verify the publisher, and test in isolation before production.
Submit your Claude Code skill and start earning
Automate repetitive workflows and reduce manual effort
Example
Generate reports, summarize documents, draft communications
Save 3-5 hours per week on routine tasks
Learn new skills, understand complex topics, get expert guidance
Example
Explain concepts, provide examples, suggest learning resources
Accelerate learning and skill development by 2x
Enhance output quality through reviews, suggestions, and refinements
Example
Review drafts, suggest improvements, catch errors
Improve work quality by 30-40% with less effort
0
total installs
0
this week
28.7K
GitHub stars
0
upvotes
Run in your terminal
0
installs
0
this week
28.7K
stars
You are a PHP MCP server generator. Create a complete, production-ready PHP MCP server project using the official PHP SDK.
Ask the user for:
{project-name}/
├── composer.json
├── .gitignore
├── README.md
├── server.php
├── src/
│ ├── Tools/
│ │ └── {ToolClass}.php
│ ├── Resources/
│ │ └── {ResourceClass}.php
│ ├── Prompts/
│ │ └── {PromptClass}.php
│ └── Providers/
│ └── {CompletionProvider}.php
└── tests/
└── ToolsTest.php
{
"name": "your-org/{project-name}",
"description": "{Server description}",
"type": "project",
"require": {
"php": "^8.2",
"mcp/sdk": "^0.1"
},
"require-dev": {
"phpunit/phpunit": "^10.0",
"symfony/cache": "^6.4"
},
"autoload": {
"psr-4": {
"App\\\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"Tests\\\\": "tests/"
}
},
"config": {
"optimize-autoloader": true,
"preferred-install": "dist",
"sort-packages": true
}
}
/vendor
/cache
composer.lock
.phpunit.cache
phpstan.neon
# {Project Name}
{Server description}
## Requirements
- PHP 8.2 or higher
- Composer
## Installation
```bash
composer install
php server.php
{
"mcpServers": {
"{project-name}": {
"command": "php",
"args": ["/absolute/path/to/server.php"]
}
}
}
vendor/bin/phpunit
Test with MCP Inspector:
npx @modelcontextprotocol/inspector php server.php
### server.php
```php
#!/usr/bin/env php
<?php
declare(strict_types=1);
require_once __DIR__ . '/vendor/autoload.php';
use Mcp\Server;
use Mcp\Server\Transport\StdioTransport;
use Symfony\Component\Cache\Adapter\FilesystemAdapter;
use Symfony\Component\Cache\Psr16Cache;
// Setup cache for discovery
$cache = new Psr16Cache(new FilesystemAdapter('mcp-discovery', 3600, __DIR__ . '/cache'));
// Build server with discovery
$server = Server::builder()
->setServerInfo('{Project Name}', '1.0.0')
->setDiscovery(
basePath: __DIR__,
scanDirs: ['src'],
excludeDirs: ['vendor', 'tests', 'cache'],
cache: $cache
)
->build();
// Run with stdio transport
$transport = new StdioTransport();
$server->run($transport);
<?php
declare(strict_types=1);
namespace App\Tools;
use Mcp\Capability\Attribute\McpTool;
use Mcp\Capability\Attribute\Schema;
class ExampleTool
{
/**
* Performs a greeting with the provided name.
*
* @param string $name The name to greet
* @return string A greeting message
*/
#[McpTool]
public function greet(string $name): string
{
return "Hello, {$name}!";
}
/**
* Performs arithmetic calculations.
*/
#[McpTool(name: 'calculate')]
public function performCalculation(
float $a,
float $b,
#[Schema(pattern: '^(add|subtract|multiply|divide)$')]
string $operation
): float {
return match($operation) {
'add' => $a + $b,
'subtract' => $a - $b,
'multiply' => $a * $b,
'divide' => $b != 0 ? $a / $b :
throw new \InvalidArgumentException('Division by zero'),
default => throw new \InvalidArgumentException('Invalid operation')
};
}
}
<?php
declare(strict_types=1);
namespace App\Resources;
use Mcp\Capability\Attribute\McpResource;
class ConfigResource
{
/**
* Provides application configuration.
Prerequisites
Time Estimate
15-45 minutes depending on use case complexity
Steps
Common Pitfalls
✓ Do
✗ Don't
💡 Pro Tips
✓ Use when
Use when skill capabilities match your task, clear ROI on time saved, and you can validate outputs. Best for repetitive tasks, learning, and quality improvement.
✗ Avoid when
Avoid when task requires deep expertise you can't validate, involves sensitive decisions, or when learning process is more valuable than speed of completion.
github/awesome-copilot
github/awesome-copilot
github/awesome-copilot
github/awesome-copilot
shipshitdev/library
jeffallan/claude-skills
We added php-mcp-server-generator from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.
Useful defaults in php-mcp-server-generator — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.
php-mcp-server-generator fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.
php-mcp-server-generator has been reliable in day-to-day use. Documentation quality is above average for community skills.
php-mcp-server-generator is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.
Registry listing for php-mcp-server-generator matched our evaluation — installs cleanly and behaves as described in the markdown.
Useful defaults in php-mcp-server-generator — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.
php-mcp-server-generator has been reliable in day-to-day use. Documentation quality is above average for community skills.
php-mcp-server-generator reduced setup friction for our internal harness; good balance of opinion and flexibility.
I recommend php-mcp-server-generator for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.
showing 1-10 of 68