Alpaca

v1.0.0Finance & Fintechstable

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

ai-tradingalgorithmic-tradingcryptoetfsmcp
Share:
752
Stars
0
Downloads
0
Weekly
0/5

What is Alpaca?

Alpaca is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to 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

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

This server falls under the Finance & Fintech category on MCPgee, the world's largest MCP server directory with 33,000+ servers.

Features

  • Alpaca’s official MCP Server lets you trade stocks, ETFs, cr

Use Cases

Trade stocks, ETFs, crypto, and options using plain English commands. Run data analysis on market data and build trading strategies. Execute algorithmic trading with Alpaca's API through Claude.
alpacahq

Maintainer

LicenseMIT License
Languagepython
Versionv1.0.0
UpdatedMay 21, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx alpaca

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

How to Set Up and Use Alpaca

Alpaca's official MCP Server connects AI assistants directly to the Alpaca brokerage API, enabling natural language trading of stocks, ETFs, cryptocurrency, and options as well as real-time and historical market data retrieval, portfolio management, and strategy analysis. It defaults to paper trading mode so you can experiment safely before enabling live trades. Quantitative analysts, algorithmic traders, and developers use it to build and test trading strategies, query option Greeks, set up watchlists, and execute orders entirely from Claude or other LLM interfaces without writing brokerage API code.

Prerequisites

  • Python 3.10 or later
  • uv package manager (install with `pip install uv` or from https://docs.astral.sh/uv/)
  • An Alpaca account with API keys — create a free paper trading account at https://app.alpaca.markets/paper/dashboard/overview
  • ALPACA_API_KEY and ALPACA_SECRET_KEY from the Alpaca dashboard
  • An MCP client such as Claude Desktop, Claude Code, Cursor, or VS Code
1

Create an Alpaca account and generate API keys

Sign up for a free paper trading account at alpaca.markets. In the dashboard, navigate to API/OAuth Apps and generate a new key pair. Copy both the API key and secret key.

2

Test the server with uvx

Run the server once with uvx to confirm it launches correctly before adding it to your client config.

ALPACA_API_KEY=your_key ALPACA_SECRET_KEY=your_secret uvx alpaca-mcp-server
3

Add to Claude Desktop configuration

Open ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows) and add the alpaca server block with your credentials.

{
  "mcpServers": {
    "alpaca": {
      "command": "uvx",
      "args": ["alpaca-mcp-server"],
      "env": {
        "ALPACA_API_KEY": "your_api_key",
        "ALPACA_SECRET_KEY": "your_secret_key",
        "ALPACA_PAPER_TRADE": "true"
      }
    }
  }
}
4

Optional: restrict enabled toolsets

Use ALPACA_TOOLSETS to expose only the tools you need, which reduces the number of tools the AI sees and focuses its capabilities.

{
  "mcpServers": {
    "alpaca": {
      "command": "uvx",
      "args": ["alpaca-mcp-server"],
      "env": {
        "ALPACA_API_KEY": "your_api_key",
        "ALPACA_SECRET_KEY": "your_secret_key",
        "ALPACA_PAPER_TRADE": "true",
        "ALPACA_TOOLSETS": "account,trading,stock-data"
      }
    }
  }
}
5

Restart Claude Desktop and verify connectivity

Fully quit and reopen Claude Desktop. Ask Claude to check your account balance — this confirms the server is running and your API keys are valid.

6

Enable live trading when ready

Set ALPACA_PAPER_TRADE to false only when you are ready to trade with real money. Ensure you understand the risks and have reviewed all order logic carefully.

Alpaca Examples

Client configuration

claude_desktop_config.json entry for the Alpaca MCP server in paper trading mode with all toolsets enabled.

{
  "mcpServers": {
    "alpaca": {
      "command": "uvx",
      "args": ["alpaca-mcp-server"],
      "env": {
        "ALPACA_API_KEY": "your_api_key",
        "ALPACA_SECRET_KEY": "your_secret_key",
        "ALPACA_PAPER_TRADE": "true"
      }
    }
  }
}

Prompts to try

These prompts map to the account, trading, stock-data, crypto-data, options-data, and news toolsets.

- "What is my current account balance and buying power?"
- "Buy 5 shares of AAPL at market price"
- "Show me TSLA's daily price bars for the last 10 trading days"
- "Place a limit order to buy 10 shares of MSFT at $380"
- "What are my current open positions?"
- "Get the option chain for SPY expiring next Friday and show me the calls near the money"
- "Cancel all my open orders"

Troubleshooting Alpaca

Authentication error: 'forbidden' or 403 when starting the server

Verify ALPACA_API_KEY and ALPACA_SECRET_KEY are correct and match the environment you are targeting (paper vs live). Paper trading keys work only against the paper endpoint. Regenerate keys from the Alpaca dashboard if needed.

Tools from a previous V1 installation behave differently or fail

Alpaca MCP V2 is a complete rewrite with incompatible tool names and parameters. Delete the old server entry from your MCP config, add the new uvx alpaca-mcp-server entry, restart your MCP client, and start a fresh conversation session.

uvx: command not found

Install uv first: run `pip install uv` or follow the instructions at https://docs.astral.sh/uv/getting-started/installation/. After installation, confirm with `uvx --version` before retrying.

Frequently Asked Questions about Alpaca

What is Alpaca?

Alpaca is a Model Context Protocol (MCP) server that 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 It connects AI assistants to external tools and data sources through a standardized interface.

How do I install Alpaca?

Follow the installation instructions on the Alpaca GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.

Which AI clients work with Alpaca?

Alpaca works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.

Is Alpaca free to use?

Yes, Alpaca is open source and available under the MIT License license. You can use it freely in both personal and commercial projects.

Browse More Finance & Fintech MCP Servers

Explore all finance & fintech servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.

Quick Config Preview

{ "mcpServers": { "alpaca": { "command": "npx", "args": ["-y", "alpaca"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

Ready to use Alpaca?

Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.

33,000+ ServersFree & Open SourceStep-by-Step Guides