AlpacaSAFE
Alpaca’s official MCP Server lets you trade stocks, ETFs, crypto, and options, run data analysis, and build strategies in plain English directly from your favorite LLM tools and IDEs
Overview
From the repository's own README, as read at the audited commit. Badges and raw HTML are left out.
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.
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.
Table of Contents
- Upgrading from V1
- Prerequisites
- Getting Your API Keys
- Setup
- Configuration
1bd4db206a89OBSERVED · 2026-09-26Connect
Built from this server's own package name, version and transport as found in its source — not copied from anyone's documentation, so it cannot drift against a page we do not control. Replace the environment placeholders with a token scoped to the least it needs.
claude mcp add alpaca-mcp-server --env ALPACA_API_KEY=${ALPACA_API_KEY} --env ALPACA_SECRET_KEY=${ALPACA_SECRET_KEY} -- None alpaca-mcp-server==2.3.2Exposed tools (14)
11 read · 3 write · 0 destructive.
| Tool | Risk | Description |
|---|---|---|
echo_tool | read | return { |
get_crypto_bars | read | Retrieve historical price bars (OHLCV) for one or more cryptocurrencies. |
get_crypto_quotes | read | Retrieve historical bid/ask quotes for one or more cryptocurrencies. |
get_crypto_trades | read | Retrieve historical trade data for one or more cryptocurrencies. |
get_news | read | return { |
get_stock_bars | read | Retrieve historical price bars (OHLCV) for one or more stocks. |
get_stock_quotes | read | Retrieve historical bid/ask quotes (level 1) for one or more stocks. |
get_stock_trades | read | Retrieve historical trade data for one or more stocks. |
place_crypto_order | write | Place a cryptocurrency order. |
place_option_order | write | Place an options order (single-leg or multi-leg). |
place_stock_order | write | Place a stock or ETF order. |
pre_wrapped_tool | read | return { |
raw_text_tool | read | return { |
simple_tool | read | return { |
Trust audit
SAFEgrade B · trust 89/100 Nothing in the source contradicts what it says it does. Grade A is reserved for packages that have also passed the behavioural sandbox.
| Layer | What it checks | Result |
|---|---|---|
| L0 | Provenance & inventory | PASS |
| L1 | Static analysis of the code | PASS |
| L2 | Instruction surface (what it tells the agent) | PASS |
| L3 | Class-specific surface | PASS |
| L4 | Behavioural (sandbox) | SKIPPED |
What the source does
- Filesystem
- none-observed
- Network
- declared (7 observation(s))
- Shell
- none-observed
- Dependencies
- not all pinned
- Secrets in source
- none-found
Findings (5)
.helmignore
base_url="http://127.0.0.1",
base_url="http://127.0.0.1",
base_url="http://127.0.0.1",
alpaca-py, mcp, python-dotenv, urllib3, python-multipart
Gates applied: no_behavioural_pass.
1bd4db206a89full audit observations/trust-audit/mcp-server/alpacahq__alpaca-3.json · Report an issue / request a re-scanAudit history
Every audit this server has had. A grade with a past is a grade somebody is still checking.
| Date | Source | Verdict | Grade | Score | Change |
|---|---|---|---|---|---|
| 2026-09-26 | 1bd4db206a89 | SAFE | B | 89 | first audit |
Questions
What is the Alpaca MCP server?
Alpaca’s official MCP Server lets you trade stocks, ETFs, crypto, and options, run data analysis, and build strategies in plain English directly from your favorite LLM tools and IDEs
What tools does Alpaca expose?
14 in total: 11 read-only, 3 that write, and 0 that can delete or overwrite. Every one is listed on this page with its risk.
Is Alpaca safe to connect to an agent?
The audit found nothing in the source that contradicts what it says it does, and graded it B (89/100). Grade A is held back for packages that have also passed a sandboxed behavioural run, which is why a clean server reads B.
What credentials does Alpaca need?
It reads ALPACA_API_KEY and ALPACA_SECRET_KEY from the environment. Give it a token scoped to the least it needs — an agent that can be talked into calling a tool can be talked into calling it with your credentials.
How does Alpaca run?
It speaks stdio and streamable-http, so it runs as a local process your client starts. It is published on PyPI as alpaca-mcp-server.
How current is this page?
The grade is for one exact copy of the source (1bd4db206a89), read on 2026-09-26. The repository is watched and re-audited when it changes.