Haelo Gateway
OfficialProvides a Robinhood Crypto integration path for AI trading agents, allowing orders to pass through Haelo's policy, autonomy-ladder, and audit controls before being sent to Robinhood Crypto via the upstream MCP proxy or client. The integration fails closed when order schemas cannot be parsed and has not been validated against Robinhood's live service by the author.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
Not financial advice. Haelo limits how badly an agent can hurt you. It does not make trading safe or profitable. Read Limitations and SECURITY.md.
Why Haelo
A broker login is all-or-nothing. Haelo starts the agent in shadow: live quotes, simulated fills, nothing sent.
Promotion is human-only. Criteria are written down first: days, decisions, invalid rate, breaches, injection follow-throughs, drawdown, no tool drift.
Demotion is automatic. A hard breach or tool-list change goes back to shadow. Drawdown or an order after an injection flag drops one rung. Promotion then freezes for a cool-down (default 24 h).
The agent has no tool that promotes, demotes, approves, or edits policy. It can ask (
haelo_request_promotion) and read its status.Live trading is off until
live.enabled: true. Force cannot override that. See docs/GO_LIVE.md.
Related MCP server: tradebox-mcp
The ladder
flowchart LR
S[shadow] --> P[paper] --> R[propose] --> M[micro] --> T[standard]
T -.->|breach or tool drift| S
M -.->|drawdown or injection| R
R -.->|drawdown or injection| P
P -.->|drawdown or injection| SRung | What an order does | Money at risk |
| Simulated against live quotes, with slippage and fees. Never reaches the broker. | none |
| Sent to the broker's paper environment (Alpaca). Skipped when the broker has no paper environment. | none |
| Held. You read an approval card built from the order fields and approve or decline. | only what you approve |
| Sent live under tighter caps (default $25 / order, $100 / day, 5 orders / day). | tiny |
| Sent live under the rails in your policy. | your limits |
Install
npx haelo-mcp --help
npm i -g haelo-mcpOr clone and build:
git clone https://github.com/HaeloBot/Haelo && cd Haelo
npm ci && npm run build
node dist/cli.js --helpThe package name on npm is haelo-mcp. Publishing runs from a GitHub release with NPM_TOKEN. This repository does not publish on its own.
Quickstart
No broker account:
git clone https://github.com/HaeloBot/Haelo && cd Haelo
npm ci && npm run build
node dist/cli.js mock-upstream --port 8799 &
mkdir /tmp/haelo-demo && cd /tmp/haelo-demo
node /path/to/Haelo/dist/cli.js init --broker mock
node /path/to/Haelo/dist/cli.js policy lock
node /path/to/Haelo/dist/cli.js doctor
node /path/to/Haelo/dist/cli.js serve --httpAlpaca paper, after ALPACA_PAPER_KEY_ID and ALPACA_PAPER_SECRET_KEY are set:
haelo init --broker alpaca && haelo policy lock
haelo doctor
haelo serve --stdioRobinhood Crypto and the upstream MCP path are in docs/ADAPTERS.md. Neither has been run against Robinhood by the author. Robinhood Chain swaps (Uniswap v3 on chain 4663) are in docs/CHAIN.md. Start at shadow.
Connect an agent with examples/claude-desktop.stdio.json or examples/cursor.mcp.json.
Features
Plain broker MCP | Haelo in front | |
First order | Live, if the key is live | Shadow |
Size | Whatever the model asks | Caps per rung. Unsized orders are refused |
A bad day | Keeps going | Drawdown demotes. A breach returns to shadow |
Tool list changes | The agent sees the new tools | Orders freeze until |
Prompt injection | The model's problem | A tripwire, then the rails anyway |
Record | Logs, if you keep them | Hash chain. |
Keys | Often in the agent config | Environment variables. Never in |
The website playground runs the same policy, ladder, and audit code in the browser. It does not ask for broker keys. Live orders stay on the local CLI.
Architecture
flowchart LR
A[AI agent] -- MCP --> G[Haelo gateway]
G --> C[Classify, policy, ladder, audit]
C --> B[Alpaca / Robinhood Crypto / Robinhood Chain / upstream MCP]
H[Human CLI] --> CA call is classified by tool name. Annotations are not trusted. Transfers and unknown tools are hidden and blocked. Orders are sized or refused, checked for an injection window, evaluated against the rung's rails, then simulated, held, or sent. Details: docs/ARCHITECTURE.md. Every policy field: docs/POLICY.md.
haelo status | report
haelo promote [--force]
haelo demote | panic
haelo proposals
haelo approve <id> | decline <id>
haelo approvals-ui
haelo doctor [--live]
haelo pin status | approve
haelo audit verify | tail | export
haelo policy lock | check | showComponent | Status |
MCP server, policy, ladder, shadow ledger, household checks, audit chain, storage, CLI, approvals UI | Verified by automated tests. Coverage is enforced in CI (lines ≥ 90%) |
| Verified against local mocks. Read-only |
Alpaca adapter | Real client for the documented endpoints. Checked against a local mock only, not yet against Alpaca |
Robinhood Crypto client | Ed25519 signing checked against the official example. Endpoints checked against a mock only |
Upstream MCP proxy | Streamable HTTP and OAuth 2.1 + PKCE checked against a local mock IdP. Not checked against Robinhood |
Robinhood Chain | Uniswap v3 router and quoter from Uniswap's chain 4663 list. Quotes read from the public RPC. Live swaps are implemented and covered by a mocked chain. No testnet router is published, so no on-chain swap has been sent |
Token storage | OS keychain when one exists, otherwise a mode |
Shadow fills | Quote ± slippage. A good shadow result is weak evidence about live results |
Wash-sale and lot checks | Heuristic warnings, not tax advice. Crypto wash-sale checks are off by default |
Security
The agent is treated as untrusted. Caps bound the loss. They do not make a trade good. Injection detection is a tripwire, not a wall. The audit log is tamper-evident, not tamper-proof. Run the gateway as a different OS user from the agent. Report vulnerabilities privately: SECURITY.md.
A determined injection can evade the regexes. The rails are the real limit.
If the agent can run a shell as the Haelo user, it can run
haelo promote.Anyone who can rewrite the whole audit file can recompute the chain.
Quotes are only as good as the broker feed. Free Alpaca data is IEX-only.
No standing orders, and no chat-app approvals. Approvals are the CLI or the local web UI.
One agent per state directory.
Roadmap
Known gaps, not dates:
The Alpaca and Robinhood Crypto adapters have not been run against those live services.
haelo doctorand the smoke scripts are the way to check a real account.Robinhood Chain testnet (46630) has no published Uniswap router. Mainnet quotes can be checked with
haelo doctor. A live swap still needs your own funded key. See docs/CHAIN.md.Robinhood does not publish its agentic-trading tool schemas, so the upstream proxy fails closed when it cannot parse an order.
$HAELOon the website has no contract address untilwebsite/public/config.jsonis filled in. The page shows "CA coming soon" until then.
Website
Live at https://haelobot.com.
To publish the $HAELO address, edit only website/public/config.json (token.ca, and buyUrlTemplate with {CA}). Push to main. The page fetches that file with cache: "no-store". Leave ca empty until you have the address.
The Connect wallet button uses Reown AppKit on Robinhood Chain only (reown.projectId in that same file). In the Reown dashboard, allowlist haelobot.com or the modal cannot finish a connection on that domain.
Contributing
CONTRIBUTING.md. Node 22.13 or newer. npm ci && npm run lint && npm run typecheck && npm test. The docs index is docs/README.md.
License
MIT. Copyright 2026 Kavindu Diluka. See LICENSE.
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
Zero-secret MCP gateway for AI agents: risk-scored, audited calls with human-in-the-loop approval.
MCP gateway with runtime security policy, tool-call-level control, and audit of agent actions.
Security gateway for AI agents: policy, approval, and audited execution, no secrets shared.
Governed autonomous-agent platform: HITL approvals, budget gates, audit chain, effect ledger.
Related MCP Servers
- FlicenseBqualityDmaintenanceAn MCP trading server over a paper broker with a deterministic risk layer that enforces limits before orders reach the handler, ensuring safe AI agent trading.7-
- AlicenseNot gradedqualityDmaintenanceEnables AI trading agents to trade safely through any broker MCP server by recording every tool call and reasoning in a local blackbox, while enforing configurable guardrails such as symbol whitelists, order size caps, rate limits, and daily-loss circuit breakers before orders reach the exchange.MIT
- FlicenseNot gradedqualityCmaintenanceEnables AI agents to trade on Binance through a governed MCP proxy that enforces configurable policies, requires a recorded rationale before orders, detects prompt injection, logs all actions in a tamper-evident audit trail, and blocks execution until a human approves.-
- AlicenseAqualityBmaintenanceLeast-privilege compiler and MCP gateway for AI agents: run your agent in record-only mode, compile the smallest policy it actually needs from its real tool calls, enforce it at the gateway (deny > approve > allow), and keep a SHA-256 hash-chained audit of every call that verifies offline.141Apache 2.0