Quickstart
You can connect an AI coding agent or script to your DiscoTrace workspace in three steps without installing a local MCP server. All programmatic access uses workspace-scoped Bearer API keys (dt_live_... or dt_test_...) created in the DiscoTrace Portal.
Step 1: Mint a workspace API key
Section titled “Step 1: Mint a workspace API key”Sign in to app.discotrace.com, open your workspace, and select the API & MCP tab (/w/<workspace>/api).
- Choose a descriptive key label (for example,
Claude Code — Marketing Site Repo). - Select an environment:
live(dt_live_...) — Full workspace access; queued runs deduct credits against your workspace balance.test(dt_test_...) — Safe integration and dry-run key; queued jobs always execute asdry_run: truewith zero live billing.
- Select the minimal scopes needed:
read— List studies, inspect KPIs, read traces, reservations, technical audit, content drafts, and pre-flight credit quotes.write— Create studies (create_study), save new study plan revisions (update_study_plan), and create or update Content Center drafts.run— Queue baseline passes, post-ship rechecks, or A/A/B experiments.
- Set an
auto_approve_creditslimit. Runs at or below this cap queue immediately; larger runs pause inawaiting_approvaluntil a human clicks approve in the portal. Set0to require human approval on every live run. - Copy the generated key once and export it in your shell:
export DISCOTRACE_API_KEY="dt_live_your_key_here"Step 2: Connect Hosted MCP
Section titled “Step 2: Connect Hosted MCP”DiscoTrace exposes a stateless Streamable HTTP MCP endpoint at https://app.discotrace.com/mcp (Protocol 2025-03-26) with all 13 workspace tools.
Claude Code / Cursor (.mcp.json in your repo root)
Section titled “Claude Code / Cursor (.mcp.json in your repo root)”{ "mcpServers": { "discotrace": { "type": "http", "url": "https://app.discotrace.com/mcp", "headers": { "Authorization": "Bearer ${DISCOTRACE_API_KEY}" } } }}Codex CLI (~/.codex/config.toml)
Section titled “Codex CLI (~/.codex/config.toml)”[mcp_servers.discotrace]url = "https://app.discotrace.com/mcp"bearer_token_env_var = "DISCOTRACE_API_KEY"Step 3: Verify REST and MCP access
Section titled “Step 3: Verify REST and MCP access”Run two quick curl checks from your terminal to confirm your key, workspace scope, and tool discovery:
# 1. Verify workspace identity, scopes, and auto-approve guardrailcurl -sS -H "Authorization: Bearer $DISCOTRACE_API_KEY" \ https://app.discotrace.com/api/v1/me
# 2. Verify Hosted MCP tool discovery (returns all 13 tools)curl -sS -X POST https://app.discotrace.com/mcp \ -H "Authorization: Bearer $DISCOTRACE_API_KEY" \ -H "Content-Type: application/json" \ -d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'Next steps
Section titled “Next steps”- Inspect all 13 tools and argument schemas in the Hosted MCP Server reference.
- Drop the Agent Operating Guide (
AGENTS.md) into your website repo so coding agents confirm[VERIFY:]facts and quote credits before queueing runs. - Review Models, Surfaces & Credits to understand Pass 1 vs. Pass 2+ credit sizing.