Skip to main content
Watch: I Built an AI App Without Leaving Databricks

Payments and finance - official Alpaca server

Alpaca MCP server

Local MCP server for Alpaca's Trading and Market Data APIs that lets an agent check account balances and positions, place and manage stock, options and crypto orders, manage watchlists, and query historical and live market data. Version 2 exposes 65 tools and supports filtering them by toolset. It runs locally from alpaca-mcp-server (pypi) with API key auth.

Last verified 15 tools6 sources

Install

Terminal
claude mcp add alpaca --scope user --transport stdio uvx alpaca-mcp-server \
  --env ALPACA_API_KEY=your_alpaca_api_key \
  --env ALPACA_SECRET_KEY=your_alpaca_secret_key
JSON
{
  "mcpServers": {
    "alpaca": {
      "command": "uvx",
      "args": ["alpaca-mcp-server"],
      "env": {
        "ALPACA_API_KEY": "your_alpaca_api_key",
        "ALPACA_SECRET_KEY": "your_alpaca_secret_key"
      }
    }
  }
}

VS Code

JSON
{
  "servers": {
    "alpaca": {
      "type": "stdio",
      "command": "uvx",
      "args": ["alpaca-mcp-server"],
      "env": {
        "ALPACA_API_KEY": "your_alpaca_api_key",
        "ALPACA_SECRET_KEY": "your_alpaca_secret_key"
      }
    }
  }
}

Generic

JSON
{
  "mcpServers": {
    "alpaca": {
      "command": "uvx",
      "args": ["alpaca-mcp-server"],
      "env": {
        "ALPACA_API_KEY": "your_alpaca_api_key",
        "ALPACA_SECRET_KEY": "your_alpaca_secret_key"
      }
    }
  }
}

Tools

get_account_info
Account balances, margin, and status
get_portfolio_history
Equity and P/L over time
get_account_activities
Fills, dividends, transfers
place_stock_order
Stocks/ETFs; market, limit, stop, stop-limit, trailing stop, brackets
place_crypto_order
Crypto; market, limit, stop-limit
place_option_order
Options; single-leg or multi-leg strategies
get_orders
Retrieve orders with filters
cancel_all_orders
Cancel all open orders
get_all_positions
All current positions
close_position
Close a specific position (full or partial)
create_watchlist
Create a new watchlist
get_option_contracts
Option contracts for underlying symbol(s)
get_stock_bars
Historical OHLCV bars
get_option_chain
Full option chain for an underlying
get_news
News articles for stocks and crypto

As documented on October 17, 2026. A running server reports its current list through tools/list.

Notes and caveats

  • Requires Python 3.10+ and uv.
  • Defaults to paper trading; set ALPACA_PAPER_TRADE=false with live keys for real-money trading.
  • V2 is a full rewrite with no backward compatibility with V1 tool names (V1 can be pinned via alpaca-mcp-server==1.x.x).
  • Streamable HTTP mode binds to localhost and the package does not configure MCP OAuth, so Alpaca warns against exposing it to the public internet.
  • Some real-time data needs an Algo Trader Plus subscription.
  • Docker image is built locally from the repo, not published.

FAQ

What does the Alpaca MCP server do?

Local MCP server for Alpaca's Trading and Market Data APIs that lets an agent check account balances and positions, place and manage stock, options and crypto orders, manage watchlists, and query historical and live market data. Version 2 exposes 65 tools and supports filtering them by toolset. The vendor documents 15 tools, including get_account_info, get_portfolio_history, get_account_activities and place_stock_order.

How do I add the Alpaca MCP server to Claude Code?

Alpaca documents a Claude Code config; copy it from the Claude Code section of this page. Snippets for Cursor, VS Code and Generic are there too.

Does the Alpaca MCP server need authentication?

Yes, API key. Transport: stdio, Streamable HTTP. Status: GA, last checked October 17, 2026.

Sources

Last verified against 6 Alpaca pages, then re-checked independently.

Newsletter

New MCP servers, the week they ship

One email per week. New official MCP servers, the coding tools that support them and how developers wire them up.