Submit

Alpaca's Official MCP Server

@alpacahq

With Alpaca's MCP server, you can: * Build simple and complex trading strategies for stocks and options using natural language with your Alpaca account * Pull real-time and historical market data for stocks and options, including stock prices, contract prices, and the Greeks, without switching tools * Manage your portfolio including tracking investments, monitoring positions, and creating watchlists, all in one place * Switch easily between your paper and live trading accounts
Overview

Alpaca MCP Server

This is a Model Context Protocol (MCP) server implementation for Alpaca's Trading API. It enables large language models (LLMs) on Claude Desktop, Cursor, or VScode to interact with Alpaca's trading infrastructure using natural language. This server supports stock trading, options trading, portfolio management, watchlist handling, and real-time market data access.

Features

  • Market Data
    • Real-time quotes, trades, and price bars for stocks
    • Historical price data and trading history
    • Option contract quotes and Greeks (via snapshots)
  • Account Management
    • View balances, buying power, and account status
    • Inspect all open and closed positions
  • Position Management
    • Get detailed info on individual holdings
    • Liquidate all or partial positions by share count or percentage
  • Order Management
    • Place stock and option orders (market or limit)
    • Cancel orders individually or in bulk
    • Retrieve full order history
  • Options Trading
    • Search and view option contracts by expiration or strike price
    • Place multi-leg options strategies
    • Get latest quotes and Greeks for contracts
  • Market Status & Corporate Actions
    • Check if markets are open
    • Fetch market calendar and trading sessions
    • View upcoming corporate announcements (earnings, splits, dividends)
  • Watchlist Management
    • Create, update, and view personal watchlists
    • Manage multiple watchlists for tracking assets
  • Asset Search
    • Query details for stocks and other Alpaca-supported assets

Example Natural Language Queries

See the "Example Queries" section below for 50 real examples covering everything from trading to corporate data to option strategies.

Basic Trading

  1. What's my current account balance and buying power?
  2. Show me my current positions.
  3. Buy 10 shares of AAPL at market price.
  4. Sell 5 shares of TSLA with a limit price of $300.
  5. Cancel all open stock orders.
  6. Cancel the order with ID abc123.
  7. Liquidate my entire position in GOOGL.
  8. Close 10% of my position in NVDA.
  9. How many shares of AMZN do I currently hold?
  10. Place a limit order to buy 100 shares of MSFT at $450.
  11. Place a market order to sell 25 shares of META.

Option Trading

  1. Show me available option contracts for AAPL expiring next month.
  2. Get the latest quote for AAPL250613C00200000.
  3. Retrieve the option snapshot for SPY250627P00400000.
  4. Liquidate my position in 2 contracts of QQQ calls expiring next week.
  5. Place a market order to buy 1 call option on AAPL expiring next Friday.
  6. What are the option Greeks for TSLA250620P00500000?
  7. Find all TSLA option contracts with strike prices within 5% of the current market price.
  8. Get all contracts for SPY expiring in June that are call options.
  9. Place a bull call spread using AAPL June 6th options: one with a 190.00 strike and the other with a 200.00 strike.

Market Information

  1. Is the US stock market currently open?
  2. What are the market open and close times today?
  3. Show me the market calendar for next week.
  4. Are there any corporate announcements for major tech stocks this month?
  5. What are the next dividend announcements for SPY?
  6. List earnings announcements coming tomorrow.

Historical & Real-time Data

  1. Show me AAPL's daily price history for the last 5 trading days.
  2. What was the closing price of TSLA yesterday?
  3. Get the latest bar for GOOG.
  4. What was the latest trade price for NVDA?
  5. Show me the most recent quote for MSFT.
  6. Retrieve the last 100 trades for AMD.
  7. Show me intraday bars for AMZN from last Tuesday through last Friday.

Orders

  1. Show me all my open and filled orders from this week.
  2. What orders do I have for AAPL?
  3. List all limit orders I placed in the past 3 days.
  4. Filter all orders by status: filled.
  5. Get me the order history for yesterday.

Watchlists

  1. Create a new watchlist called "Tech Stocks" with AAPL, MSFT, and NVDA.
  2. Update my "Tech Stocks" watchlist to include TSLA and AMZN.
  3. What stocks are in my "Dividend Picks" watchlist?
  4. Remove META from my "Growth Portfolio" watchlist.
  5. List all my existing watchlists.

Asset Information

  1. Search for details about the asset 'AAPL'.
  2. List all tradeable US Large-cap stocks.
  3. Show me the top 5 tradable crypto assets by trading volume.
  4. Filter all assets with status 'active'.
  5. Show me details for the stock with symbol 'GOOGL'.

Combined Scenarios

  1. Get today's market clock and show me my buying power before placing a limit buy order for TSLA at $340.
  2. Place a bull call spread with SPY July 3rd options: buy one 5% above and sell one 3% below the current SPY price.

Server Config

{
  "mcpServers": {
    "alpaca": {
      "command": "uvx",
      "args": [
        "alpaca-mcp-server",
        "serve"
      ],
      "env": {
        "ALPACA_API_KEY": "your_alpaca_api_key",
        "ALPACA_SECRET_KEY": "your_alpaca_secret_key"
      }
    }
  }
}
© 2025 MCP.so. All rights reserved.

Build with ShipAny.