Agent API
Stock research, Watchlist and alerts for your agent
Connect Claude Code, Hermes, OpenClaw, or your own client through remote MCP with OAuth. Scripts can use the matching REST API with a personal token.
Stocksbrew exposes research workflow actions. It cannot place trades or move money.
Quickstart
Connect with one prompt
Paste this into your agent. It includes OAuth, safe confirmation rules, and a verification task.
Connect Stocksbrew
Copy this into your agent
Connect to Stocksbrew's remote MCP server: https://www.stocksbrew.online/api/mcp Use OAuth. After connecting, verify the setup by showing my Watchlist and its latest changes. When I ask about a stock, call get_stock_intelligence first. If the detailed brief is missing, explain what data is available and ask before using add_to_radar to queue or refresh research. Recheck the stock later when research is queued or running. You may read my Watchlist and alerts. Ask for my confirmation before adding or removing a Watchlist stock, or creating or deleting a price alert. Use get_radar_changes for earnings, RSI, call, anomaly and news updates. Never place trades or claim Stocksbrew can access a brokerage. If you cannot add the server automatically, give me the exact setup steps for this client. Never ask me to paste an access token into chat.
Uses OAuth. Your access token stays out of the conversation.
- 1. Connect. Add
https://www.stocksbrew.online/api/mcpas a remote MCP server. - 2. Approve. Sign in and choose only the permissions the agent needs.
- 3. Verify. Ask: “Show my Watchlist and explain anything that changed today.”
Client setup
Claude Code, Hermes, OpenClaw, and REST
OAuth-capable clients open the Stocksbrew approval screen. Reconnect an older client if it needs Watchlist or alert write scopes.
claude mcp add --transport http stocksbrew https://www.stocksbrew.online/api/mcp
{
"mcpServers": {
"stocksbrew": { "url": "https://www.stocksbrew.online/api/mcp", "auth": "oauth" }
}
}openclaw mcp add stocksbrew --url https://www.stocksbrew.online/api/mcp --auth oauth openclaw mcp login stocksbrew openclaw mcp doctor stocksbrew --probe
curl -H "Authorization: Bearer $STOCKSBREW_TOKEN" \ "https://www.stocksbrew.online/api/v1/stocks/NVDA"
Common recipes
The jobs agents can do
Call get_stock_intelligence. Baseline data remains available when the detailed brief is missing.
Read coverage.next_action, ask the user, then call add_to_radar. Recheck the same stock later.
Call get_radar_changes with the last cursor. Save the returned cursor only after delivery succeeds.
Ask before any write, then use the alert tools. Earnings, RSI, call, anomaly and news updates come through Watchlist changes.
{
"instrument": { "ticker": "CCL", "name": "Carnival" },
"market_data": { "price": 27.81 },
"coverage": {
"status": "baseline_only",
"tracked_in_radar": false,
"has_baseline_data": true,
"has_detailed_call": false,
"next_action": {
"action": "ask_to_add_to_radar",
"tool": "add_to_radar"
}
}
}POST https://www.stocksbrew.online/api/v1/alerts
Authorization: Bearer $STOCKSBREW_TOKEN
Content-Type: application/json
{
"ticker": "NVDA",
"kind": "price_threshold",
"condition": "below",
"target_price": 190
}Chat delivery
Telegram, WhatsApp, and Discord
Hermes or OpenClaw owns the chat connection and schedule. Stocksbrew supplies research and Watchlist changes. Ask your agent to poll changes, message only when something important changed and retain the cursor after a successful send.
Check my Stocksbrew Watchlist every morning. Message me only when earnings, a directive, a risk, or a tracked price level changed. Keep the returned cursor for the next check.
MCP reference
Eleven explicit tools
| Tool | Scope | Job |
|---|---|---|
| search_stocks | stocks:read | Find a ticker or company. |
| get_stock_intelligence | stocks:read | Read baseline data, detailed research when available, freshness, and the next action. |
| compare_stocks | stocks:read | Compare two to five stocks. |
| get_market_brief | market:read | Read the current market, sectors, and movers. |
| get_my_radar | radar:read | Read the authorized member's Watchlist. |
| get_radar_changes | radar:read | Read unseen Watchlist changes from an optional cursor. |
| add_to_radar | radar:write | Track a stock and queue or refresh missing research. |
| remove_from_radar | radar:write | Stop tracking a stock. |
| get_my_alerts | alerts:read | Read active alert rules. |
| create_alert | alerts:write | Create a price threshold email alert. |
| delete_alert | alerts:write | Deactivate an alert rule. |
REST reference
The same workflow without MCP
Every path is under https://www.stocksbrew.online/api/v1.
| GET | /stocks/search?q=CCL | Search stocks |
| GET | /stocks/CCL | Read stock intelligence and research state |
| POST | /compare | Compare stocks |
| GET | /market | Read market context |
| GET | /radar?limit=50&offset=0 | Read Watchlist |
| POST | /radar | Add to Watchlist |
| DELETE | /radar | Remove from Watchlist |
| GET | /radar/changes?since=<cursor> | Read changes |
| GET | /alerts?ticker=NVDA | Read alert rules |
| POST | /alerts | Create a price alert |
| DELETE | /alerts | Deactivate an alert |
Coverage states
Missing research stays explicit
Agents should treat coverage.status as factual and coverage.next_action as the recovery instruction.
ready · queued · running · baseline_only · no_sources · failed · unavailable
Authentication and scopes
Grant the smallest useful permission set
- Research
- stocks:read · market:read
- Watchlist companion
- + radar:read
- Full assistant
- + radar:write · alerts:read · alerts:write
Mutating tools are marked as writes. Clients should confirm before calling them. Remove and delete operations are also marked destructive.
Errors and limits
Predictable failure behavior
- Allowance: 500 MCP or REST calls per month.
- Burst: 30 calls per minute. HTTP 429 includes Retry-After.
- Errors:
stock_not_found,invalid_alert_kind,profile_not_ready,forbidden_scope,subscription_required,rate_limited. - Excluded: trading, brokerage access, bulk extraction, resale, and redistribution.