Alpaca’s official MCP Server lets you trade stocks, ETFs, crypto, and options, run data analysis, and build strategies in plain English directly from your favorite LLM tools and IDEs
Drift inferred · capture-to-capture
- HIGH code analysis flagged dynamic code execution in alpacahq/alpaca-mcp-server
tools
-
add_asset_to_watchlist_by_id
Add an asset to a watchlist
-
cancel_all_orders
Cancel all open orders
-
cancel_order_by_id
Cancel a specific order
-
close_all_positions
Liquidate entire portfolio
-
close_position
Close a specific position
-
create_watchlist
Create a new watchlist
-
delete_watchlist_by_id
Delete a watchlist
-
do_not_exercise_options_position
Do-not-exercise instruction
-
exercise_options_position
Exercise a held option contract
-
get_account_activities
Fills, dividends, transfers
-
get_account_activities_by_type
Activities filtered by type
-
get_account_config
Trading restrictions, margin settings, PDT checks
-
get_account_info
Balance, margin, and account status
-
get_all_assets
List assets with optional filtering
-
get_all_positions
All current positions
-
get_asset
Detailed info for a specific asset
-
get_calendar
Market calendar for a date range
-
get_clock
Current market status and next open/close
-
get_corporate_action_announcement
Single announcement by ID
-
get_corporate_action_announcements
Corporate action announcements
-
get_crypto_bars
Historical OHLCV bars
-
get_crypto_latest_bar
Latest minute bar
-
get_crypto_latest_orderbook
Latest orderbook
-
get_crypto_latest_quote
Latest quote
-
get_crypto_latest_trade
Latest trade
-
get_crypto_quotes
Historical quotes
-
get_crypto_snapshot
Comprehensive snapshot
-
get_crypto_trades
Historical trades
-
get_market_movers
Top gainers and losers
-
get_most_active_stocks
Most active by volume/trade count
-
get_open_position
Details for a specific position
-
get_option_bars
Historical OHLCV bars
-
get_option_chain
Full option chain for an underlying
-
get_option_contract
Single option contract by symbol or ID
-
get_option_contracts
Option contracts for underlying symbol(s)
-
get_option_exchange_codes
Exchange code to name mapping
-
get_option_latest_quote
Latest quote with bid/ask and exchange info
-
get_option_latest_trade
Latest trade
-
get_option_snapshot
Snapshot with Greeks and IV
-
get_option_trades
Historical trades
-
get_order_by_client_id
Single order by client order ID
-
get_order_by_id
Single order by ID
-
get_orders
Retrieve orders with filters
-
get_portfolio_history
Equity and P/L over time
-
get_stock_bars
Historical OHLCV bars
-
get_stock_latest_bar
Latest minute bar
-
get_stock_latest_quote
Latest quote
-
get_stock_latest_trade
Latest trade
-
get_stock_quotes
Historical bid/ask quotes
-
get_stock_snapshot
Comprehensive snapshot
-
get_stock_trades
Historical trades
-
get_watchlist_by_id
Get a specific watchlist
-
get_watchlists
List all watchlists
-
place_crypto_order
Crypto (market, limit, stop-limit)
-
place_option_order
Options (single-leg or multi-leg)
-
place_stock_order
Stocks/ETFs (market, limit, stop, stop-limit, trailing-stop, brackets)
-
remove_asset_from_watchlist_by_id
Remove an asset from a watchlist
-
replace_order_by_id
Replace an existing open order
-
update_account_config
Update account configuration settings
-
update_watchlist_by_id
Update a watchlist
analyzed commit 397cf36 · analyzer v17 · 1d ago
skills & prompt files 1
- agent-rulesalpacahq-alpaca-mcp-server-397cf36/AGENTS.md
danger signals1
- dynamic code executioneval()/exec()alpacahq-alpaca-mcp-server-397cf36/src/alpaca_mcp_server/server.py:61
exec(_USER_AGENT_FILE.read_text(encoding="utf-8"), ns)
filesystem 2
- fs alpacahq-alpaca-mcp-server-397cf36/src/alpaca_mcp_server/cli.py :7
from pathlib import Path - fs alpacahq-alpaca-mcp-server-397cf36/src/alpaca_mcp_server/server.py :14
from pathlib import Path
network 3
- net alpacahq-alpaca-mcp-server-397cf36/src/alpaca_mcp_server/market_data_overrides.py :16
import httpx - net alpacahq-alpaca-mcp-server-397cf36/src/alpaca_mcp_server/overrides.py :13
import httpx - net alpacahq-alpaca-mcp-server-397cf36/src/alpaca_mcp_server/server.py :17
import httpx
secrets 2
- secrets alpacahq-alpaca-mcp-server-397cf36/src/alpaca_mcp_server/cli.py :52
if not os.environ.get("ALPACA_API_KEY") or not os.environ.get("ALPACA_SECRET_KEY"): - secrets alpacahq-alpaca-mcp-server-397cf36/src/alpaca_mcp_server/server.py :66
key = os.environ.get("ALPACA_API_KEY", "")
declared dependencies 4
- fastmcp@>=2.0.0
- httpx@>=0.27.0
- python-dotenv@>=1.0.0
- click@>=8.1.0