← Back

API-Anything

Live

Signature capability

It drives the real web app rather than reimplementing it: record an action once in your own authenticated Chrome and it captures every network call, auto-detects volatile fields like CSRF tokens by diffing two runs, then codegens a buildable MCP server crate an agent can call.

What it is

You run `api-anything record` while logged into a site, name an action (say `list_posts`), perform it, and a Python sidecar attached to your real Chrome over CDP captures every network request the page made. Recording the action twice lets a differential pass mark fields that change between runs as volatile (CSRF tokens, request IDs, timestamps) so replay ignores them. Replay reissues the captured HTTP calls with your cookies via reqwest, cheaply and scriptably, and falls back to live browser-driven mode if the session expired or anti-bot tripped. Finally it emits a per-site MCP server crate, one tool per recorded capability, speaking JSON-RPC over stdio for Claude, Cursor, or any MCP client. An auto mode replaces manual clicking with Python recipes that declare capability boundaries via an injected context manager.

Highlights

  • Rust workspace, 6 crates (~2,400 LOC): aa-core types/diff, aa-recorder CDP capture, aa-replay reqwest, aa-driver live fallback, aa-mcp-emit codegen, aa-cli
  • Automatic volatile-field detection: diffs two recordings of the same action to fingerprint CSRF tokens/timestamps/request-IDs so replay stays deterministic (aa-core/src/diff.rs)
  • Three-tier execution: cheap HTTP replay first, live browser-harness re-run as fallback when cookies expire or anti-bot fires
  • Codegens a buildable per-site MCP server crate, one MCP tool per recorded capability, consumable by any MCP client over stdio
  • 25 tests including a 220-line synthetic end-to-end test; release binary builds to a 4.5MB stripped executable (LTO, codegen-units=1)
  • Same philosophy as its sibling cli-anything but the driven engine is a live web app: drive the real thing, don't reimplement its API

Tech · Rust (2021 edition, 6-crate workspace), tokio, reqwest (rustls), clap, serde, similar/sha2 for diffing, Python sidecar over Chrome DevTools Protocol via browser-harness, MCP (JSON-RPC over stdio)