Getting started

Connect a client

Generate the exact setup for Claude Code, Cursor, the MCP Inspector, claude.ai, Claude Desktop, or ChatGPT.

On this page

Pick your client and fill in your details. The steps update as you type.

Which client are you connecting?

Nothing you type here leaves your browser. The page only builds text for you to copy, and it never asks for a token.

Token mode This client can send an Authorization header. No database needed.
  1. 1. Issue a token for that user
    php please mcp:token [email protected] --name="Claude Code"

    The token prints once, as mcp_<id>_<secret>, followed by ready-to-paste snippets. The user also needs the Access MCP permission on a role. Super admins already have it, and the command warns you when it's missing.

  2. 2. Add the server to Claude Code
    claude mcp add --transport http statamic https://example.com/mcp/statamic \
      --header "Authorization: Bearer mcp_..."

    Replace mcp_... with your token. Pasting this puts the token in your shell history, so use a leading space with HIST_IGNORE_SPACE or clean up with history -d.

  3. 3. Try it

    Ask the agent which collections your site has. It calls statamic_overview and answers from what this user may see.

Token mode or OAuth mode#

The client decides. A client that lets you set an Authorization header uses token mode, and a connector client that only takes a URL needs OAuth mode.

Token modeOAuth mode
ClientsClaude Code, Cursor, MCP Inspector, anything that can send a static headerclaude.ai, Claude Desktop, ChatGPT
Who actsThe Statamic user you issued the token forThe Statamic user who logged in and approved
Extra packagesNonelaravel/passport
DatabaseNoneOne for Passport’s own tables, SQLite is fine
Site must be publicNoYes, connector clients reach it over HTTPS from the internet
Your usersStay where they areStay where they are, file users included

Individual claude.ai and Claude Desktop connectors can’t send static headers. Static headers there are an org-admin beta for Team and Enterprise plans, so use OAuth mode for those clients.

A server runs one mode at a time, set by STATAMIC_MCP_AUTH. Token mode is the default. Details are in Token mode and OAuth mode.

Give each agent its own user#

The token is the user. An agent connected with your super admin account can do everything you can, so create a user and role for it unless you want that. Permissions has recipes, and a simulator that shows what any role can call.

If it doesn’t connect#

Run the doctor first. It names every problem at once and prints the fix for each.

php please mcp:doctor

The most common answers are a 401, meaning the token is wrong or gone, and a 403, meaning the user lacks Access MCP. Troubleshooting covers the rest.