siya-yahoo-finance-mcp


Namesiya-yahoo-finance-mcp JSON
Version 0.1.2 PyPI version JSON
download
home_pageNone
SummaryMCP server implementation for yahoo finance integration
upload_time2025-08-02 12:45:59
maintainerNone
docs_urlNone
authorNone
requires_python>=3.12
licenseMIT License Copyright (c) 2025 AlexYoung Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords ai claude financial-data mcp yahoo-finance
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            [![MseeP.ai Security Assessment Badge](https://mseep.net/pr/alex2yang97-siya-yahoo-finance-mcp-badge.png)](https://mseep.ai/app/alex2yang97-siya-yahoo-finance-mcp)

# Yahoo Finance MCP Server

<div align="right">
  <a href="README.md">English</a> | <a href="README.zh.md">中文</a>
</div>

This is a Model Context Protocol (MCP) server that provides comprehensive financial data from Yahoo Finance. It allows you to retrieve detailed information about stocks, including historical prices, company information, financial statements, options data, and market news.

[![smithery badge](https://smithery.ai/badge/@Alex2Yang97/siya-yahoo-finance-mcp)](https://smithery.ai/server/@Alex2Yang97/siya-yahoo-finance-mcp)

## Demo

![MCP Demo](assets/demo.gif)

## MCP Tools

The server exposes the following tools through the Model Context Protocol:

### Stock Information

| Tool | Description |
|------|-------------|
| `get_historical_stock_prices` | Get historical OHLCV data for a stock with customizable period and interval |
| `get_stock_info` | Get comprehensive stock data including price, metrics, and company details |
| `get_yahoo_finance_news` | Get latest news articles for a stock |
| `get_stock_actions` | Get stock dividends and splits history |

### Financial Statements

| Tool | Description |
|------|-------------|
| `get_financial_statement` | Get income statement, balance sheet, or cash flow statement (annual/quarterly) |
| `get_holder_info` | Get major holders, institutional holders, mutual funds, or insider transactions |

### Options Data

| Tool | Description |
|------|-------------|
| `get_option_expiration_dates` | Get available options expiration dates |
| `get_option_chain` | Get options chain for a specific expiration date and type (calls/puts) |

### Analyst Information

| Tool | Description |
|------|-------------|
| `get_recommendations` | Get analyst recommendations or upgrades/downgrades history |

## Real-World Use Cases

With this MCP server, you can use Claude to:

### Stock Analysis

- **Price Analysis**: "Show me the historical stock prices for AAPL over the last 6 months with daily intervals."
- **Financial Health**: "Get the quarterly balance sheet for Microsoft."
- **Performance Metrics**: "What are the key financial metrics for Tesla from the stock info?"
- **Trend Analysis**: "Compare the quarterly income statements of Amazon and Google."
- **Cash Flow Analysis**: "Show me the annual cash flow statement for NVIDIA."

### Market Research

- **News Analysis**: "Get the latest news articles about Meta Platforms."
- **Institutional Activity**: "Show me the institutional holders of Apple stock."
- **Insider Trading**: "What are the recent insider transactions for Tesla?"
- **Options Analysis**: "Get the options chain for SPY with expiration date 2024-06-21 for calls."
- **Analyst Coverage**: "What are the analyst recommendations for Amazon over the last 3 months?"

### Investment Research

- "Create a comprehensive analysis of Microsoft's financial health using their latest quarterly financial statements."
- "Compare the dividend history and stock splits of Coca-Cola and PepsiCo."
- "Analyze the institutional ownership changes in Tesla over the past year."
- "Generate a report on the options market activity for Apple stock with expiration in 30 days."
- "Summarize the latest analyst upgrades and downgrades in the tech sector over the last 6 months."

## Requirements

- Python 3.11 or higher
- Dependencies as listed in `pyproject.toml`, including:
  - mcp
  - yfinance
  - pandas
  - pydantic
  - and other packages for data processing

## Installation

### Option 1: Install from PyPI (Recommended)

```bash
pip install siya-siya-yahoo-finance-mcp
```

### Option 2: Install from Source

1. Clone this repository:
   ```bash
   git clone https://github.com/Alex2Yang97/siya-yahoo-finance-mcp.git
   cd siya-yahoo-finance-mcp
   ```

2. Create and activate a virtual environment and install dependencies:
   ```bash
   uv venv
   source .venv/bin/activate  # On Windows: .venv\Scripts\activate
   uv pip install -e .
   ```

## Usage

### Command Line Usage

**Option 1: Run with uvx (Recommended - no installation needed):**
```bash
uvx siya-yahoo-finance-mcp
```

**Option 2: After installation, run directly:**
```bash
siya-yahoo-finance-mcp
```

**Option 3: Run as Python module:**
```bash
python -m siya_yahoo_finance_mcp.server
```

### Integration with Claude for Desktop

To integrate this server with Claude for Desktop:

1. Install Claude for Desktop

2. Edit the Claude for Desktop config file:
   - **MacOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`
   - **Windows**: `%APPDATA%\Claude\claude_desktop_config.json`

3. Add the server configuration:

   **Option 1: Using uvx (Recommended - no installation needed):**
   ```json
   {
     "mcpServers": {
       "yfinance": {
         "command": "uvx",
         "args": ["siya-yahoo-finance-mcp"]
       }
     }
   }
   ```

   **Option 2: Using installed package:**
   ```json
   {
     "mcpServers": {
       "yfinance": {
         "command": "siya-yahoo-finance-mcp"
       }
     }
   }
   ```

   **Option 3: Using Python module:**
   ```json
   {
     "mcpServers": {
       "yfinance": {
         "command": "python",
         "args": ["-m", "siya_yahoo_finance_mcp.server"]
       }
     }
   }
   ```

4. Restart Claude for Desktop

### Development Mode

For development or testing with MCP Inspector:

```bash
# If installed from source
uv run siya_yahoo_finance_mcp/server.py

# If installed via pip
python -c "from siya_yahoo_finance_mcp.server import main; main()"
```

## License

MIT



            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "siya-yahoo-finance-mcp",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.12",
    "maintainer_email": null,
    "keywords": "ai, claude, financial-data, mcp, yahoo-finance",
    "author": null,
    "author_email": "Siya AI <contact@siya.ai>",
    "download_url": "https://files.pythonhosted.org/packages/9a/eb/9246855ac2d38347ccb648ff000fb7a749dabb1a3b641b38554158d666e1/siya_yahoo_finance_mcp-0.1.2.tar.gz",
    "platform": null,
    "description": "[![MseeP.ai Security Assessment Badge](https://mseep.net/pr/alex2yang97-siya-yahoo-finance-mcp-badge.png)](https://mseep.ai/app/alex2yang97-siya-yahoo-finance-mcp)\n\n# Yahoo Finance MCP Server\n\n<div align=\"right\">\n  <a href=\"README.md\">English</a> | <a href=\"README.zh.md\">\u4e2d\u6587</a>\n</div>\n\nThis is a Model Context Protocol (MCP) server that provides comprehensive financial data from Yahoo Finance. It allows you to retrieve detailed information about stocks, including historical prices, company information, financial statements, options data, and market news.\n\n[![smithery badge](https://smithery.ai/badge/@Alex2Yang97/siya-yahoo-finance-mcp)](https://smithery.ai/server/@Alex2Yang97/siya-yahoo-finance-mcp)\n\n## Demo\n\n![MCP Demo](assets/demo.gif)\n\n## MCP Tools\n\nThe server exposes the following tools through the Model Context Protocol:\n\n### Stock Information\n\n| Tool | Description |\n|------|-------------|\n| `get_historical_stock_prices` | Get historical OHLCV data for a stock with customizable period and interval |\n| `get_stock_info` | Get comprehensive stock data including price, metrics, and company details |\n| `get_yahoo_finance_news` | Get latest news articles for a stock |\n| `get_stock_actions` | Get stock dividends and splits history |\n\n### Financial Statements\n\n| Tool | Description |\n|------|-------------|\n| `get_financial_statement` | Get income statement, balance sheet, or cash flow statement (annual/quarterly) |\n| `get_holder_info` | Get major holders, institutional holders, mutual funds, or insider transactions |\n\n### Options Data\n\n| Tool | Description |\n|------|-------------|\n| `get_option_expiration_dates` | Get available options expiration dates |\n| `get_option_chain` | Get options chain for a specific expiration date and type (calls/puts) |\n\n### Analyst Information\n\n| Tool | Description |\n|------|-------------|\n| `get_recommendations` | Get analyst recommendations or upgrades/downgrades history |\n\n## Real-World Use Cases\n\nWith this MCP server, you can use Claude to:\n\n### Stock Analysis\n\n- **Price Analysis**: \"Show me the historical stock prices for AAPL over the last 6 months with daily intervals.\"\n- **Financial Health**: \"Get the quarterly balance sheet for Microsoft.\"\n- **Performance Metrics**: \"What are the key financial metrics for Tesla from the stock info?\"\n- **Trend Analysis**: \"Compare the quarterly income statements of Amazon and Google.\"\n- **Cash Flow Analysis**: \"Show me the annual cash flow statement for NVIDIA.\"\n\n### Market Research\n\n- **News Analysis**: \"Get the latest news articles about Meta Platforms.\"\n- **Institutional Activity**: \"Show me the institutional holders of Apple stock.\"\n- **Insider Trading**: \"What are the recent insider transactions for Tesla?\"\n- **Options Analysis**: \"Get the options chain for SPY with expiration date 2024-06-21 for calls.\"\n- **Analyst Coverage**: \"What are the analyst recommendations for Amazon over the last 3 months?\"\n\n### Investment Research\n\n- \"Create a comprehensive analysis of Microsoft's financial health using their latest quarterly financial statements.\"\n- \"Compare the dividend history and stock splits of Coca-Cola and PepsiCo.\"\n- \"Analyze the institutional ownership changes in Tesla over the past year.\"\n- \"Generate a report on the options market activity for Apple stock with expiration in 30 days.\"\n- \"Summarize the latest analyst upgrades and downgrades in the tech sector over the last 6 months.\"\n\n## Requirements\n\n- Python 3.11 or higher\n- Dependencies as listed in `pyproject.toml`, including:\n  - mcp\n  - yfinance\n  - pandas\n  - pydantic\n  - and other packages for data processing\n\n## Installation\n\n### Option 1: Install from PyPI (Recommended)\n\n```bash\npip install siya-siya-yahoo-finance-mcp\n```\n\n### Option 2: Install from Source\n\n1. Clone this repository:\n   ```bash\n   git clone https://github.com/Alex2Yang97/siya-yahoo-finance-mcp.git\n   cd siya-yahoo-finance-mcp\n   ```\n\n2. Create and activate a virtual environment and install dependencies:\n   ```bash\n   uv venv\n   source .venv/bin/activate  # On Windows: .venv\\Scripts\\activate\n   uv pip install -e .\n   ```\n\n## Usage\n\n### Command Line Usage\n\n**Option 1: Run with uvx (Recommended - no installation needed):**\n```bash\nuvx siya-yahoo-finance-mcp\n```\n\n**Option 2: After installation, run directly:**\n```bash\nsiya-yahoo-finance-mcp\n```\n\n**Option 3: Run as Python module:**\n```bash\npython -m siya_yahoo_finance_mcp.server\n```\n\n### Integration with Claude for Desktop\n\nTo integrate this server with Claude for Desktop:\n\n1. Install Claude for Desktop\n\n2. Edit the Claude for Desktop config file:\n   - **MacOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`\n   - **Windows**: `%APPDATA%\\Claude\\claude_desktop_config.json`\n\n3. Add the server configuration:\n\n   **Option 1: Using uvx (Recommended - no installation needed):**\n   ```json\n   {\n     \"mcpServers\": {\n       \"yfinance\": {\n         \"command\": \"uvx\",\n         \"args\": [\"siya-yahoo-finance-mcp\"]\n       }\n     }\n   }\n   ```\n\n   **Option 2: Using installed package:**\n   ```json\n   {\n     \"mcpServers\": {\n       \"yfinance\": {\n         \"command\": \"siya-yahoo-finance-mcp\"\n       }\n     }\n   }\n   ```\n\n   **Option 3: Using Python module:**\n   ```json\n   {\n     \"mcpServers\": {\n       \"yfinance\": {\n         \"command\": \"python\",\n         \"args\": [\"-m\", \"siya_yahoo_finance_mcp.server\"]\n       }\n     }\n   }\n   ```\n\n4. Restart Claude for Desktop\n\n### Development Mode\n\nFor development or testing with MCP Inspector:\n\n```bash\n# If installed from source\nuv run siya_yahoo_finance_mcp/server.py\n\n# If installed via pip\npython -c \"from siya_yahoo_finance_mcp.server import main; main()\"\n```\n\n## License\n\nMIT\n\n\n",
    "bugtrack_url": null,
    "license": "MIT License\n        \n        Copyright (c) 2025 AlexYoung\n        \n        Permission is hereby granted, free of charge, to any person obtaining a copy\n        of this software and associated documentation files (the \"Software\"), to deal\n        in the Software without restriction, including without limitation the rights\n        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n        copies of the Software, and to permit persons to whom the Software is\n        furnished to do so, subject to the following conditions:\n        \n        The above copyright notice and this permission notice shall be included in all\n        copies or substantial portions of the Software.\n        \n        THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n        SOFTWARE.",
    "summary": "MCP server implementation for yahoo finance integration",
    "version": "0.1.2",
    "project_urls": {
        "Homepage": "https://github.com/Alex2Yang97/yahoo-finance-mcp",
        "Issues": "https://github.com/Alex2Yang97/yahoo-finance-mcp/issues",
        "Repository": "https://github.com/Alex2Yang97/yahoo-finance-mcp"
    },
    "split_keywords": [
        "ai",
        " claude",
        " financial-data",
        " mcp",
        " yahoo-finance"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "141a1a5d1792cc9570979ac90366936f6fb3b41057fc679f8082f56d393694be",
                "md5": "aff1a7d96dab071f00cd83e06294b95b",
                "sha256": "4f537afb2fd34ca194b8600b3d0392e97cf29e2e500affd04e688bd7b922dafc"
            },
            "downloads": -1,
            "filename": "siya_yahoo_finance_mcp-0.1.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "aff1a7d96dab071f00cd83e06294b95b",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.12",
            "size": 8961,
            "upload_time": "2025-08-02T12:45:58",
            "upload_time_iso_8601": "2025-08-02T12:45:58.065993Z",
            "url": "https://files.pythonhosted.org/packages/14/1a/1a5d1792cc9570979ac90366936f6fb3b41057fc679f8082f56d393694be/siya_yahoo_finance_mcp-0.1.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "9aeb9246855ac2d38347ccb648ff000fb7a749dabb1a3b641b38554158d666e1",
                "md5": "cff53893c2e01333c15966831cc02747",
                "sha256": "51a04ab0f599f39b4edcaa490a22205e8e624667a78c6f9e4a4d6f64a69bd8dc"
            },
            "downloads": -1,
            "filename": "siya_yahoo_finance_mcp-0.1.2.tar.gz",
            "has_sig": false,
            "md5_digest": "cff53893c2e01333c15966831cc02747",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.12",
            "size": 8875,
            "upload_time": "2025-08-02T12:45:59",
            "upload_time_iso_8601": "2025-08-02T12:45:59.354019Z",
            "url": "https://files.pythonhosted.org/packages/9a/eb/9246855ac2d38347ccb648ff000fb7a749dabb1a3b641b38554158d666e1/siya_yahoo_finance_mcp-0.1.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-08-02 12:45:59",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "Alex2Yang97",
    "github_project": "yahoo-finance-mcp",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "siya-yahoo-finance-mcp"
}
        
Elapsed time: 0.53387s