Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
git clone --depth 1 https://github.com/dalehurley/php-mcp-sdkWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/rules/dalehurley/php-mcp-sdk/php-types-validation)<a href="https://agentmods.dev/rules/dalehurley/php-mcp-sdk/php-types-validation"><img src="https://agentmods.dev/badge/rules/dalehurley/php-mcp-sdk/php-types-validation/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/rules/dalehurley/php-mcp-sdk/php-types-validation"><img src="https://agentmods.dev/badge/rules/dalehurley/php-mcp-sdk/php-types-validation.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00011 | $0.02699 |
| Opus 5.5 | $0.00004 | $0.01080 |
| Sonnet 5.5 | $0.00002 | $0.00540 |
| Haiku 4.5 | $0.00001 | $0.00270 |
Grade A, and why
php-types-validation scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3mo ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 490 lines — stays where its author put it; the contents beside it link to each section on GitHub.
PHP MCP Types and Validation Guide
Core Type Definitions
PHP MCP SDK should use strong typing with PHP 8+ features to match TypeScript's type safety.
Protocol Version Constants
namespace MCP\Types;
final class Protocol {
public const LATEST_PROTOCOL_VERSION = '2025-06-18';
public const DEFAULT_NEGOTIATED_PROTOCOL_VERSION = '2025-03-26';
public const SUPPORTED_PROTOCOL_VERSIONS = [
'2025-06-18',
'2025-03-26',
'2024-11-05',
'2024-10-07',
];
public const JSONRPC_VERSION = '2.0';
}
Error Codes Enum
namespace MCP\Types;
enum ErrorCode: int {
// SDK error codes
case ConnectionClosed = -32000;
case RequestTimeout = -32001;
// Standard JSON-RPC error codes
case ParseError = -32700;
case InvalidRequest = -32600;
case MethodNotFound = -32601;
case InvalidParams = -32602;
case InternalError = -32603;
}
Base Types
namespace MCP\Types;
/**
* Base metadata interface
*/
interface BaseMetadata {
public function getName(): string;
public function getTitle(): ?string;
}
/**
* Implementation info
*/
class Implementation implements BaseMetadata {
public function __construct(
private string $name,
private string $version,
private ?string $title = null
) {}
public function getName(): string {
return $this->name;
}
public function getVersion(): string {
return $this->version;
}
public function getTitle(): ?string {
return $this->title;
}
public function toArray(): array {
$data = [
'name' => $this->name,
'version' => $this->version,
];
if ($this->title !== null) {
$data['title'] = $this->title;
}
return $data;
}
}
Content Types
namespace MCP\Types\Content;
interface ContentBlock {
public function getType(): string;
public function toArray(): array;
}
class TextContent implements ContentBlock {
public function __construct(
private string $text,
private array $meta = []
) {}
public function getType(): string {
return 'text';
}
public function getText(): string {
return $this->text;
}
public function toArray(): array {
$data = [
'type' => 'text',
'text' => $this->text,
];
if (!empty($this->meta)) {
$data['_meta'] = $this->meta;
}
return $data;
}
}
class ImageContent implements ContentBlock {
public function __construct(
private string $data,
private string $mimeType,
private array $meta = []
) {}
public function getType(): string {
return 'image';
}
public function toArray(): array {
return [
'type' => 'image',
'data' => $this->data,
'mimeType' => $this->mimeType,
'_meta' => $this->meta ?: null,
];
}
}
class ResourceLink implements ContentBlock {
public function __construct(
private string $uri,
private string $name,
private ?string $title = null,
private ?string $description = null,
private ?string $mimeType = null
) {}
public function getType(): string {
return 'resource_link';
}
public function toArray(): array {
return array_filter([
'type' => 'resource_link',
'uri' => $this->uri,
'name' => $this->name,
'title' => $this->title,
'description' => $this->description,
'mimeType' => $this->mimeType,
], fn($v) => $v !== null);
}
}
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 3mo ago First seen · 490 lines · 11 tokens per session scan A e45bd24ce3c1
php-types-validation is a cursor rule published in the GitHub repository dalehurley/php-mcp-sdk (27 stars, last pushed 1y ago), licensed MIT. It adds 11 tokens to every session and 2,699 once invoked, about $0.0000 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
php-types-validation compared with cursor rules from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| php-types-validationdalehurley/php-mcp-sdk | Cursor rule | 27 | 1y ago | MIT | A | 11 | Cursor |
| atelieranshrajore/atelier-mcp | Cursor rule | 0 | 3mo ago | MIT | A | 534 | Cursor |
| typescript-coding-rulesotayamashita/openapi-mcp-server | Cursor rule | 7 | 4d ago | MIT | A | 225 | Cursor |
| python-code-validatorjkanselaar/python-code-validator | Cursor rule | 0 | 3mo ago | MIT | A | 329 | Cursor |
| 114-java-secure-codingalkoleft/platform-context-exporter | Cursor rule | 50 | 1y ago | MIT | A | 2,007 | Cursor |
| projectTencentCloudCommunity/mcp-server | Cursor rule | 34 | 4mo ago | Apache-2.0 | A | 2,583 | Cursor |
| laravel-filament-projectjoaopaulolndev/cursor-rules-skills-subagents-commands | Cursor rule | 3 | 8mo ago | none | A | 6 | Cursor |