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). 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.2.0.tar.gz (16.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

stockprice_mcp-0.2.0-py3-none-any.whl (10.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: stockprice_mcp-0.2.0.tar.gz
  • Upload date:
  • Size: 16.1 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.2.0.tar.gz
Algorithm Hash digest
SHA256 7eed6741dafea54568bc56bab0e45a53112201aaaa8cd7dd5c14e28cbc751c0e
MD5 e99cbb4bdf112aa1425f4547c2d7cff1
BLAKE2b-256 2a47ec1ac65b51bf159304a93fafb022ed473f667f8865331c22c52f5477d2ce

See more details on using hashes here.

File details

Details for the file stockprice_mcp-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: stockprice_mcp-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 10.5 kB
  • Tags: Python 3
  • 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.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c6adb6496d1d78f11065cdf20eeebd9b8ea7fc0cd636befea3328418362b410c
MD5 dd89e571665dac0dc62af88790ba7275
BLAKE2b-256 866ebaa7c74e71c16be676b803fab443c1f76f31cee86c00b5512648ddf8e64d

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