MyronCMS Developers Hub Docs sandbox review

AI-Native Development

MCP Tools And Resources

MyronCMS exposes a Streamable HTTP MCP surface for AI clients. The canonical local path is:

POST /mcp

POST /api/mcp/v1/messages is also wired as a legacy alias. The route accepts JSON-RPC 2.0 requests and delegates method handling to MyronMcpServer.

Human Path

A developer or operator uses this page to understand what an MCP client can discover and call. The source authority is the running install:

  1. initialize confirms protocol version and advertised capabilities.
  2. tools/list returns callable tools for the current authorization context.
  3. resources/list returns readable documentation and state resources.
  4. tools/call invokes a registered action through the dispatcher.
  5. resources/read reads a named resource.

Do not use docs as a copied MCP catalog. Tool availability changes with registered actions, exposeToMcp, and caller scopes.

AI Path

An installed MCP client should start with:

initialize with Authorization: Bearer <token>
read Mcp-Session-Id response header
initialized with Authorization + Mcp-Session-Id
tools/list with Authorization + Mcp-Session-Id
resources/list with Authorization + Mcp-Session-Id

Then it should read the resource or call the tool that matches the task. If a tool is missing, the client should check scope and exposure instead of inventing a direct call.

An AI coding agent working locally can inspect app/system/mcp/Server.php and app/api/routes/mcp-v1.php to verify current resource URIs and method handling.

MCP Methods

MethodCurrent behavior
initializeRequires bearer auth, returns protocol version, tools capability, resources capability, server info, and emits Mcp-Session-Id as an HTTP response header.
initialized / notifications/initializedRequires bearer auth plus Mcp-Session-Id; marks the lifecycle session ready for discovery.
pingReturns an empty success result.
tools/listRequires an initialized session; lists exposed, policy-allowed, scope-allowed action tools plus the current creative-library tool when design scope allows it.
tools/callRequires an initialized session; calls a named tool; action-backed tools delegate to MyronActionDispatcher.
resources/listRequires an initialized session; lists current MCP resources permitted for the caller.
resources/readRequires an initialized session; reads a permitted MCP resource and returns text content.
notifications/cancelledAccepted as a no-op for current short-running behavior.

The initialize response advertises tools and resources. It does not advertise prompts, logging, or experimental custom capabilities.

Current Resources

resources/list currently advertises resources according to caller scope:

URIMinimum MCP resource scopeMIME typeUse
mcp://myroncms/system/manifestauthenticated sessionapplication/jsonScope-filtered exposed action catalog with metadata.
mcp://myroncms/system/snapshotadministration.readapplication/jsonLive state composed from snapshot-eligible read actions.
mcp://myroncms/system/compatibility/configuredadministration.readapplication/jsonLive install compatibility document.
mcp://myroncms/system/compatibility/defaultauthenticated sessionapplication/jsonSite-type default compatibility document.
mcp://creative-component-sdkdesign.readtext/markdownCreative Component SDK guide with live install context.
mcp://myroncms/design/jsonm-interchangedesign.readtext/markdownJSONM design-system interchange guide with live examples.

For default compatibility by site type, resources/read also accepts a site-type query shape such as:

mcp://myroncms/system/compatibility/default?siteType=BIZ

Tool Discovery

Action-backed tool names are derived from action metadata:

{domain}_{resource}_{verb}

The MCP server normalizes names to lowercase snake_case for tools/list. tools/call also supports some transitional aliases for older clients, but clients should use the exact names from tools/list.

tools/list filters actions by:

  • exposeToMcp: true,
  • caller scope,
  • policy-hidden trust-gate and identity/admin classes,
  • registered action availability in the running install.

See MCP Tool Exposure for the policy around hidden actions.

Scopes

This reference page has no single required runtime scope. Each tool has the scope declared by its underlying MyronActionMetadata.requiredScope. MCP discovery omits tools the caller cannot normally invoke.

Resource access is authenticated and scope-filtered. Some resources are documentation-like, but MCP still treats them as protected because they may include live install context or examples.

Artifacts

Primary source contracts:

  • app/system/mcp/Server.php
  • app/api/routes/mcp-v1.php
  • app/system/api/Action.php
  • app/system/api/ActionDispatcher.php

Runtime entrypoints:

  • /mcp
  • /api/mcp/v1/messages
  • MCP tools/list
  • MCP tools/call
  • MCP resources/list
  • MCP resources/read

Error Mapping

tools/call uses the action dispatcher for action-backed tools. Important mappings:

Dispatcher outcomeMCP result
Missing or invalid authJSON-RPC auth error path.
Missing session / pre-initialized sessionJSON-RPC session error path.
scope_insufficientJSON-RPC error with authorization-denied data.
rate_limitedJSON-RPC error with retry metadata.
Action-declared failureTool result with isError: true.
Unknown tool nameMethod-not-found style error.
Successful actionTool result with JSON text content and audit metadata.

Safety Boundary

MCP does not bypass auth, scopes, audit, rate limits, or trust-grant controls. It is a protocol binding over the action catalog.

MCP also does not broadcast install-specific catalogs just because a client can reach the endpoint. The client must hold a valid bearer token, complete initialize, preserve the returned Mcp-Session-Id, and send initialized before discovery.

Do not document missing tools as bugs until you check scope, action load state, and exposeToMcp. Do not tell an MCP client to create or expand its own integration to solve missing access.

Verification

For an MCP client:

initialize with bearer auth returns tools/resources capabilities and Mcp-Session-Id
initialized with Mcp-Session-Id completes lifecycle
tools/list returns only tools visible to the caller
resources/list includes only resource URIs visible to the caller
resources/read returns the expected MIME type for a listed resource
tools/call shares dispatcher behavior with the direct API

For documentation review, verify current resource URIs against app/system/mcp/Server.php.

Failure Modes

FailureLikely causeSafe response
Tool absent from tools/listCaller lacks scope, action is hidden, or action is not registered.Check manifest, action metadata, and caller scope.
Resource URI returns not foundURI is misspelled, resource registration changed, or caller lacks resource scope.Re-read resources/list with the same caller.
MCP_SESSION_REQUIRED / MCP_SESSION_NOT_INITIALIZEDClient skipped lifecycle or lost the session header.Run initialize, preserve Mcp-Session-Id, then send initialized.
tools/call cannot find a listed-looking nameClient inferred a name instead of using discovery.Use the exact name from tools/list.
MCP_RATE_LIMITEDAI bearer caller exceeded its current budget.Back off and retry after the window.
Live state resource is treated as static docsClient confused resources with source documentation.Re-read resource before planning state-sensitive work.