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.
npx agentmods add rules/dalehurley/php-mcp-sdk/php-types-validationgit clone --depth 1 https://github.com/dalehurley/php-mcp-sdkWhat 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 | $0.00011 | $0.02699 |
| Opus 5 | $0.00005 | $0.01350 |
| Sonnet 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 yesterday.
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.
- yesterday 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 9mo ago), licensed MIT. It adds 11 tokens to every session and 2,699 once invoked, about $0.0001 per session on Opus 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.
Other cursor rules, from other repositories
atelier
Atelier UI/UX and Backend Architecture Quality Gate.
cursorrules
You must strictly obey the Atelier post-generation quality gate rules for all code generation.
mcp-defender-overview
MCP Defender is a security application designed to monitor and protect Model Context Protocol (MCP) communications. It intercepts tool calls and responses, verifying them against security signatures to prevent potentially harmful operations. The following is a breakdown of the key components and files.
generate-pr-description
This rule provides guidance for generating a pull request (PR) description in this repository.
gemvc-framework
GEMVC framework rules — read vendor/gemvc before inventing patterns.
github-workflow
MCP tool management and workflow proxy.