Agent Integration

Outcome-first MCP usage over immutable RootFetch artifacts.

RootFetch is read-only. Agents should call outcome tools, persist evidence fields, and avoid narrative output not anchored to immutable runs.

60-Second Start

Fastest path from zero to reliable outputs.

  1. Connect your client to https://rootfetch.com/mcp (or run the first cURL below).
  2. Validate bootstrap with /api/mcp/first-call.
  3. Pick one task from /agents/recipes and enforce the evidence checks.

1) Connect

Remote MCP endpoint (recommended).

{
  "mcpServers": {
    "rootfetch": {
      "url": "https://rootfetch.com/mcp"
    }
  }
}

Local bridge option: npx -y @khalidsaidi/rootfetch-mcp@latest rootfetch-mcp

2) First-Call Validation

Initialize, call one outcome tool, and verify response keys.

Use /api/mcp/first-call for a live bootstrap payload with expected request/response structure.

Initialize

curl -sS https://rootfetch.com/mcp \
  -X POST \
  -H 'content-type: application/json' \
  -H 'accept: application/json, text/event-stream' \
  --data '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"example-agent","version":"1.0.0"}}}'

Current state outcome

curl -sS https://rootfetch.com/mcp \
  -X POST \
  -H 'content-type: application/json' \
  -H 'accept: application/json, text/event-stream' \
  --data '{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"rootfetch.outcome.current_state","arguments":{}}}'

2.5) Interactive Calling

Use the browser playground when CLI is not convenient.

Open /agents/playground to call any MCP tool with JSON args and inspect the raw JSON-RPC envelope.

Open playgroundOpen task recipes

3) Outcome Tools (Strict)

Use these before raw tools for operational workflows.

rootfetch.outcome.current_state

Current run: regime, DVI, concentration, coverage, top anomalies, mandatory evidence.

rootfetch.outcome.run_delta

Run pair deltas with model-version disclosure and compare/evidence links.

rootfetch.outcome.tld_spotlight

TLD-focused count/share/delta/anomaly flags for one run + evidence anchors.

rootfetch.outcome.alert_candidates

Candidate anomaly/mover rows with trigger context and immutable evidence.

4) Evidence Is Mandatory

No evidence block means no publishable claim.

Rules:
1) Treat tool responses as authoritative only when "evidence" is present.
2) Persist run_id + manifest_sha256 with any downstream claim.
3) If model_version changes between runs, require explicit disclosure.
4) Do not infer structural shift from cross-model compares without disclosure.

5) Telemetry and Adoption KPIs

Monitor agent usage and first-call health.

6) High-Value Workflows

Use these when running production governance operations.