alpaca-mcp-server
by alpacahq·★ 736·Score 53
Alpaca's official MCP server enables natural language trading of stocks, ETFs, crypto, and options through AI assistants.
Overview
Alpaca MCP Server v2 is a comprehensive implementation of the Model Context Protocol that provides access to Alpaca's Trading API through natural language interfaces. Built with FastMCP and OpenAPI, it supports trading operations, market data access, portfolio management, and strategy development directly from LLM tools like Claude, Cursor, and VS Code. The server supports multiple asset classes including stocks, options, and cryptocurrency trading with real-time market data and various order types.
Try asking AI
After installing, here are 5 things you can ask your AI assistant:
When to choose this
Choose this when you need AI-powered trading capabilities directly through LLM tools and want comprehensive market data for stocks, crypto, and options.
When NOT to choose this
Not suitable for users who need multi-brokerage support or require more sophisticated algorithmic trading tools beyond basic order types.
Tools this server exposes
12 tools extracted from the READMEget_account_infoGet account information, balances, and buying power
get_positionsView current positions in the account
place_orderPlace market, limit, stop, or stop-limit orders
cancel_orderCancel one or more open orders
liquidate_positionClose or liquidate positions
get_crypto_quotesGet current quotes for cryptocurrencies
get_option_chainGet available option contracts for a symbol
get_option_quoteGet latest quote for a specific option contract
place_option_orderPlace orders for option contracts
get_market_statusCheck market status and trading hours
get_watchlistsRetrieve and manage watchlists
get_stock_dataGet historical bars, quotes, and trades for stocks
Comparable tools
Installation
Installation
Prerequisites
- Python 3.10+
- uv
- Alpaca Trading API keys
- MCP client (Claude Desktop, Cursor, VS Code, etc.)
Setup (Claude Desktop)
Edit ~/Library/Application Support/Claude/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"
}
}
}
}Setup (Cursor)
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"
}
}
}
}FAQ
- Is there backward compatibility with v1?
- No, v2 is a complete rewrite with different tool names, parameters, and configuration methods. See the upgrade guide for migration instructions.
- How can I limit which trading tools are available?
- Use the ALPACA_TOOLSETS environment variable to specify which toolsets to enable (e.g., 'stock-data,crypto-data').
On Hacker News
Recent discussion from the developer community.
- Story by growbell_social · 2025-06-06
Compare alpaca-mcp-server with
Last updated · Auto-generated from public README + GitHub signals.