Skip to main content
Glama

Alpaca MCP Server

by cesarvarela

アルパカ MCP サーバー

Alpaca マーケット データとブローカー API を MCP ツールとして公開します。

インストール

npm install alpaca-mcp

地域開発

git clone <repo-url> cd alpaca-mcp npm install

環境変数

プロジェクトのルートに次の.envを作成します。

ALPACA_ENDPOINT=https://data.alpaca.markets ALPACA_BROKER_ENDPOINT=https://broker-api.alpaca.markets ALPACA_API_KEY=YOUR_ALPACA_API_KEY ALPACA_SECRET_KEY=YOUR_ALPACA_SECRET_KEY

コマンド

  • 開始(dev): npm start ( npx tsx index.ts実行)
  • ビルド: npm run build ( dist/にコンパイルされます)
  • コンパイルして実行: node dist/index.js

使用法

MCPサーバーは起動するとstdin/stdoutをリッスンします。任意のMCPクライアントまたはCLIを使用してください。

npm link # optional alpaca-mcp # starts server globally

利用可能なツール

  • 資産を取得する{ assetClass?: "us_equity" | "crypto" }
  • get-stock-bars { symbols: string[]; start: string; end: string; timeframe: string }
  • get-market-days { start: string; end: string }
  • get-news { start: string; end: string; symbols: string[] }

それぞれcontent[0].textでJSONを返すかエラーを返します。

MCP クライアント構成

mcp.config.json経由で統合するには、 mcpServersキーの下に以下を追加します。

{ "mcpServers": { "alpaca-mcp": { "command": "npx", "args": [ "-y", "alpaca-mcp" ], "env": { "ALPACA_ENDPOINT": "https://data.alpaca.markets", "ALPACA_BROKER_ENDPOINT": "https://broker-api.alpaca.markets", "ALPACA_API_KEY": "<YOUR_API_KEY>", "ALPACA_SECRET_KEY": "<YOUR_SECRET_KEY>" } } } } ## Publishing ```bash npm publish

ライセンス

ISC

Install Server
A
security – no known vulnerabilities
F
license - not found
A
quality - confirmed to work

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

Alpaca Market Data & Broker API をツールとして公開し、メッセージ制御プロトコルを通じて株価バー、資産、市場日、ニュースなどの金融データにアクセスできるようにする MCP サーバー。

  1. インストール
    1. 地域開発
      1. 環境変数
        1. コマンド
          1. 使用法
            1. 利用可能なツール
          2. MCP クライアント構成
            1. ライセンス

              Related MCP Servers

              • A
                security
                A
                license
                A
                quality
                A Model Context Protocol (MCP) server that provides real-time access to financial market data through the free Alpha Vantage API. This server implements a standardized interface for retrieving stock quotes and company information.
                Last updated -
                5
                55
                Python
                MIT License
                • Apple
              • A
                security
                A
                license
                A
                quality
                MCP server that provides AI assistants access to stock market data including financial statements, stock prices, and market news through a Model Context Protocol interface.
                Last updated -
                11
                433
                Python
                MIT License
                • Apple
              • -
                security
                A
                license
                -
                quality
                A Model Context Protocol server that enables LLMs like Claude to interact with the Alpaca trading API, allowing for trading stocks, checking positions, fetching market data, and managing accounts through natural language.
                Last updated -
                3
                Python
                MIT License
              • -
                security
                A
                license
                -
                quality
                An MCP server that integrates with the AlphaVantage financial data API, providing access to stock market data, technical indicators, and fundamental financial information.
                Last updated -
                Python
                MIT License
                • Linux
                • Apple

              View all related MCP servers

              MCP directory API

              We provide all the information about MCP servers via our MCP API.

              curl -X GET 'https://glama.ai/api/mcp/v1/servers/cesarvarela/alpaca-mcp'

              If you have feedback or need assistance with the MCP directory API, please join our Discord server