
twolven/mcp-stockflow
Developer toolsこのページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る
MCPを用いたClaudeデスクトップ用株式市場データプロバイダ
概要
株式メタデータ、価格履歴、テクニカル指標、財務諸表、カレンダー、オプションチェーン用のFastMCPサーバーをyfinanceでタイプしました。 ローカルstdioとコンテナ化された Streamable HTTP トランスポートをサポートしています。 - get stock data v2(symbol、include financials=False、include analysis=False、include calendar=False) - get historical data v2(symbol、期間、間隔='1d'、prepost=False) - get options chain v2(symbol、expiration date=None、include greeks=False) 歴史的ダウンロードは、明示的に非調整価格、修理可能、タイムゾーン保持、タイムアウト、フラットなシングルシンボルインデックスを使用します。 行はタイムスタンプを保持し、別々の調整クローズ列を省略します。 ヴォラティリティは、毎回リクエストされた間隔で年間252/5を5日間のバーに使用し、延長時間のセッションのために不規則な期間をスケールアップします。 RSI は、正規のゼロ・エグメント/ロス動作を定義した、再帰的なスムースによって続くキャノンのシンプル・平均シードを使用します.
概要(AI 翻訳)
株式メタデータ、価格履歴、テクニカル指標、財務諸表、カレンダー、オプションチェーン用のFastMCPサーバーをyfinanceでタイプしました。 ローカルstdioとコンテナ化された Streamable HTTP トランスポートをサポートしています。
ツール
- [
get_stock_data_v2(symbol, include_financials=False, include_analysis=False, include_calendar=False)] - [
get_historical_data_v2(symbol, period, interval='1d', prepost=False) - [
get_options_chain_v2(symbol, expiration_date=None, include_greeks=False)
歴史的ダウンロードは、明示的に非調整価格、修理可能、タイムゾーン保持、タイムアウト、フラットなシングルシンボルインデックスを使用します。 行はタイムスタンプを保持し、別々の調整クローズ列を省略します。 ヴォラティリティは、毎回リクエストされた間隔で年間252/5を5日間のバーに使用し、延長時間のセッションのために不規則な期間をスケールアップします。 RSI は、正規のゼロ・エグメント/ロス動作を定義した、再帰的なスムースによって続くキャノンのシンプル・平均シードを使用します。 要求されると、オプションのギリシャ語は理論的なヨーロッパの黒の小胞は1つの割合ポイントあたりの割合(一日あたりのΘ; 1つのパーセンテージポイントあたりのvega/rho);リスクフリーレートメタデータは、構成されたフォールバックを識別します。
サーバは stdio を使用します.
このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。
README
以下は原文 README の抜粋です。原文を見る。
StockFlow MCP
A typed FastMCP server for stock metadata, price history, technical indicators, financial statements, calendars, and option chains through yfinance. It supports local stdio and containerized Streamable HTTP transports.
Tools
get_stock_data_v2(symbol, include_financials=False, include_analysis=False, include_calendar=False)get_historical_data_v2(symbol, period, interval='1d', prepost=False)get_options_chain_v2(symbol, expiration_date=None, include_greeks=False)
Historical downloads explicitly use unadjusted prices, repair enabled, timezone retention, a timeout, and a flat single-symbol index. Rows retain timestamps and omit the separately adjusted-close column. Volatility is annualized for every requested interval, uses 252/5 for five-day bars, and scales intraday periods for extended-hours sessions. RSI uses the canonical Wilder simple-average seed followed by recursive smoothing, with defined zero-gain/loss behavior. When requested, option Greeks are theoretical European Black-Scholes estimates per share (theta per day; vega/rho per one percentage point); risk-free-rate metadata identifies the configured fallback.
uv sync --locked
uv run python stockflow.py
The server uses stdio. Yahoo Finance is an unofficial personal-use source and may be delayed, incomplete, rate-limited, missing fields, or structurally changed. Dividends and American-style early exercise are not modeled in Greeks. Results are not investment advice or guaranteed real-time data.
Docker / Streamable HTTP
The container runs as an unprivileged user, installs the locked production dependencies, and serves MCP at http://127.0.0.1:8000/mcp. Start it with:
docker compose up --build -d
Invoke-RestMethod http://127.0.0.1:8000/health
Connect a Streamable HTTP-capable MCP client to http://127.0.0.1:8000/mcp. To avoid a port collision when running multiple servers, set MCP_HOST_PORT before starting Compose, for example $env:MCP_HOST_PORT=8003. Stop and remove the container with docker compose down.
The Compose mapping intentionally binds to localhost. The endpoint has no authentication or TLS and must not be exposed to an untrusted network without a properly configured reverse proxy and access control.
Binding to loopback alone does not make the endpoint private: a browser can still reach it through DNS rebinding, so the server validates Host and Origin headers before a request reaches an MCP session. Requests carrying a foreign Host are answered with 421 Misdirected Request and those carrying a foreign Origin with 403 Forbidden, while same-origin loopback traffic and non-browser clients that send no Origin are unaffected.
| Variable | Default | Purpose |
|---|---|---|
MCP_TRANSPORT |
stdio |
stdio, http, or streamable-http. |
MCP_HOST |
127.0.0.1 |
Interface the HTTP server binds. |
MCP_PORT |
8000 |
Port inside the container. |
インストール
This server does not publish a one-line install command.
Open the repository installation guide MCP 初心者?mcpskill.org のガイドから始めましょう →