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-transport-implementationgit 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.00010 | $0.02882 |
| Opus 5 | $0.00005 | $0.01441 |
| Sonnet 5 | $0.00002 | $0.00576 |
| Haiku 4.5 | $0.00001 | $0.00288 |
Grade A, and why
php-transport-implementation 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 2d 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 — 447 lines — stays where its author put it; the contents beside it link to each section on GitHub.
PHP MCP Transport Implementation Guide
Transport Interface
All transports must implement the base Transport interface:
namespace MCP\Shared;
use React\Promise\PromiseInterface;
interface Transport {
/**
* Start the transport connection
*/
public function start(): PromiseInterface;
/**
* Send a message through the transport
*/
public function send(array $message): PromiseInterface;
/**
* Close the transport connection
*/
public function close(): PromiseInterface;
/**
* Set handler for incoming messages
*/
public function setMessageHandler(callable $handler): void;
/**
* Set handler for transport closure
*/
public function setCloseHandler(callable $handler): void;
/**
* Set handler for transport errors
*/
public function setErrorHandler(callable $handler): void;
}
STDIO Transport
Server STDIO Transport
namespace MCP\Server\Transport;
use MCP\Shared\Transport;
use React\EventLoop\LoopInterface;
use React\Stream\ReadableResourceStream;
use React\Stream\WritableResourceStream;
use React\Promise\Promise;
use React\Promise\PromiseInterface;
class StdioServerTransport implements Transport {
private ReadableResourceStream $stdin;
private WritableResourceStream $stdout;
private LoopInterface $loop;
private ?callable $messageHandler = null;
private string $buffer = '';
public function __construct(?LoopInterface $loop = null) {
$this->loop = $loop ?? Loop::get();
}
public function start(): PromiseInterface {
return new Promise(function ($resolve) {
// Set up streams
$this->stdin = new ReadableResourceStream(STDIN, $this->loop);
$this->stdout = new WritableResourceStream(STDOUT, $this->loop);
// Handle incoming data
$this->stdin->on('data', [$this, 'handleData']);
$this->stdin->on('close', [$this, 'handleClose']);
$this->stdin->on('error', [$this, 'handleError']);
$resolve();
});
}
private function handleData(string $chunk): void {
$this->buffer .= $chunk;
// Parse messages from buffer
while (($pos = strpos($this->buffer, "\n")) !== false) {
$line = substr($this->buffer, 0, $pos);
$this->buffer = substr($this->buffer, $pos + 1);
if (trim($line) === '') {
continue;
}
try {
$message = json_decode($line, true, 512, JSON_THROW_ON_ERROR);
if ($this->messageHandler) {
($this->messageHandler)($message);
}
} catch (\JsonException $e) {
$this->handleError(new \RuntimeException("Invalid JSON: " . $e->getMessage()));
}
}
}
public function send(array $message): PromiseInterface {
return new Promise(function ($resolve, $reject) use ($message) {
try {
$json = json_encode($message, JSON_THROW_ON_ERROR | JSON_UNESCAPED_SLASHES);
$this->stdout->write($json . "\n");
$resolve();
} catch (\JsonException $e) {
$reject(new \RuntimeException("Failed to encode message: " . $e->getMessage()));
}
});
}
}
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.
- 2d ago First seen · 447 lines · 10 tokens per session scan A b7a6a044cdfe
php-transport-implementation is a cursor rule published in the GitHub repository dalehurley/php-mcp-sdk (27 stars, last pushed 9mo ago), licensed MIT. It adds 10 tokens to every session and 2,882 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.
mintlify
You are an AI writing assistant specialized in creating exceptional technical documentation using Mintlify components and following industry-leading technical writing practices.
github-workflow
MCP tool management and workflow proxy.
publisher
Publish HTML frontend projects to the publishing platform (publisher). Use when the user wants to publish/ship a project, get an access URL, list their published projects, or build an Android APK. No Python required — call the HTTP APIs directly.