Agent API
Plug stocksbrew into 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.
- Protocol
- MCP + REST
- Auth
- OAuth or token
- Permissions
- Scoped reads + writes
- Plan
- Included with Pro
Stocksbrew exposes research workflow actions. It cannot place trades or move money.
Connect with one prompt
Paste this into your agent. It includes OAuth, safe confirmation rules, and a verification task.
Copy the setup prompt
Use this prompt in Codex or Claude Code for direct MCP setup. ChatGPT and Claude mobile apps cannot add Stocksbrew from a pasted prompt; connect it from their web app settings first. 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. Stocksbrew gives you five kinds of read access: 1. My Watchlist and holdings: use get_my_radar and get_radar_changes. 2. Explore: use get_explore for the Explore page's trending, heat, 52-week, Reddit and Trump sections. 3. Market history: use get_market_history for the last seven published US Market Daily editions (or a shorter window); if fewer are available, say "not enough current evidence". 4. Full stock detail: use get_stock_detail for the stock page's facts, financial history, valuation, balance sheet, dividends, business mix, institutions, price history, technicals, AI business questions, earnings, news and Reddit context. 5. Screens: use get_screens for Stocksbrew's curated thematic screen catalog and matches. When I ask about a stock, call get_stock_intelligence for a concise current read. Call get_stock_detail when I ask for the full stock page or deeper evidence. If a field is missing, say "not enough current evidence"; never fill gaps with an invented thesis. If detailed research 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.
Uses OAuth. Your access token stays out of the conversation.
- 01Connect.Add
https://www.stocksbrew.online/api/mcpas a remote MCP server. - 02Approve.Sign in and choose only the permissions the agent needs.
- 03Verify.Ask: Show my Watchlist and explain anything that changed today.
Client setup
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"
CLI
Use the official npm package when your agent or shell script needs a small REST client.
npm install -g stocksbrew-cli stocksbrew market stocksbrew stock NVDA stocksbrew search "semiconductor"
Set STOCKSBREW_TOKEN for authenticated requests. Read the OpenAPI contract for the complete API surface.
Common recipes
The jobs agents can do.
Answer about any covered stock.
Call get_stock_intelligence. Baseline data remains available when the detailed brief is missing.
Read full stock evidence.
Call get_stock_detail for the stock page's financial history, business questions, price history, technicals, earnings, news, Reddit context and materialized source documents.
Understand the broader market.
Call get_explore, get_market_history and get_screens. Market history returns seven published US editions by default and marks shorter history as not enough current evidence.
Queue missing research.
Read coverage.next_action, ask the user, then call add_to_radar. Recheck the same stock later.
Report only new Watchlist changes.
Call get_radar_changes with the last cursor. Save the returned cursor only after delivery succeeds.
Create or review price alerts.
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
Fifteen 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. |
| get_stock_detail | stocks:read | Read the full materialized stock page, including facts, history, business questions, earnings, news and Reddit context. |
| compare_stocks | stocks:read | Compare two to five stocks. |
| get_market_brief | market:read | Read the current market, sectors, and movers. |
| get_market_history | market:read | Read the last seven published Market Daily editions. |
| get_explore | market:read | Read the Explore page sections and current discovery data. |
| get_screens | market:read | Read curated screens and every current match. |
| 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
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 |
| GET | /stocks/CCL/detail | Read full stock-page detail |
| POST | /compare | Compare stocks |
| GET | /market | Read market context |
| GET | /market/history?days=7 | Read Market Daily history |
| GET | /explore | Read Explore sections |
| GET | /screens | Read curated screens |
| 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.
Authentication and scopes
Grant the smallest useful permission set. Mutating tools are marked as writes; clients should confirm before calling them. Remove and delete operations are also marked destructive.
Research
stocks:read · market:read
Watchlist companion
+ radar:read
Full assistant
+ radar:write · alerts:read · alerts:write
Errors and limits
Predictable failure behavior.
Allowance
200 MCP or REST calls per day. The counter resets at UTC midnight.
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.