MCP / GUIDE 08
Connect an MCP client
MCP lets a compatible AI client use Campaign Studio's authoring tools against the hosted SaaS. You configure a remote connection in Studio and add its URL and bearer token to your client. There is no local MCP server to install for this workflow.
Create an AI connection
- Sign in to Campaign Studio with author access.
- Open AI connections in the header.
- Give the connection a name, such as the client and device you will use.
- Choose Entire workspace or selected campaigns.
campaign:createrequires entire-workspace scope. - Select permissions. The initial selection is draft read, draft write, and playtest creation. Add answer reading or campaign creation only when needed.
- Create the connection and copy the bearer token immediately. Studio shows the plaintext token once.
The token expires after 90 days or earlier if revoked. The connection list shows permissions, expiry, and last use. Revoke a connection you no longer want to trust.
Configure Codex
Set EVENT_HORIZON_MCP_TOKEN in the environment of the process that launches Codex. Keep the value out of repository files and shell history. Then add the server:
codex mcp add event-horizon --url https://www.wayweaver.app/api/mcp --bearer-token-env-var EVENT_HORIZON_MCP_TOKEN
Restart or reconnect the client if its environment changed. The URL is a stateless Streamable HTTP MCP endpoint. Clients send authenticated JSON-RPC requests by POST; it does not provide a long-lived SSE session.
For another MCP client, choose its remote HTTP transport and configure the same endpoint with an Authorization: Bearer <token> header, if that client supports a manually supplied bearer token. Client-specific setup differs.
Verify the connection
Ask the client to list tools and call studio_get_context. It should report your granted permissions, campaign scope, and schema versions. Then call studio_list_campaigns or studio_get_schema as a safe read check. A working connection exposes 15 studio_* tools.
If the client can initialize but cannot see a campaign, inspect the connection's campaign scope. If it receives unauthorized errors, confirm the token is present in the client's own process, has not expired, and has not been revoked. See Troubleshooting.
Current authentication boundary
Remote MCP uses personal bearer tokens today. Browser-based OAuth login and automatic OAuth refresh for MCP clients are not available yet. A Studio browser session cannot substitute for the MCP bearer token.