Hosted MCP Server
DiscoTrace hosts a stateless Streamable HTTP JSON-RPC 2.0 MCP server at https://app.discotrace.com/mcp exposing 13 workspace-scoped tools. No local MCP server binary or daemon is required — authenticate with your workspace Bearer API key (dt_live_... or dt_test_...).
Endpoint & transport
Section titled “Endpoint & transport”| Setting | Value |
|---|---|
| Endpoint | POST https://app.discotrace.com/mcp |
| Protocol version | 2025-03-26 (Streamable HTTP JSON-RPC 2.0) |
| Authentication | Authorization: Bearer $DISCOTRACE_API_KEY (or X-API-Key) |
| Workspace isolation | Every key is bound to one workspace and enforces read, write, and run scopes per tool |
Client configuration
Section titled “Client configuration”Claude Code / Cursor (.mcp.json)
Section titled “Claude Code / Cursor (.mcp.json)”Place .mcp.json in your website or product repository root and keep DISCOTRACE_API_KEY in your shell environment:
{ "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"Terminal smoke test (tools/list)
Section titled “Terminal smoke test (tools/list)”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"}'Available tools (synced from live portal)
Section titled “Available tools (synced from live portal)”The table below is generated directly from portal/src/mcp.ts during every build and verified in CI:
Protocol: 2025-03-26 · Transport: Stateless Streamable HTTP (JSON-RPC 2.0) · Tools: 13
| Tool | Scope | Description | Required Arguments |
|---|---|---|---|
list_studies | read | List all DiscoTrace studies in the authenticated workspace along with latest KPI summary rates. | None |
create_study | write | Create a new DiscoTrace study (revision v1) with a Persona × Buyer Situation plan_spec, and optionally queue Pass 1 (requires run scope and enforces auto_approve_credits). | title |
update_study_plan | write | Save a new plan revision (vN+1) for an existing study—updating buyer personas, buyer situations, active cells, AI surfaces, or precision—and return the deterministic credit & AI response volume estimate. | study_slug, plan_spec |
get_study_summary | read | Fetch a study summary including active revision, run history, and KPI metrics. | study_slug |
get_technical_audit | read | Retrieve the workspace Technical Audit: robots.txt AI bot access policy, sitemap & llms.txt checks, canonical/meta/JSON-LD status, audited page breakdown, and crawl findings. | None |
query_traces | read | Query graded AI buyer answer traces from the latest pass of a study. | study_slug |
list_reservations | read | List coded buyer reservations and hesitations observed across AI answers in the latest pass. | study_slug |
list_opportunities | read | List prioritized AEO content & technical opportunities plus linked Content Center draft statuses. | study_slug |
get_content_draft | read | Fetch the full copy-ready Markdown draft, metadata, and [VERIFY:] facts checklist for an opportunity. | study_slug |
upsert_content_draft | write | Create or update a Content Center draft markdown, metadata, or workflow status. | study_slug, opportunity_id, title |
estimate_study_credits | read | Run the deterministic DiscoTrace pre-flight credit quote calculator for a study plan_spec. | None |
queue_study_run | run | Queue a study run, recheck pass, or A/A/B experiment. Runs within the API key auto_approve_credits threshold queue immediately; larger runs pause as awaiting_approval with a 1-click portal resolveUrl. | study_slug |
get_job_status | read | Check execution status, progress, and credit billing for a queued study job. | job_id |
Credit guardrails & human approval
Section titled “Credit guardrails & human approval”Every credit-spending operation (queue_study_run or create_study with queue_run: true) passes through two deterministic safety checks before execution:
- Pre-flight quote: Always call
estimate_study_creditsfirst to inspect exactthis_run_credits,total_ai_responses, andavailable_credits. - Auto-approve threshold (
auto_approve_credits):- Runs at or below your key’s
auto_approve_creditslimit (and within available workspace credits) enterqueuedimmediately. - Runs exceeding your key’s threshold — or exceeding available credits — enter
awaiting_approvaland return a direct portalresolveUrlso a human owner can review and approve in 1 click. - Keys with
env: "test"(dt_test_...) always execute withdry_run: trueand deduct0credits.
- Runs at or below your key’s