mcp-sdk-php AGENTS.md

Contributor instructions for a PHP software library implementing the Model Context Protocol, a standard way for applications to provide context and tools to language models. They describe the project, documentation, development process, and testing commands.

In plain words
What is it for?
Use them when modifying the PHP MCP SDK, building MCP clients or servers, consulting project documentation, or running its development tests.
Why use it?
They give contributors a common understanding of the SDK and its supported communication methods. This reduces the risk of changes that conflict with the project's compatibility and development rules.

Instructions file for CodexOpenCode

Install

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.

agentmods
npx agentmods add instructions/logiscape/mcp-sdk-php/agents-md
Clone the repo
git clone --depth 1 https://github.com/logiscape/mcp-sdk-php

Made for: Codex, OpenCode.

Per session 3,027 This file is loaded in full into every session.
When invoked 3,027 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5 $0.03027 $0.03027
Opus 5 $0.01514 $0.01514
Sonnet 5 $0.00605 $0.00605
Haiku 4.5 $0.00303 $0.00303

Measured 2d ago against content hash d90e23c4f5da, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

mcp-sdk-php AGENTS.md 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.

AGENTS.md · 232 lines

How it starts

The opening of the file, as written. The whole thing — 232 lines — stays where its author put it; the contents beside it link to each section on GitHub.

AGENTS.md

Project Overview

This is a PHP implementation of the Model Context Protocol (MCP), allowing applications to provide context for LLMs in a standardized way. The SDK implements both MCP clients and servers with support for stdio and HTTP transports.

Key characteristics:

  • Designed for native PHP with easy installation via Composer
  • Targets PHP 8.1+ with type safety (strict_types=1)
  • Supports both traditional CLI/stdio and web hosting environments
  • Speaks every MCP spec revision from 2024-11-05 through 2026-07-28 (the "stateless core"); servers detect each request's era and clients probe-then-fall-back, so one codebase serves modern and legacy peers concurrently
  • Implements the Tasks (SEP-2663) and MCP Apps (SEP-1865) extensions — see docs/tasks.md and docs/apps.md
  • Includes McpServer convenience wrapper for building fully functional MCP servers with just a few lines of PHP code

User-facing documentation is indexed in docs/README.md; the two deep guides are docs/server-dev.md and docs/client-dev.md, and the v1 → v2 changes are in docs/migration-v2.md.

Contributor-facing documentation

For non-trivial work, please also consult the governance and process docs at the repository root: CONTRIBUTING.md (coding standards, test stack, versioning policy), ROADMAP.md (direction and tier self-assessment), SECURITY.md (vulnerability reporting), GOVERNANCE.md, and the deeper guides under docs/docs/testing.md, docs/compatibility.md (the cPanel/Apache compatibility rules), docs/dependency-policy.md, and conformance/README.md (including the no-shortcuts-for-conformance rule).

Development Process

The main branch carries v2 of the SDK (stable v1 lives on the 1.x branch). v2 development is complete; ongoing direction — including the embedding and web-integration batteries planned for the v2.x minor line — is set by ROADMAP.md. Key rules for agents working on the SDK:

Read the full file on GitHub · 232 lines

Changes

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.

  1. 2d ago First seen · 232 lines · 3,027 tokens per session scan A d90e23c4f5da

Subscribe to this mod's changes

mcp-sdk-php AGENTS.md is an instructions file published in the GitHub repository logiscape/mcp-sdk-php (369 stars, last pushed 13d ago), licensed MIT. It adds 3,027 tokens to every session, about $0.0151 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.