Atlas / MCP servers / tedlikeskix / Alpaca

AlpacaSAFE

mcp/tedlikeskix/alpaca

Model Context Protocol (MCP) server for Alpaca trading API

Verdict
SAFE
Grade
B
Trust score
89 /100
Exposed tools
9 7r · 2w · 0d
Transport
stdio
License
MIT
Stars
28
01

Overview

From the repository's own README, as read at the audited commit. Badges and raw HTML are left out.

This is a Model Context Protocol (MCP) server for Alpaca, allowing LLMs like Claude to interact with the Alpaca trading API. It enables trading stocks, checking positions, fetching market data, and managing your account - all through natural language.

Features

  • 📊 Market Data - Get real-time stock quotes and historical price data
  • 💵 Account Information - Check your balances, buying power, and status
  • 📈 Position Management - View current positions and their performance
  • 🛒 Order Placement - Place market and limit orders through natural language
  • 📋 Order Management - List, track, and cancel orders

Prerequisites

  • Python 3.10+
  • Alpaca API keys
  • Claude for Desktop or another MCP client

Installation

  1. Clone this repository:
git clone https://github.com/YOUR_USERNAME/alpaca-mcp.git
cd alpaca-mcp
  1. Install the required packages:
pip install mcp alpaca-py python-dotenv
  1. Create a .env file with your Alpaca API credentials:
API_KEY_ID=your_alpaca_api_key
API_SECRET_KEY=your_alpaca_secret_key

Usage

Running the server

Start the server by running:

python alpaca_mcp_server.py

Configuring Claude for Desktop

  1. Open Claude for Desktop
  2. Go to Settings
  3. Click on "Developer" and then "Edit Config"
  4. Add the server configuration to claude_desktop_config.json:
{
"mcpServers": {
"alpaca": {
"command": "python",
"args": [
"/path/to/alpaca_mcp_server.py"
],
"env": {
"API_KEY_ID": "your_alpaca_api_key",
"API_SECRET_KEY": "your_alpaca_secret_key"
}
}
}
}
  1. Save and restart Claude for Desktop

Available Tools

The server exposes the following tools:

  • get_account_info() - Get account balances and status
  • get_positions() - List all current positions in the portfolio
  • get_stock_quote(symbol) - Get the latest quote for a stock
  • `get_st
Read from source at commit 267e214716b4OBSERVED · 2026-10-08
02

Exposed tools (9)

7 read · 2 write · 0 destructive.

ToolRiskDescription
cancel_all_ordersreadCancel all open orders.
close_all_positionsread
get_account_inforeadGet the current account information including balances and status.
get_ordersread
get_positionsreadGet all current positions in the portfolio.
get_stock_barsread
get_stock_quoteread
place_limit_orderwrite
place_market_orderwrite
03

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
none-observed
Shell
none-observed
Dependencies
not all pinned
Secrets in source
none-found

Findings (1)

LOWSupply chain · supply.unpinned · CWE-829, CWE-1357
requirements.txt
mcp, alpaca-py, python-dotenv
Why it matters. 3 requirement(s) not pinned with ==
Fix. pin exact versions

Gates applied: no_behavioural_pass.

Audited 2026-10-08 · audit v0.4.1 · source sha 267e214716b4full audit observations/trust-audit/mcp-server/tedlikeskix__alpaca.json · Report an issue / request a re-scan
04

Audit history

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

DateSourceVerdictGradeScoreChange
2026-10-08267e214716b4SAFEB89first audit
05

Questions

What is the Alpaca MCP server?

Model Context Protocol (MCP) server for Alpaca trading API

What tools does Alpaca expose?

9 in total: 7 read-only, 2 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 API_KEY_ID and API_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, so it runs as a local process your client starts.

How current is this page?

The grade is for one exact copy of the source (267e214716b4), read on 2026-10-08. The repository is watched and re-audited when it changes.

Advertisement