Deterministic Ed25519 pre-trade risk firewall, MCP server, and IBKR execution guard for AI trading agents (clearfills.com)
pip install clearfills==0.5.1
Let AI manage your portfolio. Never give it your broker password.
ClearFills is an open-core execution firewall and MCP server for AI trading agents. Connect Claude, Claude Code, Cursor, Codex, TradingAgents , or ai-hedge-fund to Interactive Brokers (IBKR), Alpaca, and multi-account portfolios with deterministic Ed25519 pre-trade risk rules and 1-tap human approval.
Install: pip install clearfills (add pip install 'clearfills[ibkr]' for IBKR Gateway execution)
Live Sandbox ($0, 60 seconds):
Hosted Remote MCP (OAuth 2.1 + Bearer):
Documentation: clearfills.com/docs · docs/QUICKSTART.md · docs/AGENT_INTEGRATION.md
Machine-Readable Docs: llms.txt · agents.txt
Install & Unified CLI
Run the unified clearfills CLI right from your terminal:
How It Works (3 Steps)
Connect read-only: Sync your balances and holdings from IBKR, SnapTrade, EVM wallets, or statements without handing brokerage passwords to an LLM.
Enforce hard math: Every AI trade proposal passes through a deterministic, zero-LLM risk firewall ( clearfills ) that enforces per-sleeve notional caps, mandatory stop-losses, daily loss limits, and a fail-closed kill-switch before minting a single-use 120-second Ed25519 attestation.
Approve in one tap: Review attested orders in your ClearFills Inbox and tap Approve . Your local clearfills watch worker atomically claims the order, checks a fresh live quote (50 bps slippage guard), re-attests, and routes to IBKR or Alpaca.
1. Try the Live Sandbox ($0)
Sign in at clearfills.com/console (GitHub or Google).
Click Launch 60-Second Sandbox Demo on Portfolio to load a sample Personal + Corporate balance sheet and queue an SGOV T-bill sweep.
Open Inbox and tap Approve & Execute to inspect an Ed25519-signed execution receipt and SHA-256 audit trail. Click Clear Sandbox Data anytime to connect real accounts.
2. Connect Your AI Agent via MCP (No pip install Required)
Connect Claude.ai (OAuth 2.1), Claude Code , Cursor , or Codex to . See the full copy-paste guide in examples/claude_mcp_setup.md .
4. Connect Live or Paper IBKR
Run any Python example locally with zero broker credentials:
Per-Sleeve Deterministic Risk Firewall
Zero LLM in the approval path. Every TradeProposal is routed to a sleeve and evaluated deterministically before a single-use Ed25519 attestation (120s TTL) is signed:
Every decision ( PROPOSAL_APPROVED , PROPOSAL_VETOED , DISPATCH_ALLOWED , DISPATCH_REJECTED , KILL_SWITCH_TRIPPED ) appends to a SHA-256 hash-chained audit ledger .
src/clearfills : Unified clearfills Python package & CLI ( init , doctor , mcp , watch , sync , validate , redteam , serve ).
packages/risk-firewall : Apache-2.0 clearfills_firewall , deterministic policy engine, per-sleeve rules, Ed25519 attestation authority, SHA-256 audit ledger, MCP stdio and FastAPI server.
packages/clearfills-desk : Apache-2.0 clearfills_desk , IBKR execution adapter ( whatIf previews, delayed-quote metadata, multi-agent clientId retry), clearfills-desk-mcp , clearfills sync , and clearfills watch .
examples/ : Runnable integration examples for TradingAgents , ai-hedge-fund , Claude, Cursor, and Codex.
docs/QUICKSTART.md : Concise operator guide covering Portfolio, Inbox, Rules, Lab, and live IBKR setup.
Security & Non-Custodial Guarantee
Zero credential custody: AI agents never receive brokerage or banking passwords.
Fail-closed live execution: Live IBKR requires both ibkr.allow_live: true in config and CLEARFILLS_ALLOW_LIVE=1 in the execution environment, loopback/Tailscale-only transport, and a 50 bps fresh-quote slippage guard on clearfills watch .
Software only: ClearFills is self-directed risk engineering and execution software, not an investment advisor, custodian, or broker-dealer.
Release files for clearfills 0.5.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation .
Source distribution (sdist)
Built distribution (wheel)
Total release size: 202.1 kB
Release files / clearfills-0.5.1.tar.gz
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 25, 2026.
Release files / clearfills-0.5.1-py3-none-any.whl
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 25, 2026.
Security for clearfills 0.5.1
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.
Both files in this release have been uploaded with provenance metadata.
Attestation for clearfills-0.5.1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 25, 2026.
Attestation for clearfills-0.5.1-py3-none-any.whl
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 25, 2026.
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.
Release history Release notifications | RSS feed
Nov 25, 2026 2 release files Full provenance
Nov 25, 2026 2 release files Full provenance
The full story
This article is one source in a clustered incident — the cluster page carries the summary, timeline and every other outlet covering it.
