statamic-mcp CLAUDE.md

Project instructions for a Statamic add-on that provides an MCP server, a standard way for software tools to share context and actions. It covers the add-on's Laravel, PHP, authentication, dashboard, and testing setup.

In plain words
What is it for?
Use it when developing or maintaining the Statamic MCP add-on, especially its API-token access control, Vue dashboard, web endpoints, and tests.
Why use it?
It gives a coding agent the project-specific rules and dependencies needed to work on the add-on without guessing how it is structured.

Instructions file

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/cboxdk/statamic-mcp/claude-md
Clone the repo
git clone --depth 1 https://github.com/cboxdk/statamic-mcp
Per session 9,690 This file is loaded in full into every session.
When invoked 9,690 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.09690 $0.09690
Opus 5 $0.04845 $0.04845
Sonnet 5 $0.01938 $0.01938
Haiku 4.5 $0.00969 $0.00969

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

Security

Grade A, and why

statamic-mcp CLAUDE.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.

CLAUDE.md · 1,113 lines

How it starts

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

CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

Project Overview

This is a Statamic addon that functions as an MCP (Model Context Protocol) server, built on top of Laravel's MCP server. The addon extends Statamic CMS v6.6+ and requires laravel/mcp ^0.6 || ^0.7 || ^0.8 || ^0.9 as a runtime dependency. It includes scoped API token authentication, a Vue 3 CP dashboard, and web MCP endpoints.

Key Dependencies

  • PHP: ^8.3
  • Statamic CMS: ^6.6 (v6 only — v5 support was removed in v2.0)
  • Laravel: ^12.0 || ^13.0 (via Statamic v6)
  • Laravel MCP: ^0.6 || ^0.7 || ^0.8 || ^0.9 (required - must be in require section, not require-dev)
  • Orchestra Testbench: ^10.0 || ^11.0 (dev dependency for testing)
  • Pest: ^4.1 (stable release with PHP 8.3 requirement)
  • Symfony YAML: ^7.0 || ^8.0 (for YAML processing)

Authentication System

Scoped API Tokens

The addon provides scoped API tokens for fine-grained MCP access control:

  • Token Management: Via Statamic CP dashboard (Tools → MCP → Tokens)
  • Token Storage: Eloquent model (McpToken) with SHA-256 hashed tokens
  • Guard: Custom McpTokenGuard registered as the mcp auth guard
  • Scopes: 21 granular scopes via TokenScope enum (e.g., content:read, content:write, *)

Key Auth Classes

  • src/Auth/TokenScope.php — Backed string enum with scope helpers
  • src/Auth/McpToken.php — Eloquent model with UUID primary keys
  • src/Auth/TokenService.php — Token CRUD, validation, and pruning
  • src/Auth/McpTokenGuard.php — Laravel Guard implementation for Bearer tokens
  • src/Auth/AuthServiceProvider.php — Registers singletons and auth guard

Middleware

  • HandleMcpCors — CORS headers for browser-based clients (only when allowed_origins configured)
  • EnsureSecureTransport — Rejects plain HTTP in production (when require_https enabled)
  • AuthenticateForMcp — Bearer token + Basic Auth fallback
  • RequireMcpPermission — Validates token scopes and expiry

Read the full file on GitHub · 1,113 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 · 1,113 lines · 9,690 tokens per session scan A 422a0679b9d1

Subscribe to this mod's changes

statamic-mcp CLAUDE.md is an instructions file published in the GitHub repository cboxdk/statamic-mcp (36 stars, last pushed 6d ago), licensed MIT. It adds 9,690 tokens to every session, about $0.0485 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.