StonkBroker Agent
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@StonkBroker AgentInspect StonkBroker #1 and show its stock-token portfolio."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
StonkBroker Agent
An MCP server that gives an AI agent controlled access to a StonkBroker NFT's ERC-6551 token-bound wallet (TBA). The agent can inspect the wallet, quote a stock-token swap, execute it on Robinhood Chain through Uniswap, and automatically publish the confirmed trade to X.
This is independent, experimental software and is not affiliated with or endorsed by Robinhood, StonkBrokers, Uniswap, or X. Stock tokens and automated trading involve financial risk; start in read-only mode.
The implementation targets the canonical mainnet contracts and APIs that are live today:
Robinhood Chain: chain ID
4663StonkBrokers NFT:
0x539CdD042c2f3d93EbC5BE7DfFf0c79F3B4fAbF0Verified TBA implementation:
0xE946075125843aAdb5e40e59f513d929AF507C4BCanonical stock-token registry:
https://api.robinhood.com/rhj/assetsUniswap Trading API: classic V2/V3/V4 routes on chain
4663X API:
POST /2/tweetswith OAuth user context
How it works
AI agent
│ MCP tools
▼
quote_stock_trade ──► Robinhood canonical asset registry
│ Uniswap Trading API (quote only)
▼
execute_stock_trade (explicit confirmation + live-trading gate)
│
├─ verify NFT owner ↔ TBA binding
├─ enforce exact token approval and MAX_TRADE_BPS
├─ owner EOA calls TBA.executeCall(token.approve)
├─ owner EOA calls TBA.executeCall(Uniswap swap)
├─ wait for a successful Robinhood Chain receipt
├─ measure actual input/output balance deltas
└─ persist trade in outbox ──► X API post + automatic retriesThe agent never trades from the owner's EOA. The TBA is the swapper and recipient; the EOA only authorizes executeCall because it currently owns the NFT and pays network gas.
Related MCP server: Scorched
Quick start
Any MCP client that can launch a stdio server can run the latest public source directly from GitHub—no clone or global installation required:
{
"mcpServers": {
"stonkbroker": {
"command": "npx",
"args": ["--yes", "github:slkzgm/stonkbroker-agent"],
"env": {
"BROKER_TOKEN_ID": "1"
}
}
}
}Restart the MCP client, then ask: Inspect StonkBroker #1 and show its stock-token portfolio.
The default configuration is read-only: it uses the public Robinhood Chain RPC, does not need a wallet key, and cannot trade. See Enable live trading only when you are ready to perform the bounty proof with a low-value wallet.
MCP tools
Tool | Effect |
| Read-only connectivity and configuration check; never reveals secrets. |
| Verifies the ERC-6551 binding and lists canonical Robinhood stock-token balances. |
| Searches Robinhood's live canonical asset registry. |
| Returns a 30-second exact-input Uniswap quote. No signing or transaction. |
| Requires |
| Retries queued X posts for confirmed swaps. |
Install from source
Requirements: Node.js 20+ and pnpm.
git clone https://github.com/slkzgm/stonkbroker-agent.git
cd stonkbroker-agent
corepack enable
pnpm install
cp .env.example .env
pnpm run build
pnpm run verify:chainRead-only inspection works with the default public RPC and no secrets:
pnpm run cli -- status --token-id 1
pnpm run cli -- tokens --query AAPLThe packaged CLI can also be used without cloning:
npx --yes --package=github:slkzgm/stonkbroker-agent stonkbroker-cli status --token-id 1
# Equivalent pnpm command
pnpm dlx --package=github:slkzgm/stonkbroker-agent stonkbroker-cli status --token-id 1Enable live trading
To request quotes, set UNISWAP_API_KEY. To execute a trade, also set the
following values in a local .env file or your MCP client's private environment:
BROKER_TOKEN_ID=<your broker id>
OWNER_PRIVATE_KEY=0x...
ALLOW_LIVE_TRADING=true
X_USER_ACCESS_TOKEN=<OAuth user token with tweet.read tweet.write users.read>
REQUIRE_X_POST=true
X_DRY_RUN=falseThe signer must be the current onchain owner of the selected StonkBroker. It also needs a small amount of ETH on Robinhood Chain for gas. Never put a key in source code or an MCP prompt.
Capture a bounty proof
The packaged proof runner connects to the real MCP server as a client and saves
a reviewable, mode-0600 JSON artifact. Its inspection mode is read-only:
pnpm run build
pnpm run proof -- --inspect-only --token-id 1With a controlled StonkBroker and the live variables above configured, run a tiny proof trade:
pnpm run proof -- --token-id 123 --in AAPL --out NVDA --amount 0.001 --slippage 0.5The runner records the MCP tool list, system health, verified TBA, quote,
confirmed transaction, and X result in .stonkagent/bounty-proof.json. It
prints the quote and requires the operator to type the literal EXECUTE before
anything is signed. Credentials are inherited by the child MCP process but are
never printed or written to the evidence file.
It can also run directly from the public release:
npx --yes --package=github:slkzgm/stonkbroker-agent#v0.2.0 \
stonkbroker-proof --inspect-only --token-id 1Connect an agent
For a local clone, build first and configure any MCP client to spawn the server over stdio:
{
"mcpServers": {
"stonkbroker": {
"command": "node",
"args": ["/absolute/path/to/stonkbroker/dist/src/server.js"],
"env": {
"BROKER_TOKEN_ID": "123",
"UNISWAP_API_KEY": "...",
"OWNER_PRIVATE_KEY": "0x...",
"ALLOW_LIVE_TRADING": "true",
"X_USER_ACCESS_TOKEN": "..."
}
}
}
}For Docker, build the image and keep stdin open for the MCP transport:
docker build -t stonkbroker-agent .
mkdir -p .stonkagent
docker run --rm -i --env-file .env \
-v "$PWD/.stonkagent:/data" stonkbroker-agentSuggested demo conversation:
Inspect StonkBroker #123 and show its stock-token portfolio.Quote swapping 0.001 AAPL to NVDA with 0.5% slippage.Review the route, amounts, expiry, and wallet returned by the agent.
Execute quote <id> with confirmation EXECUTE.Open the returned Blockscout transaction and X post.
Safety properties
Live trading is off by default.
A quote cannot spend more than
MAX_TRADE_BPSof the current input-token balance (5% by default).Only canonical contracts returned by Robinhood's live registry can be selected.
Quotes are forced to immediate Uniswap AMM routes; intent orders are not used.
Permit2 is disabled. Any mismatched existing allowance is first cleared, then set to the exact input amount for Uniswap's deterministic Swap Proxy.
The NFT owner, predicted TBA, deployed TBA, implementation, TBA owner, token contract, and token ID are checked before trading.
Quote input, output, amount, and recipient must exactly match the request.
Swap calldata must identify the TBA as
from, target chain4663, call only the official Swap Proxy and Universal Router2.1.1, bind the exact input token and amount, send zero native value, use a short deadline, and survive aneth_callsimulation throughexecuteCall.V2, V3, nested, and V4 router plans are decoded: Permit2-funded, allow-revert, exact-output, partial-output, and unrelated commands are rejected, and the complete output must be addressed explicitly to the TBA rather than the Swap Proxy.
A quote expires after 30 seconds and is removed after one execution attempt.
Actual post amounts come from confirmed onchain balance deltas, not the pre-trade quote.
Confirmed trades enter a mode-
0600durable outbox before the first X request. Failed posts are retried every minute and throughretry_x_posts.When
REQUIRE_X_POST=true, live trading refuses to start without a real X user token or while X dry-run mode is enabled.
Verification
pnpm run check
pnpm run test
pnpm run build
pnpm run verify:chainverify:chain performs live read-only checks against chain 4663, including the NFT/TBA linkage, canonical stock-token balances, Universal Router 2.1.1, and Swap Proxy deployments. The test suite covers canonical-asset filtering, quote binding, decoded V2/V3/V4 calldata safety, complete trade orchestration, X post formatting, and outbox persistence. stonkbroker-proof --inspect-only additionally exercises the packaged MCP client/server boundary without enabling transactions.
Robinhood Trading MCP and onchain execution
Robinhood's Agentic Trading documentation describes the Robinhood Trading MCP as connecting an AI agent to a dedicated Robinhood Agentic brokerage account, and explicitly says the agent can only place trades in that Agentic account. Separately, Robinhood's Chain documentation says Robinhood Chain operates independently of Robinhood brokerage and crypto accounts.
The bounty targets a StonkBroker's ERC-6551 wallet on Robinhood Chain, so this project provides a separate MCP execution path for that onchain account. The current NFT owner authorizes the TBA call, and this implementation chooses Uniswap as its swap venue. Uniswap is an implementation choice, not a claim that it is the only possible onchain venue.
An agent may connect to both MCP servers: Robinhood Trading MCP for the brokerage capabilities Robinhood documents, and this server for the StonkBroker TBA. Based on the currently published interfaces, Robinhood Trading MCP alone is not an execution interface for the TBA. See the architecture evidence and claim boundaries.
External prerequisites for a public bounty demo
The implementation and test harness contain no embedded credentials. The bounty must not be claimed as verified until a public live proof provides:
A StonkBroker controlled by the demo signer.
Input stock-token balance in its TBA.
Enough ETH in the owner EOA for Robinhood Chain gas.
A Uniswap Developer API key.
An X developer app and OAuth user access token with
tweet.read,tweet.write, andusers.read.
Stock tokens and automated trading involve financial risk. Use a tiny amount for the proof transaction.
Contributing and security
Contributions are welcome. Read CONTRIBUTING.md before opening a pull request. Report vulnerabilities privately as described in SECURITY.md; never publish keys, tokens, or an unpatched exploit.
Licensed under the MIT License.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/slkzgm/stonkbroker-agent'
If you have feedback or need assistance with the MCP directory API, please join our Discord server