MCP Directory

Alpaca Trading MCP Server

Manage your Alpaca stock and crypto portfolio, place trades, and access market data via MCP.

Unverified
stdio (local)
API key
Stale
Python

Add to your client

Copy the config for your MCP client and paste it into its config file.

Install / run
pip install -e .

Paste into ~/Library/Application Support/Claude/claude_desktop_config.json

{
  "mcpServers": {
    "alpaca-trading-mcp-server": {
      "command": "uv",
      "args": [
        "--directory",
        "/ABSOLUTE/PATH/TO/PARENT/FOLDER/alpaca-mcp-server",
        "run",
        "src/server.py"
      ]
    }
  }
}

Step-by-step guides: Add to Claude Desktop · Add to Cursor · Add to Windsurf

Before you start

  • Python with the project installed via 'pip install -e .' or 'uv pip install -e .'
  • uv (used in the Claude Desktop config to run the server)
  • An Alpaca account with Paper Trading API key and secret (ALPACA_PAPER_API_KEY, ALPACA_PAPER_API_SECRET)

About Alpaca Trading MCP Server

An MCP server that wraps the Alpaca trading API so MCP clients (e.g. Claude Desktop) can view account information, place market/limit/stop/stop-limit orders, manage positions, and read real-time and historical market data. It exposes both MCP resources (account, positions, orders, market quotes/bars, assets) and tools for trading actions. Authentication uses Alpaca Paper Trading API credentials provided through a .env file.

Tools & capabilities (8)

get_account_info_tool

Get current account information.

place_market_order

Place a market order to buy or sell a stock.

place_limit_order

Place a limit order to buy or sell a stock at a specified price.

place_stop_order

Place a stop order to buy or sell a stock when it reaches a specified price.

place_stop_limit_order

Place a stop-limit order combining stop and limit order features.

cancel_order

Cancel an open order by its ID.

close_position

Close an open position for a specific symbol.

get_portfolio_summary

Get a comprehensive summary of the portfolio.

When to use it

  • Check account balances and portfolio status from an AI assistant
  • Place market, limit, stop, or stop-limit orders for stocks
  • Cancel open orders and close existing positions
  • Retrieve real-time quotes and historical price bars for a symbol
  • List and inspect tradable assets available on Alpaca

Security notes

Requires Alpaca API credentials (ALPACA_PAPER_API_KEY and ALPACA_PAPER_API_SECRET) stored in a local .env file. The README configures the server against Alpaca's Paper Trading API. The server can place and cancel live orders and close positions, so credentials grant trade-execution capability on the connected account.

Alpaca Trading MCP Server FAQ

How do I install it for Claude Desktop?

You can install it automatically via Smithery with 'npx -y @smithery/cli install @laukikk/alpaca-mcp --client claude', or manually clone the repo, run 'pip install -e .', and add the mcpServers config block pointing 'uv' at the cloned alpaca-mcp-server directory.

What credentials are required?

Alpaca Paper Trading API credentials. Copy .env.example to .env and set ALPACA_PAPER_API_KEY and ALPACA_PAPER_API_SECRET, which you can obtain by creating an account at Alpaca.

What resources does the server expose?

It exposes resources including account://info, positions://all, positions://{symbol}, orders://recent/{limit}, market://{symbol}/quote, market://{symbol}/bars/{timeframe}, assets://list, and assets://{symbol}.

Alternatives to Alpaca Trading MCP Server

Compare all alternatives →

Official Stripe server for payments, customers, subscriptions, invoices, and billing via natural language.

Featured
Verified
stdio (local)
API key
TypeScript
12 tools
Updated 1 month agoRepo

Coinbase's AgentKit MCP extension for onchain actions: transfers, swaps, and contract calls.

Verified
stdio (local)
API key
TypeScript
9 tools
Updated 1 month agoRepo

Alpaca's official trading server for stocks, ETFs, options, and crypto in plain English.

Verified
stdio (local)
API key
Python
12 tools
Updated 1 month agoRepo