Setup Guide & Local Indexing

Developer Documentation, MCP & Verification Schema

Connect A2AC to your AI coding assistant in a few minutes so it reads a compact local index, keeps raw source files on your machine, and saves verifiable usage receipts.

Configure mcpServers for AST .cube sidecars, choose between Python AST (--mode local-ast) or Gemma 4 E4B Q4_K_M GGUF (--mode chimera), and verify SHA-256 + Ed25519 receipts.

0. 30-Second Quickstart (Zero Dependencies)

Download the standalone a2ac.py CLI + MCP server (Python 3.9+ stdlib), benchmark your own repository in 5 seconds, and auto-configure Claude Code, Cursor, or VS Code.

quickstart.sh (macOS / Linux)
curl -fsSL https://a2ac.ai/downloads/a2ac.py -o a2ac.py
python3 a2ac.py bench .
python3 a2ac.py setup --client claude --write   # or --client cursor / --client vscode
quickstart.ps1 (Windows PowerShell)
irm https://a2ac.ai/downloads/a2ac.py -OutFile a2ac.py
python a2ac.py bench .
python a2ac.py setup --client cursor --write    # or --client claude / --client vscode

Direct downloads: a2ac.py (CLI + MCP) a2ac_token_benchmark.py a2ac-workspace-latest.vsix (VS Code / Cursor Pro)

1. Three-Step Setup

Once connected, your AI coding tool asks A2AC for exact function locations instead of uploading entire source files repeatedly.

Step 1: Benchmark Your Repo

Run python3 a2ac.py bench . inside any repository to build local .cube symbol maps and measure exact token savings.

Step 2: Connect MCP

Run python3 a2ac.py setup --client claude --write (or cursor / vscode) to register the local MCP server.

Step 3: Track Usage Receipts

Call a2ac_savings_receipt or check .a2ac/bench_receipt.json to verify cloud tokens avoided and dollars saved.

2. What Stays Local vs. What Goes to the Cloud

A2AC separates local file indexing from cloud reasoning so raw repositories stay on your computer.

Item Where It Runs or Stays Why It Matters
Raw source code files Stays on your machine Full files are not re-uploaded on every step of a coding session.
Local project index (.cube) Built locally ($0.00 API cost) Maps functions and line ranges so your AI requests only what it needs.
Short targeted excerpts Sent to cloud model only when needed Reduces cloud token usage by up to 99% across multi-step tasks.
Usage & cost receipts Saved locally + verifiable online Gives you an auditable record of tokens saved and dollars spent.

3. Copy-Paste AI Tool Configuration

1. Copy-Paste mcpServers JSON Configuration

Paste this into .a2ac/mcp.json, claude_desktop_config.json, or your IDE MCP settings.

Add the following mcpServers entry to .a2ac/mcp.json, claude_desktop_config.json, or your IDE MCP settings.

mcp_config.json
{
  "mcpServers": {
    "a2ac-local": {
      "command": "python3",
      "args": [
        "a2ac.py",
        "mcp",
        "."
      ]
    }
  }
}
Exposed MCP Tool What It Returns Locally
a2ac_list_filesRepository file list with line counts and token sizes (~100 tokens total).
a2ac_get_symbolsClasses, functions, and exact line ranges for a file without reading its body.
a2ac_read_sliceOnly the requested symbol or line range instead of the full file.
a2ac_search_symbolsInstant symbol lookup across all indexed files in the workspace.
a2ac_savings_receiptCumulative tokens avoided in the active session + SHA-256 receipt.

2. Local Extraction Modes & CLI Benchmark

Compare deterministic Python AST indexing against local Gemma 4 E4B Q4_K_M GGUF semantic extraction. Both keep raw source files local at $0.00 cloud API cost (545,145 → 4,182 cloud tokens, 130.4x reduction, 107 verified AST functions).

Mode Flag Engine Behavior & Hardware
--mode local-ast Python ast parser Deterministic AST symbol & line-range extraction, zero GPU/LLM required, instant offline sidecar generation.
--mode chimera Gemma 4 E4B Q4_K_M GGUF Local GGUF inference on RTX GPU or CPU via llama.cpp for semantic summaries and schema validation at $0.00 cloud API cost.
cli_benchmark.sh
curl -fsSL https://a2ac.ai/downloads/a2ac_token_benchmark.py -o a2ac_token_benchmark.py
pip install tiktoken
python a2ac_token_benchmark.py --repo . --side-by-side --mode local-ast
python a2ac_token_benchmark.py --repo . --side-by-side --mode chimera

3. SHA-256 + Ed25519 Receipt Verification Schema

Every execution turn writes a canonical sorted-key JSON .cube receipt. Signatures exclude the signing envelope keys (signature, ed25519_sig, ed25519_pubkey, signing_alg, brain_cube) before computing SHA-256 and verifying the Ed25519 signature.

receipt_schema.json
{
  "receipt_id": "rcpt_2026_15step_ast",
  "mode": "local-ast",
  "ast_functions_verified": 107,
  "cloud_api_tokens_used": 4182,
  "local_tokens_used": 14800,
  "cloud_tokens_avoided": 540963,
  "compression_ratio": 130.4,
  "est_cloud_usd": 0.0162,
  "signing_alg": "SHA-256+Ed25519",
  "signature": "sha256:...",
  "ed25519_sig": "base64:...",
  "ed25519_pubkey": "base64:..."
}
receipt_cli.sh
python tools/write_receipt.py --agent a2ac-dev --task "Benchmark audit" --result "pass" --cloud-tokens 4182
python tools/write_receipt.py --verify-chain
python a2ac_token_benchmark.py --verify benchmarks/latest_token_benchmark.cube

4. Verify a Receipt or Run the Calculator

4. HTTP Endpoints & Specifications

Check your saved receipts or estimate monthly team savings on the Benchmark page, or use these direct endpoints for automated checks.

Method & Path Purpose
POST /cube Store and return a content-addressed .cube payload and UUID.
GET /cube/{uuid} Retrieve a stored .cube payload by UUID.
POST /api/verify-receipt Verify canonical SHA-256 and Ed25519 signature of a .cube receipt.
GET /benchmarks/latest_token_benchmark.json Fetch the latest reproducible 15-step token benchmark JSON report.

OpenAPI 3.1 (YAML) AsyncAPI 3.0 (YAML) Cube Schema (JSON) 15-Step Benchmark