AI Skill Hub 强烈推荐:阿尔帕卡MCP服务器 是一款优质的MCP工具。AI 综合评分 8.0 分,在同类工具中表现稳健。如果你正在寻找可靠的MCP工具解决方案,这是一个值得深入了解的选择。
阿尔帕卡MCP服务器 是一款遵循 MCP(Model Context Protocol)标准协议的 AI 工具扩展。通过 MCP 协议,它可以让 Claude、Cursor 等主流 AI 客户端直接访问和操作外部工具、数据源和服务,实现 AI 能力的无缝扩展。无论是文件操作、数据库查询还是 API 调用,都可以通过自然语言在 AI 对话中直接触发,极大提升生产效率。
阿尔帕卡MCP服务器 是一款遵循 MCP(Model Context Protocol)标准协议的 AI 工具扩展。通过 MCP 协议,它可以让 Claude、Cursor 等主流 AI 客户端直接访问和操作外部工具、数据源和服务,实现 AI 能力的无缝扩展。无论是文件操作、数据库查询还是 API 调用,都可以通过自然语言在 AI 对话中直接触发,极大提升生产效率。
# 方式一:通过 Claude Code CLI 一键安装
claude skill install https://github.com/alpacahq/alpaca-mcp-server
# 方式二:手动配置 claude_desktop_config.json
{
"mcpServers": {
"----mcp---": {
"command": "npx",
"args": ["-y", "alpaca-mcp-server"]
}
}
}
# 配置文件位置
# macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
# Windows: %APPDATA%/Claude/claude_desktop_config.json
# 安装后在 Claude 对话中直接使用 # 示例: 用户: 请帮我用 阿尔帕卡MCP服务器 执行以下任务... Claude: [自动调用 阿尔帕卡MCP服务器 MCP 工具处理请求] # 查看可用工具列表 # 在 Claude 中输入:"列出所有可用的 MCP 工具"
// claude_desktop_config.json 配置示例
{
"mcpServers": {
"____mcp___": {
"command": "npx",
"args": ["-y", "alpaca-mcp-server"],
"env": {
// "API_KEY": "your-api-key-here"
}
}
}
}
// 保存后重启 Claude Desktop 生效
<p align="center"> <img src="https://raw.githubusercontent.com/alpacahq/alpaca-mcp-server/main/assets/01-primary-alpaca-logo.png" alt="Alpaca logo" width="220"> </p>
<a href="https://x.com/alpacahq?lang=en" target="_blank"><img src="https://img.shields.io/badge/X-DCDCDC?logo=x&logoColor=000" alt="X"></a> <a href="https://www.reddit.com/r/alpacamarkets/" target="_blank"><img src="https://img.shields.io/badge/Reddit-DCDCDC?logo=reddit&logoColor=000" alt="Reddit"></a> <a href="https://alpaca.markets/slack" target="_blank"><img src="https://img.shields.io/badge/Slack-DCDCDC?logo=slack&logoColor=000" alt="Slack"></a> <a href="https://www.linkedin.com/company/alpacamarkets/" target="_blank"><img src="https://img.shields.io/badge/LinkedIn-DCDCDC" alt="LinkedIn"></a> <a href="https://forum.alpaca.markets/" target="_blank"><img src="https://img.shields.io/badge/Forum-DCDCDC?logo=discourse&logoColor=000" alt="Forum"></a> <a href="https://docs.alpaca.markets/docs/getting-started" target="_blank"><img src="https://img.shields.io/badge/Docs-DCDCDC" alt="Docs"></a> <a href="https://alpaca.markets/sdks/python/" target="_blank"><img src="https://img.shields.io/badge/Python_SDK-DCDCDC?logo=python&logoColor=000" alt="Python SDK"></a>
</div>
<p align="center"> A comprehensive Model Context Protocol (MCP) server for Alpaca's Trading API. Enable natural language trading operations through AI assistants like Claude, Cursor, and VS Code. Supports stocks, options, crypto, portfolio management, and real-time market data. </p>
Alpaca MCP Server v2 is here. This version is a complete rewrite built with FastMCP and OpenAPI. If you're upgrading from v1, please read the Upgrade Guide — tool names, parameters, and configuration have changed.
ALPACA_API_KEY=... ALPACA_SECRET_KEY=... pytest tests/ -m integration -v
ALPACA_RUN_README_INTEGRATION=true pytest tests/test_readme_integration.py -v ```
Add the server to your MCP client config, then restart the client. No init command, no .env files — credentials are set in one place only.
git clone https://github.com/alpacahq/alpaca-mcp-server.git
cd alpaca-mcp-server
docker build -t mcp/alpaca:latest .
Add to your MCP client config:
{
"mcpServers": {
"alpaca": {
"command": "docker",
"args": [
"run", "--rm", "-i",
"-e", "ALPACA_API_KEY=your_key",
"-e", "ALPACA_SECRET_KEY=your_secret",
"-e", "ALPACA_PAPER_TRADE=true",
"mcp/alpaca:latest"
]
}
}
}
MCP clients discover tools dynamically from the server. There is no config file where you "whitelist" tool names — the client gets whatever tools the server exposes. To avoid your client or AI assistant using V2 incorrectly:
.env or init-based setup.get_account_info"), update them to match V2 tool names or remove those references and let the LLM discover tools from context.ALPACA_TOOLSETS — If you previously limited which capabilities your assistant could use, V2 supports server-side filtering via the ALPACA_TOOLSETS env var. See Configuration > Toolset Filtering for the list of toolsets.Basic Trading
Crypto Trading
Option Trading
Market Information
To access the latest 15-minute data, you need to subscribe to the Algo Trader Plus Plan. 1. What are the market open and close times today? 2. Show me the market calendar for next week. 3. Show me recent cash dividends and stock splits for AAPL, MSFT, and GOOGL in the last 3 months. 4. Get all corporate actions for SPY including dividends, splits, and any mergers in the past year. 5. What are the upcoming corporate actions scheduled for SPY in the next 6 months?
Historical & Real-time Data
Orders
Watchlists
At this moment, you can only view and update trading watchlists created via Alpaca's Trading API through the API itself 1. Create a new watchlist called "Tech Stocks" with AAPL, MSFT, and NVDA. 2. Update my "Tech Stocks" watchlist to include TSLA and AMZN. 3. What stocks are in my "Dividend Picks" watchlist? 4. Remove META from my "Growth Portfolio" watchlist. 5. List all my existing watchlists.
Asset Information
Combined Scenarios
All configuration is through environment variables set in your MCP client config. No files are written to disk.
| Variable | Required | Default | Description |
|---|---|---|---|
ALPACA_API_KEY | Yes | — | Your Alpaca API key |
ALPACA_SECRET_KEY | Yes | — | Your Alpaca secret key |
ALPACA_PAPER_TRADE | No | true | Set to false for live trading |
ALPACA_TOOLSETS | No | all | Comma-separated list of toolsets to enable |
If you documented allowed tools, wrote scripts that call tools by name, or built prompts around specific V1 tool/parameter shapes — treat them as obsolete. Recreate them using the Available Tools listed below and the current parameter schemas exposed by the server.
Create .vscode/mcp.json in your project root. See the official docs.
{
"servers": {
"alpaca": {
"type": "stdio",
"command": "uvx",
"args": ["alpaca-mcp-server"],
"env": {
"ALPACA_API_KEY": "your_alpaca_api_key",
"ALPACA_SECRET_KEY": "your_alpaca_secret_key"
}
}
}
}
uv/uvx are on PATH.ALPACA_API_KEY and ALPACA_SECRET_KEY in the client's env block. Paper mode default is ALPACA_PAPER_TRADE = True.--transport streamable-http, change --port to a free port.alpaca-mcp-server 是一个专为 MCP 协议设计的服务器,旨在将 Alpaca 的强大金融交易能力引入 AI 助手。通过该服务器,你可以让 Claude 等 AI 客户端直接访问实时市场数据并执行交易指令,实现从数据分析到自动化交易的无缝衔接。
本项目提供全面的金融数据与交易管理功能。支持股票、加密货币及期权的实时报价、成交记录和价格棒(Price Bars),并提供���活的历史数据查询及期权希腊字母(Greeks)和隐含波动率分析。此外,还具备完整的账户管理功能(查看余额、购买力及持仓历史)以及高级订单管理功能(支持市价、限价、止损、止损限价及追踪止损订单的下单与撤单)。
在使用本服务器前,请确保您的开发环境已安装 Python 3.10+ 以及高性能 Python 包管理器 uv。此外,您需要准备好 Alpaca Trading API keys(建议使用免费的 paper trading 账户进行测试),并配置好支持 MCP 协议的客户端(如 Claude Desktop)。
安装过程非常简洁。您无需运行 init 命令或手动创建 .env 文件,所有的凭证配置都将统一在您的 MCP 客户端配置文件中完成。只需将服务器的启动命令及参数添加到 MCP 客户端配置中,随后重启客户端即可完成部署,实现开箱即用。
在 V2 版本中,MCP 客户端会动态发现服务器提供的工具,无需手动维护工具白名单。请注意,不要直接复用 V1 版本的配置,应将其视为全新的服务器进行配置。建议在升级后清除客户端的工具缓存,以确保 AI 助手能够正确识别最新的工具定义与参数 Schema。您可以直接通过自然语言指令,如“查询我��账户余额”或“以市价买入 5 股 AAPL”来驱动交易。
本项目采用“无文件”配置理念,所有配置均通过在 MCP 客户端配置文件中设置环境变量来实现,不会在磁盘上写入任何配置文件。核心配置项包括必须提供的 ALPACA_API_KEY 和 ALPACA_SECRET_KEY,请确保这些变量已正确注入到客户端的运行环境中。
获取 API 密钥非常简单:首先访问 Alpaca Dashboard,创建一个免费的 paper trading 账户,然后直接从控制面板(Dashboard)生成您的专属 API keys 即可开始使用。
如果您之前在使用 V1 版本时编写了自定义工作流、工具白名单脚本或特定的 Prompt 模板,请注意这些旧版模式已不再适用。建议根据当前服务器暴露的最新工具列表(Available Tools)和参数 Schema,重新构建您的自动化流程与提示词,以充分发挥 V2 版本的动态调用能力。
常见问题排查:若遇到 uv/uvx 未找到的错误,请按照官方指南安装 uv 并重启终端以确保其在 PATH 路径中;若提示凭证缺失,请检查 MCP 客户端配置文件中是否已正确设置 ALPACA_API_KEY 和 ALPACA_SECRET_KEY。
高质量的开源MCP工具,支持多种交易类型
AI Skill Hub 为第三方内容聚合平台,本页面信息基于公开数据整理,不对工具功能和质量作任何法律背书。
建议在沙箱或测试环境中充分验证后,再部署至生产环境,并做好必要的安全评估。
✅ MIT 协议 — 最宽松的开源协议之一,可自由商用、修改、分发,仅需保留版权声明。
总体来看,阿尔帕卡MCP服务器 是一款质量优秀的MCP工具,在同类工具中具备一定竞争力。AI Skill Hub 将持续追踪其更新动态,建议收藏备用,结合自身场景选择合适时机引入使用。
| 原始名称 | alpaca-mcp-server |
| 原始描述 | 开源MCP工具:Alpaca’s official MCP Server lets you trade stocks, ETFs, crypto, and options, r。⭐842 · Python |
| Topics | ai-tradingalgorithmic-tradingcryptoetfsmcppython |
| GitHub | https://github.com/alpacahq/alpaca-mcp-server |
| License | MIT |
| 语言 | Python |
收录时间:2026-06-24 · 更新时间:2026-06-26 · License:MIT · AI Skill Hub 不对第三方内容的准确性作法律背书。
选择 Agent 类型,复制安装指令后粘贴到对应客户端