pyhood-mcp
Connect your Robinhood account for conversational portfolio management and automated trading.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
pyhood-mcp
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.)
Related MCP server: TastyTrade MCP Server
Installation
Prerequisites
Python 3.10+
A Robinhood account
Claude Code (or any MCP-compatible client)
Install dependencies
pip install pyhood mcpDownload 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.pySetup
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": "your_email@example.com",
"ROBINHOOD_PASSWORD": "your_password"
}
}
}
}Or set environment variables in your shell:
export ROBINHOOD_USERNAME="your_email@example.com"
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 monthAvailable Tools
Tool | Description |
| Portfolio summary with all positions |
| List all current positions |
| Real-time quote for a symbol |
| Quotes for multiple symbols |
| Available cash balance |
| Place buy/sell orders |
| Recent order history |
| Cancel a pending order |
| Cancel all pending orders |
| Check status of a specific order |
| Historical price data |
| Company fundamentals |
| Earnings dates and estimates |
| Options data for a symbol |
| Available option expirations |
Security
โ ๏ธ Important Security Notes:
Never commit your Robinhood credentials to git
The session cache (
~/.pyhood/session.json) contains sensitive tokensUse 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
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogโฆ
Related MCP Connectors
Trade Robinhood through natural language in Claude Code.
Connect your portfolio to Claude, ChatGPT, or Codex to analyze it and make smarter investments.
Connect Claude, ChatGPT, Codex, Claude Code or another MCP client to your real multi-broker investment portfolio. Fortunest tracks stocks, ETFs and crypto across brokers and exchanges; its MCP server lets your agent read holdings, returns, allocation, risk, trades and tax lots, calculated by Fortunest rather than guessed by the model. Reads run on their own; every change waits for your approval in the Fortunest app, and no tool places an order or moves money. Sign-in is OAuth 2.1 and needs Fortunest Pro (14-day trial, no card). A free demo that needs no account is listed as Fortunest demo.
Connect brokerage accounts to AI assistants: holdings, orders, asset lookup, and approved trading.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceTrade Robinhood through Claude Code. Check portfolio, get quotes, place orders โ one-line setup, no coding required. OAuth 2.1 with KMS-encrypted token storage.41-
- AlicenseNot gradedqualityDmaintenanceConnects your TastyTrade trading account to AI assistants like Claude Desktop and ChatGPT for conversational trading and portfolio management.5MIT
- FlicenseNot gradedqualityDmaintenanceEnables portfolio management, trading, and automated bot operations for Robinhood accounts through MCP tools like get_portfolio, buy_stock, sell_stock, and bot management.1-
- FlicenseNot gradedqualityDmaintenanceEnables AI models to manage Robinhood portfolios, execute trades, and run automated trading bots with stop-loss/take-profit monitoring.1-