Alpaca Trading Bot 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 Trading Bot MCP Serverplace a market order to buy 10 shares of AAPL"
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 Trading Bot (MCP Server)
An MCP server exposing Alpaca paper trading as tools for Claude (or any MCP client): check quotes, manage a watchlist, check market hours, and place simulated trades. No real money is ever at risk — paper=True is hardcoded in trading_mcp_server.py.
Setup
python -m venv .venv
.venv/Scripts/activate # or source .venv/bin/activate on macOS/Linux
pip install -r requirements.txt
cp .env.example .env # then fill in your Alpaca paper trading keysGet paper trading API keys from the Alpaca dashboard (alpaca.markets) — sign up, then generate a key under the Paper Trading section (not Live).
Related MCP server: Alpaca MCP Server
Running
python trading_mcp_server.pyThis runs as a stdio MCP server. To register it with Claude Code:
claude mcp add alpaca-trading -- python /full/path/to/trading_mcp_server.pyTools
get_account— cash, buying power, portfolio valueget_quotes(symbols?)— latest bid/ask for given tickers, or the whole watchlist if omittedget_watchlist/add_to_watchlist(symbol)/remove_from_watchlist(symbol)— managewatchlist.jsonis_market_open— checks Alpaca's trading calendar (accounts for weekends + market holidays)list_positions— current open positionsplace_order(symbol, qty, side)— market order, paper trading onlylist_orders— recent order history
Watchlist
watchlist.json seeds the top 25 QQQM (Nasdaq-100) holdings by weight, verified via stockanalysis.com. Edit the file directly, or use the add_to_watchlist / remove_from_watchlist tools.
Not yet built
Scheduled runs (e.g. every 30 minutes during market hours): the MCP server itself only responds to on-demand tool calls — it does not self-schedule. Options discussed but not decided: a local script + Task Scheduler/cron, or an Azure Function with a timer trigger (Azure Functions has GA support for MCP tool triggers as of Build 2026 — see
functions-bindings-mcp-tool-triggerdocs).is_market_openis the building block for whichever scheduler wraps it.Autonomous vs. approval-gated trading: not yet decided whether the AI should place orders on its own or require confirmation each time.
This server cannot be deployed
Maintenance
Related MCP Connectors
- FensoryOAuthcom.fensory
Trading MCP server for AI agents, with live market data, account reads and controlled execution.
Market Data App MCP — wraps the Market Data App API (marketdata.app)
Alpaca MCP — real-time US stock market data via the Alpaca Market Data API
Finnhub MCP — wraps Finnhub Stock API (finnhub.io)
Related MCP Servers
- AlicenseDqualityDmaintenanceMCP server that exposes Alpaca Market Data & Broker API as tools, enabling access to financial data like stock bars, assets, market days, and news through the Message Control Protocol.465 npm2ISC
- AlicenseNot gradedqualityDmaintenanceProvides tools for interacting with the Alpaca Trading API, enabling trading operations like getting account information, placing/canceling orders, listing positions, and accessing market data.MIT
- AlicenseAqualityDmaintenanceEnables querying stock data, financial information, news, and historical prices from Yahoo Finance through a set of MCP tools.5MIT
- AlicenseNot gradedqualityBmaintenanceExposes Trading 212 trading account, instruments, orders, history, and pies as MCP tools. Allows placing and canceling real orders (defaults to demo/paper environment).Apache 2.0