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

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

Connectors where a guard matters most

Broker MCP servers that let an agent trade without a per-order confirmation, from our sourced listings:

ConnectorSafetyWho places the orderTAS Guard
Alpaca MCP ServerSafety 68%AI trades directlyVerified profile
Longbridge MCPSafety 68%AI trades directlyHeuristic mode
NinjaTrader MCPSafety 58%AI trades directlyHeuristic mode
moomoo MCPSafety 58%AI trades directlyHeuristic mode
Public Hosted MCP ServerSafety 28% (partial)AI trades directlyHeuristic mode
Tradier MCP ServerSafety 50%AI trades directlyHeuristic mode
B2Trader MCP (B2PRIME)Safety 40% (partial)AI trades directlyHeuristic mode
Aries MCP ServerSafety 33% (partial)AI trades directlyHeuristic mode
Interactive Brokers AI Integration (MCP)Safety 71% (partial)Approval optionalHeuristic mode
Robinhood Trading MCPSafety 71% (partial)Approval optionalVerified profile
Axi MCP (MT5)Safety 75%Approval optionalHeuristic mode
CCXT MCP ServerSafety 85%Approval optionalVerified profile
cTrader AI Agent Connect (MCP)Safety 64% (partial)Approval optionalHeuristic 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:

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:

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:

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:

It isn't available yet. Tell us what you'd use it for, and we'll email you once when it's ready.





Which would you want? (pick any)








We'll email you once when it's ready. No newsletter unless you sign up for it separately. Privacy

Limits of the guard

TAS Guard is made by TradingAgentStack. It is our own tool, so it never affects safety scores or rankings. Version 0.4.0, MIT license.

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.

More in Build an AI agent

Other paths: Trade with a bot · Markets & infrastructure · Learn · Search all tools

Get the weekly AI trading bot stats

Who won, who lost and who got drained: verified results for AI agents, vaults and apps, new incidents and claims we checked. One email a week, unsubscribe anytime.

No spam. Unsubscribe anytime. Privacy