A monorepo providing CLI and MCP access to the robin-stocks (unofficial) Robinhood API.
| Package | Description |
|---|---|
robinhood-core |
Shared library: client, models, services |
robinhood-cli |
CLI tool (rh command) for terminal access |
robinhood-mcp |
MCP server for AI assistants (Claude, OpenCode, etc.) |
# Clone and install globally
git clone https://github.com/ach968/robinhood-tools.git
cd robinhood-tools
uv tool install ./robinhood-cli
# Login (prompts for username/password)
rh login
# Use
rh price AAPL MSFT
rh quote TSLA
rh portfolio
rh positions
rh options-chain SPY --expiry 2026-06-20 --type call
rh history AAPL --interval day --span month
rh orders --type stock --since 2026-01-01
rh watchlists
rh news NVDA
rh fundamentals AMD
rh status
rh logoutAll commands support --json for raw JSON output.
Add to your OpenCode config (~/.config/opencode/opencode.json):
{
"mcp": {
"robinhood": {
"type": "local",
"command": [
"uvx",
"--from", "git+https://github.com/ach968/robinhood-tools.git",
"robinhood-mcp",
"--username", "your_username",
"--password", "your_password"
],
"enabled": true
}
}
}See robinhood-mcp/README.md for full MCP documentation.
# Clone
git clone https://github.com/ach968/robinhood-tools.git
cd robinhood-tools
# Install all packages
cd robinhood-core && uv pip install -e ".[dev]"
cd ../robinhood-cli && uv pip install -e ".[dev]"
cd ../robinhood-mcp && uv pip install -e ".[dev]"
# Run tests
cd robinhood-core && uv run pytest tests/ -v
cd ../robinhood-cli && uv run pytest tests/ -v
cd ../robinhood-mcp && uv run pytest tests/ -v| Command | Description |
|---|---|
rh login |
Authenticate with Robinhood |
rh logout |
Clear saved session |
rh status |
Show authentication status |
rh price SYMBOLS... |
Current prices |
rh quote SYMBOLS... |
Detailed quotes with change |
rh history SYMBOL |
Historical OHLCV data |
rh portfolio |
Portfolio summary |
rh positions |
Open stock positions |
rh options-chain SYMBOL |
Options chain |
rh options-positions |
Open options positions |
rh watchlists |
List watchlists |
rh news SYMBOL |
Latest news |
rh fundamentals SYMBOL |
Company fundamentals |
rh orders |
Order history |
All commands accept --json for machine-readable output.
robinhood-core/ # Shared library
├── robinhood_core/
│ ├── client.py # RobinhoodClient (robin-stocks wrapper)
│ ├── errors.py # Exception types
│ ├── models/ # Pydantic models
│ └── services/ # Business logic services
robinhood-cli/ # CLI tool
├── robinhood_cli/
│ ├── main.py # Typer app entry point
│ ├── auth.py # Session management
│ ├── output.py # Rich formatting helpers
│ └── commands/ # Command modules
robinhood-mcp/ # MCP server
├── robin_stocks_mcp/
│ └── server.py # MCP tool implementations
- All tools are read-only — cannot place orders or modify accounts
- CLI stores session tokens in
~/.config/robinhood/(pickle file + config) - MCP accepts credentials via CLI args or environment variables
- Passwords and tokens are never logged
A skill is included at skills/rh-cli.md.
To use it, copy to your agent skills directory:
mkdir -p ~/.claude/skills/rh-cli
cp skills/rh-cli.md ~/.claude/skills/rh-cli/SKILL.mdAfter installing, your agent will automatically suggest using rh commands when you ask about Robinhood data.
This project uses robin-stocks, an unofficial Python library. It is not affiliated with or endorsed by Robinhood Markets, Inc. Use at your own risk.
