alpacahq/alpaca-mcp-server

Alpaca’s official MCP Server lets you trade stocks, ETFs, crypto, and options, run data analysis, and build strategies in plain English directly from your favorite LLM tools and IDEs

What it solves

It allows AI assistants (such as Claude, Cursor, and VS Code) to perform trading operations and retrieve market data using natural language. It bridges the gap between Large Language Models and the Alpaca Trading API, enabling users to manage portfolios and execute trades without writing code.

How it works

The project implements a Model Context Protocol (MCP) server that exposes Alpaca's Trading and Market Data APIs as a set of tools. When connected to an MCP-compatible client, the AI assistant can dynamically discover these tools and call them to interact with Alpaca's services. It is built using FastMCP and OpenAPI to ensure tool schemas align with the official Alpaca API specifications.

Who it’s for

Traders and developers who use AI-powered IDEs or assistants and want to manage their stocks, options, and crypto portfolios through a conversational interface.

Highlights

  • Multi-Asset Support: Handles stocks, ETFs, cryptocurrencies, and options.
  • Comprehensive Trading: Supports various order types including market, limit, stop, stop-limit, and trailing-stop, as well as multi-leg option strategies.
  • Real-time & Historical Data: Provides access to quotes, trades, price bars, and snapshots.
  • Portfolio Management: Tools for viewing balances, managing positions, and organizing assets via watchlists.
  • Flexible Configuration: Supports both paper trading and live trading, with the ability to filter specific toolsets (e.g., only enabling crypto-data).
  • Broad Client Compatibility: Integrates with Claude Desktop, Cursor, VS Code, PyCharm, and Claude Code.

Related

  • Project
  • Project
  • Project
  • Project
  • Project