Skip to content
appsgit

Alpaca MCP Server

Alpaca MCP Server is an MCP server that adds finance tools to AI assistants such as Claude Desktop, Claude Code and Cursor. Alpaca’s official MCP Server lets you trade stocks, ETFs, crypto, and options, run data analysis, and build strategies in… It has 1,008 GitHub stars, is released under the MIT license and runs locally with uvx alpaca-mcp-server.

github.com/alpacahq/alpaca-mcp-server (opens in a new tab)

  • Official
  • Needs API key
  • Finance
  • MIT
  • Actively maintained

Install Alpaca MCP Server

Generated from the server's published package. Replace your-value with your own values.

Claude Desktop

claude_desktop_config.json
{
  "mcpServers": {
    "alpaca-mcp-server": {
      "command": "uvx",
      "args": [
        "alpaca-mcp-server"
      ],
      "env": {
        "ALPACA_API_KEY": "your-value",
        "ALPACA_SECRET_KEY": "your-value"
      }
    }
  }
}

Settings > Developer > Edit Config. macOS: ~/Library/Application Support/Claude/, Windows: %APPDATA%\Claude\. Restart Claude Desktop afterwards.

Claude Code

claude mcp add --env ALPACA_API_KEY=your-value --env ALPACA_SECRET_KEY=your-value --transport stdio alpaca-mcp-server -- uvx alpaca-mcp-server

Cursor

.cursor/mcp.json
{
  "mcpServers": {
    "alpaca-mcp-server": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "alpaca-mcp-server"
      ],
      "env": {
        "ALPACA_API_KEY": "your-value",
        "ALPACA_SECRET_KEY": "your-value"
      }
    }
  }
}

Project file; use ~/.cursor/mcp.json to enable it in every project.

VS Code

.vscode/mcp.json
{
  "inputs": [
    {
      "type": "promptString",
      "id": "alpaca_api_key",
      "description": "ALPACA_API_KEY",
      "password": true
    },
    {
      "type": "promptString",
      "id": "alpaca_secret_key",
      "description": "ALPACA_SECRET_KEY",
      "password": true
    }
  ],
  "servers": {
    "alpaca-mcp-server": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "alpaca-mcp-server"
      ],
      "env": {
        "ALPACA_API_KEY": "${input:alpaca_api_key}",
        "ALPACA_SECRET_KEY": "${input:alpaca_secret_key}"
      }
    }
  }
}

Config formats checked against the official docs on Oct 7, 2026: modelcontextprotocol.io (opens in a new tab), code.claude.com (opens in a new tab), cursor.com (opens in a new tab), code.visualstudio.com (opens in a new tab).

Environment variables

Variables the server reads at startup.

NameRequiredDescription
ALPACA_API_KEYsecretNoShown in the README's example configuration.
ALPACA_SECRET_KEYsecretNoShown in the README's example configuration.
ALPACA_PAPER_TRADENoShown in the README's example configuration.
ALPACA_TOOLSETSNoShown in the README's example configuration.

Tools (40)

Parsed from the Tools section of the README; check the repository for the current list.

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

    List all watchlists

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

    List assets with optional filtering

  • 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

About 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.

  • ai-trading
  • algorithmic-trading
  • mcp
  • mcp-server
  • options
  • stocks
  • trading
  • trading-api
  • crypto
  • etfs

FAQ

Alpaca MCP Server FAQ

Still curious? Email info@appsgit.com.

What is Alpaca MCP Server?

Alpaca MCP Server is an MCP server that adds finance tools to AI assistants such as Claude Desktop, Claude Code and Cursor. Alpaca’s official MCP Server lets you trade stocks, ETFs, crypto, and options, run data analysis, and build strategies in… It has 1,008 GitHub stars, is released under the MIT license and runs locally with uvx alpaca-mcp-server. The source code is at github.com/alpacahq/alpaca-mcp-server.

How do I install the Alpaca MCP Server MCP server?

Add the command uvx alpaca-mcp-server to your MCP client: put it in claude_desktop_config.json for Claude Desktop, run claude mcp add for Claude Code, or add it to .cursor/mcp.json (Cursor) or .vscode/mcp.json (VS Code). The snippets on this page are ready to paste.

Is Alpaca MCP Server free?

The server is open source under the MIT license, so running it is free. It needs credentials (ALPACA_API_KEY and ALPACA_SECRET_KEY) for the service it connects to, which may require a paid account.

Is Alpaca MCP Server actively maintained?

The most recent commit was on Sep 25, 2026. The latest release is v2.3.2, published Sep 15, 2026. appsgit only lists MCP servers with a commit in the last six months and re-checks every server daily.