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-auth-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.00011 | $0.02878 |
| Opus 5 | $0.00005 | $0.01439 |
| Sonnet 5 | $0.00002 | $0.00576 |
| Haiku 4.5 | $0.00001 | $0.00288 |
Grade A, and why
php-auth-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 — 435 lines — stays where its author put it; the contents beside it link to each section on GitHub.
PHP MCP Authentication and Authorization Guide
Authentication Architecture
MCP supports OAuth 2.0 authentication with proper token validation and client management.
AuthInfo Interface
namespace MCP\Auth;
interface AuthInfo {
public function getToken(): string;
public function getClientId(): string;
public function getScopes(): array;
public function getExpiresAt(): ?int;
public function getResource(): ?string;
public function getExtra(): array;
}
class DefaultAuthInfo implements AuthInfo {
public function __construct(
private string $token,
private string $clientId,
private array $scopes,
private ?int $expiresAt = null,
private ?string $resource = null,
private array $extra = []
) {}
// Implement interface methods...
}
OAuth Provider Interface
namespace MCP\Server\Auth;
use React\Promise\PromiseInterface;
interface OAuthProvider {
/**
* Get authorization URL
*/
public function getAuthorizationUrl(array $params): string;
/**
* Exchange authorization code for tokens
*/
public function exchangeCode(string $code, array $params): PromiseInterface;
/**
* Refresh an access token
*/
public function refreshToken(string $refreshToken): PromiseInterface;
/**
* Verify an access token
*/
public function verifyAccessToken(string $token): PromiseInterface;
/**
* Revoke a token
*/
public function revokeToken(string $token, string $tokenType): PromiseInterface;
/**
* Get client information
*/
public function getClient(string $clientId): PromiseInterface;
}
Proxy OAuth Provider
For proxying OAuth requests to an external provider:
namespace MCP\Server\Auth\Providers;
use GuzzleHttp\Client;
use React\Promise\Promise;
use React\Promise\PromiseInterface;
class ProxyOAuthProvider implements OAuthProvider {
private Client $httpClient;
private array $endpoints;
private callable $verifyAccessToken;
private callable $getClient;
public function __construct(array $config) {
$this->httpClient = new Client();
$this->endpoints = $config['endpoints'];
$this->verifyAccessToken = $config['verifyAccessToken'];
$this->getClient = $config['getClient'];
}
public function exchangeCode(string $code, array $params): PromiseInterface {
return new Promise(function ($resolve, $reject) use ($code, $params) {
try {
$response = $this->httpClient->post($this->endpoints['tokenUrl'], [
'form_params' => [
'grant_type' => 'authorization_code',
'code' => $code,
'redirect_uri' => $params['redirect_uri'],
'client_id' => $params['client_id'],
'client_secret' => $params['client_secret'] ?? null,
'code_verifier' => $params['code_verifier'] ?? null,
]
]);
$data = json_decode($response->getBody()->getContents(), true);
$resolve($data);
} catch (\Exception $e) {
$reject($e);
}
});
}
public function verifyAccessToken(string $token): PromiseInterface {
return new Promise(function ($resolve, $reject) use ($token) {
try {
$authInfo = ($this->verifyAccessToken)($token);
$resolve($authInfo);
} catch (\Exception $e) {
$reject($e);
}
});
}
}
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 · 435 lines · 11 tokens per session scan A 64333f75b97d
php-auth-implementation 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,878 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.