Alpaca logo

Alpaca

Provides US stock snapshots, historical OHLCV bars, and intraday VWAP calculations through Alpaca market data.

Install Alpaca

Pick your client, then add it in one click or paste the config.

STDIONode.js
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "alpaca": {
      "command": "npx",
      "args": [
        "-y",
        "@pipeworx/mcp-alpaca"
      ]
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

Install not yet sandbox-tested— we haven't run this command through our automated sandbox yet. Not a red flag; we're working through the catalog.

Overview

The Alpaca MCP server connects AI agents to the Alpaca Market Data API for real-time and historical US stock data. Its tools return snapshots, OHLCV bars, trade counts, per-bar VWAP, and current-session VWAP comparisons, including extended-hours data on the IEX feed. Use it for market-data questions, chart inputs, or checks such as whether a stock is trading above VWAP. It can run locally over stdio or through the Pipeworx gateway, with an Alpaca key supplied per tool call.

Use cases

  • Check current and extended-hours prices for US stocks
  • Retrieve historical OHLCV bars for charting or analysis
  • Compare current prices with session VWAP
  • Inspect pre-market and after-hours trading activity

Key features

  • Real-time US stock snapshots
  • Historical OHLCV bars
  • Per-bar VWAP and trade counts
  • Current-session VWAP comparison
  • Extended-hours coverage on the IEX feed
  • Multi-symbol requests for up to 20 symbols

Tools3

What Alpaca lets your agent do. Expand a tool for its parameters.

Self-reported~237 tokens of context

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked 2d ago

Recent health check succeeded.

8/8 checks healthy over the last 45d

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 15d ago via OSV.dev · @pipeworx/mcp-alpaca (npm)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

npm downloads257Package downloads in the last 30 days.
Last commit28d agoMost recent push to the default branch.
Tools exposed3Callable tools this server registers over MCP.

How Alpaca works

What Alpaca MCP server does

The Alpaca MCP server exposes three market-data operations for US equities through MCP. It is intended for agents that need current prices, historical bars, or a session VWAP calculation rather than order execution or portfolio management.

alpaca_snapshot returns the latest trade, bid and ask, current-day OHLCV, previous close, absolute and percentage change, and the most recent minute bar with VWAP. Pre-market and after-hours coverage is included. During those sessions, the returned minute bar represents the live extended-hours price. One request can contain up to 20 comma-separated symbols.

alpaca_bars retrieves historical OHLCV data with VWAP and trade count for every bar. Supported intervals are 1 minute, 5 minutes, 15 minutes, 1 hour, and 1 day. Intraday results include pre-market and after-hours sessions through the IEX feed.

alpaca_intraday_vwap loads one-minute bars from 04:00 Eastern Time, calculates the cumulative VWAP for the current session, and compares it with the latest trade. Its result includes the current price, session VWAP, above-or-below status, and session volume for each requested symbol.

How it works

The Alpaca MCP server accepts MCP tool calls and forwards market-data requests to Alpaca. Each tool requires the caller to provide an Alpaca credential in the _apiKey argument, using the key_id:secret_key format shown in the project examples.

For bar queries, callers can provide ISO start and end timestamps or a relative lookback such as 2h or 5d. Symbols are passed as a comma-separated string, with a maximum of 20 symbols per request.

The gateway endpoint also exposes shared Pipeworx meta-tools, including routing and discovery tools. A local stdio connection exposes only the three Alpaca tools. The gateway and local modes use the same source and market-data tool set, but they differ in whether shared gateway tools are listed.

Setup and configuration

For a gateway connection, add the following MCP endpoint to a compatible client:

config.json
{
  "mcpServers": {
    "alpaca": {
      "url": "https://gateway.pipeworx.io/alpaca/mcp"
    }
  }
}

The package can also run without a gateway account using stdio:

config.json
{
  "mcpServers": {
    "alpaca": {
      "command": "npx",
      "args": ["-y", "@pipeworx/mcp-alpaca"]
    }
  }
}

Run npx -y @pipeworx/mcp-alpaca directly to verify that the local process starts. In either mode, supply _apiKey when calling a market-data tool.

Tools and capabilities

  • Retrieve real-time snapshots for up to 20 US stock symbols.
  • Include pre-market and after-hours prices and volume in snapshot and intraday-bar results.
  • Request historical bars at five supported timeframes.
  • Use ISO time ranges or shorthand lookbacks for historical queries.
  • Compare current trade prices with session VWAP across multiple symbols.
  • Receive per-bar VWAP and trade counts from historical queries.

Limitations and notes

The Alpaca MCP server covers US stock market data described by the three listed tools.

Data uses Alpaca's real-time IEX feed, and intraday VWAP begins at 04:00 Eastern Time. Requests are limited to 20 comma-separated symbols. Gateway connections list additional Pipeworx meta-tools, while local stdio mode does not provide those routing and discovery tools.

The server does not provide an Alpaca key for the caller. An Alpaca credential must be supplied with each relevant tool request through _apiKey.

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Alpaca

Alpaca is an MCP server that connects AI agents to the Alpaca Market Data API. Its main tools provide real-time US stock snapshots, historical OHLCV bars with VWAP and trade counts, and current-session VWAP comparisons, including pre-market and after-hours data through the IEX feed.

Install it locally with `npx -y @pipeworx/mcp-alpaca` and configure that command as an MCP stdio server. You can also connect a client to `https://gateway.pipeworx.io/alpaca/mcp` instead of running the package locally.

Yes, Alpaca works with Cursor through the documented MCP gateway configuration. Add the gateway URL to Cursor's MCP server settings, then provide your Alpaca credential in the `_apiKey` argument when calling a tool.

The server needs your Alpaca API credentials in the `_apiKey` tool argument, formatted as `key_id:secret_key`.

Yes, `alpaca_bars` returns historical US stock OHLCV bars with VWAP and trade count. It supports 1-minute, 5-minute, 15-minute, 1-hour, and 1-day intervals, plus ISO time ranges or shorthand lookbacks such as `2h` and `5d`.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewAlpaca AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/alpaca?style=directory)](https://allmcps.com/mcp/alpaca)
HTML Embed
<a href="https://allmcps.com/mcp/alpaca"><img src="https://allmcps.com/api/badge/alpaca?style=directory" alt="Alpaca on AllMCPs" /></a>