mcp-php-schema

Navigate and understand the MCP PHP schema. Use when implementing MCP clients/servers, understanding protocol types, or finding the right DTO for a task.

⭐3stars🔀0forks📁View on GitHub🕐Updated Jan 9, 2026

When & Why to Use This Skill

This Claude skill serves as a comprehensive technical reference for the Model Context Protocol (MCP) PHP schema. It enables developers to efficiently navigate, understand, and implement MCP clients and servers by providing instant access to protocol types, DTO (Data Transfer Object) structures, and JSON-RPC method definitions specifically tailored for the PHP ecosystem.

Use Cases

  • Implementing MCP Servers: Quickly identify and utilize the correct DTOs for resources, tools, and prompts when building server-side MCP integrations in PHP.
  • Developing MCP Clients: Reference specific client-side types such as sampling and roots to ensure seamless communication between PHP applications and AI models.
  • Protocol Mapping and Debugging: Use the schema index and search scripts to find request/result pairs and resolve type mismatches during the development of JSON-RPC interfaces.
  • Architectural Planning: Leverage the domain overview and factory patterns to design scalable and protocol-compliant PHP architectures for agentic tool use.
namemcp-php-schema
descriptionNavigate and understand the MCP PHP schema. Use when implementing MCP clients/servers, understanding protocol types, or finding the right DTO for a task.

MCP PHP Schema Reference

Quick Navigation

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

  1. Check rpc-methods.md for method name
  2. Look up request type in domain file
  3. 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 index
  • data/schema-common.json - Common domain types
  • data/schema-server.json - Server domain types
  • data/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"