# ryanfrigo/robinhood-mcp-server architecture

> Architecture diagram of the GitHub repository ryanfrigo/robinhood-mcp-server, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-20). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/ryanfrigo/robinhood-mcp-server
- Repository: https://github.com/ryanfrigo/robinhood-mcp-server

## Overview

Robinhood MCP Server exposes Robinhood account, research, market-data, order, and trading operations as MCP tools for compatible AI clients. The principal workflow is an MCP client request routed to a tool in server.py, which uses robin_stocks to obtain data or perform an operation against Robinhood and returns a result. The README documents all major tool categories; sampled source confirms some portfolio, quote, order, crypto-trading, and watchlist calls. Other category links to the brokerage library are documented but their implementations were not sampled.

Main entry points: [`server.py`](https://github.com/ryanfrigo/robinhood-mcp-server/blob/main/server.py) (MCP Tool Server)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["MCP Runtime"]
  node_server["MCP Tool Server<br/>[server.py]"]
end

subgraph group_insight["Account And Research"]
  node_portfolio["Portfolio Tools<br/>[server.py]"]
  node_market["Market Data<br/>[server.py]"]
  node_research["Research Tools<br/>[server.py]"]
  node_watchlists["Watchlists<br/>[server.py]"]
end

subgraph group_execution["Orders And Trading"]
  node_orders["Order Queries<br/>[server.py]"]
  node_stock["Stock Trading<br/>[server.py]"]
  node_crypto["Crypto Trading<br/>[server.py]"]
  node_options["Options Tools<br/>[server.py]"]
end

node_client(("MCP Client"))
node_robin_stocks["robin_stocks"]
node_robinhood{{"Robinhood API"}}

node_client -->|"sends MCP requests"| node_server
node_server -->|"dispatches tools"| node_portfolio
node_server -->|"dispatches tools"| node_market
node_server -->|"dispatches tools"| node_research
node_server -->|"dispatches tools"| node_watchlists
node_server -->|"dispatches tools"| node_orders
node_server -->|"dispatches tools"| node_stock
node_server -->|"dispatches tools"| node_crypto
node_server -->|"dispatches tools"| node_options
node_portfolio -->|"fetches account data"| node_robin_stocks
node_market -->|"fetches quotes"| node_robin_stocks
node_orders -->|"queries orders"| node_robin_stocks
node_crypto -->|"places limit orders"| node_robin_stocks
node_watchlists -->|"reads watchlists"| node_robin_stocks
node_research -.->|"uses library"| node_robin_stocks
node_stock -.->|"uses library"| node_robin_stocks
node_options -.->|"uses library"| node_robin_stocks
node_robin_stocks -->|"accesses brokerage"| node_robinhood

click node_server "https://github.com/ryanfrigo/robinhood-mcp-server/blob/main/server.py"
click node_portfolio "https://github.com/ryanfrigo/robinhood-mcp-server/blob/main/server.py"
click node_market "https://github.com/ryanfrigo/robinhood-mcp-server/blob/main/server.py"
click node_research "https://github.com/ryanfrigo/robinhood-mcp-server/blob/main/server.py"
click node_watchlists "https://github.com/ryanfrigo/robinhood-mcp-server/blob/main/server.py"
click node_orders "https://github.com/ryanfrigo/robinhood-mcp-server/blob/main/server.py"
click node_stock "https://github.com/ryanfrigo/robinhood-mcp-server/blob/main/server.py"
click node_crypto "https://github.com/ryanfrigo/robinhood-mcp-server/blob/main/server.py"
click node_options "https://github.com/ryanfrigo/robinhood-mcp-server/blob/main/server.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_server,node_client toneBlue
class node_portfolio,node_market,node_research,node_watchlists toneAmber
class node_orders,node_stock,node_crypto,node_options,node_robinhood toneMint
class node_robin_stocks toneIndigo
```

## Components

### MCP Runtime

- [MCP Tool Server](https://github.com/ryanfrigo/robinhood-mcp-server/blob/main/server.py): `server.py`

### Account And Research

- [Portfolio Tools](https://github.com/ryanfrigo/robinhood-mcp-server/blob/main/server.py): `server.py`
- [Market Data](https://github.com/ryanfrigo/robinhood-mcp-server/blob/main/server.py): `server.py`
- [Research Tools](https://github.com/ryanfrigo/robinhood-mcp-server/blob/main/server.py): `server.py`
- [Watchlists](https://github.com/ryanfrigo/robinhood-mcp-server/blob/main/server.py): `server.py`

### Orders And Trading

- [Order Queries](https://github.com/ryanfrigo/robinhood-mcp-server/blob/main/server.py): `server.py`
- [Stock Trading](https://github.com/ryanfrigo/robinhood-mcp-server/blob/main/server.py): `server.py`
- [Crypto Trading](https://github.com/ryanfrigo/robinhood-mcp-server/blob/main/server.py): `server.py`
- [Options Tools](https://github.com/ryanfrigo/robinhood-mcp-server/blob/main/server.py): `server.py`

### Other components

- **MCP Client**
- **robin_stocks**
- **Robinhood API**

## Connections

- MCP Client → MCP Tool Server: sends MCP requests (evidence: `README.md`)
- MCP Tool Server → Portfolio Tools: dispatches tools (evidence: `README.md`)
- MCP Tool Server → Market Data: dispatches tools (evidence: `README.md`)
- MCP Tool Server → Research Tools: dispatches tools (evidence: `README.md`)
- MCP Tool Server → Watchlists: dispatches tools (evidence: `README.md`)
- MCP Tool Server → Order Queries: dispatches tools (evidence: `README.md`)
- MCP Tool Server → Stock Trading: dispatches tools (evidence: `README.md`)
- MCP Tool Server → Crypto Trading: dispatches tools (evidence: `README.md`)
- MCP Tool Server → Options Tools: dispatches tools (evidence: `README.md`)
- Portfolio Tools → robin_stocks: fetches account data (evidence: `server.py`)
- Market Data → robin_stocks: fetches quotes (evidence: `server.py`)
- Order Queries → robin_stocks: queries orders (evidence: `server.py`)
- Crypto Trading → robin_stocks: places limit orders (evidence: `server.py`)
- Watchlists → robin_stocks: reads watchlists (evidence: `server.py`)
- Research Tools → robin_stocks: uses library (evidence: `README.md`)
- Stock Trading → robin_stocks: uses library (evidence: `README.md`)
- Options Tools → robin_stocks: uses library (evidence: `README.md`)
- robin_stocks → Robinhood API: accesses brokerage (evidence: `README.md`)
