robinhood
The Robinhood MCP Server provides a comprehensive interface to the Robinhood Crypto API. This server handles authentication, account management, market data retrieval, and trading operations through both REST API and WebSocket interfaces.
claude mcp add --transport stdio rohitsingh-iitd-robinhood-mcp-server python -m src.main \ --env HOST="0.0.0.0" \ --env PORT="8000" \ --env DEBUG="False" \ --env LOG_FILE="robinhood_mcp_server.log" \ --env LOG_LEVEL="INFO" \ --env WEBSOCKET_PORT="8001" \ --env RATE_LIMIT_PERIOD="60" \ --env ROBINHOOD_API_KEY="your_api_key_here" \ --env RATE_LIMIT_ENABLED="True" \ --env RATE_LIMIT_REQUESTS="100" \ --env ROBINHOOD_PRIVATE_KEY="your_base64_encoded_private_key_here"
How to use
The Robinhood MCP Server exposes a REST API for account management, market data, and trading operations, along with a WebSocket feed for real-time market data and order updates. After starting the server, REST endpoints are served at http://<host>:<port> (default http://localhost:8000) and WebSocket updates are delivered at ws://<host>:<websocket_port> (default ws://localhost:8001). Use the REST endpoints to authenticate, fetch account details, query market data, and place or cancel trades. Connect a WebSocket client to receive real-time market data updates (e.g., price quotes for symbols like BTC-USD) and order status updates as your orders are filled or canceled. The server includes rate limiting and structured logging to help monitor usage and diagnose issues.
How to install
Prerequisites:
- Python 3.8 or higher
- pip
- Robinhood API credentials
Install steps:
-
Clone the repository and navigate into it: git clone https://github.com/rohitsingh-iitd/robinhood-mcp-server.git cd robinhood-mcp-server
-
(Optional but recommended) Create and activate a virtual environment: python -m venv venv
macOS/Linux
source venv/bin/activate
Windows
.\venv\Scripts\activate
-
Install dependencies: pip install -r requirements.txt
-
Create a .env file in the project root with the required and optional settings described in the README (see Configuration section).
-
Run the server: python -m src.main
-
Verify REST and WebSocket endpoints:
- REST: http://localhost:8000
- WebSocket: ws://localhost:8001
Additional notes
Environment variables and configuration:
- ROBINHOOD_API_KEY and ROBINHOOD_PRIVATE_KEY must be provided for authentication.
- HOST, PORT, and WEBSOCKET_PORT control where the REST and WebSocket services listen.
- ENABLED rate limiting (RATE_LIMIT_ENABLED) and related values (RATE_LIMIT_REQUESTS, RATE_LIMIT_PERIOD) help prevent abuse.
Common issues:
- Invalid credentials: double-check ROBINHOOD_API_KEY and ROBINHOOD_PRIVATE_KEY.
- Ports already in use: ensure PORT (8000) and WEBSOCKET_PORT (8001) are free or change them in the .env.
- Missing dependencies: ensure you installed requirements.txt in a activated virtual environment.
Tips:
- Use a proper ASGI server like Gunicorn with Uvicorn for production as suggested in the README.
- Monitor logs via LOG_FILE to diagnose API or WebSocket issues.
Related MCP Servers
web-eval-agent
An MCP server that autonomously evaluates web applications.
mcp-neo4j
Neo4j Labs Model Context Protocol servers
mcp-aktools
📈 提供股票、加密货币的数据查询和分析功能MCP服务器
mcp_massive
An MCP server for Massive.com Financial Market Data
Gitingest
mcp server for gitingest
fhir
FHIR MCP Server – helping you expose any FHIR Server or API as a MCP Server.