DOC-MCP-001 · DEVELOPER

Connect your agent. Inspect the execution record.

The recommended customer path is the hosted MCP endpoint. No private core checkout is required. Authentication, model execution and code verification are separate steps.

Server
https://adaptorch.com/mcp
Protocol
MCP 2025-11-25
Transports
Hosted HTTP MCP · local bridge is a separate path
Contact
ingeng2004@gmail.com

§ 01

What you get from the hosted connection

Submit runs, retrieve their status and inspect available artifacts through your existing MCP client. The tool list returned by the hosted service is the current capability reference.

A completed model run is not proof that a repository check ran. Inspect execution records and available verification results; shared hosted command verification is disabled by default.

Protocol version 2025-11-25 is the default; 2024-11-05, 2025-03-26, and 2025-06-18 are also supported.

§ 02

Recommended: connect to the hosted service

Use an HTTP-capable MCP client. Create an AdaptOrch account and key, then configure the endpoint. Do not clone the private core for this path.

1 · Create a key

Create an account at /app/signup and create an API key at /app/api-keys. Use this value as ADAPTORCH_API_KEY throughout the direct hosted instructions. Keep actual keys out of committed files.

export ADAPTORCH_API_KEY="ado_..."

2 · Confirm authentication without running a model

This read-only tools/list request checks the endpoint and the supplied credentials. It does not submit a run, validate every client configuration, or prove that a code check is available.

: "${ADAPTORCH_API_KEY:?Set your AdaptOrch API key first}"
curl --fail --silent --show-error https://adaptorch.com/mcp \
  -H "Authorization: Bearer $ADAPTORCH_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'

A valid key returns a result.tools array including adaptorch_run. Without a key the same call returns {"code":-32001,"message":"Missing bearer token"} with HTTP 401 — that response is itself proof the endpoint is reachable.

Endpoint: https://adaptorch.com/mcp · JSON-RPC over POST. GET returns 405 by design — there is no SSE stream to subscribe to. The token may be sent as Authorization: Bearer or X-API-Key.

Execution also needs your provider key

An AdaptOrch API key authenticates the service. Model execution also needs your provider, model and provider key. Set the three variables below and send them using X-Provider headers. Provider tokens are billed separately.

Hosted model execution is not a repository test pass. A code check requires a separately configured execution environment. Only count verification when a record shows that the relevant check actually ran.

After signup, open the per-client connection guide

Set these only in your local environment; never in a shared transcript or committed file.

export ADAPTORCH_PROVIDER="openai"
export ADAPTORCH_PROVIDER_MODEL="YOUR_SUPPORTED_MODEL"
export ADAPTORCH_PROVIDER_KEY="YOUR_PROVIDER_KEY"

§ 03

3 · Recommended client connection

Start with the complete Claude Code HTTP example below. The other configuration blocks show client-specific authentication syntax only; add your provider headers using the authenticated dashboard guide before model execution.

Claude Code — one command

: "${ADAPTORCH_API_KEY:?Set your AdaptOrch API key}"
: "${ADAPTORCH_PROVIDER:?Set a supported provider}"
: "${ADAPTORCH_PROVIDER_MODEL:?Set the provider model ID}"
: "${ADAPTORCH_PROVIDER_KEY:?Set your provider key}"
claude mcp add --transport http adaptorch https://adaptorch.com/mcp \
  --header "Authorization: Bearer ${ADAPTORCH_API_KEY}" \
  --header "X-Provider: ${ADAPTORCH_PROVIDER}" \
  --header "X-Provider-Model: ${ADAPTORCH_PROVIDER_MODEL}" \
  --header "X-Provider-Key: ${ADAPTORCH_PROVIDER_KEY}"

Cursor — ~/.cursor/mcp.json

{
  "mcpServers": {
    "adaptorch": {
      "url": "https://adaptorch.com/mcp",
      "headers": { "Authorization": "Bearer ${ADAPTORCH_API_KEY}" }
    }
  }
}

Codex CLI — ~/.codex/config.toml (TOML, not JSON)

[mcp_servers.adaptorch]
url = "https://adaptorch.com/mcp"
bearer_token_env_var = "ADAPTORCH_API_KEY"
env_http_headers = { "X-Provider" = "ADAPTORCH_PROVIDER", "X-Provider-Model" = "ADAPTORCH_PROVIDER_MODEL", "X-Provider-Key" = "ADAPTORCH_PROVIDER_KEY" }

Gemini CLI — ~/.gemini/settings.json (key is httpUrl)

{
  "mcpServers": {
    "adaptorch": {
      "httpUrl": "https://adaptorch.com/mcp",
      "headers": { "Authorization": "Bearer ${ADAPTORCH_API_KEY}" }
    }
  }
}

VS Code — .vscode/mcp.json (top-level servers)

{
  "servers": {
    "adaptorch": {
      "type": "http",
      "url": "https://adaptorch.com/mcp",
      "headers": { "Authorization": "Bearer ${env:ADAPTORCH_API_KEY}" }
    }
  }
}

Windsurf — ~/.codeium/windsurf/mcp_config.json (key is serverUrl)

{
  "mcpServers": {
    "adaptorch": {
      "serverUrl": "https://adaptorch.com/mcp",
      "headers": { "Authorization": "Bearer ${ADAPTORCH_API_KEY}" }
    }
  }
}

Authentication is not execution. The direct HTTP instructions use ADAPTORCH_API_KEY. Local bridge examples use ADAPTORCH_CONTROL_PLANE_TOKEN for the same service credential. Do not confuse either with your model-provider key. Shell commands expand environment values and clients may persist the resulting headers. Keep that configuration private and never commit keys.

4 · Submit one bounded run and inspect its record

Ask the connected client to call adaptorch_run once with the single-task payload below. This step can consume your plan allowance and your provider budget. Do not repeatedly submit it while polling.

{
  "payload": {"subtasks": [{"id": "ping", "description": "Reply exactly PONG", "estimated_tokens": 16}]},
  "synthesis_mode": "paper",
  "budget_policy": {"global_timeout_budget_seconds": 20}
}

Use the returned run_id with adaptorch_get_run and adaptorch_get_artifacts, or open /app/runs. Confirm the requested model and output. Then check whether any verification command actually ran; SUCCEEDED alone does not establish that.

401: check service authentication and provider-key requirements. 429: inspect quota/rate limits. Provider billing failures and unsupported verification environments are setup blockers, not successful activation.

Run records · Plan allowances and BYOK · Data flow

§ 04

Maintainers: local bridge and engine development

The local Python wrapper delegates to the AdaptOrch engine under proprietary licence terms. Downloading grants no broader licence; review the terms and the licence included with your distribution. This maintainer path requires the engine to be available and is not the hosted customer quickstart.

pip install adaptorch-mcp

export ADAPTORCH_CONTROL_PLANE_TOKEN="$ADAPTORCH_API_KEY"
export ADAPTORCH_MCP_PROVIDER="$ADAPTORCH_PROVIDER"
export ADAPTORCH_MCP_PROVIDER_MODEL="$ADAPTORCH_PROVIDER_MODEL"
export ADAPTORCH_MCP_PROVIDER_API_KEY="$ADAPTORCH_PROVIDER_KEY"
adaptorch-mcp --transport stdio --base-url https://adaptorch.com

For the local bridge, set ADAPTORCH_CONTROL_PLANE_TOKEN from your AdaptOrch API key. ADAPTORCH_MCP_PROVIDER, ADAPTORCH_MCP_PROVIDER_MODEL and ADAPTORCH_MCP_PROVIDER_API_KEY configure provider credentials in that process. Do not send secrets as tool arguments.

Running a client locally is not self-hosting the control plane. A private runner is separately scoped at repository-validation PoC. General customers can use the hosted HTTP instructions above without a private core checkout.

§ 05

Tool reference

The hosted tools/list response is authoritative for the available tools. Results and errors follow the returned schemas. A tool-list response is not a model run or a verification result.

adaptorch_run

Submit a task payload to AdaptOrch control-plane and optionally wait.

WRITEnon-destructivenon-idempotentOPEN-WORLD

Param Type Required Default
prompt string conditional —
context string no —
payload object no —
connector_name string no "mcp"
synthesis_mode string (enum) no "robust"
model string no —
trace boolean no false
budget_policy object no —
wait_for_terminal boolean no true
timeout_seconds number no 120.0
poll_interval_seconds number no 1.0
verification_commands string[] no — (gated)
prefer_ensemble_singleton boolean no false
output_extractor string (enum) no —
{ "jsonrpc": "2.0", "id": 1, "method": "tools/call",
  "params": { "name": "adaptorch_run",
    "arguments": { "prompt": "${TASK_PROMPT}", "synthesis_mode": "robust",
                   "wait_for_terminal": true, "timeout_seconds": 120.0 } } }

adaptorch_get_run

Get run summary by run_id.

READ-ONLYnon-destructiveIDEMPOTENTOPEN-WORLD

Param Type Required Default
run_id string yes —
{ "jsonrpc": "2.0", "id": 2, "method": "tools/call",
  "params": { "name": "adaptorch_get_run", "arguments": { "run_id": "${RUN_ID}" } } }

adaptorch_get_artifacts

Get run artifacts by run_id.

READ-ONLYnon-destructiveIDEMPOTENTOPEN-WORLD

Param Type Required Default
run_id string yes —
{ "jsonrpc": "2.0", "id": 3, "method": "tools/call",
  "params": { "name": "adaptorch_get_artifacts", "arguments": { "run_id": "${RUN_ID}" } } }

adaptorch_list_runs

List recent AdaptOrch control-plane runs, newest first.

READ-ONLYnon-destructivenon-idempotentOPEN-WORLD

Param Type Required Default
limit integer (1–100) no 20
status string no —
{ "jsonrpc": "2.0", "id": 4, "method": "tools/call",
  "params": { "name": "adaptorch_list_runs", "arguments": { "limit": 20, "status": "SUCCEEDED" } } }

adaptorch_get_traces

Get execution traces for a run by run_id.

READ-ONLYnon-destructiveIDEMPOTENTOPEN-WORLD

Param Type Required Default
run_id string yes —
{ "jsonrpc": "2.0", "id": 5, "method": "tools/call",
  "params": { "name": "adaptorch_get_traces", "arguments": { "run_id": "${RUN_ID}" } } }

adaptorch_cancel_run

Request cancellation of an in-flight run by run_id.

WRITEDESTRUCTIVEnon-idempotentOPEN-WORLD

Param Type Required Default
run_id string yes —
{ "jsonrpc": "2.0", "id": 6, "method": "tools/call",
  "params": { "name": "adaptorch_cancel_run", "arguments": { "run_id": "${RUN_ID}" } } }

adaptorch_route_topology

Recommend an execution topology for a task DAG using the local TopologyRouter (no control-plane call).

READ-ONLYnon-destructiveIDEMPOTENTclosed-world

Param Type Required Default
subtasks object[] yes —
dependencies object[] no —
{ "jsonrpc": "2.0", "id": 7, "method": "tools/call",
  "params": { "name": "adaptorch_route_topology",
    "arguments": { "subtasks": [ { "id": "t1" }, { "id": "t2" } ],
                   "dependencies": [ { "from": "t1", "to": "t2" } ] } } }

adaptorch_server_metrics

Return redacted MCP tool-call counters and latency percentiles.

READ-ONLYnon-destructivenon-idempotentclosed-world

No arguments.

{ "jsonrpc": "2.0", "id": 8, "method": "tools/call",
  "params": { "name": "adaptorch_server_metrics", "arguments": {} } }

adaptorch_capabilities

Return supported synthesis modes, connectors, and server capabilities.

READ-ONLYnon-destructiveIDEMPOTENTclosed-world

No arguments.

{ "jsonrpc": "2.0", "id": 9, "method": "tools/call",
  "params": { "name": "adaptorch_capabilities", "arguments": {} } }

adaptorch_plan_catalog

Return the current AdaptOrch hosted cloud plan catalog: Starter $0, Pro $39, Team $149.

READ-ONLYnon-destructiveIDEMPOTENTOPEN-WORLD

No arguments.

{ "jsonrpc": "2.0", "id": 10, "method": "tools/call",
  "params": { "name": "adaptorch_plan_catalog", "arguments": {} } }

§ 06

Authentication

stdio relies on a local trust model plus a control-plane token. HTTP+SSE adds bearer auth, origin allow-listing, protocol-version checks, and a payload size cap. All tokens are injected through environment variables and are never hard-coded.

Environment variable Default Purpose
ADAPTORCH_CONTROL_PLANE_TOKEN required Control-plane bearer token (stdio + http)
ADAPTORCH_CONTROL_PLANE_BASE_URL http://127.0.0.1:8000 Control-plane base URL
ADAPTORCH_MCP_HTTP_AUTH_TOKEN falls back to control-plane token Bearer expected on HTTP requests
ADAPTORCH_MCP_ALLOWED_ORIGINS localhost, 127.0.0.1, ::1 Allowed Origin header values
ADAPTORCH_MCP_MAX_PAYLOAD_SIZE_BYTES 1048576 Max HTTP request body (else 413)
ADAPTORCH_MCP_ALLOW_VERIFICATION_COMMANDS off Gate for verification_commands

HTTP responses: 401 for a missing or invalid bearer token, 403 for a disallowed origin, 413 when the payload exceeds the size cap. Tokens are compared with hmac.compare_digest and are never logged.

§ 07

Workflows

Three common flows cover most agent integrations.

1 · Run and collect

Call adaptorch_run with wait_for_terminal, then read the result with adaptorch_get_run, adaptorch_get_artifacts, and adaptorch_get_traces.

{ "name": "adaptorch_run",
  "arguments": { "prompt": "${TASK_PROMPT}", "wait_for_terminal": true } }
{ "name": "adaptorch_get_artifacts", "arguments": { "run_id": "${RUN_ID}" } }

2 · Pre-route a DAG

adaptorch_route_topology computes a recommended topology locally — it does not call the control-plane.

{ "name": "adaptorch_route_topology",
  "arguments": { "subtasks": [ { "id": "t1" }, { "id": "t2" } ],
                 "dependencies": [ { "from": "t1", "to": "t2" } ] } }

3 · Operate

List recent runs with adaptorch_list_runs and stop an in-flight run with adaptorch_cancel_run. The adaptorch_run_prompt and adaptorch_get_run_prompt prompts wrap these calls for agents.

§ 08

Troubleshooting

  • Launcher not found: use the adaptorch-mcp console script or scripts/run_adaptorch_mcp.sh.
  • Token missing: set ADAPTORCH_CONTROL_PLANE_TOKEN; a remote --base-url requires it.
  • Framing mismatch: match --stdio-framing (newline default vs content-length).
  • HTTP 401 / 403: check the bearer token and the Origin allow-list.
  • HTTP 413: the request body exceeds the payload size cap.
  • verification_commands rejected: disabled unless ADAPTORCH_MCP_ALLOW_VERIFICATION_COMMANDS is set.
  • Smoke test: GET /mcp/health and GET /mcp/sse?once=true.