Metadata-Version: 2.4
Name: stockprice-mcp
Version: 0.2.0
Summary: Stock price & FX MCP server for Claude Desktop, powered by yfinance — no API key required
Project-URL: Homepage, https://github.com/ajtgjmdjp/stockprice-mcp
Project-URL: Repository, https://github.com/ajtgjmdjp/stockprice-mcp
Project-URL: Issues, https://github.com/ajtgjmdjp/stockprice-mcp/issues
License-Expression: Apache-2.0
Keywords: claude,fx,japan,mcp,stock,yahoo-finance,yfinance
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Financial and Insurance Industry
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Office/Business :: Financial
Classifier: Typing :: Typed
Requires-Python: >=3.10
Requires-Dist: yfinance>=0.2
Provides-Extra: server
Requires-Dist: click>=8.0; extra == 'server'
Requires-Dist: fastmcp>=2.0; extra == 'server'
Requires-Dist: loguru>=0.7; extra == 'server'
Requires-Dist: pydantic>=2.0; extra == 'server'
Description-Content-Type: text/markdown

# stockprice-mcp

Stock price & FX rate MCP server for Claude Desktop, powered by [yfinance](https://github.com/ranaroussi/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)

```bash
uvx stockprice-mcp serve
```

Add to `claude_desktop_config.json`:

```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

```text
stockprice でトヨタ（7203）の最新株価を教えて
```

```text
stockprice で USDJPY の直近1週間の推移を確認して
```

```text
stockprice でソニーのティッカーを検索して
```

## CLI

```bash
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

```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](https://github.com/ranaroussi/yfinance) (Apache 2.0).
Data is intended for personal, educational, and research use.

## License

Apache-2.0
