← Back to directory
A

Alpaca MCP Server

Official
Alpaca's official MCP server for trading stocks, ETFs, crypto, and options via natural language.
Category
Dev Tools #95 of 438
Stars
★ 1.0k Very popular
Transport
stdio (local process)
Runtime
Python 3.10+ · Docker
Credentials
API key / credential required
License
MIT
Last commit
Tools
74
62FMRS · C

The Alpaca MCP server is an official, feature-rich server covering multiple asset classes and trading operations, but requires careful use due to real trading risks.

Strongest · Documentation 16/20 Weakest · Reliability 10/20

Reliability
10/20
Security and permissions
12/20
Maintenance
10/20
Documentation
16/20
Setup experience
14/20
Why each score
Reliability 10/20
The manifest and README describe a versioned v2.2.0 server with a detailed tool inventory, and the README claims integrity, server-construction, paper API, ReadMe tests, and CI. However, the supplied source material contains only the README and manifest, not the actual CI workflow or committed test files, so startup, MCP handshake, and tool behavior cannot be verified statically. Static calibration caps reliability at 12 without executable evidence; a conservative score of 10 is given. Deductions are for unverifiable test evidence and thin diagnosable failure paths.
Security and permissions 12/20
Credentials are supplied via ALPACA_API_KEY and ALPACA_SECRET_KEY and marked secret in the manifest; paper trading is the default, HTTP transport defaults to localhost, data collection is disclosed as user-agent only, install examples use placeholders, and ALPACA_TOOLSETS allows capability scoping. No red-line violations are present. However, the server exposes high-risk tools such as close_all_positions, cancel_all_orders, and exercise_options_position without an explicit in-server confirmation workflow, leaving permission and confirmation incomplete. Score is 12.
Maintenance 10/20
The project has an MIT license, is not archived, and shows a v2 rewrite with version 2.2.0 and a v1-to-v2 upgrade guide, indicating active maintenance and a release path. However, the supplied materials lack commit history, issue-response evidence, dependency-update records, or a security-response channel; 26 open issues cannot be assessed for resolution. A conservative score of 10 is given.
Documentation 16/20
The README provides layered documentation: prerequisites, multi-client installation, authentication, environment variable table, toolset filtering, feature list, extensive example prompts, available tools, testing commands, troubleshooting, disclosures, privacy, and security notes. It also discloses limitations such as the 15-minute data subscription and exclusion of Broker API docs. Deductions are for missing per-tool parameter-level reference, rate-limit details, and cost details. Score is 16.
Setup experience 14/20
Setup is clearly documented with client-specific config examples for Claude Desktop, Cursor, VS Code, Claude Code, PyCharm, Antigravity, and Docker, using the uvx launcher and centralized environment variables. Deductions are for heavy reliance on uv/uvx and the lack of static evidence verifying PyPI package availability and runtime behavior; static calibration caps setup at 15. A conservative score of 14 is given.

Static review · not runListed 2026-08-07

Read the FMRS scoring method →

Fit and risk

What it can accessUses the networkChanges third-party account data

Best for

  • Developers who want to automate trading
  • Users who want to use AI assistants for investment research and trade execution
  • Traders familiar with Alpaca brokerage services

Not for

  • Users who need a hosted remote MCP server (Alpaca does not provide hosted service)
  • Users who want to trade mutual funds or futures (not supported)
  • Users who need to view Broker API docs (server excludes Broker API endpoints)

Required permissions

  • Access Alpaca account information (balances, positions, orders)
  • Place orders on behalf of the user (buy, sell, cancel)
  • Read market data and news
  • Read Alpaca documentation

Risks and side effects

  • The server can execute real trades, potentially leading to financial loss
  • API keys are sensitive credentials and should be handled securely
  • Options and crypto trading carry high risk and are not suitable for all investors
  • Algorithmic outputs are based on historical data and may not predict future markets

Setup

Before you start

Runtime:Python 3.10+ · Docker

ALPACA_API_KEY requiredsecret Required Alpaca Trading API key; generate one in the Alpaca Dashboard after creating a free paper trading account at app.alpaca.markets.
ALPACA_SECRET_KEY requiredsecret Required Alpaca API secret key, generated alongside the API key in the Alpaca Dashboard; treat as a sensitive credential.
Other optional settings (2)
ALPACA_PAPER_TRADE optional Optional, defaults to true (paper trading); set to false to enable live trading.
ALPACA_TOOLSETS optional Optional comma-separated list of toolsets (e.g. stock-data,crypto-data) to restrict which tools are enabled; all are enabled by default.
  1. Ensure Python 3.10+ and uv are installed.
  2. Create a free paper trading account at the Alpaca Dashboard and generate API keys.
  3. Edit your MCP client config (e.g., Claude Desktop, Cursor, VS Code) to add the above mcpServers configuration with your API keys.
  4. Restart the client.
claude_desktop_config.json
{
  "mcpServers": {
    "alpaca": {
      "command": "uvx",
      "args": ["alpaca-mcp-server"],
      "env": {
        "ALPACA_API_KEY": "your_alpaca_api_key",
        "ALPACA_SECRET_KEY": "your_alpaca_secret_key"
      }
    }
  }
}

Shown for Claude Desktop. Other clients may use a different file or key (VS Code uses "servers") — the configurator below converts it.

.vscode/mcp.json
{
  "servers": {
    "alpaca": {
      "command": "uvx",
      "args": [
        "alpaca-mcp-server"
      ],
      "env": {
        "ALPACA_API_KEY": "your_alpaca_api_key",
        "ALPACA_SECRET_KEY": "your_alpaca_secret_key"
      }
    }
  }
}

Goes in your project's .vscode/mcp.json (VS Code uses a "servers" key).

Terminal
claude mcp add alpaca -e ALPACA_API_KEY=your_alpaca_api_key -e ALPACA_SECRET_KEY=your_alpaca_secret_key -- uvx alpaca-mcp-server

Run it in a terminal; replace any <…> placeholders with your own values first.

Check that it works

Add the server to your MCP client config (uvx alpaca-mcp-server with your Alpaca keys) and restart the client; confirm get_account_info appears in the tool list, then ask "What's my current account balance on Alpaca?" — a returned balance proves the connection works.

Troubleshooting

  1. If uvx is not found, install uv and restart your terminal
  2. Ensure ALPACA_API_KEY and ALPACA_SECRET_KEY are set in the client's config
  3. Restart the client after config changes
  4. If using HTTP transport, check for port conflicts

Things to try

Once connected, you can ask your AI assistant things like:

  • What's my current buying power in my Alpaca account?
  • Buy 5 shares of AAPL at market price.
  • Show me AAPL's daily price history for the last 5 trading days.
  • Cancel all my open stock orders.

Tools 74

get_account_info read-only
Get account balance, margin, and status
get_account_config read-only
View trading restrictions, margin settings, PDT checks
update_account_config writes
Update account configuration settings
get_portfolio_history read-only
Get equity and P/L over time
get_account_activities read-only
Get fills, dividends, transfers
get_account_activities_by_type read-only
Get activities filtered by type
get_orders read-only
Retrieve orders with filters
get_order_by_id read-only
Get a single order by ID
Show 66 more tools
get_order_by_client_id read-only
Get a single order by client order ID
replace_order_by_id writes
Replace an existing open order
cancel_order_by_id writes
Cancel a specific order
cancel_all_orders writes
Cancel all open orders
place_stock_order writes
Place stock/ETF orders (market, limit, stop, etc.)
place_crypto_order writes
Place crypto orders (market, limit, stop-limit)
place_option_order writes
Place option orders (single-leg or multi-leg)
get_all_positions read-only
Get all current positions
get_open_position read-only
Get details for a specific position
close_position writes
Close a specific position
close_all_positions destructive
Liquidate entire portfolio
exercise_options_position writes
Exercise a held option contract
do_not_exercise_options_position writes
Send do-not-exercise instruction
create_watchlist writes
Create a new watchlist
get_watchlists read-only
List all watchlists
get_watchlist_by_id read-only
Get a specific watchlist
update_watchlist_by_id writes
Update a watchlist
delete_watchlist_by_id destructive
Delete a watchlist
add_asset_to_watchlist_by_id writes
Add an asset to a watchlist
remove_asset_from_watchlist_by_id writes
Remove an asset from a watchlist
get_all_assets read-only
List assets with optional filtering
get_asset read-only
Get detailed info for a specific asset
get_option_contracts read-only
Get option contracts for underlying symbol(s)
get_option_contract read-only
Get a single option contract by symbol or ID
get_calendar read-only
Get market calendar for a date range
get_clock read-only
Get current market status and next open/close
get_corporate_action_announcements read-only
Get corporate action announcements
get_corporate_action_announcement read-only
Get a single announcement by ID
get_stock_bars read-only
Get historical OHLCV bars
get_stock_quotes read-only
Get historical bid/ask quotes
get_stock_trades read-only
Get historical trades
get_stock_latest_bar read-only
Get latest minute bar
get_stock_latest_quote read-only
Get latest quote
get_stock_latest_trade read-only
Get latest trade
get_stock_snapshot read-only
Get comprehensive snapshot (quote, trade, minute bar, etc.)
get_most_active_stocks read-only
Get most active stocks by volume or trade count
get_market_movers read-only
Get top gainers and losers
get_crypto_bars read-only
Get historical OHLCV bars for crypto
get_crypto_quotes read-only
Get historical quotes for crypto
get_crypto_trades read-only
Get historical trades for crypto
get_crypto_latest_bar read-only
Get latest minute bar for crypto
get_crypto_latest_quote read-only
Get latest quote for crypto
get_crypto_latest_trade read-only
Get latest trade for crypto
get_crypto_snapshot read-only
Get comprehensive snapshot for crypto
get_crypto_latest_orderbook read-only
Get latest orderbook for crypto
get_option_bars read-only
Get historical OHLCV bars for options
get_option_trades read-only
Get historical trades for options
get_option_latest_trade read-only
Get latest trade for options
get_option_latest_quote read-only
Get latest quote with bid/ask and exchange info
get_option_snapshot read-only
Get snapshot with Greeks and IV
get_option_chain read-only
Get full option chain for an underlying
get_option_exchange_codes read-only
Get exchange code to name mapping
get_corporate_actions read-only
Get corporate action announcements from market data
get_news read-only
Get news articles for stocks and crypto
get_fixed_income_latest_quotes read-only
Get latest quotes for fixed income securities by ISIN
get_index_latest_values read-only
Get latest values for market indices
get_index_values read-only
Get historical values for market indices
get_locates read-only
List locate requests filtered by status, symbol, or date range
create_locate writes
Create a locate request for a short sale
get_locate read-only
Get a single locate request by ID
get_locate_quotes read-only
Get locate availability and pricing for symbols
search_alpaca_docs read-only
Search Alpaca documentation pages and guides
fetch_alpaca_doc read-only
Fetch one Alpaca ReadMe documentation page by page ID
search_alpaca_api_specs read-only
Search Alpaca API reference endpoints by topic, path, parameter, or schema term
list_alpaca_api_endpoints read-only
List endpoints for one allowed Alpaca OpenAPI spec
get_alpaca_endpoint_docs read-only
Fetch reference docs for one exact Alpaca API endpoint by method and path

Use cases

Check account balance and buying power
View current positions and order status
Place stock, crypto, and option orders via natural language
Fetch real-time and historical market data (bars, quotes, trades)
Manage watchlists and corporate action announcements

Supported clients

Claude Desktop
Cursor
VS Code
Claude Code
PyCharm
Antigravity CLI
ChatGPTPartial support
Claude MobilePartial support

Listed from the project's documentation, not tested by this site.

Overview

Alpaca's official MCP server, built with FastMCP and OpenAPI specs, provides 60+ tools covering account management, trading, positions, market data, news, and more. Supports stocks, options, crypto, fixed income, indices, and other asset classes. Users can execute trades, fetch real-time and historical market data, and manage portfolios through natural language instructions in AI assistants like Claude, Cursor, and VS Code.

Similar servers

Context7 80 · B

Upstash's official server providing up-to-date third-party library docs for AI coding assistants

★ 62.9k · Tools 2 Compare with this →

Source revision a82ad1ccb740 Data synced 2026-10-12 Read the FMRS scoring method