MCP Stock Market
MCP株式市場
Alpha Vantage APIを使用して株式市場データを取得するためのモデルコンテキストプロトコル(MCP)ツール。このツールは、シンプルなMCPインターフェースを通じて、あらゆる銘柄の毎日の株式市場データにアクセスできるようにします。
要件
Node.js v18以上
Alpha Vantage API キー(無料版あり)
Related MCP server: Stock Ticker MCP Server
設定
依存関係をインストールする
npm install.env.exampleに基づいて.envファイルを作成し、Alpha Vantage API キーを追加します。ALPHA_VANTAGE_API_KEY=your_api_key_hereAlpha Vantageから無料の API キーを取得できます。
プロジェクトを構築する
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呼び出し
より多くの容量が必要な場合は、プレミアム プランへのアップグレードを検討してください。
トラブルシューティング
問題が発生した場合:
Alpha Vantage APIキーが
.envファイルに正しく設定されていることを確認してください。Node.jsバージョン18以上を使用していることを確認してください
MCPクライアント構成のパスが正しいことを確認してください
MCPクライアントを再起動します
Available Tools
7 toolscalculatePortfolioValuePortfolio 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
Scored across 7 tools
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.
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.
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.
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
Related MCP Connectors
Daily end-of-day OHLCV stock data for U.S.-listed symbols, 15 years of history. Free API key.
Live stock quotes, a stock screener, crypto prices and FX rates as agent tools.
Yahoo Finance for AI agents: quotes, price history, options with Greeks, financials, news, movers.
Yahoo Finance stock quotes and multi-ticker comparison as agent tools.
Related MCP Servers
- AlicenseDqualityDmaintenanceAllows 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.36MIT
- -licenseNot gradedqualityDmaintenanceProvides 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.-
- AlicenseCqualityDmaintenanceProvides access to real-time and historical stock market data through the Alpha Vantage API, enabling financial analysis and market data queries through natural language.10057 PyPI74Apache 2.0
- FlicenseBqualityCmaintenanceProvides 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-