npx skills add ...
npx skills add reason-machines/mcp-skills --skill alpaca-mcp-server-trading
Use Alpaca's MCP server to trade stocks, ETFs, crypto, and options through natural language in your IDE or AI assistant.
npx skills add reason-machines/mcp-skills --skill alpaca-mcp-server-trading
Skill by ara.so — MCP Skills collection.
Alpaca MCP Server is an official Model Context Protocol server that enables AI assistants to trade stocks, ETFs, crypto, and options through natural language. Built with FastMCP and OpenAPI, it exposes Alpaca's Trading API as MCP tools in Claude Desktop, Cursor, VS Code, PyCharm, and other MCP clients.
Key capabilities:
Edit ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):
Restart Claude Desktop.
Add to ~/.cursor/mcp.json:
Restart Cursor.
Create .vscode/mcp.json in your project:
Reload window.
uvxalpaca-mcp-serverAdd to MCP client config:
All configuration is via environment variables in your MCP client config:
| Variable | Required | Default | Description |
|---|---|---|---|
ALPACA_API_KEY | Yes | — | Alpaca API key |
ALPACA_SECRET_KEY | Yes | — | Alpaca secret key |
ALPACA_PAPER_TRADE | No | true | Set to false for live trading |
ALPACA_TOOLSETS | No | all | Comma-separated toolsets to enable |
⚠️ WARNING: Live trading uses real money. Test thoroughly in paper trading first.
Update env vars in your MCP client config:
Restart your MCP client.
Limit the server to specific capabilities by setting ALPACA_TOOLSETS:
Available toolsets:
account — Account info, balances, portfolio historytrading — Orders, positions, option exerciseswatchlists — Watchlist managementassets — Asset lookup, option contracts, market calendarstock-data — Stock bars, quotes, trades, snapshots, screenerscrypto-data — Crypto bars, quotes, trades, orderbooksoptions-data — Option bars, quotes, Greeks, chain datacorporate-actions — Corporate action announcementsnews — News articles for stocks and cryptoNatural language prompts that work:
The AI will use tools like get_account_info and get_portfolio_history.
Market order:
Limit order:
Stop-loss:
Bracket order:
Find contracts:
Place option trade:
Multi-leg strategy:
Real-time quote:
Historical bars:
Snapshot:
Option chain:
While the MCP server is designed for natural language use, you can also use the Alpaca Python SDK directly:
For market data:
uvx alpaca-mcp-server --help in terminal to verify installationSolution:
ALPACA_API_KEY and ALPACA_SECRET_KEY are set correctlyALPACA_PAPER_TRADE=true or live keys with falseSolution:
ALPACA_PAPER_TRADE=false in env varsIf certain tools are missing (e.g., options tools):
Solution:
ALPACA_TOOLSETS to include the toolset you needSolution:
Solution:
Solution:
If you used alpaca-mcp-server V1:
.env files or init commands from V1 setupuvx alpaca-mcp-server==1.x.x serve in configSolution:
docker psThe MCP server exposes tools dynamically — test by asking your AI assistant:
Or verify directly with the MCP inspector (if your client supports it).
For paper trading, you can freely test all operations without risk. Recommended test flow:
This is a trading platform. Use paper trading for testing. Live trading involves real money and risk of loss. Past performance does not guarantee future results. Alpaca Securities LLC is a member of FINRA/SIPC. See alpaca.markets/disclosures for important disclosures.
{
"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"
}
}
}
}
}