Alpaca MCP Server

Alpaca MCP Server

alpaca-mcp-server-jwaresolutions•byjwaresolutions

A Model Context Protocol server that connects AI assistants and development tools to the Alpaca Trading API.

License: MIT License•Runtime: Awaiting documentation review•Category: finance crypto

WHAT IT DOES

  • •Provides tools to retrieve Alpaca account information such as status, buying power, equity, and day trade details.
  • •Exposes current stock positions with symbol, quantity, market value, cost basis, P&L, and position side.
  • •Provides real-time market quotes with bid and ask prices, sizes, spread calculation, and timestamp for a given symbol.
  • •Lists recent orders with optional status filtering and a configurable limit.

BEST FOR

  • •Using an AI assistant to inspect Alpaca account status, buying power, and equity.
  • •Reviewing current portfolio positions and their profit-and-loss metrics conversationally.
  • •Checking real-time quotes for symbols like AAPL, TSLA, or NVDA through an MCP client.

ABOUT ALPACA-MCP-SERVER-JWARESOLUTIONS

Alpaca MCP Server is cataloged as an MCP server attributed to jwaresolutions. A Model Context Protocol server that connects AI assistants and development tools to the Alpaca Trading API. It is categorized under finance crypto. See the capability inspector for recorded interfaces and their independent review status; consult upstream documentation for the current interface.

HOW TO INSTALL

Installation configuration is not reviewed. No executable setup is offered for this entry; inspect the source repository before proceeding.

LICENSE

Catalog license label: MIT License. Check the source repository's current license and terms before using, modifying or distributing this software.

Capability inspector

Capability definitions are not reviewed. Unreviewed imports are not exposed as trusted interfaces.

Tools (0)

No reviewed records to display. This does not establish that upstream lacks this capability.

Resources (0)

No reviewed records to display. This does not establish that upstream lacks this capability.

Prompts (0)

No reviewed records to display. This does not establish that upstream lacks this capability.

NEWSLETTER - COMING LATER

Newsletter subscriptions are not open yet

Email delivery is not connected. This page does not collect email addresses or create subscriptions.

Browse the registry for current listings instead.

Community Reviews

Coming later

Reviews for Alpaca MCP Server are not available yet

Review publishing and storage are not connected. This page does not collect or publish ratings or comments, including after sign-in.

FREQUENTLY ASKED QUESTIONS

Does the server support paper trading?

Yes. The README states the server defaults to paper trading mode for safety and supports a paper trading API base URL.

Can it be used with live trading?

Yes, by changing the API base URL to the live trading endpoint, though the README cautions using live trading only when ready to trade with real money.

Upstream README

View this exact version on GitHub

README.md · 9b8dad8070d1 · Fetched 2026-11-13 13:36:01 UTC

Original upstream text, without AI rewriting. Scripts, forms and unsafe links are filtered for safety.

Showing the last retrieved documentation snapshot; check the source for current changes.

Alpaca MCP Server

A Model Context Protocol (MCP) server for Alpaca Trading API that provides seamless integration with AI assistants and development tools.

✅ Compatibility

Tested and verified to work on Apple Silicon M1 Pro laptops running macOS.

Features

  • Account Information: Get real-time account details, buying power, equity, and status
  • Portfolio Management: View current positions with P&L tracking
  • Market Data: Retrieve real-time stock quotes with bid/ask spreads
  • Order Management: List and monitor recent orders
  • Paper Trading Support: Safe testing environment with paper trading API
  • Live Trading Ready: Compatible with live trading (use with caution)

Installation

Prerequisites

pip install alpaca-trade-api

Quick Start

  1. Clone the repository:
git clone https://github.com/jwaresolutions/alpaca-mcp-server.git
cd alpaca-mcp-server
  1. Set up your Alpaca API credentials:

Create environment variables or add to your shell profile:

export APCA_API_KEY_ID="your_api_key_here"
export APCA_API_SECRET_KEY="your_secret_key_here"
export APCA_API_BASE_URL="https://paper-api.alpaca.markets"  # Paper trading
# export APCA_API_BASE_URL="https://api.alpaca.markets"      # Live trading
  1. Test the server:
python alpaca_mcp_server.py

MCP Integration

For Cline/Claude Dev Tools

Add to your MCP settings JSON:

{
  "mcpServers": {
    "alpaca": {
      "command": "python",
      "args": ["/path/to/alpaca-mcp-server/alpaca_mcp_server.py"],
      "env": {
        "APCA_API_KEY_ID": "your_api_key_here",
        "APCA_API_SECRET_KEY": "your_secret_key_here",
        "APCA_API_BASE_URL": "https://paper-api.alpaca.markets"
      }
    }
  }
}

For Claude Desktop

Add to your claude_desktop_config.json:

{
  "mcpServers": {
    "alpaca": {
      "command": "python",
      "args": ["/path/to/alpaca-mcp-server/alpaca_mcp_server.py"],
      "env": {
        "APCA_API_KEY_ID": "your_api_key_here",
        "APCA_API_SECRET_KEY": "your_secret_key_here",
        "APCA_API_BASE_URL": "https://paper-api.alpaca.markets"
      }
    }
  }
}

Available Tools

1. get_account

Get comprehensive account information including:

  • Account status and number
  • Buying power and cash available
  • Portfolio equity and value
  • Pattern day trader status
  • Day trade count
  • SMA (Special Memorandum Account)

2. get_positions

View current stock positions with:

  • Symbol and quantity
  • Current market value
  • Cost basis and P&L
  • Unrealized gains/losses
  • Current stock price
  • Position side (long/short)

3. get_quote

Get real-time market quotes for any symbol:

  • Bid and ask prices
  • Bid and ask sizes
  • Price spread calculation
  • Timestamp of quote

Parameters:

  • symbol (required): Stock symbol (e.g., "AAPL", "TSLA", "NVDA")

4. get_orders

List recent orders with filtering:

  • Order ID and status
  • Symbol and quantity
  • Order type and side
  • Fill information
  • Submission timestamps

Parameters:

  • status (optional): "open", "closed", or "all" (default: "all")
  • limit (optional): Maximum number of orders (default: 10)

API Credentials

Getting Alpaca API Keys

  1. Sign up at Alpaca Markets
  2. Go to the dashboard and navigate to "API Keys"
  3. Generate new API keys for paper trading or live trading
  4. Copy your API Key ID and Secret Key

Environment Setup

Option 1: Environment Variables

export APCA_API_KEY_ID="PK..."
export APCA_API_SECRET_KEY="..."
export APCA_API_BASE_URL="https://paper-api.alpaca.markets"

Option 2: .env file

APCA_API_KEY_ID=PK...
APCA_API_SECRET_KEY=...
APCA_API_BASE_URL=https://paper-api.alpaca.markets

Safety and Paper Trading

⚠️ Important: This server defaults to paper trading mode for safety. Paper trading uses virtual money and is perfect for testing and development.

To switch to live trading, change the base URL to:

APCA_API_BASE_URL=https://api.alpaca.markets

Use live trading only when you're confident in your setup and ready to trade with real money.

Troubleshooting

Common Issues

  1. "Missing API credentials" error:

    • Ensure environment variables are set correctly
    • Check that variable names match exactly: APCA_API_KEY_ID, APCA_API_SECRET_KEY
  2. "Connection failed" error:

    • Verify your API keys are valid
    • Check your internet connection
    • Ensure you're using the correct base URL for paper/live trading
  3. "Module not found" error:

    • Install required dependencies: pip install alpaca-trade-api

Testing the Server

You can test the server manually using JSON-RPC:

echo '{"jsonrpc": "2.0", "id": 1, "method": "tools/list"}' | python alpaca_mcp_server.py

Expected response should include available tools.

Development

Project Structure

alpaca-mcp-server/
├── alpaca_mcp_server.py    # Main MCP server
├── README.md               # This documentation
├── requirements.txt        # Python dependencies
└── examples/              # Usage examples

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Test thoroughly with paper trading
  5. Submit a pull request

License

MIT License - see LICENSE file for details.

Support

Disclaimer

This software is for educational and development purposes. When using live trading features, you are trading with real money. Always test thoroughly with paper trading first. The authors are not responsible for any financial losses.

Install configuration

Are you the maintainer?

Claim this server with your GitHub account to request manual ownership verification.

README Embed Badge
Markdown

Link to the catalog listing for Alpaca MCP Server from your README. This badge does not certify ownership, compatibility or security.

[![MCP catalog listing](https://img.shields.io/badge/MCP-awesome--mcp-orange?style=flat-square)](https://awesome-mcp.com/servers/alpaca-mcp-server-jwaresolutions)

REPOSITORY STATS

GitHub StarsUnavailable
ForksUnavailable

Public repository statistics could not be verified. Check the configured source address; unavailable counts are not zero.

Downloads and pulls

Separate sources, scopes and periods. Never combined or treated as installations, active users or security reviews.

No reviewed package or image identity; download statistics are not listed yet.

Related finance crypto MCP Servers

Alternative and complementary servers in the same category

View all in finance crypto →
USA Spending MCP Server
usaspending-mcp-server•thsmale

A stateless streamable HTTP MCP server for interacting with the official source of government spending data.

Repository stats unavailable
Finance & Analytics
Fortnox MCP server — More AI
more-ai-chatgpt-claude-mcp-fortnox•amor3

A hosted, remote MCP server for Fortnox that lets AI assistants answer questions from a company's bookkeeping and propose changes for approval before writing them.

0
Finance & Analytics

OptimistFi is a read-only remote MCP server that provides perpetual futures market data, perps prop firm rules and pricing, and US equity investment research.

Repository stats unavailable
Finance & Analytics