Pyhood
БесплатноНе проверенConnect your Robinhood account to Claude Code (or any MCP client) for conversational portfolio management and automated trading.
Описание
Connect your Robinhood account to Claude Code (or any MCP client) for conversational portfolio management and automated trading.
README
Model Context Protocol (MCP) server for Robinhood trading via pyhood
Connect your Robinhood account to Claude Code (or any MCP client) for conversational portfolio management and automated trading.
Features
- 📊 Portfolio monitoring (positions, gains/losses, buying power)
- 📈 Real-time quotes and market data
- 🔄 Stock order placement (market, limit, stop orders)
- 📜 Order history and management
- 📉 Historical price data for technical analysis
- 💰 Options chain data and expirations
- 🏢 Fundamental data (market cap, PE ratio, etc.)
Installation
Prerequisites
- Python 3.10+
- A Robinhood account
- Claude Code (or any MCP-compatible client)
Install dependencies
pip install pyhood mcp
Download the server
# Clone this repo
git clone https://github.com/YOUR_USERNAME/pyhood-mcp.git
cd pyhood-mcp
# Or just download pyhood_mcp_server.py
curl -O https://raw.githubusercontent.com/YOUR_USERNAME/pyhood-mcp/main/pyhood_mcp_server.py
chmod +x pyhood_mcp_server.py
Setup
1. Authenticate with Robinhood
First, create a session (handles 2FA):
python3 -c "import pyhood; pyhood.login(username='YOUR_EMAIL', password='YOUR_PASSWORD')"
This creates a cached session in ~/.pyhood/session.json.
2. Configure Claude Code
Add to your ~/.claude/settings.json:
{
"mcpServers": {
"pyhood": {
"command": "python3",
"args": ["/path/to/pyhood_mcp_server.py"],
"env": {
"ROBINHOOD_USERNAME": "[email protected]",
"ROBINHOOD_PASSWORD": "your_password"
}
}
}
}
Or set environment variables in your shell:
export ROBINHOOD_USERNAME="[email protected]"
export ROBINHOOD_PASSWORD="your_password"
3. Restart Claude Code
The pyhood MCP server will now be available in Claude Code.
Usage
In Claude Code
What's my portfolio performance today?
Get a quote for NVDA
Place a market order to buy 10 shares of AAPL
Show me my recent order history
Get historical data for TSLA over the past month
Available Tools
| Tool | Description |
|---|---|
get_portfolio |
Portfolio summary with all positions |
get_positions |
List all current positions |
get_quote |
Real-time quote for a symbol |
get_quotes |
Quotes for multiple symbols |
get_buying_power |
Available cash balance |
place_order |
Place buy/sell orders |
get_stock_orders |
Recent order history |
cancel_order |
Cancel a pending order |
cancel_all_stock_orders |
Cancel all pending orders |
get_order |
Check status of a specific order |
get_stock_historicals |
Historical price data |
get_fundamentals |
Company fundamentals |
get_earnings |
Earnings dates and estimates |
get_options_chain |
Options data for a symbol |
get_options_expirations |
Available option expirations |
Security
⚠️ Important Security Notes:
- Never commit your Robinhood credentials to git
- The session cache (
~/.pyhood/session.json) contains sensitive tokens - Use environment variables for credentials when possible
- This server runs locally and communicates only with Robinhood's API
Pattern Day Trading (PDT)
If your account is <$25k, you're limited to 3 day trades per rolling 5-day period. Be careful with automated trading strategies. See FINRA PDT rules.
Dependencies
Disclaimer
This software is for educational purposes only. Trading stocks involves risk.
- You are responsible for all trades executed through this tool
- No warranty or guarantee of fitness for any purpose
- The authors are not liable for any financial losses
- Always verify orders before execution
- Use at your own risk
Robinhood® is a trademark of Robinhood Markets, Inc. This project is not affiliated with or endorsed by Robinhood.
Contributing
Contributions welcome! Please:
- Fork the repo
- Create a feature branch
- Submit a pull request
License
MIT License - see LICENSE file for details
Related Projects
- autonomous-trading-agent - Autonomous trading agent using this MCP server
- pyhood - The underlying Robinhood API client
Support
- Issues: GitHub Issues
- Discussions: GitHub Discussions
Установка Pyhood
У этого сервера нет опубликованного пакета — он собирается из исходников. Открой репозиторий и следуй инструкции в README.
▸ github.com/bakernyc/pyhood-mcpFAQ
Pyhood MCP бесплатный?
Да, Pyhood MCP бесплатный — установка в пару кликов через Unyly без оплаты.
Нужен ли API-ключ для Pyhood?
Нет, Pyhood работает без API-ключей и переменных окружения.
Pyhood — hosted или self-hosted?
Self-hosted: сервер запускается локально на твоей машине командой из раздела установки.
Как установить Pyhood в Claude Desktop, Claude Code или Cursor?
Открой Pyhood на unyly.org, выбери вкладку своего клиента (Claude Desktop, Claude Code, Cursor) и нажми Install — конфиг сгенерируется автоматически, без правки JSON.
Похожие MCP
GitHub
PRs, issues, code search, CI status
автор: GitHubFilesystem
Secure file operations with configurable access controls.
Memory
Knowledge graph-based persistent memory system.
Template MCP Server
A CLI tool to create a new Model Context Protocol server project with TypeScript support, dual transport options, and an extensible structure
автор: mcpdotdirectCompare Pyhood with
Не уверен что выбрать?
Найди свой стек за 60 секунд
Автор?
Embed-бейдж для README
Похожее
Все в категории development
