Alpaca Trading MCP Server
MCP server interface for real-time stock and crypto trading via Alpaca.
Key Features
Use Cases
README
Alpaca Trading MCP Server
A Model Context Protocol (MCP) server that provides an interface to the Alpaca trading API, allowing you to manage your stock and crypto portfolio, place trades, and access market data.
Features
- Account Management: View account details, balances, and portfolio status
- Trading: Place market, limit, stop, and stop-limit orders
- Portfolio Management: View positions, calculate performance, and close positions
- Market Data: Access real-time quotes and historical price data
- Asset Information: Get details about tradable assets
Installation
Installing via Smithery
To install Alpaca Trading MCP Server for Claude Desktop automatically via Smithery:
npx -y @smithery/cli install @laukikk/alpaca-mcp --client claude
Manual Installation
- Clone this repository
- Install dependencies:
pip install -e .
Or using uv:
uv pip install -e .
Configuration
- Copy the
.env.examplefile to.env:
cp .env.example .env
- Add your Alpaca Paper Trading API credentials to the
.envfile:
ALPACA_PAPER_API_KEY = "your-api-key"
ALPACA_PAPER_API_SECRET = "your-api-secret"
You can obtain these credentials by creating an account at Alpaca.
Usage
Run the MCP server:
python src/server.py
The server will start and be available for MCP clients to connect to.
Testing with Claude for Desktop
Configuration:
Open your Claude for Desktop App configuration in a text editor. Create the file if it doesn't exist.
- Windows:
%APPDATA%\Claude\claude_desktop_config.json - Mac:
~/Library/Application\ Support/Claude/claude_desktop_config.json
Add the Alpaca MCP server configuration:
{
"mcpServers": {
"alpaca": {
"command": "uv",
"args": [
"--directory",
"/ABSOLUTE/PATH/TO/PARENT/FOLDER/alpaca-mcp-server",
"run",
"src/server.py"
]
}
}
}
MCP For Server Developers: Quickstart
Available Resources
The server provides the following resources:
account://info- Get current account informationpositions://all- Get all current positionspositions://{symbol}- Get position details for a specific symbolorders://recent/{limit}- Get most recent orders with specified limitmarket://{symbol}/quote- Get current market quote for a specific symbolmarket://{symbol}/bars/{timeframe}- Get historical price bars for a symbol with specified timeframeassets://list- List tradable assets available on Alpacaassets://{symbol}- Get detailed asset information by symbol
Available Tools
The server provides the following tools:
get_account_info_tool- Get current account informationplace_market_order- Place a market order to buy or sell a stockplace_limit_order- Place a limit order to buy or sell a stock at a specified priceplace_stop_order- Place a stop order to buy or sell a stock when it reaches a specified priceplace_stop_limit_order- Place a stop-limit order combining stop and limit order featurescancel_order- Cancel an open order by its IDclose_position- Close an open position for a specific symbolget_portfolio_summary- Get a comprehensive summary of the portfolio
Star History
Repository Owner
User
Repository Details
Programming Languages
Tags
Join Our Newsletter
Stay updated with the latest AI tools, news, and offers by subscribing to our weekly newsletter.
Related MCPs
Discover similar Model Context Protocol servers
QuantConnect MCP Server
Official bridge for secure AI access to QuantConnect's algorithmic trading cloud platform
QuantConnect MCP Server enables artificial intelligence systems such as Claude and OpenAI to interface with QuantConnect's cloud platform through an official, secure, and dockerized implementation of the Model Context Protocol (MCP). It facilitates automated project management, strategy writing, backtesting, and live deployment by exposing a comprehensive suite of API tools for users with valid access credentials. As the maintained official version, it ensures security, easy deployment, and cross-platform compatibility for advanced algorithmic trading automation.
- ⭐ 50
- MCP
- QuantConnect/mcp-server
Coincap MCP
Query live cryptocurrency data through Coincap's public API for desktop AI tools.
Coincap MCP provides seamless access to cryptocurrency market data from Coincap's public API without requiring API keys or registration. Designed to integrate with Claude Desktop using the Model Context Protocol (MCP), it enables users to query crypto asset prices, market capitalization, and a list of available assets. Installation and configuration are streamlined through Smithery or direct setup. The tool includes sample prompts and exposes specialized tools for crypto price lookup and asset listing.
- ⭐ 89
- MCP
- QuantGeekDev/coincap-mcp
Twelve Data MCP Server
Seamless AI-powered access to financial market data via the Twelve Data API.
Twelve Data MCP Server provides a Model Context Protocol-compliant server for integrating and accessing Twelve Data’s financial market API. It enables users and AI agents to retrieve historical data, real-time quotes, and instrument metadata for stocks, forex, and crypto using natural language or endpoint calls. The system leverages AI-driven routing, including OpenAI GPT-4o, to intelligently map plain English queries to relevant API endpoints for structured or conversational workflows. Integration options are available for platforms like Claude Desktop and VS Code, with flexible local or remote deployment.
- ⭐ 43
- MCP
- twelvedata/mcp
mcp-server-ledger
Model Context Protocol server for interacting with Ledger CLI via AI assistants.
mcp-server-ledger provides a standardized Model Context Protocol interface for the Ledger CLI, enabling AI-driven querying and analysis of double-entry accounting data. It exposes key Ledger CLI commands as tools accessible by Large Language Models for financial reporting, budget analysis, and account management. It supports deployment via Docker, Smithery, or 'uv', and requires a valid ledger file and appropriate environment setup.
- ⭐ 35
- MCP
- minhyeoky/mcp-server-ledger
Bitcoin MCP Server
Real-time Bitcoin blockchain data server for MCP clients.
Provides tools to deliver real-time Bitcoin blockchain data for use with Model Context Protocol (MCP) clients. Offers specialized endpoints for querying blockchain addresses, transactions, UTXOs, and block information by interfacing with the mempool.space API. Supports easy installation and integration with popular MCP clients, enabling seamless access to blockchain analytics.
- ⭐ 0
- MCP
- JamesANZ/bitcoin-mcp
Bitcoin & Lightning Network MCP Server
Enable AI models to safely interact with Bitcoin and Lightning Network in a standardized way.
The Bitcoin & Lightning Network MCP Server implements the Model Context Protocol, allowing AI models to interface with Bitcoin and Lightning Network functionalities such as key generation, address validation, transaction decoding, blockchain queries, and lightning payments. It provides standardized endpoints for AI model integration, including support for Claude Desktop and Goose. The solution supports querying blockchain data, parsing transactions and invoices, and managing cryptographic operations in a secure and extensible manner.
- ⭐ 65
- MCP
- AbdelStark/bitcoin-mcp
Didn't find tool you were looking for?