phramecms / mcp
Native Model Context Protocol (MCP) JSON-RPC 2.0 server module for PhrameCMS.
v0.1.0
2026-12-04 21:15 UTC
Requires
- php: ^8.5
- phramecms/core: ^0.1
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.95
- infection/infection: ^0.35.12
- phpstan/phpstan: ^2.1
- phpunit/phpunit: ^13.0
- phramecms/config: ^0.1
- phramecms/entity: ^0.1
- phramecms/routing: ^0.1
- phramecms/user: ^0.1
- spaze/phpstan-disallowed-calls: ^4.15
Suggests
- phramecms/config: Enables configuration schema and active config MCP resources
- phramecms/entity: Enables entity schema and content MCP resources
- phramecms/routing: Enables Streamable HTTP /mcp transport integration
- phramecms/user: Enables scoped AI Agent Bearer Token authentication and RBAC enforcement
Provides
None
Conflicts
None
Replaces
None
This package is auto-updated.
Last update: 2026-12-04 21:35:07 UTC
README
Native Model Context Protocol (MCP) server module for PhrameCMS, enabling AI agents to reliably inspect schemas and manage content and configuration out of the box.
Responsibilities
- JSON-RPC 2.0 MCP Protocol Implementation:
- Stdio transport (invoked via
phrame mcp:serve) for local IDE / CLI AI agents. - Streamable HTTP transport (
/mcproute viaphramecms/routing) for remote autonomous agents with Bearer Agent Token authentication.
- Stdio transport (invoked via
- Auto-Exposed MCP Resources:
phrame://schema/entities— live JSON Schemas of all entity types, bundles, and attached fields.phrame://schema/config— registered configuration schemas.phrame://content/{entity_type}/{bundle}/{id}— structured entity payload & metadata.phrame://config/{name}— active configuration object.phrame://audit/recent— recent immutable audit log entries (permission-gated).
- Auto-Exposed MCP Tools:
- Automatically publishes every Core
OperationInterfaceregistered by installed modules as a typed MCP Tool using its JSON SchemainputSchema. - Native support for
dry_run: true,idempotency_key, structured diff previews, and snapshot rollback.
- Automatically publishes every Core
- Security & RBAC: Every tool call and resource read executes through Core's
OperationBusunder the authenticated AI Agent Principal — never bypassing permission scopes, validation, or audit logging.
Dependencies
- PHP
^8.5 phramecms/corephramecms/user(recommended for scoped AI Agent Token enforcement)phramecms/routing(optional — enables HTTP/mcptransport)
Ecosystem
Part of the PhrameCMS multi-repo suite. See PhrameCMS/cms for the starter distribution and architecture docs.