Skip to main content

Stock price & FX MCP server for Claude Desktop, powered by yfinance — no API key required

Project description

stockprice-mcp

Stock price & FX rate MCP server for Claude Desktop, powered by yfinance. No API key required.

Note: An unrelated package named yfinance-mcp exists on PyPI — it is not affiliated with this project. This project is published as stockprice-mcp.

Setup (Claude Desktop)

uvx stockprice-mcp serve

Add to claude_desktop_config.json:

{
  "mcpServers": {
    "stockprice": {
      "command": "uvx",
      "args": ["stockprice-mcp", "serve"]
    }
  }
}

Tools

Tool Description
get_stock_price Latest price + fundamentals for TSE-listed stocks (code.T)
get_stock_history OHLCV history for a date range
get_fx_rates JPY FX rates (USDJPY, EURJPY, GBPJPY, CNYJPY)
search_ticker Search ticker by company name or keyword

Usage in Claude Desktop

stockprice でトヨタ(7203)の最新株価を教えて
stockprice で USDJPY の直近1週間の推移を確認して
stockprice でソニーのティッカーを検索して

CLI

pip install stockprice-mcp

yfinance-mcp price 7203                        # 最新株価
yfinance-mcp history 7203 --start 2025-01-01   # 価格履歴
yfinance-mcp fx                                # FXレート
yfinance-mcp search Toyota                     # ティッカー検索
yfinance-mcp test                              # 疎通確認
yfinance-mcp serve                             # MCPサーバー起動

Python

import asyncio
from yfinance_mcp import YfinanceClient

async def main():
    client = YfinanceClient()
    price = await client.get_stock_price("7203")
    print(price.close, price.trailing_pe)

asyncio.run(main())

Disclaimer

This package uses yfinance (Apache 2.0) to access Yahoo Finance data. yfinance is not affiliated with or endorsed by Yahoo. Users are responsible for complying with Yahoo Finance's Terms of Service. Data is intended for personal, educational, and research use.

License

Apache-2.0

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

stockprice_mcp-0.1.0.tar.gz (6.9 kB view details)

Uploaded Source

File details

Details for the file stockprice_mcp-0.1.0.tar.gz.

File metadata

  • Download URL: stockprice_mcp-0.1.0.tar.gz
  • Upload date:
  • Size: 6.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.0 {"installer":{"name":"uv","version":"0.10.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for stockprice_mcp-0.1.0.tar.gz
Algorithm Hash digest
SHA256 1a707c89336afefb4190740848b050772ddd7f0ca6a89b781073df3670b6e1f1
MD5 f7706328d39f9182b966612f3b6d47b6
BLAKE2b-256 3883c6b50309fe23a9e503afbd75d9fff48f86512f9f8281b543da7b70b52a00

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page