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. Require approval for trading tools with requireApproval so a person confirms each order before it runs. 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'] }),
})

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