Alpaca MCP Server
by MCP-Mirror
The Alpaca MCP Server allows Large Language Models like Claude to interact with the Alpaca trading API. It enables trading stocks, checking positions, and fetching market data through natural language.
Last updated: N/A
What is Alpaca MCP Server?
This is a Model Context Protocol (MCP) server designed to interface with the Alpaca trading API. It allows users to manage their Alpaca trading account and execute trades using natural language commands through LLMs like Claude.
How to use Alpaca MCP Server?
First, clone the repository and install the required Python packages. Then, configure your Alpaca API keys in a .env
file. Start the server using python alpaca_mcp_server.py
. Finally, configure your MCP client (e.g., Claude for Desktop) to connect to the server by providing the server's command and environment variables.
Key features of Alpaca MCP Server
Access Alpaca SDK documentation
Get real-time stock quotes and historical price data
Check account balances, buying power, and status
View current positions and their performance
Place market and limit orders through natural language
List, track, and cancel orders
Use cases of Alpaca MCP Server
Trading stocks using natural language commands
Automated portfolio management through LLM integration
Fetching real-time market data and account information
Integrating trading functionalities into conversational AI applications
FAQ from Alpaca MCP Server
What is an MCP server?
What is an MCP server?
An MCP (Model Context Protocol) server acts as a bridge between a Large Language Model (LLM) and external tools or APIs.
What API keys do I need?
What API keys do I need?
You need Alpaca API keys (API_KEY_ID and API_SECRET_KEY) to connect to your Alpaca trading account.
How do I configure Claude for Desktop?
How do I configure Claude for Desktop?
You need to edit the claude_desktop_config.json
file and add the server configuration, including the command to run the server and the necessary environment variables.
Does this server use real money?
Does this server use real money?
By default, the server uses Alpaca's paper trading environment. To use real money trading, you need to change paper=True
to paper=False
in the TradingClient
initialization.
Is this server secure?
Is this server secure?
This MCP server will have access to your Alpaca account and can place real trades. Always review what Claude is suggesting before approving any trades.