MCP Stock Market

by ctoouli

Integrations

  • Uses .ENV for environment variable management, specifically to store and access the Alpha Vantage API key required for authentication.

  • Runs on Node.js v18 or higher to execute the MCP server that retrieves stock market data.

  • Uses npm for dependency management and running build commands for the MCP server.

MCP株式市場

Alpha Vantage APIを使用して株式市場データを取得するためのモデルコンテキストプロトコル(MCP)ツール。このツールは、シンプルなMCPインターフェースを通じて、あらゆる銘柄の毎日の株式市場データにアクセスできるようにします。

要件

  • Node.js v18以上
  • Alpha Vantage API キー(無料版あり)

設定

  1. 依存関係をインストールする
    npm install
  2. .env.exampleに基づいて.envファイルを作成し、Alpha Vantage API キーを追加します。
    ALPHA_VANTAGE_API_KEY=your_api_key_here
    Alpha Vantageから無料の API キーを取得できます。
  3. プロジェクトを構築する
    npm run build

MCP クライアント構成

このツールをMCPクライアントで使用するには、MCPサーバーの設定を更新する必要があります。クライアントの設定に以下の行を追加してください。

{ "mcpServers": { "stock-market": { "command": "node", "args": [ "/ABSOLUTE/PATH/TO/PARENT/FOLDER/mcp-stock-market/build/index.js" ] } } }

/ABSOLUTE/PATH/TO/PARENT/FOLDERこのリポジトリを含む親ディレクトリへの実際の絶対パスに置き換えてください。

利用可能なツール

株価データ取得

特定の株価シンボルの毎日の株式市場データを取得します。

パラメータ:

  • symbol : 株式シンボル(例: IBM、AAPL、MSFT、GOOG、AMZN)

MCP クライアントでの使用例:

@stock-market get-stock-data symbol=AAPL

応答例:

Stock: AAPL Last Updated: 2025-03-12 Time Zone: US/Eastern Daily Prices: Date: 2025-03-12 Open: $178.35 High: $180.13 Low: $177.53 Close: $179.63 Volume: 58,492,206 --- Date: 2025-03-11 Open: $177.99 High: $179.70 Low: $176.86 Close: $178.95 Volume: 62,630,570 ---

発達

プロジェクト構造

  • src/index.ts - MCP サーバーとツールの実装を含むメイン アプリケーション ファイル
  • build/ - コンパイルされたJavaScript出力
  • .env - 環境変数(APIキー)

コマンド

  • npm run build - TypeScriptコードをビルドする

API使用上の注意

このツールは、Alpha Vantage APIを使用して株式市場データを取得します。Alpha Vantageの無料版には以下の制限があります。

  • 1日あたり25回のAPI呼び出し
  • 1分あたり5回のAPI呼び出し

より多くの容量が必要な場合は、プレミアム プランへのアップグレードを検討してください。

トラブルシューティング

問題が発生した場合:

  1. Alpha Vantage APIキーが.envファイルに正しく設定されていることを確認してください。
  2. Node.jsバージョン18以上を使用していることを確認してください
  3. MCPクライアント構成のパスが正しいことを確認してください
  4. MCPクライアントを再起動します
-
security - not tested
A
license - permissive license
-
quality - not tested

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.

Alpha Vantage API を使用して、任意の株価シンボルの毎日の株価市場データを取得するモデル コンテキスト プロトコル ツール。

  1. 要件
    1. 設定
      1. MCP クライアント構成
        1. 利用可能なツール
          1. 株価データ取得
        2. 発達
          1. プロジェクト構造
          2. コマンド
        3. API使用上の注意
          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
              30
              Python
              MIT License
              • Apple
            • A
              security
              A
              license
              A
              quality
              Allows Claude and other MCP clients to access real-time and historical stock market data from Alpha Vantage API, including intraday and daily stock data with customizable intervals.
              Last updated -
              3
              3
              TypeScript
              MIT License
            • A
              security
              A
              license
              A
              quality
              A Model Context Protocol server that enables interaction with Yahoo Finance to retrieve stock pricing, company information, and historical financial data through natural language queries.
              Last updated -
              9
              3
              Python
              MIT License
            • A
              security
              F
              license
              A
              quality
              A Model Context Protocol server that enables LLMs to access comprehensive financial data from Alpha Vantage API, including stock prices, fundamentals, forex, crypto, and economic indicators.
              Last updated -
              94
              12
              JavaScript

            View all related MCP servers

            ID: pjettfyiam