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 ```
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.
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.
{
"mcp": {
"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"
}
}
}
}
}
PyCharm
See the official guide.
1. Go to File → Settings → Tools → Model Context Protocol (MCP) 2. Add a new server: - Type: stdio - Command: uvx - Arguments: alpaca-mcp-server 3. Set environment variables:
ALPACA_API_KEY=your_alpaca_api_key
ALPACA_SECRET_KEY=your_alpaca_secret_key
Claude Code
claude mcp add alpaca --scope user --transport stdio uvx alpaca-mcp-server \
--env ALPACA_API_KEY=your_alpaca_api_key \
--env ALPACA_SECRET_KEY=your_alpaca_secret_key
Verify with /mcp in the Claude Code CLI.
Gemini CLI
See the Gemini CLI MCP docs.
Add to your settings.json:
{
"mcpServers": {
"alpaca": {
"type": "stdio",
"command": "uvx",
"args": ["alpaca-mcp-server"],
"env": {
"ALPACA_API_KEY": "your_alpaca_api_key",
"ALPACA_SECRET_KEY": "your_alpaca_secret_key"
}
}
}
}
Docker
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"
]
}
}
}
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.高质量的开源MCP工具,支持多种交易类型
AI Skill Hub 为第三方内容聚合平台,本页面信息基于公开数据整理,不对工具功能和质量作任何法律背书。
建议在沙箱或测试环境中充分验证后,再部署至生产环境,并做好必要的安全评估。
✅ MIT 协议 — 最宽松的开源协议之一,可自由商用、修改、分发,仅需保留版权声明。
总体来看,阿尔帕卡MCP服务器 是一款质量优秀的MCP工具,在同类工具中具备一定竞争力。AI Skill Hub 将持续追踪其更新动态,建议收藏备用,结合自身场景选择合适时机引入使用。
| 原始名称 | alpaca-mcp-server |
| Topics | ai-tradingalgorithmic-tradingcryptoetfsmcppython |
| GitHub | https://github.com/alpacahq/alpaca-mcp-server |
| License | MIT |
| 语言 | Python |
收录时间:2026-06-24 · 更新时间:2026-06-24 · License:MIT · AI Skill Hub 不对第三方内容的准确性作法律背书。
选择 Agent 类型,复制安装指令后粘贴到对应客户端