About mcp-php-schema
mcp-php-schema is a reference for MCP PHP types and RPC methods, aimed at PHP developers. It organizes 164 types across common, server, and client domains, with JSON data files and scripts for querying types and methods.
Key features
- 01Covers common, server, and client types
- 02Maps RPC requests to results
- 03Documents factory classes
- 04Provides schema data as JSON
- 05Includes type and RPC search scripts
Use cases
- 01Look up MCP type definitions
- 02Check request and result types for an RPC method
- 03Read schemas programmatically from JSON files
- 04Search types or methods from the command line
MCP support
The project documents MCP protocol types, JSON-RPC, and server and client structures. Its coverage includes tools, resources, prompts, sampling, and roots.
Install
Copy the command and run it in a terminal.
$
npx skills add https:/ / github.com/ wordpress/ php-mcp-schema --skill mcp-php-schemaAfter installing, type/mcp-php-schemain Claude Code to confirm it loaded.
Bundled files
References and scripts installed along with SKILL.md.
data/schema-index.jsonschema-server.jsonschema-client.jsonschema-common.jsonreference/factories.mdserver.mdclient.mdcommon.mdrpc-methods.mdoverview.mdscripts/find-rpc.shsearch-types.shget-type.shDetails
From the project READMEMCP PHP Schema Reference
Quick Navigation
- Server types (resources, tools, prompts): reference/server.md
- Client types (sampling, elicitation, roots): reference/client.md
- Common types (protocol, JSON-RPC): reference/common.md
- RPC methods: reference/rpc-methods.md
- Factories: reference/factories.md
Schema Structure
3 domains, 17 subdomains, 164 types total.
Domains Overview
| Domain | Types | Purpose |
|---|---|---|
| Common | 59 | Protocol base, JSON-RPC, content blocks |
| Server | 59 | Tools, resources, prompts, logging |
| Client | 46 | Sampling, elicitation, roots, tasks |
Common Patterns
Finding a Request/Result Pair
- Check rpc-methods.md for method name
- Look up request type in domain file
- Find corresponding result type
Using Factory Classes
Factories create the correct DTO from discriminator values. See factories.md for patterns.
JSON Data Files
For programmatic access:
data/schema-index.json- Lightweight discovery indexdata/schema-common.json- Common domain typesdata/schema-server.json- Server domain typesdata/schema-client.json- Client domain types
Search Scripts
# Search types by name
./scripts/search-types.sh "Resource"
# Get type details
./scripts/get-type.sh "CallToolRequest"
# Find RPC method
./scripts/find-rpc.sh "tools/call"
Comments
Markdown supported