Atlas / MCP servers / alpacahq / Alpaca

AlpacaSAFE

mcp/alpacahq/alpaca-3

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

Verdict
SAFE
Grade
B
Trust score
89 /100
Exposed tools
14 11r · 3w · 0d
Transport
stdio · streamable-http
License
MIT
Stars
993
01

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
Read from source at commit 1bd4db206a89OBSERVED · 2026-09-26
02

Connect

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-code (pypi)
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.2
03

Exposed tools (14)

11 read · 3 write · 0 destructive.

ToolRiskDescription
echo_toolreadreturn {
get_crypto_barsreadRetrieve historical price bars (OHLCV) for one or more cryptocurrencies.
get_crypto_quotesreadRetrieve historical bid/ask quotes for one or more cryptocurrencies.
get_crypto_tradesreadRetrieve historical trade data for one or more cryptocurrencies.
get_newsreadreturn {
get_stock_barsreadRetrieve historical price bars (OHLCV) for one or more stocks.
get_stock_quotesreadRetrieve historical bid/ask quotes (level 1) for one or more stocks.
get_stock_tradesreadRetrieve historical trade data for one or more stocks.
place_crypto_orderwritePlace a cryptocurrency order.
place_option_orderwritePlace an options order (single-leg or multi-leg).
place_stock_orderwritePlace a stock or ETF order.
pre_wrapped_toolreadreturn {
raw_text_toolreadreturn {
simple_toolreadreturn {
04

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.

LayerWhat it checksResult
L0Provenance & inventoryPASS
L1Static analysis of the codePASS
L2Instruction surface (what it tells the agent)PASS
L3Class-specific surfacePASS
L4Behavioural (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)

LOWInventory / provenance · inv.hidden_file · CWE-1104
charts/alpaca-mcp-server/.helmignore
.helmignore
Why it matters. hidden member outside the usual dotfiles
Fix. review its purpose
LOWNetwork egress · net.raw_ip · CWE-200, CWE-319
tests/test_http_security.py:88
base_url="http://127.0.0.1",
LOWNetwork egress · net.raw_ip · CWE-200, CWE-319
tests/test_http_security.py:105
base_url="http://127.0.0.1",
LOWNetwork egress · net.raw_ip · CWE-200, CWE-319
tests/test_http_security.py:148
base_url="http://127.0.0.1",
LOWSupply chain · supply.unpinned · CWE-829, CWE-1357
requirements.txt
alpaca-py, mcp, python-dotenv, urllib3, python-multipart
Why it matters. 5 requirement(s) not pinned with ==
Fix. pin exact versions

Gates applied: no_behavioural_pass.

Audited 2026-09-26 · audit v0.4.1 · source sha 1bd4db206a89full audit observations/trust-audit/mcp-server/alpacahq__alpaca-3.json · Report an issue / request a re-scan
05

Audit history

Every audit this server has had. A grade with a past is a grade somebody is still checking.

DateSourceVerdictGradeScoreChange
2026-09-261bd4db206a89SAFEB89first audit
06

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.

Advertisement