Documentation
¶
Overview ¶
Command mcptoken mints an API token for MCP on a test panel and prints the `claude mcp add` line that connects a coding agent to it, so an agent can drive a real throwaway panel over MCP (scripts/e2e/mcp-token.sh is the wrapper; scripts/e2e-wsl.sh --hold is the panel).
Making a token is the owner's act: it needs the owner's session and a step-up (a fresh authenticator code). The owner session cookie and the authenticator secret of the TEST panel come from the environment, never from flags (which a process list shows):
MG_ADMIN_URL the admin URL with a trailing slash, e.g. http://localhost:8081/ MG_OWNER_COOKIE the value of the __Host-sid cookie of the owner's session MG_TOTP_SECRET the base32 secret of the owner's authenticator
The token secret is printed once, in the output line only. It lives as long as -ttl-days (default 1) and has the profile of -profile (readonly, operator or admin; default operator: reads, tests and day-to-day changes, no owner approvals). Never point this at a production panel.