autonomous-audit-mcp
v0.1.0MCP server exposing autonomous-audit's tamper-evident decision log (record/verify/report/anchor) as agent-callable tools - integrity & traceability for AI…
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
record_decision Record Decision
Append ONE trading-agent decision to a tamper-evident SHA-256 hash-chain log. ``decision`` is a free-form dict of what the agent decided (e.g. ``symbol``, ``side``, ``qty``, ``reason``, ``timestamp``, ``alpaca_order_id``). Keep values string-typed if the log will also be verified outside Python. Read-only w.r.t. the broker/market: this only appends to the local log — it never places orders. Returns the new entry hash + record count.
| Parameter | Type | Description |
|---|---|---|
decision * | object | |
log_path * | string |
verify_log Verify Log
Verify the full integrity of a decision log. Detects in-place edits (hash mismatch) and deletions/reorders (prev_hash break). It does NOT by itself detect truncation of the newest records or a wholesale rewrite from genesis — use ``chain_head`` plus external anchoring for that. Returns intact/error + record count + span.
| Parameter | Type | Description |
|---|---|---|
log_path * | string |
export_report Export Report
Render the decision log as a self-contained, human-readable HTML report. The report leads with an integrity banner, one row per decision, and the required disclosure; print it to PDF from any browser. Writes to ``output_path`` and returns a summary.
| Parameter | Type | Description |
|---|---|---|
log_path * | string | |
output_path | string |
chain_head Chain Head
Return the current chain head hash and record count. This is the value to publish/sign EXTERNALLY (e.g. to a WORM store) so that truncation of the newest records or a genesis rewrite — which the local chain alone cannot catch — becomes detectable by comparing a later log against the anchored head.
| Parameter | Type | Description |
|---|---|---|
log_path * | string |
check_and_size_order Check And Size Order
Validate an intended trade against deterministic risk caps and compute safe share qty. Fail-closed cooperative pre-trade helper for Alpaca MCP and IBKR Autonomous Trading MCP: checks daily trade limits, available cash, single-symbol concentration (default 25%), and max order value (default $10,000), rounding down to whole shares when ``allow_fractional=False`` (default, safe for IBKR AI Partitions). Read-only w.r.t. any broker — never places, modifies, or cancels orders.
| Parameter | Type | Description |
|---|---|---|
account_cash * | number | |
account_equity * | number | |
current_price * | number | |
side * | string | |
symbol * | string | |
allow_fractional | boolean | |
daily_trades_count | integer | |
existing_position_value | number | |
is_risk_reducing_exit | boolean | |
max_daily_trades | integer | |
max_order_value | number | |
max_position_pct | number | |
max_positions | integer | |
min_order_value | number | |
requested_qty |