Alpaca MCP ServerServer

miguelyad26
GitHub
FinanceTradingNatural Language Processing

Loading subscription status...

💡 Description

This is a Model Context Protocol (MCP) server for Alpaca, allowing LLMs like Claude to interact with the Alpaca trading API. It enables stock trading, position checks, market data retrieval, and account management through natural language.

📝 JSON Entries

{
  "mcpServers": [
    {
      "alpaca": {
        "env": {
          "API_KEY_ID": "your_alpaca_api_key",
          "API_SECRET_KEY": "your_alpaca_secret_key"
        },
        "args": [
          "/path/to/alpaca_mcp_server.py"
        ],
        "command": "python"
      }
    }
  ]
}

🛠️ Tools

get_account_info()get_positions()get_stock_quote(symbol)get_stock_bars(symbol, days)get_orders(status, limit)place_market_order(symbol, side, quantity)place_limit_order(symbol, side, quantity, limit_price)cancel_all_orders()close_all_positions(cancel_orders)

Features

  • Access Alpaca SDK documentation
  • Get real-time stock quotes and historical price data
  • Check account balances and status
  • Manage current positions and performance
  • Place market and limit orders via natural language
  • List, track, and cancel orders

💬 Example Queries

  • What is the balance of my current account and my buying power?
  • Show me my current positions
  • Get the latest quote for AAPL
  • Show me the price history of TSLA for the last 10 days
  • Buy 5 shares of MSFT at market price.
  • Sell 10 shares of AMZN with a limit price of $130.
  • Cancel all my open orders