aadc-mcp
AADC and the 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 platform
aadc-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" } } }
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:line
Then 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 |
|---|---|
check_environment |
packages, platform, licence state, engine self-test, tracing self-test, findings with fixes |
trace_script |
run a .py file with tracing on, keep the tape, return stdout, census and stats |
inspect_tape |
one question in the engine's grammar: stats, leaves, branches, sites, at, find, origin, uses, cone, source |
replay |
re-evaluate the tape at new inputs; exact when every recorded decision re-checks, withheld when one flips or cannot be checked |
set_source_root |
map the compiled source prefix to a local tree so at shows code, with hash=ok or hash=MISMATCH |
load_tape, list_tapes |
register a tape written elsewhere; list what the server holds |
list_examples, get_example, run_example |
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.
Metadata
Release files for aadc-mcp 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| aadc_mcp-0.1.1.tar.gz | 44.4 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| aadc_mcp-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 98.3 kB
Release files / aadc_mcp-0.1.1.tar.gz
| Download URL | aadc_mcp-0.1.1.tar.gz |
|---|---|
| Size | 44.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b43a4210543e613c3bf34c254cf2fa52c03446f76cd6f6d40fdaf1868851df31
|
|
BLAKE2b-256 checksum How to use checksums |
d55e4c32651e9403b19bef12c0772ce020a380edb39269ce133726a8ebb428f0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.2
|
Release files / aadc_mcp-0.1.1-py3-none-any.whl
| Download URL | aadc_mcp-0.1.1-py3-none-any.whl |
|---|---|
| Size | 54.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
273ba1df8d806b27432849829a1b9814ec8c596eeb9e659a4a383b812cf3d1f1
|
|
BLAKE2b-256 checksum How to use checksums |
3415924fc8ba1b60d5682a721f8003d66d304ca7240022d0c68a63460c0483d0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.2
|
Security for aadc-mcp 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.