@bonooo/mcp
v0.1.1
Published
Bonooo MCP server — connect Claude Code / Codex and other MCP-compatible AI agents to your Bonooo account (read-only v1).
Downloads
356
Readme
@bonooo/mcp — Bonooo MCP Server
Connect Claude Code, Codex or any MCP-compatible AI agent to your Bonooo trading account. v1 is strictly read-only — account, positions, orders, history, quotes, K-lines, symbols. No order placement, no fund movement.
1. Get an API key
Log in to the web member center → Profile → API Keys → Create key.
The plaintext key (bonooo_live_xxx) is shown only once — copy it immediately.
2. Configure your agent
Claude Code (.mcp.json in your project, or ~/.claude.json)
{
"mcpServers": {
"bonooo": {
"command": "npx",
"args": ["-y", "@bonooo/mcp"],
"env": {
"BONOOO_API_KEY": "bonooo_live_xxx",
"BONOOO_API_BASE": "https://api.bonooo.com"
}
}
}
}Codex (~/.codex/config.toml)
[mcp_servers.bonooo]
command = "npx"
args = ["-y", "@bonooo/mcp"]
[mcp_servers.bonooo.env]
BONOOO_API_KEY = "bonooo_live_xxx"
BONOOO_API_BASE = "https://api.bonooo.com"From a monorepo checkout (before npm publish)
{
"mcpServers": {
"bonooo": {
"command": "node",
"args": ["<repo>/packages/mcp-server/dist/cli.js"],
"env": { "BONOOO_API_KEY": "bonooo_live_xxx" }
}
}
}3. Tools
| Tool | Args | Returns |
|---|---|---|
| get_account | — | balance / equity / margin / free margin / floating PnL |
| get_positions | — | open positions with floating PnL |
| get_orders | status?, limit? | active orders (open + pending) |
| get_history | limit? | closed orders, most recent first |
| get_quotes | symbols[] | latest bid/ask per symbol |
| get_klines | symbol, period (M1…MN1), limit? | OHLC candles |
| list_symbols | — | tradable symbols and contract info |
Environment
| Var | Required | Default |
|---|---|---|
| BONOOO_API_KEY | ✅ | — |
| BONOOO_API_BASE | — | https://api.bonooo.com |
Rate limits & safety
- 60 requests/min per API key (HTTP 429 when exceeded).
- Keys can be revoked at any time in the member center; revoked/expired keys get 401.
- v1 exposes zero write endpoints — an agent with your key can read, never trade.
Development
pnpm --filter @bonooo/mcp build # tsc → dist/
pnpm --filter @bonooo/mcp selfcheck # spawn stdio server, assert 7 tools listed
BONOOO_API_KEY=bonooo_live_xxx node dist/cli.js # manual run