Alpaca MCP Server
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Alpaca MCP Server What's my account balance and buying power?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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.
Table of Contents
Related MCP server: Alpaca MCP Server
Upgrading from V1
V2 is a complete rewrite built with FastMCP and OpenAPI. None of the V1 tools exist in V2 — tool names, parameters, and schemas have changed. You cannot use V2 as a drop-in replacement if your setup depends on specific V1 tool names or parameters.
What changes
Aspect | V1 | V2 |
Tool names | Hand-crafted (e.g. | Spec-derived with overrides (e.g. |
Parameters | Custom schemas | Aligned with Alpaca API specs |
Configuration |
| Env vars in MCP client config only |
Tool filtering | Not supported |
|
Whitelisting | Not supported | Use |
How to avoid V1-style usage in V2
MCP clients discover tools dynamically from the server. There is no config file where you "whitelist" tool names — the client gets whatever tools the server exposes. To avoid your client or AI assistant using V2 incorrectly:
Do not reuse V1 config — Treat V2 as a new server. Update your MCP client config with the new command/args; remove any
.envorinit-based setup.Clear tool caches — Restart your MCP client (Claude Desktop, Cursor, VS Code, etc.) after switching so it fetches the new tool list instead of using a stale one.
Start a fresh chat/session — Existing conversations may have cached references to old tool names. Start a new chat so the LLM sees the current V2 tools and their schemas.
Update custom instructions and rules — If you have Cursor rules, Claude instructions, or other prompts that mention specific V1 tool names (e.g. "use
get_account_info"), update them to match V2 tool names or remove those references and let the LLM discover tools from context.Restrict tools with
ALPACA_TOOLSETS— If you previously limited which capabilities your assistant could use, V2 supports server-side filtering via theALPACA_TOOLSETSenv var. See Configuration > Toolset Filtering for the list of toolsets.
Summary
Assume no backward compatibility with V1. Reconfigure your MCP client for V2, restart it, and use a fresh session. Check the Available Tools section for the current tool list.
If you had custom V1 workflows
If you documented allowed tools, wrote scripts that call tools by name, or built prompts around specific V1 tool/parameter shapes — treat them as obsolete. Recreate them using the Available Tools listed below and the current parameter schemas exposed by the server.
Staying on V1
If you need to stay on V1, pin to the last V1 release (e.g. uvx alpaca-mcp-server==1.x.x serve) in your MCP client config. V1 remains available on PyPI for existing setups.
Prerequisites
Python 3.10+ (installation guide)
uv (installation guide)
Alpaca Trading API keys (free paper trading account)
MCP client (Claude Desktop, Cursor, VS Code, etc.)
Getting Your API Keys
Visit the Alpaca Dashboard
Create a free paper trading account
Generate API keys from the dashboard
Setup
Add the server to your MCP client config, then restart the client. No init command, no .env files — credentials are set in one place only.
Claude Desktop
Edit ~/Library/Application Support/Claude/claude_desktop_config.json (Mac) or %APPDATA%\Claude\claude_desktop_config.json (Windows):
{
"mcpServers": {
"alpaca": {
"command": "uvx",
"args": ["alpaca-mcp-server"],
"env": {
"ALPACA_API_KEY": "your_alpaca_api_key",
"ALPACA_SECRET_KEY": "your_alpaca_secret_key"
}
}
}
}Claude Mobile
Alpaca does not provide a hosted remote MCP server. To use the MCP server on the Claude mobile app, host it remotely on a cloud provider, then add it as a custom connector in Claude. The connector syncs to the mobile app once connected on the web.
For hosting, deployment, and connector setup, see How to Deploy Alpaca's MCP Server Remotely on Claude Mobile App.
ChatGPT
Alpaca does not provide a hosted remote MCP server. To use the MCP server in ChatGPT, host it remotely on a cloud provider, then add it as a connector.
See Connectors in ChatGPT and the Claude Mobile deployment guide for hosting and setup steps.
Cursor
Install from the Cursor Directory in a few clicks, or add to ~/.cursor/mcp.json:
{
"mcpServers": {
"alpaca": {
"command": "uvx",
"args": ["alpaca-mcp-server"],
"env": {
"ALPACA_API_KEY": "your_alpaca_api_key",
"ALPACA_SECRET_KEY": "your_alpaca_secret_key"
}
}
}
}VS Code
Create .vscode/mcp.json in your project root. See the official docs.
{
"mcp": {
"servers": {
"alpaca": {
"type": "stdio",
"command": "uvx",
"args": ["alpaca-mcp-server"],
"env": {
"ALPACA_API_KEY": "your_alpaca_api_key",
"ALPACA_SECRET_KEY": "your_alpaca_secret_key"
}
}
}
}
}PyCharm
See the official guide.
Go to File → Settings → Tools → Model Context Protocol (MCP)
Add a new server:
Type: stdio
Command: uvx
Arguments: alpaca-mcp-server
Set environment variables:
ALPACA_API_KEY=your_alpaca_api_key
ALPACA_SECRET_KEY=your_alpaca_secret_keyClaude Code
claude mcp add alpaca --scope user --transport stdio uvx alpaca-mcp-server \
--env ALPACA_API_KEY=your_alpaca_api_key \
--env ALPACA_SECRET_KEY=your_alpaca_secret_keyVerify with /mcp in the Claude Code CLI.
Antigravity CLI
See the Antigravity MCP docs.
Add to ~/.gemini/antigravity-cli/mcp_config.json (global) or .agents/mcp_config.json (workspace):
{
"mcpServers": {
"alpaca": {
"command": "uvx",
"args": ["alpaca-mcp-server"],
"env": {
"ALPACA_API_KEY": "your_alpaca_api_key",
"ALPACA_SECRET_KEY": "your_alpaca_secret_key"
}
}
}
}Docker
git clone https://github.com/alpacahq/alpaca-mcp-server.git
cd alpaca-mcp-server
docker build -t mcp/alpaca:latest .Add to your MCP client config:
{
"mcpServers": {
"alpaca": {
"command": "docker",
"args": [
"run", "--rm", "-i",
"-e", "ALPACA_API_KEY=your_key",
"-e", "ALPACA_SECRET_KEY=your_secret",
"-e", "ALPACA_PAPER_TRADE=true",
"mcp/alpaca:latest"
]
}
}
}Configuration
All configuration is through environment variables set in your MCP client config. No files are written to disk.
Variable | Required | Default | Description |
| Yes | — | Your Alpaca API key |
| Yes | — | Your Alpaca secret key |
| No |
| Set to |
| No | all | Comma-separated list of toolsets to enable |
Switching to Live Trading
Update the env block in your MCP client config and restart:
{
"env": {
"ALPACA_API_KEY": "your_live_api_key",
"ALPACA_SECRET_KEY": "your_live_secret_key",
"ALPACA_PAPER_TRADE": "false"
}
}Toolset Filtering
By default, all tools are enabled. To limit the server to specific toolsets, set ALPACA_TOOLSETS:
{
"env": {
"ALPACA_API_KEY": "...",
"ALPACA_SECRET_KEY": "...",
"ALPACA_TOOLSETS": "stock-data,crypto-data"
}
}Available toolsets:
Toolset | Description |
| Account info, config, portfolio history, activities |
| Orders, positions, exercise options |
| Watchlist CRUD operations |
| Asset lookup, option contracts, calendar, clock |
| Stock bars, quotes, trades, snapshots, screeners |
| Crypto bars, quotes, trades, snapshots, orderbooks |
| Option bars, quotes, trades, snapshots, chain, exchange codes |
| Corporate action announcements |
| News articles for stocks and crypto |
| Fixed income (bond/treasury) quotes |
| Market index values (SPX, VIX, etc.) |
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.
Example Prompts
Basic Trading
What's my current account balance and buying power on Alpaca?
Show me my current positions in my Alpaca account.
Buy 5 shares of AAPL at market price.
Sell 5 shares of TSLA with a limit price of $300.
Cancel all open stock orders.
Cancel the order with ID abc123.
Liquidate my entire position in GOOGL.
Close 10% of my position in NVDA.
Place a limit order to buy 100 shares of MSFT at $450.
Place a market order to sell 25 shares of META.
Crypto Trading
Place a market order to buy 0.01 ETH/USD.
Place a limit order to sell 0.01 BTC/USD at $110,000.
Option Trading
Show me available option contracts for AAPL expiring next month.
Get the latest quote for the AAPL250613C00200000 option.
Retrieve the option snapshot for the SPY250627P00400000 option.
Liquidate my position in 2 contracts of QQQ calls expiring next week.
Place a market order to buy 1 call option on AAPL expiring next Friday.
What are the option Greeks for the TSLA250620P00500000 option?
Find TSLA option contracts with strike prices within 5% of the current market price.
Get SPY call options expiring the week of June 16th, 2025, within 10% of market price.
Place a bull call spread using AAPL June 6th options: one with a 190.00 strike and the other with a 200.00 strike.
Exercise my NVDA call option contract NVDA250919C001680.
Market Information
To access the latest 15-minute data, you need to subscribe to the Algo Trader Plus Plan.
What are the market open and close times today?
Show me the market calendar for next week.
Show me recent cash dividends and stock splits for AAPL, MSFT, and GOOGL in the last 3 months.
Get all corporate actions for SPY including dividends, splits, and any mergers in the past year.
What are the upcoming corporate actions scheduled for SPY in the next 6 months?
Historical & Real-time Data
Show me AAPL's daily price history for the last 5 trading days.
What was the closing price of TSLA yesterday?
Get the latest bar for GOOGL.
What was the latest trade price for NVDA?
Show me the most recent quote for MSFT.
Retrieve the last 100 trades for AMD.
Show me 1-minute bars for AMZN from the last 2 hours.
Get 5-minute intraday bars for TSLA from last Tuesday through last Friday.
Get a comprehensive stock snapshot for AAPL showing latest quote, trade, minute bar, daily bar, and previous daily bar all in one view.
Compare market snapshots for TSLA, NVDA, and MSFT to analyze their current bid/ask spreads, latest trade prices, and daily performance.
Orders
Show me all my open and filled orders from this week.
What orders do I have for AAPL?
List all limit orders I placed in the past 3 days.
Filter all orders by status: filled.
Get me the order history for yesterday.
Watchlists
At this moment, you can only view and update trading watchlists created via Alpaca's Trading API through the API itself
Create a new watchlist called "Tech Stocks" with AAPL, MSFT, and NVDA.
Update my "Tech Stocks" watchlist to include TSLA and AMZN.
What stocks are in my "Dividend Picks" watchlist?
Remove META from my "Growth Portfolio" watchlist.
List all my existing watchlists.
Asset Information
Search for details about the asset 'AAPL'.
Show me the top 5 tradable crypto assets by trading volume.
Get all NASDAQ active US equity assets and filter the results to show only tradable securities
Combined Scenarios
Get today's market clock and show me my buying power before placing a limit buy order for TSLA at $340.
Place a bull call spread with SPY July 3rd options: sell one 5% above and buy one 3% below the current SPY price.
Available Tools
Account & Portfolio
get_account_info— Balance, margin, and account statusget_account_config— Trading restrictions, margin settings, PDT checksupdate_account_config— Update account configuration settingsget_portfolio_history— Equity and P/L over timeget_account_activities— Fills, dividends, transfersget_account_activities_by_type— Activities filtered by type
Trading (Orders)
get_orders— Retrieve orders with filtersget_order_by_id— Single order by IDget_order_by_client_id— Single order by client order IDreplace_order_by_id— Replace an existing open ordercancel_order_by_id— Cancel a specific ordercancel_all_orders— Cancel all open ordersplace_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)
Positions
get_all_positions— All current positionsget_open_position— Details for a specific positionclose_position— Close a specific positionclose_all_positions— Liquidate entire portfolioexercise_options_position— Exercise a held option contractdo_not_exercise_options_position— Do-not-exercise instruction
Watchlists
create_watchlist— Create a new watchlistget_watchlists— List all watchlistsget_watchlist_by_id— Get a specific watchlistupdate_watchlist_by_id— Update a watchlistdelete_watchlist_by_id— Delete a watchlistadd_asset_to_watchlist_by_id— Add an asset to a watchlistremove_asset_from_watchlist_by_id— Remove an asset from a watchlist
Assets & Market Info
get_all_assets— List assets with optional filteringget_asset— Detailed info for a specific assetget_option_contracts— Option contracts for underlying symbol(s)get_option_contract— Single option contract by symbol or IDget_calendar— Market calendar for a date rangeget_clock— Current market status and next open/closeget_corporate_action_announcements— Corporate action announcementsget_corporate_action_announcement— Single announcement by ID
Stock Data
get_stock_bars— Historical OHLCV barsget_stock_quotes— Historical bid/ask quotesget_stock_trades— Historical tradesget_stock_latest_bar— Latest minute barget_stock_latest_quote— Latest quoteget_stock_latest_trade— Latest tradeget_stock_snapshot— Comprehensive snapshotget_most_active_stocks— Most active by volume/trade countget_market_movers— Top gainers and losers
Crypto Data
get_crypto_bars— Historical OHLCV barsget_crypto_quotes— Historical quotesget_crypto_trades— Historical tradesget_crypto_latest_bar— Latest minute barget_crypto_latest_quote— Latest quoteget_crypto_latest_trade— Latest tradeget_crypto_snapshot— Comprehensive snapshotget_crypto_latest_orderbook— Latest orderbook
Options Data
get_option_bars— Historical OHLCV barsget_option_trades— Historical tradesget_option_latest_trade— Latest tradeget_option_latest_quote— Latest quote with bid/ask and exchange infoget_option_snapshot— Snapshot with Greeks and IVget_option_chain— Full option chain for an underlyingget_option_exchange_codes— Exchange code to name mapping
Corporate Actions
get_corporate_actions— Corporate action announcements from market data
News
get_news— News articles for stocks and crypto
Fixed Income Data
get_fixed_income_latest_quotes— Latest quotes for fixed income securities by ISIN
Index Data
get_index_latest_values— Latest values for market indicesget_index_values— Historical values for market indices
Locates (Short Selling)
get_locates— List locate requests filtered by status, symbol, or date rangecreate_locate— Create a locate request for a short saleget_locate— Get a single locate request by IDget_locate_quotes— Get locate availability and pricing for symbols
Testing
The project includes a multi-layered test suite that runs in CI on every pull request:
Integrity tests — Validate consistency between OpenAPI specs, toolset definitions, and tool name/description overrides. No network or credentials required.
Server construction tests — Build the server with mocked credentials and verify the correct number of tools are exposed. No network required.
Paper API integration tests — Execute real calls against the Alpaca paper trading API, covering account info, market data, order lifecycle, watchlists, positions, and more. Requires
ALPACA_API_KEYandALPACA_SECRET_KEY.
Run the full suite locally:
# Core tests (no credentials needed)
pytest tests/test_integrity.py tests/test_server_construction.py -v
# Integration tests (requires paper API keys)
ALPACA_API_KEY=... ALPACA_SECRET_KEY=... pytest tests/ -m integration -vProject Structure
alpaca-mcp-server/
├── src/
│ └── alpaca_mcp_server/
│ ├── __init__.py
│ ├── cli.py ← CLI entry point
│ ├── server.py ← FastMCP server built from OpenAPI specs
│ ├── tool_registry.py ← Tool names, descriptions, and output risk classifications
│ ├── toolsets.py ← Toolset → operationId allowlists
│ ├── overrides.py ← Hand-crafted tools for complex trading endpoints
│ ├── market_data_overrides.py ← Hand-crafted tools for historical data
│ └── specs/
│ ├── trading-api.json
│ └── market-data-api.json
├── tests/
│ ├── conftest.py ← Shared fixtures and paper-account cleanup
│ ├── test_integrity.py ← Spec ↔ toolset ↔ names consistency checks
│ ├── test_server_construction.py ← Server build verification
│ └── test_paper_integration.py ← Paper API integration tests
├── scripts/
│ └── sync-specs.sh ← Download latest OpenAPI specs
├── .github/
│ └── workflows/
│ └── ci.yml ← CI pipeline (core + integration)
├── AGENTS.md ← Instructions for coding agents
├── pyproject.toml
└── README.mdTroubleshooting
uv/uvx not found: Install uv from the official guide (https://docs.astral.sh/uv/getting-started/installation/) and then restart your terminal so
uv/uvxare on PATH.Credentials missing: Set
ALPACA_API_KEYandALPACA_SECRET_KEYin the client'senvblock. Paper mode default isALPACA_PAPER_TRADE = True.Client didn't pick up new config: Restart the client (Cursor, Claude Desktop, VS Code) after changes.
HTTP port conflicts: If using
--transport streamable-http, change--portto a free port.
Disclosure
Insights generated by our MCP server and connected AI agents are for educational and informational purposes only and should not be taken as investment advice. Alpaca does not recommend any specific securities or investment strategies.Please conduct your own due diligence before making any decisions. All firms mentioned operate independently and are not liable for one another.
Options trading is not suitable for all investors due to its inherent high risk, which can potentially result in significant losses. Please read Characteristics and Risks of Standardized Options (Options Disclosure Document) before investing in options.
Alpaca does not prepare, edit, endorse, or approve Third Party Content. Alpaca does not guarantee the accuracy, timeliness, completeness or usefulness of Third Party Content, and is not responsible or liable for any content, advertising, products, or other materials on or available from third party sites.
All investments involve risk, and the past performance of a security, or financial product does not guarantee future results or returns. There is no guarantee that any investment strategy will achieve its objectives. Please note that diversification does not ensure a profit, or protect against loss. There is always the potential of losing money when you invest in securities, or other financial products. Investors should consider their investment objectives and risks carefully before investing.
The algorithm's calculations are based on historical and real-time market data but may not account for all market factors, including sudden price moves, liquidity constraints, or execution delays. Model assumptions, such as volatility estimates and dividend treatments, can impact performance and accuracy. Trades generated by the algorithm are subject to brokerage execution processes, market liquidity, order priority, and timing delays. These factors may cause deviations from expected trade execution prices or times. Users are responsible for monitoring algorithmic activity and understanding the risks involved. Alpaca is not liable for any losses incurred through the use of this system.
Past hypothetical backtest results do not guarantee future returns, and actual results may vary from the analysis.
The Paper Trading API is offered by AlpacaDB, Inc. and does not require real money or permit a user to transact in real securities in the market. Providing use of the Paper Trading API is not an offer or solicitation to buy or sell securities, securities derivative or futures products of any kind, or any type of trading or investment advice, recommendation or strategy, given or in any manner endorsed by AlpacaDB, Inc. or any AlpacaDB, Inc. affiliate and the information made available through the Paper Trading API is not an offer or solicitation of any kind in any jurisdiction where AlpacaDB, Inc. or any AlpacaDB, Inc. affiliate (collectively, "Alpaca") is not authorized to do business.
Securities brokerage services are provided by Alpaca Securities LLC ("Alpaca Securities"), member FINRA/SIPC, a wholly-owned subsidiary of AlpacaDB, Inc. Technology and services are offered by AlpacaDB, Inc.
Cryptocurrency services are provided by Alpaca Crypto LLC ("Alpaca Crypto"), a FinCEN registered money services business (NMLS # 2160858), and a wholly-owned subsidiary of AlpacaDB, Inc. Alpaca Crypto is not a member of SIPC or FINRA. Cryptocurrencies are not stocks and your cryptocurrency investments are not protected by either FDIC or SIPC. Cryptocurrency assets are highly volatile and speculative, involving substantial risk of loss, and are not insured by the FDIC or any government agency. Customers should be aware of the various risks prior to engaging these services, including potential loss of principal, cybersecurity considerations, regulatory developments, and the evolving nature of digital asset technology. For additional information on the risks of cryptocurrency, please click here.
This is not an offer, solicitation of an offer, or advice to buy or sell securities or cryptocurrencies or open a brokerage account or cryptocurrency account in any jurisdiction where Alpaca Securities or Alpaca Crypto, respectively, are not registered or licensed, as applicable.
Privacy Policy
For information about how Alpaca handles your data, please review:
Data Collection
What is collected: User agent string ('ALPACA-MCP-SERVER') for API calls
How it's used: To identify MCP server usage and improve user experience
Third-party sharing: Not shared with third parties
Retention: Retained per Alpaca's standard data retention policy
Opt-out: Modify or remove the
USER_AGENTconstant in.github/core/user_agent.py
Security Notice
This server can place real trades and access your portfolio. Treat your API keys as sensitive credentials. Review all actions proposed by the LLM carefully, especially for complex options strategies or multi-leg trades.
HTTP Transport Security: When using HTTP transport, the server defaults to localhost (127.0.0.1:8000) for security. For remote access, you can bind to all interfaces with --host 0.0.0.0, use SSH tunneling (ssh -L 8000:localhost:8000 user@server), or set up a reverse proxy with authentication for secure access.
Support
For issues or questions, please contact us at support@alpaca.markets.
GitHub Issues: https://github.com/alpacahq/alpaca-mcp-server/issues GitHub Pull requests: https://github.com/alpacahq/alpaca-mcp-server/pulls
MCP Registry Metadata
mcp-name: io.github.alpacahq/alpaca-mcp-server
Available Tools
69 toolsadd_asset_to_watchlist_by_idA
Add an asset by symbol to a specific watchlist.
Inputs: watchlist_id (required), symbol. Returns: object
cancel_all_ordersA
Cancel all open orders.
Inputs: no named parameters. Returns: object
cancel_order_by_idA
Cancel a specific order by its ID.
Inputs: order_id (required).
close_all_positionsA
Closes all open positions by placing sell orders for each. If the market is closed, the sell orders will remain queued and execute at the next market open.
Inputs: cancel_orders. Returns: object
close_positionA
Closes a specific position for a single symbol by placing a sell order. If the market is closed, the sell order will remain queued and execute at the next market open.
Inputs: symbol_or_asset_id (required), qty, percentage. Returns: object
create_locateA
Creates a locate request for a short sale. Requires a symbol and quantity. Optionally set a limit price and all-or-none flag.
Inputs: qty (required), symbol (required), all_or_none, limit_price. Returns: object
create_watchlistB
Creates a new watchlist with specified symbols.
Inputs: name (required), symbols. Returns: object
delete_watchlist_by_idA
Delete a specific watchlist by its ID.
Inputs: watchlist_id (required).
do_not_exercise_options_positionB
Submits a do-not-exercise instruction for a held option contract.
Inputs: symbol_or_contract_id (required).
exercise_options_positionA
Exercises a held option contract, converting it into the underlying asset.
Inputs: symbol_or_contract_id (required).
get_account_activitiesC
Returns a list of account activities such as fills, dividends, and transfers.
Inputs: date, after, until, category, +4 more. Returns: object
get_account_activities_by_typeB
Returns account activity entries for a specific type of activity.
Inputs: activity_type (required), date, after, until, +3 more. Returns: object
get_account_configA
Retrieves the current account configuration settings, including trading restrictions, margin settings, PDT checks, and options trading level.
Inputs: no named parameters. Returns: object
get_account_infoA
Retrieves and formats the current account information including balances and status.
Inputs: no named parameters. Returns: object
get_all_assetsA
Get all available assets with optional filtering. WARNING: The unfiltered response is very large (thousands of assets). Always narrow results with the status, asset_class, or exchange parameters. To look up a single asset, use get_asset instead.
Inputs: status, exchange, attributes, asset_class. Returns: object
get_all_positionsA
Retrieves all current positions in the portfolio as JSON.
Inputs: no named parameters. Returns: object
get_assetB
Retrieves and formats detailed information about a specific asset.
Inputs: symbol_or_asset_id (required). Returns: object
get_calendarA
Retrieves and formats market calendar for specified date range. WARNING: Always provide start and end dates (YYYY-MM-DD). Without date bounds the response contains the entire multi-year calendar and will be extremely large.
Inputs: end, start, date_type. Returns: object
get_clockA
Retrieves and formats current market status and next open/close times.
Inputs: no named parameters. Returns: object
get_corporate_action_announcementA
Retrieves a single corporate action announcement by ID.
Inputs: id (required). Returns: object
get_corporate_action_announcementsA
Retrieves corporate action announcements (dividends, mergers, splits, spinoffs). Use a narrow date range and filter by symbol when possible — broad queries can return very large responses.
Inputs: since (required), until (required), ca_types (required), cusip, +2 more. Returns: object
get_corporate_actionsB
Retrieves and formats corporate action announcements.
Inputs: end, ids, sort, limit, +6 more. Returns: object
get_crypto_barsGet Crypto BarsARead-only
Retrieve historical price bars (OHLCV) for one or more cryptocurrencies.
When start is omitted, it is automatically computed as now minus the days/hours/minutes lookback.
Args: symbols: Comma-separated crypto pairs (e.g. "BTC/USD" or "BTC/USD,ETH/USD"). timeframe: Bar aggregation period — "1Min", "5Min", "15Min", "30Min", "1Hour", "1Day", "1Week", or "1Month". start: Inclusive start time (RFC 3339). Omit to use relative lookback. end: Inclusive end time (RFC 3339). Omit for current time. days: Days to look back when start is omitted (default 1). hours: Additional hours in the lookback (default 0). minutes: Additional minutes in the lookback (default 0). limit: Max total data points returned across all symbols, 1–10000 (default 1000). sort: Timestamp sort order — "asc" (default) or "desc".
Inputs: symbols (required), end, days, sort, +5 more. Returns: object
get_crypto_latest_barA
Returns the latest minute bar for one or more crypto symbols. The loc parameter is required — always set loc to "us".
Inputs: loc (required), symbols (required). Returns: object
get_crypto_latest_orderbookA
Returns the latest orderbook for one or more crypto symbols. The loc parameter is required — always set loc to "us". Note: the response includes the full order book depth and can be large.
Inputs: loc (required), symbols (required). Returns: object
get_crypto_latest_quoteB
Returns the latest quote for one or more crypto symbols. The loc parameter is required — always set loc to "us".
Inputs: loc (required), symbols (required). Returns: object
get_crypto_latest_tradeA
Returns the latest trade for one or more crypto symbols. The loc parameter is required — always set loc to "us".
Inputs: loc (required), symbols (required). Returns: object
get_crypto_quotesGet Crypto QuotesARead-only
Retrieve historical bid/ask quotes for one or more cryptocurrencies.
When start is omitted, it is automatically computed as now minus the days/hours/minutes lookback.
Args: symbols: Comma-separated crypto pairs (e.g. "BTC/USD" or "BTC/USD,ETH/USD"). start: Inclusive start time (RFC 3339). Omit to use relative lookback. end: Inclusive end time (RFC 3339). Omit for current time. days: Days to look back when start is omitted (default 0). hours: Additional hours in the lookback (default 0). minutes: Additional minutes in the lookback (default 15). limit: Max total data points returned across all symbols, 1–10000 (default 1000). sort: Timestamp sort order — "asc" (default) or "desc".
Inputs: symbols (required), end, days, sort, +4 more. Returns: object
get_crypto_snapshotA
Returns a snapshot for one or more crypto symbols including latest trade, quote, minute bar, daily bar, and previous daily bar. The loc parameter is required — always set loc to "us".
Inputs: loc (required), symbols (required). Returns: object
get_crypto_tradesGet Crypto TradesARead-only
Retrieve historical trade data for one or more cryptocurrencies.
When start is omitted, it is automatically computed as now minus the days/hours/minutes lookback.
Args: symbols: Comma-separated crypto pairs (e.g. "BTC/USD" or "BTC/USD,ETH/USD"). start: Inclusive start time (RFC 3339). Omit to use relative lookback. end: Inclusive end time (RFC 3339). Omit for current time. days: Days to look back when start is omitted (default 0). hours: Additional hours in the lookback (default 0). minutes: Additional minutes in the lookback (default 15). limit: Max total data points returned across all symbols, 1–10000 (default 1000). sort: Timestamp sort order — "asc" (default) or "desc".
Inputs: symbols (required), end, days, sort, +4 more. Returns: object
get_fixed_income_latest_quotesA
Returns the latest quotes for fixed income securities (bonds, treasuries). Provide a comma-separated list of ISINs (e.g. 'US912797SX61,US912810SK51'). Returns bid/ask prices, sizes, and yield-to-maturity for each security.
Inputs: isins (required), trade_size. Returns: object
get_index_latest_valuesB
Returns the latest values for market indices (e.g. SPX, VIX, DJI). Provide a comma-separated list of index symbols.
Inputs: symbols (required). Returns: object
get_index_valuesA
Returns historical values for market indices over a time interval. Supports pagination, sorting, and date range filtering. Provide a comma-separated list of index symbols.
Inputs: symbols (required), end, sort, limit, +2 more. Returns: object
get_locateB
Returns a single locate request by its ID.
Inputs: locate_id (required). Returns: object
get_locate_quotesA
Returns locate availability and pricing for one or more symbols. Provide a comma-separated list of symbols.
Inputs: symbols (required). Returns: object
get_locatesB
Returns locate requests for the account, filtered by status, symbol, or date range. Results are sorted by creation date descending.
Inputs: end, limit, start, status, +2 more. Returns: object
get_market_moversA
Returns the top market movers (gainers and losers) based on real-time SIP data.
Inputs: market_type (required), top. Returns: object
get_most_active_stocksB
Screens the market for most active stocks by volume or trade count.
Inputs: by, top. Returns: object
get_newsA
Retrieves news articles for stocks and crypto. Filter by symbols, date range, and sort order. Returns headlines, summaries, URLs, and associated ticker symbols.
Inputs: end, sort, limit, start, +4 more. Returns: object
get_open_positionB
Retrieves and formats details for a specific open position.
Inputs: symbol_or_asset_id (required). Returns: object
get_option_barsB
Retrieves historical bar (OHLCV) data for one or more option contracts.
Inputs: symbols (required), timeframe (required), end, sort, +3 more. Returns: object
get_option_chainA
Retrieves option chain data for an underlying symbol, including latest trade, quote, implied volatility, and greeks for each contract. The response can be very large. Use the type (call/put), strike_price_gte/lte, expiration_date, and limit parameters to narrow results.
Inputs: underlying_symbol (required), feed, type, limit, +8 more. Returns: object
get_option_contractA
Retrieves a single option contract by symbol or contract ID.
Inputs: symbol_or_id (required). Returns: object
get_option_contractsC
Retrieves option contracts for underlying symbol(s).
Inputs: type, limit, ppind, style, +10 more. Returns: object
get_option_exchange_codesA
Retrieves the mapping of exchange codes to exchange names for option market data. Useful for interpreting exchange fields returned by other option data tools.
Inputs: no named parameters. Returns: object
get_option_latest_quoteA
Retrieves and formats the latest quote for one or more option contracts including bid/ask prices, sizes, and exchange information.
Inputs: symbols (required), feed. Returns: object
get_option_latest_tradeB
Retrieves the latest trade for one or more option contracts.
Inputs: symbols (required), feed. Returns: object
get_option_snapshotA
Retrieves comprehensive snapshots of option contracts including latest trade, quote, implied volatility, and Greeks.
Inputs: symbols (required), feed, limit, page_token, +1 more. Returns: object
get_option_tradesA
Retrieves historical trade data for one or more option contracts.
Inputs: symbols (required), end, sort, limit, +2 more. Returns: object
get_order_by_client_idA
Retrieves a single order specified by the client order ID. Note: if the order was replaced, this returns the original order (status "replaced") with a replaced_by field pointing to the new order ID.
Inputs: client_order_id (required). Returns: object
get_order_by_idA
Retrieves a single order by its ID.
Inputs: order_id (required), nested. Returns: object
get_ordersC
Retrieves and formats orders with the specified filters.
Inputs: side, after, limit, until, +7 more. Returns: object
get_portfolio_historyC
Retrieves account portfolio history (equity and P/L) over a requested time window.
Inputs: end, start, period, pnl_reset, +4 more. Returns: object
get_stock_barsGet Stock BarsARead-only
Retrieve historical price bars (OHLCV) for one or more stocks.
When start is omitted, it is automatically computed as now minus the days/hours/minutes lookback.
Args: symbols: Comma-separated tickers (e.g. "AAPL" or "AAPL,MSFT,GOOG"). timeframe: Bar aggregation period — "1Min", "5Min", "15Min", "30Min", "1Hour", "1Day", "1Week", or "1Month". start: Inclusive start time (RFC 3339). Omit to use relative lookback. end: Inclusive end time (RFC 3339). Omit for current time. days: Days to look back when start is omitted (default 5). hours: Additional hours in the lookback (default 0). minutes: Additional minutes in the lookback (default 0). limit: Max total data points returned across all symbols, 1–10000 (default 1000). adjustment: Price adjustment — "raw", "split", "dividend", "spin-off", or "all". Comma-separated combos allowed (e.g. "split,dividend"). Default "raw". feed: Data feed — "sip" (all US exchanges, default, paid), "iex" (IEX only, free tier), "otc", or "boats". currency: Price currency (ISO 4217, e.g. "USD"). Default USD. sort: Timestamp sort order — "asc" (default) or "desc". asof: As-of date (YYYY-MM-DD) for point-in-time symbol mapping. Useful for backtesting with historical ticker changes.
Inputs: symbols (required), end, asof, days, +9 more. Returns: object
get_stock_latest_barB
Get the latest minute bar for one or more stocks.
Inputs: symbols (required), feed, currency. Returns: object
get_stock_latest_quoteC
Retrieves and formats the latest quote for one or more stocks.
Inputs: symbols (required), feed, currency. Returns: object
get_stock_latest_tradeB
Get the latest trade for one or more stocks.
Inputs: symbols (required), feed, currency. Returns: object
get_stock_quotesGet Stock QuotesARead-only
Retrieve historical bid/ask quotes (level 1) for one or more stocks.
When start is omitted, it is automatically computed as now minus the days/hours/minutes lookback.
Args: symbols: Comma-separated tickers (e.g. "AAPL" or "AAPL,MSFT"). start: Inclusive start time (RFC 3339). Omit to use relative lookback. end: Inclusive end time (RFC 3339). Omit for current time. days: Days to look back when start is omitted (default 0). hours: Additional hours in the lookback (default 0). minutes: Additional minutes in the lookback (default 20). limit: Max total data points returned across all symbols, 1–10000 (default 1000). feed: Data feed — "sip" (all US exchanges, default, paid), "iex" (free tier), "otc", or "boats". Paper/free accounts must set feed="iex" to avoid 403 errors. currency: Price currency (ISO 4217). Default USD. sort: Timestamp sort order — "asc" (default) or "desc". asof: As-of date (YYYY-MM-DD) for point-in-time symbol mapping.
Inputs: symbols (required), end, asof, days, +7 more. Returns: object
get_stock_snapshotA
Retrieves comprehensive snapshots of stock symbols including latest trade, quote, minute bar, daily bar, and previous daily bar.
Inputs: symbols (required), feed, currency. Returns: object
get_stock_tradesGet Stock TradesARead-only
Retrieve historical trade data for one or more stocks.
When start is omitted, it is automatically computed as now minus the days/hours/minutes lookback.
Args: symbols: Comma-separated tickers (e.g. "AAPL" or "AAPL,MSFT"). start: Inclusive start time (RFC 3339). Omit to use relative lookback. end: Inclusive end time (RFC 3339). Omit for current time. days: Days to look back when start is omitted (default 0). hours: Additional hours in the lookback (default 0). minutes: Additional minutes in the lookback (default 20). limit: Max total data points returned across all symbols, 1–10000 (default 1000). feed: Data feed — "sip" (all US exchanges, default, paid), "iex" (free tier), "otc", or "boats". Paper/free accounts must set feed="iex" to avoid 403 errors. currency: Price currency (ISO 4217). Default USD. sort: Timestamp sort order — "asc" (default) or "desc". asof: As-of date (YYYY-MM-DD) for point-in-time symbol mapping.
Inputs: symbols (required), end, asof, days, +7 more. Returns: object
get_watchlist_by_idA
Get a specific watchlist by its ID.
Inputs: watchlist_id (required). Returns: object
get_watchlistsA
Get all watchlists for the account.
Inputs: no named parameters. Returns: object
place_crypto_orderPlace Crypto OrderADestructive
Place a cryptocurrency order.
Args: symbol: Crypto pair (e.g., "BTC/USD", "ETH/USD"). side: "buy" or "sell". qty: Number of coins/tokens. Mutually exclusive with notional. notional: Dollar amount to trade. Mutually exclusive with qty. Only valid for market orders. type: "market", "limit", or "stop_limit". time_in_force: "gtc" (default) or "ioc". Crypto does not support "day" or "fok". limit_price: Required for limit and stop_limit orders. stop_price: Required for stop_limit orders. client_order_id: Unique idempotency key. If the request times out, you can safely retry with the same value — the API will reject duplicates. Recommended for every order.
Inputs: side (required), symbol (required), qty, type, +5 more. Returns: object
place_option_orderPlace Option OrderADestructive
Place an options order (single-leg or multi-leg).
For single-leg orders, provide symbol, side, and qty. For multi-leg orders, provide qty, legs, and optionally order_class="mleg" (auto-inferred). Symbol and side on the parent are not needed for multi-leg.
Args: qty: Number of contracts. Required for both single-leg and multi-leg orders. For multi-leg, this is the strategy multiplier — each leg's ratio_qty is scaled by this value (e.g., qty="10" with ratio_qty="2" = 20 contracts for that leg). type: "market" or "limit". time_in_force: "day" only. Options do not support other values. symbol: OCC option symbol (e.g., "AAPL250321C00150000"). Required for single-leg. side: "buy" or "sell". Required for single-leg. position_intent: "buy_to_open", "buy_to_close", "sell_to_open", or "sell_to_close". Clarifies whether the trade opens or closes a position. Optional but recommended. limit_price: Required for limit orders. For multi-leg, this is the net debit/credit (positive = debit/cost, negative = credit/proceeds). client_order_id: Unique idempotency key. If the request times out, you can safely retry with the same value — the API will reject duplicates. Recommended for every order. order_class: Set to "mleg" for multi-leg orders. Automatically inferred when legs are provided. legs: List of leg dicts for multi-leg orders (max 4). Each leg requires "symbol" and "ratio_qty" (string). Optional per-leg fields: "side" ("buy" or "sell") and "position_intent".
Inputs: qty (required), legs, side, type, +6 more. Returns: object
place_stock_orderPlace Stock OrderADestructive
Place a stock or ETF order.
Args:
symbol: Stock ticker (e.g., "AAPL", "SPY").
side: "buy" or "sell".
qty: Number of shares. Mutually exclusive with notional.
notional: Dollar amount to trade. Mutually exclusive with qty.
Only valid for market orders with time_in_force="day".
type: Order type — "market", "limit", "stop", "stop_limit",
"trailing_stop".
time_in_force: "day", "gtc", "opg", "cls", "ioc", or "fok".
limit_price: Required for limit and stop_limit orders.
stop_price: Required for stop and stop_limit orders.
trail_price: Dollar trail amount for trailing_stop orders.
trail_percent: Percent trail for trailing_stop orders.
extended_hours: Allow execution in pre-market, after-hours, and
overnight sessions. Only works with type="limit"
and time_in_force="day" or "gtc".
client_order_id: Unique idempotency key. If the request times out,
you can safely retry with the same value — the API
will reject duplicates. Recommended for every order.
order_class: "simple", "bracket", "oco", or "oto". Automatically
set to "bracket" when take_profit or stop_loss params
are provided.
take_profit_limit_price: Limit price for bracket take-profit leg.
stop_loss_stop_price: Stop price for bracket stop-loss leg.
stop_loss_limit_price: Limit price for bracket stop-loss leg.
advanced_instructions: Alpaca Elite Smart Router routing/algo
payload. Stocks-only (the Elite docs explicitly note options
and crypto reject the payload). Requires the account to be
on Elite Smart Router routing; non-Elite accounts will see
the field ignored or rejected by Alpaca's API. Shapes:
DMA Gateway (direct routing):
{"algorithm": "DMA",
"destination": "NYSE"|"NASDAQ"|"ARCA",
"display_qty": "<round lot, optional>"}
Only with type="limit"|"market" and time_in_force="day";
not compatible with opg/cls/gtc or stop orders.
VWAP (Volume-Weighted Average Price):
{"algorithm": "VWAP",
"start_time": "<RFC3339, optional>",
"end_time": "<RFC3339, optional>",
"max_percentage": "<0<x<1, optional>"}
Does NOT participate in open/close auctions.
TWAP (Time-Weighted Average Price):
{"algorithm": "TWAP",
"start_time": "<RFC3339, optional>",
"end_time": "<RFC3339, optional>",
"max_percentage": "<0<x<1, optional>"}
Does NOT participate in open/close auctions.
NOTE: PATCH /v2/orders/{id} already documents
advanced_instructions in the OpenAPI spec
(PatchOrderRequest), and replace_order_by_id exposes
it through auto-generation — this patch only addresses
the POST-side asymmetry.
Inputs: side (required), symbol (required), qty, type, +13 more. Returns: object
remove_asset_from_watchlist_by_idA
Remove an asset by symbol from a specific watchlist.
Inputs: symbol (required), watchlist_id (required). Returns: object
replace_order_by_idB
Replaces an existing open order with updated parameters. At least one optional field must be provided.
Inputs: order_id (required), qty, trail, notional, +5 more. Returns: object
update_account_configA
Updates one or more account configuration settings. Only the fields you provide will be changed; all others retain their current values.
Inputs: no_shorting, suspend_trade, fractional_trading, trade_confirm_email, +4 more. Returns: object
update_watchlist_by_idA
Update an existing watchlist. IMPORTANT: this replaces the entire watchlist. You must include the symbols parameter with the full list of desired symbols, otherwise all assets will be removed.
Inputs: watchlist_id (required), name, symbols. Returns: object
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 69 tools
Most tools have distinct purposes, but there are notable overlaps: get_corporate_actions and get_corporate_action_announcements appear to be duplicates, and snapshot tools (get_stock_snapshot, get_crypto_snapshot, get_option_snapshot) overlap with the individual latest data tools. With 69 tools, the boundaries can blur, though descriptions generally clarify the differences.
The naming largely follows a consistent verb_noun pattern: get_*, place_*, cancel_*, replace_*, create_*, update_*, delete_*. Minor deviations exist, such as do_not_exercise_options_position and exercise_options_position, but these are still readable and understandable in context.
69 tools is extremely high for any MCP server, even a comprehensive trading API. The sheer number makes the tool surface unwieldy and difficult for an agent to navigate efficiently, exceeding the range where each tool clearly earns its place.
The server covers a broad domain: orders, positions, account config, watchlists, market data (stocks, crypto, options, indices, fixed income), corporate actions, and short-locate management. Minor gaps exist (e.g., no historical option quotes, no locate cancellation), but the core user workflows are well-supported with CRUD-like operations.
Maintenance
Related MCP Connectors
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
Trading MCP server for AI agents, with live market data, account reads and controlled execution.
MCP server for OpenMM — exposes market data, account, trading, and strategy tools to AI agents
Connect any brokerage account, including Robinhood, Charles Schwab, E*Trade, Webull, Public, Tastytrade, Moomoo, TradeStation, Coinbase, and Kraken, to ChatGPT, Claude, Gemini, Grok, Muse, or any MCP client. Look up accounts, holdings, and option chains, then place stock, multi-leg options, and crypto orders, including bracket orders with take-profit and stop-loss. Every order is shown for your approval before it’s placed unless you choose otherwise.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol server enabling LLMs like Claude to interact with the Alpaca trading API through natural language for stock trading, checking positions, fetching market data, and managing your account.28MIT
- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol server that enables LLMs like Claude to interact with the Alpaca trading API, allowing for trading stocks, checking positions, fetching market data, and managing accounts through natural language.3MIT
- AlicenseAqualityDmaintenanceA Model Context Protocol server that interfaces with Alpaca trading API, allowing users to manage portfolios, place trades, and access market data through natural language interactions.835MIT
- AlicenseNot gradedqualityCmaintenanceEnables natural language trading operations through AI assistants using Alpaca's Trading API. Supports stocks, options, crypto trading, portfolio management, and real-time market data access.MIT