clearfills-firewall
OfficialThis server has a remotely hosted endpoint. Open its connector listing for connection details, authentication requirements, and setup instructions:
ClearFills Pre-Trade Risk Firewall (clearfills-firewall)
Deterministic Ed25519 pre-trade risk firewall & MCP server for AI trading agents.
Sits between any untrusted AI trading agent (Claude, Grok, Codex, TradingAgents, ai-hedge-fund, or custom Python loops) and your execution gateway so LLMs never hold brokerage API keys and can never hallucinate or get prompt-injected into an unbounded market sweep.
Interactive Simulator & Live Arena: https://clearfills.com
LLM Overview: https://clearfills.com/llms.txt
Agent Operational Contract: https://clearfills.com/agents.txt
Install
pip install clearfills-firewallRun the MCP stdio server:
clearfills-firewall-mcp
# or: uvx --from clearfills-firewall clearfills-firewall-mcpRun the FastAPI HTTP firewall service:
clearfills-firewallRelated MCP server: bvcc-agent-mcp
Connect to Claude Code & Cursor
Claude Code
claude mcp add clearfills -- uvx --from clearfills-firewall clearfills-firewall-mcpCursor (.cursor/mcp.json) / Project .mcp.json
{
"mcpServers": {
"clearfills": {
"command": "uvx",
"args": ["--from", "clearfills-firewall", "clearfills-firewall-mcp"]
}
}
}Deterministic Policy Invariants (Zero LLM in the Loop)
Every TradeProposal must satisfy all deterministic math rules before an Ed25519 attestation is signed:
Rejection Code | Invariant Enforced |
| Strict |
| Atomic bracket stop-loss required (or bounded binary collateral on Polymarket/Kalshi) |
| <= 1.5% NLV per equity trade / <= 1.0% fractional Kelly cap on binary markets |
| <= 20% gross NLV concentration cap |
| Fail-closed intraday halt at -3.0% PnL |
| Single-use 120-second Ed25519 attestation nonce; replays rejected and logged |
Every APPROVED, VETO, and VETO (REPLAY) decision appends to a SHA-256 hash-chained audit ledger (prev_hash -> entry_hash).
Drop-In Shims for Open-Source Trading Agents
Wrap TauricResearch/TradingAgents or virattt/ai-hedge-fund without rewriting their research pipelines:
from clearfills_firewall import FirewallService
from clearfills_firewall.shims import TradingAgentsShim, AIHedgeFundShimOpen Core vs. Pro Infrastructure Kit
Open Core (
clearfills-firewall, Apache-2.0 — $0): Deterministic risk engine, Ed25519 120s TTL attestation authority, replay protection, kill-switch, SHA-256 audit ledger, MCP stdio server, FastAPI server, andTradingAgents/ai-hedge-fundshims.Pro Infrastructure Kit ($299 one-time): Turnkey private source repo with Fly.io + Tailscale private mesh, headless IB Gateway + IBC + API-handshake watchdog, attested-only IBKR / Alpaca / Polymarket CLOB / Kalshi adapters, and Web Console → clearfills.com/#pricing.
Private Desk Install (MLDSAI Inc., $15k–$25k): Custom deployment for family offices and prop desks → Book 30-min call.
Risk engineering and execution software only. Not investment advice.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Trading MCP server for AI agents, with live market data, account reads and controlled execution.
MCP server for OpenMM — exposes market data, account, trading, and strategy tools to AI agents
JW3.ai remote MCP server for market reads and confirm-gated trading execution.
No-KYC managed MCP for AI agents: sandboxed TypeScript trading SDK, isolated sub-accounts, futures.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceAgent-native, self-hosted MCP server for crypto trading and DeFi management. Enables agents to query balances, execute trades, and manage positions with a policy engine and secure key storage.8Apache 2.0
- AlicenseNot gradedqualityBmaintenanceNon-custodial BVCC Agent Wallet MCP server: let an AI agent check balances, send native/ERC-20, approve, and swap on Uniswap v3/v4 across Ethereum, BNB Chain, Arbitrum and Base, within on-chain enforced limits.142 npm2MIT
- AlicenseAqualityCmaintenanceMCP server for AI agent guardrails — validates and signs agent decisions (OAA tokens) so third parties can verify them without server access32MIT
- AlicenseAqualityBmaintenanceAn MCP server that lets AI agents read Hyperliquid perpetual futures market data and their own account state, then place and cancel orders, adjust leverage, move USDC from spot to perp, and convert stablecoins to USDC. It holds no credentials and never contacts the exchange, routing every request through a runtime that enforces caps and signs server-side.9Apache 2.0