aadc-mcp
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@aadc-mcp trace ~/pricers/european.py and show the branches closest to flipping"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
aadc-mcp
MatLogica's AADC engine and AADC Tracer, from your coding agent, on your own machine.
aadc-mcp is a local MCP server. It runs over stdio inside the Python
environment where the AADC packages are installed, and gives an agent in Claude Code, Cursor, Codex or any other MCP
client three things:
a measured environment check: which packages and versions are here, whether the engine runs (it records, replays and differentiates a two-line function and checks the answer), whether QuantLib tracing attributes anything, and the pip command for whatever is missing;
tracing of your own script with no code changes: the script runs with recording on and leaves a tape; a QuantLib pricer written against
aadc-quantlib-tracingneeds nothing added;the questions a tape answers: the constants the price depends on that nobody passed in, each at its C++ line; every decision frozen at record time and how far it was from going the other way; where a printed number was computed and the formula behind it; the source line with the recorded values written in, hash-checked against the compiled file; and a replay at new inputs that is exact when every recorded decision can be re-checked, and otherwise withheld, naming the decision it cannot vouch for.
Every number and every file:line in an answer is the engine's own output. The agent narrates; it never computes.
Install
python3 -m venv aadc-env && . aadc-env/bin/activate
pip install "aadc-mcp[quantlib]" # Linux x86-64, macOS arm64: aadc + QuantLib 1.41 with source tracing
pip install aadc-mcp # elsewhere: aadc only (tracing of QuantLib needs Linux x86-64 or macOS arm64)
pip install "aadc-mcp[greeks]" # adds aadc-quantlib: QuantLib 1.38 with exact AAD sensitivities, every platformaadc-mcp --check prints what runs here, and the pip command for anything missing, before you register anything.
Register it with the absolute path of the console script, so the client always finds the right interpreter:
claude mcp add aadc -- /absolute/path/to/aadc-env/bin/aadc-mcp{ "mcpServers": { "aadc": { "command": "/absolute/path/to/aadc-env/bin/aadc-mcp" } } }Related MCP server: AIS Revizor
First three calls
check_environment()
run_example("european_option") -> tape_id
inspect_tape(tape_id, "branches order=margin limit=5") -> the decisions closest to flipping, with file:lineThen on your own code: trace_script("/path/to/my_pricer.py"), inspect_tape(tape_id, "leaves kind=constant"),
inspect_tape(tape_id, "find value=<the printed price>"), replay(tape_id, "#<input>=<value>", "#<output>").
Tools
tool | what it does |
| packages, platform, licence state, engine self-test, tracing self-test, findings with fixes |
| run a |
| one question in the engine's grammar: |
| re-evaluate the tape at new inputs; exact when every recorded decision re-checks, withheld when one flips or cannot be checked |
| map the compiled source prefix to a local tree so |
| register a tape written elsewhere; list what the server holds |
| six bundled scripts: plain AADC (any platform) and unmodified QuantLib pricers |
Resources: two how-tos whose every snippet the tests run (using AADC: record once, replay, exact derivatives, batch,
QuantLib sensitivities; using the Tracer: the two ways to record, the switches, the questions in order, when a replay
is exact), the agent guide and the release notes shipped inside the aadc wheel, the verbs reference, a get-started
page, the package and platform matrix, and the tracing documentation (for agents, for people, model validation, how it
works). Prompts: get_started, validate_pricer, add_sensitivities.
Scope
The server runs your code on your machine; it is a developer tool, not a sandbox or a hosted service. A tape is one
execution at one input point: it supports "this executed" and "this constant is declared at file:line", never "this is
the only path". The source behind a line is shown when you point set_source_root at a matching QuantLib 1.41 ql/
tree; the answer says whether the file matches the compiled one.
Platforms follow the packages: aadc on Linux x86-64 and arm64, macOS arm64 and Windows x86-64 (CPython 3.10 to 3.14);
aadc-quantlib-tracing on Linux x86-64 and macOS arm64. Intel Macs are not supported: the engine has no wheel for them.
Licence
Proprietary, MatLogica. The aadc engine installs in Community Edition: non-commercial and academic use. Commercial
use needs a licence: info@matlogica.com.
Available Tools
10 toolscheck_environmentA
What this interpreter can do with AADC and the Tracer, measured: installed packages and versions, platform, licence state, an engine self-test (record, replay, reverse: dz/dx = 6 at x = 3), a tracing self-test (one traced QuantLib call must attribute leaves to QuantLib's C++), and findings with the pip command that fixes each. Call it first; call it again after installing anything.
Inputs: no named parameters.
get_exampleC
The source of one bundled example, to read, copy or adapt.
Inputs: name (required).
inspect_tapeB
Ask the tape one question in the engine's own grammar and get its text answer plus the parsed header. Verbs: 'stats' | 'leaves [kind=input|constant] [by=leaf] [limit=N]' | 'branches order=margin [limit=N]' | 'sites [file=NAME] [limit=N]' | 'at FILE:LINE [context=N]' (source with the recorded values; hash=ok means the file shown is the one compiled) | 'find value=X' (where a printed number was computed) | 'origin #N' (the formula behind a value) | 'uses #N' | 'cone #N' (which leaves can move a value, by derivative or only by a branch) | 'source root=COMPILED=LOCAL' (map compiled paths to a local source tree) | 'replay ...' (prefer the replay tool). Ids are #N from earlier answers. A malformed request answers status=error in the header, never an exception.
Inputs: request (required), tape_id (required), max_lines.
list_examplesB
Bundled scripts to start from: plain AADC (any platform), and unmodified QuantLib pricers that aadc-quantlib-tracing records (Linux x86-64, macOS arm64). mode=auto scripts are traced as they are; mode=explicit scripts record themselves and print sensitivities. Each is a starting point to copy and edit.
Inputs: no named parameters.
list_tapesB
The tapes this server holds: id, file, size, the script that produced each, and the source roots applied.
Inputs: no named parameters.
load_tapeA
Register an existing .tape file written earlier (by trace_script, by a script's own save_tape(), or downloaded from a report) and return its tape_id and stats.
Inputs: path (required).
replayA
Re-evaluate the tape at new inputs without re-running the model. assignments: '#12=101' or '#12=101,#15=0.21' (leaf ids from 'leaves kind=input' or 'leaves by=leaf'); out: the output id from 'find value='. survives=true: the recorded path holds and value is exact (equal to a fresh run to the last digit). survives=false: WITHHELD; flipped names the decision (file:line, decided true -> false) and unchecked the conversions the tape cannot check. There is no value to quote in that case. A tape read back from a file keeps no operand for a counted conversion, so on most QuantLib tapes a replay is withheld with unchecked naming the line (often errorfunction.cpp:200); say so and re-run the script at the new inputs for the price. path_recorded=true returns the recorded path's value labelled as such, for comparison only.
Inputs: out (required), tape_id (required), assignments (required), path_recorded.
run_exampleA
Copy one bundled example into the server's working folder, run it with tracing on and return its tape_id, its printed output and the tape's stats. Then question the tape with inspect_tape and replay.
Inputs: name (required), timeout_s.
set_source_rootA
Map the compiled source prefix recorded on the tape (for aadc-quantlib-tracing 1.41 it is /project/work/QLAADC/ql) to a local directory holding that source, so 'at FILE:LINE' and 'origin' can show the code. Later answers say hash=ok when the local file is the one the library was compiled from and hash=MISMATCH when it is not; a mismatch is reported, never silent. Remembered for this tape.
Inputs: tape_id (required), local_dir (required), compiled_prefix (required).
trace_scriptA
Run a Python script with tracing on and keep the record (tape) it leaves. The script needs no changes: it runs in its own directory with AADC_TRACE=1, so every calculation through aadc types or an AADC-built library such as aadc-quantlib-tracing is recorded with its source coordinates. Returns tape_id, the script's stdout and stderr, the engine's census (frozen branch sites, outputs) and stats. A script that records itself and ends with f.save_tape() writes to AADC_TRACE_OUT; mark its first line with 'mode=explicit'. outputs: optional AADC_TRACE_OUTPUTS entries, e.g. ['value=123.45'] or ['pricer.py:42'], to name the program's results on the tape. python: another interpreter to run under (the one where the user's packages live). This runs the user's own code on the user's own machine; it is not a sandbox.
Inputs: path (required), args, python, outputs, +2 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 10 tools
Most tools have clearly distinct purposes across the tracing lifecycle: environment check, trace/run, load/list, inspect, replay, source mapping, and examples. Minor overlap exists because inspect_tape supports a 'replay' verb despite a dedicated replay tool, and run_example and trace_script both run code and produce tapes, though their scopes are clearly differentiated.
Names are consistently snake_case and mostly follow a verb_noun pattern such as check_environment, trace_script, inspect_tape, load_tape, and set_source_root. The only notable deviation is the bare verb 'replay', which is still clear but breaks the otherwise predictable pattern.
Ten tools is well-scoped for a tracing, inspection, and replay server. Each tool corresponds to a meaningful stage or object in the workflow, with no obviously redundant or trivial tools.
The surface covers the core lifecycle: environment validation, tracing scripts and examples, loading and listing tapes, inspecting and replaying tapes, source-root mapping, and example discovery. Minor gaps remain around tape cleanup/removal or export, but agents can work around them for the stated tracing and debugging purpose.
Related MCP Connectors
Trading MCP server for AI agents, with live market data, account reads and controlled execution.
Shared memory MCP server for Claude Code, Codex, Gemini CLI and Cursor. Cited, editable.
JW3.ai remote MCP server for market reads and confirm-gated trading execution.
MCP server exposing the Backtest360 engine API as tools for AI agents.
Related MCP Servers
- AlicenseAqualityDmaintenanceMCP server for deterministic numeric verification and spreadsheet auditing. Enables AI agents to verify math/finance claims, audit rows, and evaluate covenant rules with signed, independently checkable receipts.4MIT
- FlicenseNot gradedqualityDmaintenanceA local-first MCP server that gives AI coding agents runtime visibility and AI-managed debug logging. It replaces blind print() debugging by turning runtime execution into causal chains, allowing agents to instantly locate bugs by finding missing .success events in Python and TypeScript code. Single binary with MCP, CLI, and HTTP interfaces.-
- AlicenseNot gradedqualityAmaintenanceProvides a local stdio MCP server that gives AI coding agents a typed, temporal, evidence-backed memory on embedded SQLite, letting them record decisions and constraints, ask why something happened, navigate memory by time, trace proof paths between refs, and export or supersede stored state without rewriting it. It also exposes read-only ChronoLoom view tools so a person and their agent can steer the same multidimensional memory view by semantic intent rather than raw coordinates.Apache 2.0
- AlicenseNot gradedqualityBmaintenanceA local stdio MCP server that exposes tools for running evidence-first research with source-linked, replayable reports, plus replay, citation-audit, and Agent Reach health checks. It preserves fetched page text, exact quote offsets, hashes, and run traces so a client can verify that quotes match retrieved sources, while withholding arbitrary shell or local-file access.1MIT