npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

rh-for-agents

v0.4.2

Published

AI-native Robinhood trading interface — MCP server + TypeScript client

Downloads

286

Readme

rh-for-agents

CI npm version License: MIT

Robinhood for AI agents — an MCP server with 18 structured tools and a standalone TypeScript client, in a single package.

  • 18 MCP tools for any MCP-compatible AI agent
  • Standalone API client (~50 async methods) for programmatic use

Compatible with Claude Code, Codex, OpenClaw, and any MCP-compatible agent.

Prerequisites

  • Bun v1.0+
  • Google Chrome (used by playwright-core for browser-based login — no bundled browser)
  • A Robinhood account

Quick Start

Guided setup (recommended)

# Requires Bun runtime — see Prerequisites
npx rh-for-agents onboard

The interactive setup detects your agent, registers the MCP server, installs skills (where supported), and walks you through Robinhood login.

You can also specify your agent directly:

rh-for-agents onboard --agent claude-code
rh-for-agents onboard --agent codex
rh-for-agents onboard --agent openclaw

From source

git clone https://github.com/kevin1chun/rh-for-agents.git
cd rh-for-agents
bun install
bun bin/rh-for-agents.ts onboard

Manual setup

# Register MCP server (global — available in all projects)
claude mcp add -s user rh-for-agents -- bun run /path/to/bin/rh-for-agents.ts

# Install skills (per-project, optional)
cd your-project
rh-for-agents install --skills

Restart Claude Code to pick up the changes. Claude Code supports 5 trading skills in addition to the 18 MCP tools — see Skills.

codex mcp add rh-for-agents -- bun run /path/to/bin/rh-for-agents.ts

Restart Codex to pick up the changes. Codex uses all 18 MCP tools directly.

rh-for-agents onboard --agent openclaw

This installs 5 trading skills to ~/.openclaw/workspace/skills/. Restart the OpenClaw gateway to pick up the changes.

Add to your MCP client's config (e.g. ~/Library/Application Support/Claude/claude_desktop_config.json for Claude Desktop):

{
  "mcpServers": {
    "rh-for-agents": {
      "command": "bun",
      "args": ["run", "/absolute/path/to/rh-for-agents/bin/rh-for-agents.ts"]
    }
  }
}

Authenticate

Start your agent and say "setup robinhood" (or call robinhood_browser_login directly). Chrome will open to the real Robinhood login page — log in with your credentials and MFA. The session is cached and auto-restores for ~24 hours.

Example

"Buy 1 50-delta SPX call expiring tomorrow"

SPX options chain with greeks and order summary

MCP Tools (18)

All 18 tools work with every MCP-compatible agent.

| Tool | Description | |------|-------------| | robinhood_browser_login | Authenticate via Chrome browser | | robinhood_check_session | Check if cached session is valid | | robinhood_get_portfolio | Portfolio: positions, P&L, equity, cash | | robinhood_get_accounts | List all brokerage accounts | | robinhood_get_account | Account details and profile | | robinhood_get_stock_quote | Stock quotes and fundamentals | | robinhood_get_historicals | OHLCV price history | | robinhood_get_news | News, analyst ratings, earnings | | robinhood_get_movers | Market movers and popular stocks | | robinhood_get_options | Options chain with greeks | | robinhood_get_crypto | Crypto quotes, history, positions | | robinhood_place_stock_order | Place stock orders (market/limit/stop/trailing) | | robinhood_place_option_order | Place option orders | | robinhood_place_crypto_order | Place crypto orders | | robinhood_get_orders | View order history | | robinhood_cancel_order | Cancel an order by ID | | robinhood_get_order_status | Get status of a specific order by ID | | robinhood_search | Search stocks or browse categories |

Skills (5)

Skills provide guided workflows on top of MCP tools. Supported by Claude Code and OpenClaw. Agents without skill support (Codex, etc.) use the 18 MCP tools directly, which provide the same functionality.

| Skill | Triggers | |-------|----------| | robinhood-setup | "setup robinhood", "connect to robinhood" | | robinhood-portfolio | "show my portfolio", "my holdings" | | robinhood-research | "research AAPL", "analyze TSLA" | | robinhood-trade | "buy 10 AAPL", "sell my position" | | robinhood-options | "show AAPL options", "find calls" |

Each skill includes a client-api.md reference for advanced users who want their agent to generate TypeScript scripts using rh-for-agents.

Agent Compatibility

| Feature | Claude Code | Codex | OpenClaw | Other MCP | |---------|:-----------:|:-----:|:--------:|:---------:| | 18 MCP tools | Yes | Yes | Yes | Yes | | 5 trading skills | Yes | — | Yes | — | | onboard setup | Yes | Yes | Yes | — | | Browser auth | Yes | Yes | Yes | Yes |

Client Library (standalone)

import { RobinhoodClient } from "rh-for-agents";

const client = new RobinhoodClient();
await client.restoreSession();

const quotes = await client.getQuotes("AAPL");
const portfolio = await client.buildHoldings();

Safety

  • Fund transfers and bank operations are blocked — never exposed
  • Bulk cancel operations are blocked
  • All order placements require explicit parameters (no dangerous defaults)
  • Skills always confirm with the user before placing orders
  • See ACCESS_CONTROLS.md for the full risk matrix

Authentication

Sessions are cached to ~/.rh-for-agents/session.enc (AES-256-GCM encrypted, key in OS keychain). Authentication uses browser-based login — robinhood_browser_login opens Chrome to the real Robinhood login page where you handle MFA natively. After initial login, subsequent authentication is automatic until the token expires (~24 hours).

MCP: Call robinhood_browser_login to open Chrome and log in (works with all agents). After that, all tools auto-restore the cached session.

Skills: Run the robinhood-setup skill for guided browser login (Claude Code and OpenClaw).

Development

bun install                    # Install deps
bun run typecheck              # tsc --noEmit
bun run check                  # Biome lint + format
npx vitest run                 # Run all tests

Architecture

See docs/ARCHITECTURE.md for full system design, authentication flow, HTTP pipeline, and exception hierarchy.

Contributing

See docs/CONTRIBUTING.md for how to add new tools, create skills, and run tests.

Disclaimer

This project is not affiliated with, endorsed by, or sponsored by Robinhood Markets, Inc. "Robinhood" is a trademark of Robinhood Markets, Inc. This software interacts with Robinhood's services through publicly accessible interfaces but is an independent, third-party tool.

USE AT YOUR OWN RISK. This software enables AI agents to read data from and place orders on your Robinhood brokerage account. Automated and AI-assisted trading carries inherent risks, including but not limited to:

  • Unintended order execution due to AI misinterpretation
  • Financial losses from erroneous trades
  • Stale or inaccurate market data
  • Software bugs or unexpected behavior

You are solely responsible for all activity on your brokerage account, whether initiated manually or through this software. The authors and contributors assume no liability for any financial losses, damages, or other consequences arising from the use of this software. Review all AI-proposed actions before confirming, and never grant unsupervised trading authority to any automated system.

This software is provided "as is" without warranty of any kind. See LICENSE for full terms.

License

MIT — see LICENSE.