robinhood-mcp CLAUDE.md

robinhood-mcp CLAUDE.md is an instructions file for coding agents from drasticstatic/robinhood-mcp. It costs 1,016 tokens per session, scanned A, original, MIT.

A project guide for robinhood-mcp, a read-only server that exposes Robinhood portfolio research through tools. It documents the Python layout, delayed login, error handling, and commands for linting, formatting, and tests.

In plain words
What is it for?
Use it when developing, reviewing, testing, or troubleshooting robinhood-mcp and its authentication, tool, and server code.
Why use it?
It makes the project’s safety boundary clear: the server can read portfolio data but cannot place, cancel, or modify trades. It also gives coding agents the conventions and checks needed for changes.

Instructions file

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add instructions/drasticstatic/robinhood-mcp/claude-md
Clone the repo
git clone --depth 1 https://github.com/drasticstatic/robinhood-mcp

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for robinhood-mcp CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/drasticstatic/robinhood-mcp/claude-md.svg)](https://agentmods.dev/instructions/drasticstatic/robinhood-mcp/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/drasticstatic/robinhood-mcp/claude-md"><img src="https://agentmods.dev/badge/instructions/drasticstatic/robinhood-mcp/claude-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 1,016 This file is loaded in full into every session.
When invoked 1,016 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.01016 $0.01016
Opus 5 $0.00508 $0.00508
Sonnet 5 $0.00203 $0.00203
Haiku 4.5 $0.00102 $0.00102

Measured 5d ago against content hash 7a7576c397cc, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

robinhood-mcp CLAUDE.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

CLAUDE.md · 116 lines

How it starts

The opening of the file, as written. The whole thing — 116 lines — stays where its author put it; the contents beside it link to each section on GitHub.

CLAUDE.md

This file provides guidance to Claude Code when working with this repository.

Project Overview

robinhood-mcp is a read-only MCP server that wraps the robin_stocks Python library to provide research tools for Robinhood portfolio data. This is strictly a research/educational tool - no trading functionality is exposed.

Architecture

src/robinhood_mcp/
├── __init__.py      # Package version
├── auth.py          # Authentication with TOTP support
├── tools.py         # 12 read-only tool implementations
└── server.py        # FastMCP server with tool registration

Key Design Decisions

  1. Read-Only Only: We explicitly do NOT expose any trading functions:

    • No order_buy_*, order_sell_*
    • No cancel_*_order
    • No account modification functions
  2. FastMCP: Uses FastMCP for simpler decorator-based tool registration

  3. Lazy Authentication: Login happens on first tool call, not server startup

  4. Error Handling: All robin_stocks calls are wrapped with _safe_call() for consistent error handling

Common Commands

# Install dependencies
pip install -e ".[dev]"

# Run linting
ruff check .
ruff format --check .

# Run tests
pytest -v

# Run with coverage
pytest --cov=src --cov-report=html

# Run the server
robinhood-mcp

Environment Variables

Variable Required Description
ROBINHOOD_USERNAME Yes Robinhood account email
ROBINHOOD_PASSWORD Yes Robinhood account password
ROBINHOOD_TOTP_SECRET No Base32 TOTP secret for 2FA

Testing

Tests use mocked robin_stocks responses. To run with real credentials (careful!):

# Set env vars first
pytest tests/ -v

Adding New Tools

  1. Add the implementation to tools.py with proper type hints
  2. Register in server.py with @mcp.tool() decorator
  3. Add tests in tests/test_tools.py
  4. Update server.json tool list
  5. Update README.md tool table

Publishing

This project uses GitHub Actions for CI/CD:

Read the full file on GitHub · 116 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago First seen · 116 lines · 1,016 tokens per session scan A 7a7576c397cc

Subscribe to this mod's changes

robinhood-mcp CLAUDE.md is an instructions file published in the GitHub repository drasticstatic/robinhood-mcp (0 stars, last pushed 3mo ago), licensed MIT. It adds 1,016 tokens to every session, about $0.0051 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.