Skip to content

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.

Sign in to app.discotrace.com, open your workspace, and select the API & MCP tab (/w/<workspace>/api).

  1. Choose a descriptive key label (for example, Claude Code — Marketing Site Repo).
  2. 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 as dry_run: true with zero live billing.
  3. 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.
  4. Set an auto_approve_credits limit. Runs at or below this cap queue immediately; larger runs pause in awaiting_approval until a human clicks approve in the portal. Set 0 to require human approval on every live run.
  5. Copy the generated key once and export it in your shell:
Terminal window
export DISCOTRACE_API_KEY="dt_live_your_key_here"

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}"
}
}
}
}
[mcp_servers.discotrace]
url = "https://app.discotrace.com/mcp"
bearer_token_env_var = "DISCOTRACE_API_KEY"

Run two quick curl checks from your terminal to confirm your key, workspace scope, and tool discovery:

Terminal window
# 1. Verify workspace identity, scopes, and auto-approve guardrail
curl -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"}'