StockPrice
This server provides tools for stock price data and screening Japanese stocks.
StockPrice: Fetches current and historical stock price information from Yahoo Finance for a given symbol (e.g.,
AAPL,7203.T). Returns details like price, volume, etc.ScreenStocks: Filters stocks on the Tokyo Stock Exchange Prime Market (default) based on a variety of financial metrics, including:
PER (trailing or forward)
PBR
Dividend yield
Market capitalization
Stock price
Trading volume (daily or 3-month average)
Day-over-day price change percentage
EPS, BPS, and 52-week price change
Supports custom filtering with operators (
gte,lte,gt,lt,eq) combined with AND logic.Optionally filter by one of 33 TSE industry sectors or specify target symbols.
Sort results by any supported metric (ascending/descending) and limit the number returned (up to 200).
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@StockPriceWhat's the current price of AAPL?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
stock-mcp
Yahoo Finance から株価情報を取得する MCP サーバーです。
セットアップ
npm installRelated MCP server: YFinance MCP Server
開発起動
npm run devビルド
npm run buildMCP クライアント設定
このサーバーは stdio transport で起動します。MCP クライアントには、ビルド後の build/index.js を node で実行するように設定します。
事前にビルドしてください。
npm install
npm run buildCodex
~/.codex/config.toml またはプロジェクトの .codex/config.toml に設定します。
[mcp_servers.stock-mcp]
command = "node"
args = ["/path/to/stock-mcp/build/index.js"]CLI で追加する場合:
codex mcp add stock-mcp -- node /path/to/stock-mcp/build/index.jsClaude Code
Claude Code の MCP 設定は JSON の mcpServers 形式です。プロジェクトで共有する場合は .mcp.json に設定します。
{
"mcpServers": {
"stock-mcp": {
"command": "node",
"args": [
"/path/to/stock-mcp/build/index.js"
]
}
}
}CLI で追加する場合:
claude mcp add --transport stdio stock-mcp -- node /path/to/stock-mcp/build/index.js開発用設定
開発中に TypeScript のまま起動したい場合は、各クライアントで npm --prefix ... run dev を実行するように設定します。
Codex:
[mcp_servers.stock-mcp]
command = "npm"
args = [
"--prefix",
"/path/to/stock-mcp",
"run",
"dev",
]Claude Code:
{
"mcpServers": {
"stock-mcp": {
"command": "npm",
"args": [
"--prefix",
"/path/to/stock-mcp",
"run",
"dev"
]
}
}
}設定後、MCP クライアントを再起動すると StockPrice と ScreenStocks のツールを利用できます。
MCP ツール
サーバー名:
stock-mcpStockPrice:symbolに銘柄コードを指定して株価情報を取得します。ScreenStocks: 東証プライムの銘柄を、PER や配当利回りなどの条件で絞り込みます。
StockPrice
入力
パラメータ | 型 | 必須 | 説明 |
| string | Yes | 銘柄コード。米国株は |
例:
{
"symbol": "AAPL"
}出力
yahoo-finance2 の quote() の結果を、加工せず JSON 文字列にしてテキストコンテンツで返します。フィールドの内容は yahoo-finance2 および Yahoo Finance 側の仕様に従うため、詳細は下記を参照してください。
エラー時も yahoo-finance2 が投げた内容がそのまま MCP のツールエラーとして返ります。
ScreenStocks
指定した条件をすべて満たす銘柄だけを返します。
yahoo-finance2 にも screener() はありますが、指定できるのは day_gainers や undervalued_large_caps といった定義済みのプリセットで、任意の条件を組み立てることはできません。region パラメータはあるものの、JP を指定しても返るのは米国株でした。日本株を独自の条件で絞り込む用途には不十分なため、銘柄一覧を JPX から、指標を Yahoo Finance から取得して、絞り込みはこのサーバーで行います。
入力
パラメータ | 型 | 必須 | 説明 |
| array | Yes | 絞り込み条件。すべてを満たす銘柄が対象(AND 条件) |
| array | No | 対象銘柄。省略すると東証プライムの全銘柄が対象 |
| string | No | 33 業種区分での絞り込み(例: |
| string | No | 並び替えに使う指標 |
| string | No |
|
| number | No | 返す件数の上限。1〜200(既定: 20) |
symbols は証券コードのままでも指定できます。7203 や 166A のように先頭が数字の 4〜5 桁は .T を補って Yahoo Finance のシンボルに変換します(7203 → 7203.T)。. を含む文字列はそのまま使います。
filters の各要素は field(指標)、op(比較演算子)、value(しきい値)を持ちます。op は gte(以上)、lte(以下)、gt(超)、lt(未満)、eq(等しい)です。
指定できる field と sortBy:
指標 | 内容 |
| 実績 PER(倍) |
| 予想 PER(倍) |
| PBR(倍) |
| 配当利回り(%) |
| 時価総額(円) |
| 株価(円) |
| 出来高(株) |
| 平均出来高・3ヶ月(株) |
| 前日比(%) |
| EPS(円) |
| BPS(円) |
| 52 週騰落率(%) |
例(PER 15 倍以下・PBR 1 倍以下・配当利回り 3.5% 以上を、利回り順に 8 件):
{
"filters": [
{ "field": "trailingPE", "op": "lte", "value": 15 },
{ "field": "priceToBook", "op": "lte", "value": 1.0 },
{ "field": "dividendYield", "op": "gte", "value": 3.5 }
],
"sortBy": "dividendYield",
"order": "desc",
"limit": 8
}出力
条件と sortBy に使った指標だけを返します(株価は常に含みます)。全銘柄の生データは返しません。
{
"evaluated": 1559,
"fetched": 1558,
"matched": 171,
"returned": 8,
"elapsedMs": 2036,
"fieldLabels": { "trailingPE": "実績PER(倍)" },
"results": [
{
"symbol": "6358.T",
"name": "酒井重工業",
"sector": "機械",
"regularMarketPrice": 2135,
"trailingPE": 10.383737,
"priceToBook": 0.5794713,
"dividendYield": 6.06
}
]
}evaluated は対象銘柄数、fetched は指標を取得できた銘柄数です。指標が欠けている銘柄は条件を判定できないため対象外になります。
データの取得元と注意点
銘柄一覧は JPX の東証上場銘柄一覧(
data_j.xls)から取得し、市場・商品区分がプライム(内国株式)の銘柄を対象にします取得結果は
~/.cache/stock-mcp/jpx-prime.jsonに 7 日間キャッシュします。元ファイルが月次更新のため、上場・廃止の反映は最大 7 日遅れます株価・指標は Yahoo Finance から取得します。日本株は約 20 分遅延です
プライム全銘柄を対象にすると、Yahoo へのリクエストは 250 銘柄ずつ 7 回程度になります(実測 約 2 秒)
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Tools
Related MCP Servers
- AlicenseAqualityAmaintenanceA simple MCP server for Yahoo Finance using yfinance. This server provides a set of tools to fetch stock data, news, and other financial information.Last updated13173MIT
- Alicense-qualityDmaintenanceA comprehensive MCP server that provides seamless access to Yahoo Finance stock market data, enabling retrieval of real-time quotes, historical data, charts, financial summaries, and market searches.Last updated68ISC
- AlicenseAqualityBmaintenanceAn MCP server that exposes comprehensive Yahoo Finance data (quotes, financials, options, news, and more) to AI agents via the yfinance library, requiring no API key.Last updated24MIT
- Flicense-qualityDmaintenanceA lightweight MCP server for accessing Yahoo Finance data, providing stock prices, history, company information, and financial statements.Last updated
Related MCP Connectors
Alpaca MCP — real-time US stock market data via the Alpaca Market Data API
Multi-tenant FastMCP server for Charles Schwab brokerage data, monetized via DPYC Tollbooth
MCP server exposing the Backtest360 engine API as tools for AI agents.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/motucraft/stock-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server