Alpaca API MCP Server
This MCP server provides an interface to the Alpaca trading API allowing you to trade stock, place trades, and access market information. Here is a list of “tools” it uses:
get-alpaca-account: Fetches your Alpaca account details.
alpaca-createOrder: Places a new order on Alpaca (buy/sell).
alpaca-getOrder: Retrieves a single order by its ID.
alpaca-getOrders: Lists orders with optional filters (status, limit, direction).
alpaca-replaceOrder: Modifies an existing order’s quantity or limit price.
alpaca-cancelOrder: Cancels a specific order by ID.
alpaca-cancelOrders: Cancels all open orders at once.
alpaca-getPosition: Retrieves details for a specific position.
alpaca-getPositions: Lists all current positions in your account.
alpaca-closePosition: Closes a specific position by symbol or asset ID.
alpaca-closePositions: Closes all open positions.
alpaca-exerciseOption: Exercises a specified option contract.
alpaca-getWatchlist: Retrieves a single watchlist by ID.
alpaca-getWatchlists: Lists all your watchlists.
alpaca-createWatchlist: Creates a new watchlist with given symbols.
alpaca-updateWatchlist: Updates an existing watchlist’s name and symbols.
alpaca-deleteWatchlist: Deletes a watchlist by ID.
alpaca-getPortfolioHistory: Fetches historical portfolio performance data.
alpaca-getActivity: Retrieves a specific account activity record.
alpaca-getActivities: Lists all account activity records.
alpaca-getOptionsContract: Retrieves details for one options contract.
alpaca-getOptionsContracts: Lists options contracts with filters.
alpaca-getCorporateAction: Retrieves a specific corporate action event.
alpaca-getCorporateActions: Lists corporate actions within a date range.
alpaca-getStocksCorporateActions: Lists corporate actions for stocks.
alpaca-getNews: Fetches news articles for specified symbols.
alpaca-getStocksMostActives: Lists the most active stocks by volume or change.
alpaca-getStocksMarketMovers: Lists top market movers by volume or change.
alpaca-getStocksQuotes: Retrieves quotes for specified symbols.
alpaca-getStocksQuotesLatest: Retrieves the latest quotes for symbols.
alpaca-getStocksSnapshots: Fetches snapshot data for symbols.
alpaca-getStocksConditions: Retrieves tick condition codes for trades or quotes.
alpaca-getStocksExchangeCodes: Lists available stock exchange codes.
alpaca-getStocksTrades: Retrieves trade data for specified symbols.
alpaca-getStocksTradesLatest: Retrieves the latest trade data for symbols.
Installation
- Clone this repo
- Install once using
npm install- Reads the
package.jsonandpackage-lock.jsonto install dependencies
- Reads the
- For Development:
npm run dev - To ship
npm run build- will execute the build script in the
package.json
- will execute the build script in the
npm start- launches the development server on Node.js backend
Connecting to Claude Desktop App
After running npm run build to build your server, you can test your MCP server using Claude as the client.
After installing Claude for Desktop, the App configuration sits in ~/Library/Application Support/Claude/claude_desktop_config.json. You can use the command
code ~/Library/Application Support/Claude/claude_desktop_config.json to open this file.
Now, you want to add the following to this json file for your MCP server.
{
"mcpServers": {
"alpaca": {
"command": "node",
"args": [
"/ABSOLUTE/PATH/TO/PARENT/FOLDER/alpaca/build/index.js"
]
}
}
}
Save the file and restart Claude for Desktop. Once you launch you should see the hammer logo with your preloaded MCP toolkit/functions. Enjoy Trading!
Contributions
Contributions are welcome! Please fork this repository, make your changes, and open a pull request.
License
This project is licensed under the MIT License.
Contact
For issues, questions, and suggestions, create an issue in the repository or contact the maintainers through GitHub.
Alpaca Trading Integration
Project Details
- wlu03/ALPACA-MCP
- Last Updated: 5/14/2025
Recomended MCP Servers
JLCPCB PCBA向けの、部品探しを補助するためのMCPサーバー
mcp-suiteg
Model Context Protocol server for generating QR codes
Integrate Arduino-based robotics (using the NodeMCU ESP32 or Arduino Nano 368 board) with AI using the MCP (Model...
MCP server for Mixpanel Analytics integration with AI assistants. Enables Claude and other MCP clients to track events,...
Stdio MCP Server wrapping custom Python runtime (LocalPythonExecutor) from Hugging Faces' `smolagents` framework. The runtime combines the ease...
A Model Context Protocol (MCP) server for research and documentation assistance using Perplexity AI. Won 1st @ Cline...
Allow AI to wade through complex OpenAPIs using Simple Language





