Alpaca
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
What is Alpaca?
Alpaca is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to 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
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
This server falls under the Finance & Fintech category on MCPgee, the world's largest MCP server directory with 33,000+ servers.
Features
- Alpaca’s official MCP Server lets you trade stocks, ETFs, cr
Use Cases
Maintainer
Works with
Installation
Manual Installation
npx alpacaConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
How to Set Up and Use Alpaca
Alpaca's official MCP Server connects AI assistants directly to the Alpaca brokerage API, enabling natural language trading of stocks, ETFs, cryptocurrency, and options as well as real-time and historical market data retrieval, portfolio management, and strategy analysis. It defaults to paper trading mode so you can experiment safely before enabling live trades. Quantitative analysts, algorithmic traders, and developers use it to build and test trading strategies, query option Greeks, set up watchlists, and execute orders entirely from Claude or other LLM interfaces without writing brokerage API code.
Prerequisites
- Python 3.10 or later
- uv package manager (install with `pip install uv` or from https://docs.astral.sh/uv/)
- An Alpaca account with API keys — create a free paper trading account at https://app.alpaca.markets/paper/dashboard/overview
- ALPACA_API_KEY and ALPACA_SECRET_KEY from the Alpaca dashboard
- An MCP client such as Claude Desktop, Claude Code, Cursor, or VS Code
Create an Alpaca account and generate API keys
Sign up for a free paper trading account at alpaca.markets. In the dashboard, navigate to API/OAuth Apps and generate a new key pair. Copy both the API key and secret key.
Test the server with uvx
Run the server once with uvx to confirm it launches correctly before adding it to your client config.
ALPACA_API_KEY=your_key ALPACA_SECRET_KEY=your_secret uvx alpaca-mcp-serverAdd to Claude Desktop configuration
Open ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows) and add the alpaca server block with your credentials.
{
"mcpServers": {
"alpaca": {
"command": "uvx",
"args": ["alpaca-mcp-server"],
"env": {
"ALPACA_API_KEY": "your_api_key",
"ALPACA_SECRET_KEY": "your_secret_key",
"ALPACA_PAPER_TRADE": "true"
}
}
}
}Optional: restrict enabled toolsets
Use ALPACA_TOOLSETS to expose only the tools you need, which reduces the number of tools the AI sees and focuses its capabilities.
{
"mcpServers": {
"alpaca": {
"command": "uvx",
"args": ["alpaca-mcp-server"],
"env": {
"ALPACA_API_KEY": "your_api_key",
"ALPACA_SECRET_KEY": "your_secret_key",
"ALPACA_PAPER_TRADE": "true",
"ALPACA_TOOLSETS": "account,trading,stock-data"
}
}
}
}Restart Claude Desktop and verify connectivity
Fully quit and reopen Claude Desktop. Ask Claude to check your account balance — this confirms the server is running and your API keys are valid.
Enable live trading when ready
Set ALPACA_PAPER_TRADE to false only when you are ready to trade with real money. Ensure you understand the risks and have reviewed all order logic carefully.
Alpaca Examples
Client configuration
claude_desktop_config.json entry for the Alpaca MCP server in paper trading mode with all toolsets enabled.
{
"mcpServers": {
"alpaca": {
"command": "uvx",
"args": ["alpaca-mcp-server"],
"env": {
"ALPACA_API_KEY": "your_api_key",
"ALPACA_SECRET_KEY": "your_secret_key",
"ALPACA_PAPER_TRADE": "true"
}
}
}
}Prompts to try
These prompts map to the account, trading, stock-data, crypto-data, options-data, and news toolsets.
- "What is my current account balance and buying power?"
- "Buy 5 shares of AAPL at market price"
- "Show me TSLA's daily price bars for the last 10 trading days"
- "Place a limit order to buy 10 shares of MSFT at $380"
- "What are my current open positions?"
- "Get the option chain for SPY expiring next Friday and show me the calls near the money"
- "Cancel all my open orders"Troubleshooting Alpaca
Authentication error: 'forbidden' or 403 when starting the server
Verify ALPACA_API_KEY and ALPACA_SECRET_KEY are correct and match the environment you are targeting (paper vs live). Paper trading keys work only against the paper endpoint. Regenerate keys from the Alpaca dashboard if needed.
Tools from a previous V1 installation behave differently or fail
Alpaca MCP V2 is a complete rewrite with incompatible tool names and parameters. Delete the old server entry from your MCP config, add the new uvx alpaca-mcp-server entry, restart your MCP client, and start a fresh conversation session.
uvx: command not found
Install uv first: run `pip install uv` or follow the instructions at https://docs.astral.sh/uv/getting-started/installation/. After installation, confirm with `uvx --version` before retrying.
Frequently Asked Questions about Alpaca
What is Alpaca?
Alpaca is a Model Context Protocol (MCP) server that 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 It connects AI assistants to external tools and data sources through a standardized interface.
How do I install Alpaca?
Follow the installation instructions on the Alpaca GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.
Which AI clients work with Alpaca?
Alpaca works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.
Is Alpaca free to use?
Yes, Alpaca is open source and available under the MIT License license. You can use it freely in both personal and commercial projects.
Alpaca Alternatives — Similar Finance & Fintech Servers
Looking for alternatives to Alpaca? Here are other popular finance & fintech servers you can use with Claude, Cursor, and VS Code.
ValueCell
★ 10.7kValueCell is a community-driven, multi-agent platform for financial applications.
Vibe Trading
★ 8.1k'Vibe-Trading: Your Personal Trading Agent'
Quantdinger
★ 6.2kAI quantitative trading platform for crypto, stocks, and forex with backtesting, live trading, market data, and multi-agent research.vibe-trading ,trading-agents,ai-trader,ai-trading
TradingView
★ 2.8kReal-time crypto & stock screening, advanced technical indicators, Bollinger Bands intelligence, candlestick patterns + native Claude Desktop integration. Multi-exchange (Binance, KuCoin, Bybit+). Open-source AI trading infrastructure.
Financial Datasets
★ 2.1kProvides access to comprehensive financial data including income statements, balance sheets, cash flow statements, stock prices, company news, SEC filings, and cryptocurrency information with built-in financial ratio analysis.
Stripe
★ 1.6kThe Stripe Model Context Protocol server allows you to integrate with Stripe APIs through function calling. This protocol supports various tools to interact with different Stripe services.
Browse More Finance & Fintech MCP Servers
Explore all finance & fintech servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.
Set Up Alpaca in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
Ready to use Alpaca?
Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.