Finance · Developer Tools

Alpaca MCP Server

alpacahq/alpaca-mcp-server

A comprehensive Model Context Protocol (MCP) server for Alpaca's Trading API. Enable natural language trading operations through AI assistants like Claude, Cursor, and VS Code. Supports stocks, options, crypto, portfolio management, and real-time market data.

Install

uvx alpaca-mcp-server

Client configuration

{
  "mcpServers": {
    "alpaca": {
      "command": "uvx",
      "args": [
        "alpaca-mcp-server"
      ],
      "env": {
        "ALPACA_API_KEY": "<ALPACA_API_KEY>",
        "ALPACA_SECRET_KEY": "<ALPACA_SECRET_KEY>"
      }
    }
  }
}

Environment variables

ALPACA_API_KEYALPACA_SECRET_KEY
Author
@alpacahq
Category
Finance, Developer Tools
Updated
Oct 6, 2026

About Alpaca MCP Server

Alpaca MCP Server v2 is here. This version is a complete rewrite built with FastMCP and OpenAPI. If you're upgrading from v1, please read the Upgrade Guide — tool names, parameters, and configuration have changed.

Features

  • Market Data — Real-time quotes, trades, and price bars for stocks, crypto, and options. Historical data with flexible timeframes. Option Greeks and implied volatility.

  • Account Management — View balances, buying power, account status, and portfolio history.

  • Order Management — Place market, limit, stop, stop-limit, and trailing-stop orders for stocks, crypto, and options. Cancel orders individually or in bulk.

  • Options Trading — Search contracts by expiration/strike/type. Place single-leg or multi-leg strategies. Get latest quotes, Greeks, and IV.

  • Crypto Trading — Market, limit, and stop-limit orders with GTC/IOC. Quantity or notional-based.

  • Position Management — View, close, or liquidate positions. Exercise option contracts.

  • News — News articles filterable by ticker and date range.

  • Market Status — Market open/close times, calendar, corporate actions.

  • Watchlists — Create, update, and manage watchlists.

  • Asset Search — Query details for stocks, ETFs, crypto, and options with filtering.

Tools (40)

  • get_account_info

    Balance, margin, and account status

  • get_account_config

    Trading restrictions, margin settings, PDT checks

  • update_account_config

    Update account configuration settings

  • get_portfolio_history

    Equity and P/L over time

  • get_account_activities

    Fills, dividends, transfers

  • get_account_activities_by_type

    Activities filtered by type

  • get_orders

    Retrieve orders with filters

  • get_order_by_id

    Single order by ID

  • get_order_by_client_id

    Single order by client order ID

  • replace_order_by_id

    Replace an existing open order

  • cancel_order_by_id

    Cancel a specific order

  • cancel_all_orders

    Cancel all open orders

  • 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)

  • get_all_positions

    All current positions

  • get_open_position

    Details for a specific position

  • close_position

    Close a specific position

  • close_all_positions

    Liquidate entire portfolio

  • exercise_options_position

    Exercise a held option contract

  • do_not_exercise_options_position

    Do-not-exercise instruction

  • create_watchlist

    Create a new watchlist

  • get_watchlist_by_id

    Get a specific watchlist

  • update_watchlist_by_id

    Update a watchlist

  • delete_watchlist_by_id

    Delete a watchlist

  • add_asset_to_watchlist_by_id

    Add an asset to a watchlist

  • remove_asset_from_watchlist_by_id

    Remove an asset from a watchlist

  • get_asset

    Detailed info for a specific asset

  • get_option_contracts

    Option contracts for underlying symbol(s)

  • get_option_contract

    Single option contract by symbol or ID

  • get_calendar

    Market calendar for a date range

  • get_clock

    Current market status and next open/close

  • get_corporate_action_announcements

    Corporate action announcements

  • get_corporate_action_announcement

    Single announcement by ID

  • get_stock_bars

    Historical OHLCV bars

  • get_stock_quotes

    Historical bid/ask quotes

  • get_stock_trades

    Historical trades

  • get_stock_latest_bar

    Latest minute bar

  • get_stock_latest_quote

    Latest quote

  • get_stock_latest_trade

    Latest trade

Details on this page are taken from the project's README. Open README

Supported clients

Clients mentioned in this server's README:

View all
Claude Desktop logo

Claude Desktop

Desktop · Freemium · Proprietary

Anthropic's official Claude AI desktop application. Supports MCP servers to extend functionality.

WindowsMacOS
Cursor logo

Cursor

Desktop · Freemium · Proprietary

The first agentic IDE. The Cursor editor truly merges how developers and AI work together, delivering a magical coding experience.

WindowsMacOSLinux
VS Code GitHub Copilot logo

VS Code GitHub Copilot

Desktop · Freemium · MIT

VS Code integrates MCP with GitHub Copilot through agent mode, allowing direct interaction with MCP-provided tools in your agentic coding workflow. Configure servers in Claude Desktop, workspace, or user settings, with guided MCP installation and secure handling of secrets in input variables to avoid leaking hardcoded keys.

WindowsMacOSLinuxWeb

Related MCP servers

More servers
Stripe Agent Toolkit logo

Stripe Agent Toolkit

stripe/agent-toolkit

677

It contains a collection of SDKs to help you integrate Stripe with LLMs and agent frameworks, including.

Finance
Awesome Web3 MCP Servers logo

Awesome Web3 MCP Servers

demcp/awesome-web3-mcp-servers

405

MCP is an open protocol that standardizes how applications provide context to LLMs. Think of MCP like a USB-C port for AI applications. Just as USB-C provides a standardized way to connect your devices to various peripherals and accessories, MCP provides a standardized way to connect AI models to different data sources and tools.

Finance
Financial Datasets logo

Financial Datasets

financial-datasets/mcp-server

225

This is a Model Context Protocol (MCP) server that provides access to stock market data from Financial Datasets.

Finance
lyraios logo

lyraios

GalaxyLLMCI/lyraios

216

LYRAI is a Model Context Protocol (MCP) operating system for multi-AI AGENTs designed to extend the functionality of AI applications (such as Claude Desktop and Cursor) by enabling them to interact with financial networks and blockchain public chains.

Finance
EVM Blockchain logo

EVM Blockchain

mcpdotdirect/evm-mcp-server

216

A comprehensive Model Context Protocol (MCP) server that provides blockchain services across 60+ EVM-compatible networks. This server enables AI agents to interact with Ethereum, Optimism, Arbitrum, Base, Polygon, and many other EVM chains with a unified interface through 22 tools and 10 AI-guided prompts.

Finance
longport logo

longport

longportapp/openapi

206

Longport OpenAPI provides programmatic quote trading interfaces for investors with research and development capabilities and assists them to build trading or quote strategy analysis tools based on their own investment strategies. The functions fall into the following categories.

Finance