Skip to main content
Glama
MCP Stock Market

MCP Stock Market

by ctoouli

MCP株式市場

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

要件

  • Node.js v18以上

  • Alpha Vantage API キー(無料版あり)

Related MCP server: Stock Ticker MCP Server

設定

  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クライアントを再起動します

Available Tools

7 tools
calculatePortfolioValuePortfolio Value CalculatorC

Calculate total value of a portfolio given holdings

Inputs: holdings (required).

convertCurrencyCurrency Conversion ToolC

Convert an amount from one currency to another using latest exchange rate

Inputs: amount (required), from_currency (required), to_currency (required).

getCompanyOverviewCompany Overview ToolB

Get company information for a given stock ticker symbol using Alpha Vantage API

Inputs: symbol (required).

getDividendHistoryDividend History ToolB

Get recent dividend payout history for a ticker symbol using Alpha Vantage API

Inputs: symbol (required).

getIntradayIntraday Price ToolA

Get recent intraday stock prices (5-minute intervals) for a ticker symbol using Alpha Vantage API

Inputs: symbol (required).

getStockNewsStock News ToolC

Get the latest news for a stock ticker symbol using Alpha Vantage API

Inputs: symbol (required).

getStockPriceStock Price ToolB

Get the latest stock price for a given ticker symbol using Alpha Vantage API

Inputs: symbol (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.4/5.0

    Scored across 7 tools

    Disambiguation4/5

    Most tools have distinct purposes targeting different data types (price, news, dividends, company info, portfolio value, currency conversion). However, getStockPrice and getIntraday both provide price data, which could cause confusion about which to use for basic price queries, though getIntraday specifies intraday intervals while getStockPrice suggests latest price.

    Naming Consistency4/5

    Tool names follow a consistent verb_noun pattern with clear, descriptive names (e.g., getStockPrice, calculatePortfolioValue). The only minor deviation is convertCurrency, which uses 'convert' instead of 'get' or 'calculate', but this is appropriate for its action and maintains readability.

    Tool Count5/5

    With 7 tools, the count is well-scoped for a stock market server, covering key operations like price lookup, news, company info, dividends, portfolio valuation, and currency conversion. Each tool earns its place without bloat or thin coverage.

    Completeness4/5

    The toolset covers essential stock market data retrieval (price, news, company info, dividends) and utility functions (portfolio value, currency conversion). Minor gaps include lack of historical price data beyond intraday, market indices, or trading actions (e.g., buy/sell simulations), but core workflows are well-supported.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      D
      quality
      D
      maintenance
      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.
      3
      6
      MIT
    • -
      license
      Not graded
      quality
      D
      maintenance
      Provides real-time and historical stock market data through the Alpha Vantage API. Enables users to get current stock prices and retrieve historical stock data for any major stock symbol via natural language queries.
      -
    • A
      license
      C
      quality
      D
      maintenance
      Provides access to real-time and historical stock market data through the Alpha Vantage API, enabling financial analysis and market data queries through natural language.
      100
      57 PyPI
      74
      Apache 2.0
    • F
      license
      B
      quality
      C
      maintenance
      Provides a suite of stock analysis tools for Claude, enabling real-time price tracking, financial data retrieval, and technical indicator calculations like RSI and MACD. It leverages Finnhub and Alpha Vantage APIs to deliver comprehensive market insights through the Model Context Protocol.
      8
      -