Alpaca Official MCP Server Evaluation¶
Created: 2025-11-29 Status: EVALUATION COMPLETE Decision: WAIT AND EVALUATE - No immediate action needed
Executive Summary¶
Alpaca Markets released an official MCP server (alpacahq/alpaca-mcp-server) that enables natural language trading through Claude Code, Cursor, and other MCP clients. This document evaluates whether to adopt it vs. maintaining our current custom implementation.
Recommendation: Keep current implementation for stocks, evaluate Alpaca MCP for options/crypto expansion.
1. Alpaca MCP Server Overview¶
Official Repository¶
- GitHub: https://github.com/alpacahq/alpaca-mcp-server
- Stars: 365+ (as of Nov 2025)
- License: MIT
- Maintained by: Alpaca Markets (official)
Installation¶
# One-command install
uvx alpaca-mcp-server init
# Claude Code integration
claude mcp add alpaca --scope user --transport stdio uvx alpaca-mcp-server serve \
--env ALPACA_API_KEY=your_key \
--env ALPACA_SECRET_KEY=your_secret
Features (43 Tools)¶
| Category | Tools |
|---|---|
| Account | get_account_info, get_all_positions, get_open_position |
| Orders | place_stock_order, place_crypto_order, place_option_market_order, cancel_order, get_orders |
| Market Data | get_stock_bars, get_stock_quotes, get_stock_latest_quote, get_stock_snapshot |
| Options | get_option_contracts, get_option_latest_quote, get_option_snapshot, exercise_options_position |
| Crypto | get_crypto_bars, get_crypto_quotes, get_crypto_latest_quote, get_crypto_snapshot |
| Portfolio | get_portfolio_history, close_position, close_all_positions |
| Market Info | get_calendar, get_clock, get_corporate_actions |
| Watchlists | create_watchlist, get_watchlists, update_watchlist, delete_watchlist |
2. Current Implementation Comparison¶
Your Tools (Custom)¶
| File | Lines | Purpose |
|---|---|---|
tools/portfolio_fetcher.py |
~200 | Fetch positions from Alpaca + Schwab |
tools/alpaca_mcp_server.py |
~300 | FastMCP wrapper for Alpaca API |
tools/execute_alpaca_live.py |
~150 | Order execution scripts |
unified_api/services.py |
596 | TradingService (simulated) |
trading_agents/ |
~2000 | Multi-strategy automation |
Total custom trading code: ~3,200 lines
Feature Comparison¶
| Feature | Your Implementation | Alpaca MCP |
|---|---|---|
| Stock Trading | ✅ Full (market, limit, stop) | ✅ Full (+ trailing stop) |
| Options Trading | ❌ Not implemented | ✅ Full (single + multi-leg) |
| Crypto Trading | ❌ Not implemented | ✅ Full (market, limit, stop-limit) |
| Fractional Shares | ❌ Not implemented | ✅ Supported |
| Historical Data | ✅ Basic (via yfinance) | ✅ Full (bars, quotes, trades) |
| Real-time Quotes | ❌ Limited | ✅ Full (snapshot, latest) |
| Portfolio History | ❌ Manual tracking | ✅ Built-in |
| Corporate Actions | ❌ Not implemented | ✅ Dividends, splits, earnings |
| Schwab Support | ✅ Yes | ❌ No (Alpaca only) |
| Paper-First Rule | ✅ Enforced | 🟡 Manual (env var) |
| Risk Management | ✅ Custom (stop losses, position sizing) | ❌ Manual |
| Memory Integration | ✅ Full (Qdrant, lessons, decisions) | ❌ None |
| Multi-Strategy | ✅ Full (3 active strategies) | ❌ None |
3. Integration Architecture¶
Option A: Full Replacement (NOT RECOMMENDED)¶
Pros: - Less code to maintain - Official support from Alpaca - Options + crypto immediately available
Cons: - Lose Schwab integration - Lose risk management enforcement - Lose memory system integration - Trading logic moves to prompts (less auditable)
Option B: Hybrid (RECOMMENDED for Future)¶
Claude Code → Your Trading Agents → Alpaca MCP (for options/crypto)
→ Current API (for stocks + Schwab)
Pros: - Keep existing stock trading infrastructure - Add options/crypto via Alpaca MCP - Maintain risk management and paper-first rules - Keep memory integration
Cons: - Two systems to manage - More complexity
Option C: Keep Current (RECOMMENDED Now)¶
Current: Claude Code → tools/portfolio_fetcher.py → Alpaca REST API
→ trading_agents/ → Custom automation
Pros: - Already working for stocks - Full control over risk management - Memory system integration - Schwab support
Cons: - No options/crypto support - Manual historical data management
4. Decision Matrix¶
| Factor | Weight | Current | Alpaca MCP | Winner |
|---|---|---|---|---|
| Stock trading | 30% | 9/10 | 9/10 | Tie |
| Options support | 15% | 0/10 | 10/10 | Alpaca MCP |
| Crypto support | 10% | 0/10 | 10/10 | Alpaca MCP |
| Risk management | 20% | 10/10 | 2/10 | Current |
| Memory integration | 15% | 10/10 | 0/10 | Current |
| Multi-broker (Schwab) | 10% | 10/10 | 0/10 | Current |
Weighted Score: - Current: 7.7/10 - Alpaca MCP: 5.8/10
Winner for now: Keep current implementation
5. When to Revisit¶
Trigger: Options Strategy (Week 3 Roadmap)¶
If implementing options trading becomes a priority: 1. Evaluate Alpaca MCP for options-only integration 2. Keep current stock trading infrastructure 3. Add Alpaca MCP as second MCP server
Trigger: Crypto Strategy (Week 4 Roadmap)¶
If implementing crypto trading becomes a priority: 1. Same hybrid approach as options 2. Alpaca MCP handles crypto execution 3. Your agents handle strategy logic
Not Recommended¶
- Full replacement of current system
- Abandoning Schwab integration
- Moving risk management to prompts
6. Quick Reference: Alpaca MCP Setup (If Needed Later)¶
Claude Code Integration¶
# Install
uvx alpaca-mcp-server init
# Add to Claude Code
claude mcp add alpaca --scope user --transport stdio uvx alpaca-mcp-server serve \
--env ALPACA_API_KEY=$ALPACA_PAPER_API_KEY \
--env ALPACA_SECRET_KEY=$ALPACA_PAPER_SECRET_KEY
Manual Config (~/.claude/settings.json)¶
{
"mcpServers": {
"alpaca": {
"command": "uvx",
"args": ["alpaca-mcp-server", "serve"],
"env": {
"ALPACA_API_KEY": "your_key",
"ALPACA_SECRET_KEY": "your_secret"
}
}
}
}
Example Natural Language Commands¶
"What's my current account balance?"
"Buy 5 shares of AAPL at market"
"Show me TSLA option contracts expiring next month"
"Place a bull call spread on SPY"
"Get my portfolio history for the last week"
7. Sources¶
- Alpaca MCP Server GitHub
- Alpaca MCP Documentation
- MCP Trading Workflow Guide
- Alpaca MCP Server Landing Page
8. Appendix: Tool List Comparison¶
Alpaca MCP Tools (43 total)¶
Account & Positions (3) - get_account_info - get_all_positions - get_open_position
Assets (2) - get_asset - get_all_assets
Corporate Actions (1) - get_corporate_actions
Portfolio (1) - get_portfolio_history
Watchlists (6) - create_watchlist - get_watchlists - update_watchlist_by_id - get_watchlist_by_id - add_asset_to_watchlist_by_id - remove_asset_from_watchlist_by_id - delete_watchlist_by_id
Market Calendar & Clock (2) - get_calendar - get_clock
Stock Market Data (7) - get_stock_bars - get_stock_quotes - get_stock_trades - get_stock_latest_bar - get_stock_latest_quote - get_stock_latest_trade - get_stock_snapshot
Crypto Market Data (8) - get_crypto_bars - get_crypto_quotes - get_crypto_trades - get_crypto_latest_quote - get_crypto_latest_bar - get_crypto_latest_trade - get_crypto_snapshot - get_crypto_latest_orderbook
Options Market Data (3) - get_option_contracts - get_option_latest_quote - get_option_snapshot
Trading Orders (3) - get_orders - place_stock_order - place_crypto_order - place_option_market_order
Position Management (4) - cancel_all_orders - cancel_order_by_id - close_position - close_all_positions - exercise_options_position
Your Current Tools¶
portfolio_fetcher.py - fetch_alpaca_portfolio(use_paper) - fetch_schwab_portfolio() - get_all_positions() - get_account_summary()
alpaca_mcp_server.py (FastMCP) - get_account() - get_positions() - place_market_order() - place_limit_order() - cancel_order()
trading_agents/ - MicroCapMomentum agent - RSIOversold agent - FinancialServicesScorer agent
Last Updated: 2025-11-29 Next Review: When options/crypto strategy becomes priority