Basic wrapper API around Robinhood's Agentic MCP API that turns it into an actual API for use with programming languages for custom LLM harnesses
This repository has been archived on 2026-10-05. You can view files and clone it, but you cannot make any changes to its state, such as pushing and creating new issues, pull requests or comments.
Find a file
Blake 96bef3ddd5
All checks were successful
CI / Test and build (pull_request) Successful in 16s
CI / Test and build (push) Successful in 16s
auth: Ignore tokens.json so Login output is not git-added
Login writes access/refresh tokens (and often client_secret) to
tokens.json at mode 0600. Without a gitignore entry, git add . after a
local login can stage live Agentic credentials.

Closes: #20
2026-09-14 13:24:03 +00:00
.gitea/workflows ci: Add Gitea Actions workflow 2026-09-01 19:45:01 +00:00
accounts fix: parse MCP result payloads and drop place idempotency_key 2026-09-01 14:18:39 -05:00
auth docs: Remove sibling product and lab path leaks 2026-09-01 19:43:35 +00:00
client client: Honor IsError and extract JSON from tool text 2026-09-05 04:53:47 +00:00
crypto fix: parse MCP result payloads and drop place idempotency_key 2026-09-01 14:18:39 -05:00
docs/superpowers docs: Soften unfinished OAuth wording in the plan 2026-09-01 19:45:12 +00:00
equity equity: Accept open_price aliases in historicals 2026-09-09 10:07:23 +00:00
internal fix: parse MCP result payloads and drop place idempotency_key 2026-09-01 14:18:39 -05:00
market fix: parse MCP result payloads and drop place idempotency_key 2026-09-01 14:18:39 -05:00
options fix: parse MCP result payloads and drop place idempotency_key 2026-09-01 14:18:39 -05:00
scanner fix: parse MCP result payloads and drop place idempotency_key 2026-09-01 14:18:39 -05:00
testdata feat: add rh Connect facade and tool coverage 2026-09-01 13:40:40 -05:00
watchlists docs: Remove sibling product and lab path leaks 2026-09-01 19:43:35 +00:00
.gitignore auth: Ignore tokens.json so Login output is not git-added 2026-09-14 13:24:03 +00:00
connect.go fix: fail closed on cancelled Connect and timeout RPC fallback 2026-09-01 14:00:28 -05:00
CONTRIBUTING.md docs: Add CONTRIBUTING.md 2026-09-01 19:33:05 +00:00
go.mod feat: add accounts MCP methods 2026-09-01 12:20:14 -05:00
go.sum feat: add OAuth login and MCP session connect 2026-09-01 12:06:01 -05:00
Makefile feat: add module and decimal wire helpers 2026-09-01 11:12:10 -05:00
README.md auth: Ignore tokens.json so Login output is not git-added 2026-09-14 13:24:03 +00:00
rh.go feat: add rh Connect facade and tool coverage 2026-09-01 13:40:40 -05:00
rh_test.go docs: Remove sibling product and lab path leaks 2026-09-01 19:43:35 +00:00
tools.go feat: add rh Connect facade and tool coverage 2026-09-01 13:40:40 -05:00

robinhood-agentic-mcp

Go library for the Robinhood Agentic MCP.

Module: s1d3sw1ped/robinhood-agentic-mcp
Go: 1.25
Default MCP URL: https://agent.robinhood.com/mcp/trading (rh.DefaultURL)

This moves real money in a Robinhood Agentic account. Not investment advice. The caller is responsible for every fill.

There is no CLI. Login is a library function.

Identity

Set Config.Name and Config.Version before Login or Connect. They are the MCP Implementation name/version and the OAuth client name. After a session exists they cannot be changed.

Empty Name / Version / URL become robinhood-agentic-mcp / 0.1.0 / rh.DefaultURL. Apps that need a distinct Robinhood OAuth client pass their own Name.

cfg := rh.Config{
    TokenFile: "tokens.json",
    Name:      "my-bot", // MCP identity and OAuth ClientName
    Version:   "0.1.0",
}

Daemon/headless callers must not call Login (no browser). They call Connect with an existing token file (mode 0600). Keep tokens.json out of git (listed in .gitignore).

Example

package main

import (
	"context"
	"log"

	decimal "github.com/alpacahq/alpacadecimal"
	rh "s1d3sw1ped/robinhood-agentic-mcp"
	"s1d3sw1ped/robinhood-agentic-mcp/equity"
)

func main() {
	ctx := context.Background()
	cfg := rh.Config{
		TokenFile: "tokens.json",
		Name:      "my-bot",
	}

	if _, err := rh.Login(ctx, cfg); err != nil {
		log.Fatal(err)
	}

	api, err := rh.Connect(ctx, cfg)
	if err != nil {
		log.Fatal(err)
	}

	qty := decimal.RequireFromString("1")
	limit := decimal.RequireFromString("100")
	_, err = api.Equity.PlaceOrder(ctx, equity.PlaceOrderRequest{
		Symbol:      "MU",
		Side:        rh.Buy,
		Type:        rh.Limit,
		Qty:         &qty,
		LimitPrice:  &limit,
		TimeInForce: rh.GFD,
	})
	if err != nil {
		log.Fatal(err)
	}
}

Login writes tokens when ROBINHOOD_ACCESS_TOKEN is set, otherwise it runs a browser OAuth dance. Connect opens a streamable MCP session as cfg.Name/cfg.Version, or falls back to JSON-RPC tools/call with a bearer token.

Subpackages (accounts, equity, options, crypto, watchlists, market, scanner) also export New(c client.Caller) *Client for use without the facade. api.Client.Call is the escape hatch for any MCP tool by name.