Skip to main content

Robinhood

Give agents tools to read account and market data and place trades in Robinhood through Mastra Connect. Robinhood serves these tools from a hosted Model Context Protocol (MCP) server. Your application never stores Robinhood credentials.

Connect
Direct link to Connect

Before you start, complete the Connect setup to install @mastra/connect and configure your platform project.

warning

These tools can place real trades with real money. The example below requires approval for every Robinhood tool so a person confirms each call before it runs. To let reads run without approval, list only the trading tools by key in requireApproval. See MCP providers.

Connect an account
Direct link to Connect an account

Run this command from the directory that contains your .env file:

mastra connect add robinhood-mcp

The CLI guides you through Robinhood's authorization and waits until the connection is active.

Add tools to an agent
Direct link to Add tools to an agent

Pass tools() to the agent and select the robinhood-mcp provider:

src/mastra/agents/robinhood-mcp-agent.ts
import { Agent } from '@mastra/core/agent'
import { tools } from '@mastra/connect'

export const robinhoodMcpAgent = new Agent({
id: 'robinhood-mcp-agent',
name: 'Robinhood agent',
instructions: 'You help people read account and market data and place trades in Robinhood.',
model: 'openai/gpt-6-luna',
tools: tools({ providers: ['robinhood-mcp'], requireApproval: true }),
})

Mastra discovers Robinhood's tools from its MCP server when the agent runs. The available tools depend on the server and the connected account, not on your @mastra/connect version. Tool keys start with robinhood-mcp_.

To see which tools Robinhood provides, read the Agentic Trading documentation. To require approval before a call runs, see MCP providers in the tools() reference.

On this page