Alpaca MCP Server
@jwaresolutions
关于 Alpaca MCP Server
暂无概览
基本信息
配置
使用下面的配置,将此服务器添加到你的 MCP 客户端。
{
"mcpServers": {
"alpaca": {
"command": "node",
"args": [
"/path/to/alpaca-server/build/index.js"
],
"env": {
"ALPACA_API_KEY": "",
"ALPACA_SECRET_KEY": "",
"ALPACA_BASE_URL": ""
}
}
}
}工具
未检测到工具
工具是从 README 中自动提取的。维护者可以在 ## Tools 标题下列出工具,即可填充这部分内容。
概览
What is Alpaca MCP Server?
Alpaca MCP Server is a Model Context Protocol (MCP) server that provides seamless integration between the Alpaca Trading API and AI assistants or development tools. It allows users to manage trading accounts, view positions, get market data, and handle orders through MCP-compatible interfaces like Claude Desktop or Cline/Claude Dev Tools.
How to use Alpaca MCP Server?
Install the alpaca-trade-api Python package, clone the repository, and set environment variables for your Alpaca API credentials (APCA_API_KEY_ID, APCA_API_SECRET_KEY, APCA_API_BASE_URL). Configure the MCP client (e.g., Cline or Claude Desktop) by adding a JSON entry pointing to the alpaca_mcp_server.py script with the required environment variables. Run the server with python alpaca_mcp_server.py to make tools available.
Key features of Alpaca MCP Server
- Real-time account details, buying power, equity, and status
- Portfolio management with position-level P&L tracking
- Live stock quotes showing bid/ask prices and spreads
- Order listing with status, type, and fill details
- Built-in paper trading support for safe testing
- Compatible with live trading (use with caution)
Use cases of Alpaca MCP Server
- AI-assisted portfolio review and account status checks
- Automated market data retrieval for analysis
- Monitoring open and recent orders through natural language
- Paper trading strategy tests before going live
FAQ from Alpaca MCP Server
What API credentials are needed?
You need an Alpaca API Key ID and Secret Key, plus a base URL for either paper trading (https://paper-api.alpaca.markets) or live trading (https://api.alpaca.markets). These are set as environment variables.
How do I switch between paper and live trading?
Change the APCA_API_BASE_URL environment variable: use https://paper-api.alpaca.markets for paper trading or https://api.alpaca.markets for live trading. The server defaults to paper trading for safety.
What tools are provided?
Four tools: get_account (account details), get_positions (current holdings with P&L), get_quote (real-time quote for a symbol), and get_orders (list recent orders with optional status/limit filters). All are listed by calling tools/list.
What are the known transport or authentication methods?
The server uses environment variables for authentication (APCA_API_KEY_ID, APCA_API_SECRET_KEY). Communication follows the MCP protocol over standard input/output; tested on Apple Silicon M1 Pro laptops running macOS.
How do I troubleshoot common issues?
Ensure environment variable names match exactly (APCA_API_KEY_ID, APCA_API_SECRET_KEY, APCA_API_BASE_URL). Verify internet connectivity and valid API keys. Install dependencies with pip install alpaca-trade-api. Test manually using JSON-RPC: echo '{"jsonrpc":"2.0","id":1,"method":"tools/list"}' | python alpaca_mcp_server.py.
其他 分类下的更多 MCP 服务器
Servers
modelcontextprotocolModel Context Protocol Servers
FastMCP v2 🚀
jlowin🚀 The fast, Pythonic way to build MCP servers and clients.
Core Philosophy: Connect, Unify, Respond
mindsdbDelegate anything. It comes back done.
Blender
ahujasidOpen-source MCP to use Blender with any LLM
Awesome Mlops
visengerA curated list of references for MLOps
评论