Get the FREE Ultimate OpenClaw Setup Guide →

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.

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
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:

  1. Clone the repository and navigate into it: git clone https://github.com/rohitsingh-iitd/robinhood-mcp-server.git cd robinhood-mcp-server

  2. (Optional but recommended) Create and activate a virtual environment: python -m venv venv

    macOS/Linux

    source venv/bin/activate

    Windows

    .\venv\Scripts\activate

  3. Install dependencies: pip install -r requirements.txt

  4. Create a .env file in the project root with the required and optional settings described in the README (see Configuration section).

  5. Run the server: python -m src.main

  6. Verify REST and WebSocket endpoints:

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

Sponsor this space

Reach thousands of developers