Tools · free · open source · runs on your computer
TAS Guard: limits for bots and AI that trade your money
TAS Guard sits between your bot or AI agent and your money: it blocks orders over your limits, sends big ones to your phone for approval, and gives you a kill switch and an audit log.
Works with broker AI connectors such as Alpaca, EVM wallets and Solana.
Get Guard updates and the weekly AI trading bot stats. New limits and connectors, plus who won, lost or got drained. One email a week.
Who it's for
- You let Claude, ChatGPT or another AI app trade for you on a broker or exchange account through its connector (MCP server).
- You run a trading bot or script that signs with your own wallet: a Solana sniper or Jupiter bot, a pump.fun script, or a bot on Base, Ethereum or another EVM chain.
- You build trading agents for yourself or for other people.
What it can't protect: custodial Telegram bots and apps that keep your keys on their own servers, and bots that call an exchange's API directly instead of going through the guard. For those, check the bot's official links and the worst case for your setup before you connect, and only deposit what you'd accept losing. Coming next: Hyperliquid, with order caps on an API wallet that can't withdraw.
Why it exists
When we hand-labelled 5,132 X posts about trading bots and AI agents, 86 described real losses, 84 of them from individual traders (study). Most came from bots that held users' keys, which no tool on your own computer can guard. The losses a guard does stop are the ones where your own bot or agent does too much: an oversized order, a runaway loop, an approval it should never have signed.
Of the 18 official broker MCP servers we track, 8 let an AI agent place orders directly and 5 make approval optional (research). Generic MCP gateways can flag "create order" as risky, but they can't tell a $50 order from a $50,000 one. TAS Guard reads the order itself: symbol, side, size and price, including option contract multipliers and exchanges that preview before they fill.
What it does
- Hard limits: per-order and daily value caps, orders per day and per minute. Approval can't override them.
- Allow and block lists: symbols (with wildcards like
BTC/*) and sides (for example buy-only). - Human approval: orders over a threshold, live-money orders, market orders with no price, and "cancel or close everything". You approve in your AI app's prompt or with a command; the agent can't.
- Blocked by default: withdrawals and transfers, leverage changes, account settings, raw "call any endpoint" tools and anything unrecognized. They're hidden from the agent too.
- Approve from your phone: held actions arrive in Telegram with Approve and Deny buttons, through your own bot. You also get alerts when an order is blocked, and
/kill,/resumeand/statusfrom anywhere. Optionally, only your phone can approve. - Kill switch: one command, or
/killon your phone, stops new orders on every guarded account. Cancels and closing positions keep working. - Audit log: every decision, with secrets redacted, in a hash-chained file that shows if a line was edited or deleted.
Connectors where a guard matters most
Broker MCP servers that let an agent trade without a per-order confirmation, from our sourced listings:
| Connector | Safety | Who places the order | TAS Guard |
|---|---|---|---|
| Alpaca MCP Server | Safety 68% | AI trades directly | Verified profile |
| Longbridge MCP | Safety 68% | AI trades directly | Heuristic mode |
| NinjaTrader MCP | Safety 58% | AI trades directly | Heuristic mode |
| moomoo MCP | Safety 58% | AI trades directly | Heuristic mode |
| Public Hosted MCP Server | Safety 28% (partial) | AI trades directly | Heuristic mode |
| Tradier MCP Server | Safety 50% | AI trades directly | Heuristic mode |
| B2Trader MCP (B2PRIME) | Safety 40% (partial) | AI trades directly | Heuristic mode |
| Aries MCP Server | Safety 33% (partial) | AI trades directly | Heuristic mode |
| Interactive Brokers AI Integration (MCP) | Safety 71% (partial) | Approval optional | Heuristic mode |
| Robinhood Trading MCP | Safety 71% (partial) | Approval optional | Verified profile |
| Axi MCP (MT5) | Safety 75% | Approval optional | Heuristic mode |
| CCXT MCP Server | Safety 85% | Approval optional | Verified profile |
| cTrader AI Agent Connect (MCP) | Safety 64% (partial) | Approval optional | Heuristic mode |
Try it in 10 seconds
No broker account or API keys needed. This starts TAS Guard in front of a built-in demo broker: a $100,000 paper account with simulated prices, held in memory. Add it to your MCP client the same way as below, or run it directly:
npx -y tas-guard demo
Demo limits: $2,000 per order, $5,000 a day, approval over $1,000, symbols SPY, QQQ, AAPL, MSFT and NVDA. Ask your agent to buy 1 SPY at $580 (allowed), 2 SPY at $580 (held for your approval), 10 SPY (blocked: over the per-order limit) or 1 TSLA (blocked: not on the list), then call tas_guard_status. Nothing touches a real account.
Quick start (Alpaca, paper trading)
On Windows with Claude Desktop? Follow the step-by-step Windows guide: two copy-paste scripts, tested with an Alpaca paper account.
Needs Node 18+ and uv. Install Alpaca's server once with uv tool install alpaca-mcp-server, then save this as alpaca.json. Keep your API keys in this file rather than in your AI app's settings: some apps keep their own copy of server settings, and keys in the guard file always win. (${VAR} values are read from the environment if you prefer.)
{
"name": "alpaca",
"profile": "alpaca-mcp-server",
"upstream": {
"command": "alpaca-mcp-server",
"args": [],
"env": {
"ALPACA_API_KEY": "PK...your paper key",
"ALPACA_SECRET_KEY": "...your paper secret",
"ALPACA_PAPER_TRADE": "true"
}
},
"policy": {
"max_order_value": 500,
"max_daily_value": 2000,
"approve_over": 250,
"symbols_allow": [
"SPY",
"QQQ",
"AAPL"
]
}
}Then point your MCP client at the guard instead of at Alpaca. Claude Desktop (claude_desktop_config.json):
{
"mcpServers": {
"alpaca": {
"command": "npx",
"args": [
"-y",
"tas-guard",
"run",
"--config",
"/path/to/alpaca.json"
]
}
}
}Claude Code: claude mcp add alpaca -- npx -y tas-guard run --config ~/alpaca.json. Ask the agent to call tas_guard_status to see its limits.
Approve from your phone
Link your own Telegram bot in about two minutes. Held actions then arrive with Approve and Deny buttons, and the agent's call goes through as soon as you tap:
npx tas-guard telegram-setup --config ~/alpaca.json
On your phone: /status, /pending, /kill, /resume. Taps from anyone else are ignored.
Your controls
npx tas-guard pending # actions waiting for you npx tas-guard approve <id> # approve one (the agent repeats the call) npx tas-guard kill # stop all new orders now npx tas-guard resume npx tas-guard log --tail 20 # what happened npx tas-guard verify-log # check the log wasn't edited
Onchain mode (EVM wallets)
New in 0.3.0. Our agent wallet and agent payments ratings found that most of them have no transaction preview and no human approval step. tas-guard rpc adds both for any EVM agent: it runs a local RPC endpoint that your agent (AgentKit, viem, ethers, web3.py) uses instead of its normal RPC URL. Reads pass straight through; every transaction or signature is decoded and checked first:
- USD limits: per-transaction and daily caps, plus transactions per minute and per day, for native ETH and the tokens you list (USDC counts as $1).
- Who and what: allowed chains, a recipient allowlist and a contract allowlist; anything new asks you first.
- Approvals and permits: unlimited token approvals and
setApprovalForAllare blocked; other approvals and Permit/Permit2 signatures ask you. Revokes are always allowed. - Pre-flight revert check: each transaction is run with
eth_callbefore it is sent, so a call that would fail is stopped with its revert reason. - The same controls: phone approvals on Telegram, the kill switch and the hash-chained audit log.
Try it with no chain or keys:
npx -y tas-guard rpc-demo
It prints test requests that are allowed, held for you, and blocked. For a real wallet on Base, save this as base.json and run npx -y tas-guard rpc --config base.json, then point your agent at http://127.0.0.1:8547:
{
"name": "base-agent",
"upstream_rpc": "https://base-mainnet.g.alchemy.com/v2/${ALCHEMY_API_KEY}",
"listen": "127.0.0.1:8547",
"wallets": [
"0xYourAgentWalletAddress"
],
"onchain": {
"chains_allow": [
8453
],
"native_usd": {
"8453": 3000
},
"tokens": {
"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913": {
"symbol": "USDC",
"decimals": 6,
"usd_price": "stable"
}
},
"max_tx_usd": 100,
"max_daily_usd": 500,
"approve_over_usd": 25,
"max_tx_per_minute": 3,
"max_tx_per_day": 20,
"recipients_allow": [],
"contracts_allow": [],
"unlimited_approval": "block"
},
"approvals": {
"telegram": {
"bot_token": "${TAS_TELEGRAM_BOT_TOKEN}",
"chat_id": "123456789"
}
}
}Limits: it protects only agents that use this RPC URL; the pre-flight is a revert check, not a full balance-change simulation; token prices come from your config; the wallet address must be listed in wallets. For Solana, see the next section. Details in the README.
Solana mode
New in 0.4.0. tas-guard sol-rpc is a local Solana RPC endpoint for agents that sign their own transactions (Solana Agent Kit, web3.js or Kit bots, Jupiter and pump.fun scripts). Before a transaction reaches the network, the guard simulates it and reads what would actually leave your wallet, including SOL and tokens moved inside other programs:
- USD limits: per-transaction and daily caps, and per-program caps, for example pump.fun at $20 per trade and $100 a day.
- Drainer patterns blocked: unlimited token approvals, handing your wallet or a token account to someone else, even when another program does it quietly (the simulation shows it).
- Runaway fees: a cap on the network plus priority fee.
- Asks you first: new recipients, programs not on your list, and anything it can't price.
- Every transaction format: legacy, v0 with lookup tables, and the new v1 format live on mainnet since September 2026.
- The same controls: phone approvals on Telegram, the kill switch and the hash-chained audit log.
See it handle seven agent transactions on a built-in test chain, with no keys and no money:
npx -y tas-guard sol-demo
For a real wallet, print a starter config with npx -y tas-guard init solana, save it as solana.json, run npx -y tas-guard sol-rpc --config solana.json, and point your agent at http://127.0.0.1:8890:
{
"name": "solana",
"upstream_rpc": "https://mainnet.helius-rpc.com/?api-key=${HELIUS_API_KEY}",
"listen": "127.0.0.1:8890",
"wallets": ["YourAgentWalletAddress"],
"solana": {
"clusters_allow": ["mainnet"],
"sol_usd": 150,
"max_tx_usd": 50,
"max_daily_usd": 200,
"approve_over_usd": 25,
"max_fee_sol": 0.005,
"programs_allow": ["jupiter", "pumpfun", "pumpswap"],
"program_caps": { "pumpfun": { "max_tx_usd": 20, "max_daily_usd": 100 } }
}
}Limits: it protects only agents that send through this RPC URL, so custodial Telegram bots (which keep your keys on their servers) can't be guarded; for those, check the bot's links instead. The simulation is a snapshot, so a swap can still fill worse within your slippage. Prices come from your config. Details in the README.
Connector profiles (open data)
A profile records what each tool of a connector can do with money and where its order fields live, checked against the connector's source code. They're published as JSON under the same CC BY 4.0 terms as our dataset:
- Alpaca MCP Server: alpaca-mcp-server.json, 22 tools, checked 2026-10-20 against tests/test_server_construction.py EXPECTED_TOOLS and src/alpaca_mcp_server/overrides.py at commit 2a973a0 (2026-10-12)
- CCXT MCP Server: ccxt-mcp-server.json, 24 tools, checked 2026-10-20 against mcp/ts/tools/*.ts registerTool calls at ccxt commit 310bf4b (2026-10-19)
- Robinhood Trading MCP: robinhood-trading-mcp.json, 94 tools, checked 2026-10-21 against Robinhood support article 'Trading with your agent' (robinhood.com/us/en/support/articles/trading-with-your-agent/), tool table of 94 tools, read 2026-10-21; endpoint from 'Agentic trading overview' (robinhood.com/us/en/support/articles/agentic-trading-overview/). The server is hosted and closed source; Robinhood publishes tool names but no argument schemas.
Schema: connector-profile.v1.json. Index: /data/profiles/index.json. Profiles for more brokers are welcome as pull requests on GitHub.
Guard Cloud: join the waitlist
TAS Guard stays free and open source. We're planning a hosted version for people who want more without running anything extra:
- Phone approvals without creating your own bot
- Several approvers for a team or fund
- Alerts when an agent nears its daily caps, and one dashboard across all your agents
- An off-machine copy of the audit log
It isn't available yet. Tell us what you'd use it for, and we'll email you once when it's ready.
Limits of the guard
- Order values use the order's own price; a market order by quantity has no price, so it needs approval by default.
- There's no profit-and-loss stop yet: daily caps limit how much the agent can trade, not how much it can lose.
- If your agent can run terminal commands, it could run the approve command itself, unless you turn on phone-only approvals (
"cli": false). - It's a seatbelt, not a guarantee. Not financial advice.
FAQ
Who is TAS Guard for?
Anyone who lets software trade with their money: people who connect Claude, ChatGPT or another AI app to a broker or exchange, traders who run a bot or script that signs with their own wallet (Solana, Base, Ethereum and other EVM chains), and developers building trading agents. You set the limits once; the bot or agent can't change them.
Can it protect my Telegram trading bot?
Only if the bot signs with a wallet you control and sends through the guard's RPC address. Most Telegram bots are custodial: they keep your keys on their servers, so no tool on your computer can see or stop their trades. For those, check the bot's official links, read its worst case, and keep only a small amount in it.
Is TAS Guard free?
Yes. It's open source under the MIT license: github.com/intoApex/tas-guard. It runs on your own computer; nothing goes through our servers.
Does it replace my broker's own safety controls?
No. It adds a second layer you control. Keep the broker's paper mode, read-only scopes and a separately funded account; the guard limits what an agent can do within them.
Can the AI agent turn the guard off or approve its own orders?
The agent gets no tool to approve, change limits or switch off the kill switch. Approvals come from you: a tap in Telegram, your AI app's own prompt, or a command you run. If your agent can run terminal commands, turn on phone-only approvals ("cli": false) so a terminal command can't approve anything.
Which brokers does it work with?
Any MCP server. 3 connectors have verified profiles (Alpaca MCP Server, CCXT MCP Server, Robinhood Trading MCP); for others it classifies tools by name and blocks anything it doesn't recognize.
Does it work with Solana trading bots?
Yes, for bots and agents that sign their own transactions: tas-guard sol-rpc simulates each transaction and enforces your limits, including per-program caps such as pump.fun. Custodial Telegram bots keep your keys on their servers and never send through your RPC, so no local guard can see their trades.
Does TradingAgentStack see my trades?
No. The guard runs locally and sends nothing to us. The audit log stays on your machine.
Does using TAS Guard change a tool's safety score?
No. Safety scores describe what each connector can do on its own, from its official docs. The guard is our own tool and never affects scores or rankings.