MCP Yahoo Finance

by maxscheijen

27 stars
573 downloads
Not rated
GitHub

About

Access real-time stock prices, company information, and financial data from Yahoo Finance.

Details

Author
maxscheijen
GitHub stars
27
Downloads
573
Categories
Database, Finance, Other, API, Automation

- Get current stock price for any ticker symbol
- Compare stock prices between multiple companies
- Query historical price changes over custom date ranges
- Retrieve available options expiration dates
- View call and put options chains for a ticker
- No API keys or external services required

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name MCP Yahoo Finance
    Command (node, npx, python, etc.)

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

Install and run using uvx mcp-yahoo-finance without manual setup. Alternatively, install via pip install mcp-yahoo-finance or clone the repository and run uv sync. Configure the server in your MCP client by adding the command and arguments to the appropriate configuration file (e.g., claude_desktop_config.json or .vscode/mcp.json).

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "mcp yahoo finance": {
            "mcp-yahoo-finance": {
                "command": "uv",
                "args": [
                    "sync"
                ]
            }
        }
    }
}

McpServers

{
    "mcp-yahoo-finance": {
        "command": "uv",
        "args": [
            "sync"
        ]
    }
}

MCP Yahoo Finance

PyPI - Version
PyPI - Python Version
PyPI - License

A Model Context Protocol (MCP) server for Yahoo Finance interaction. This server provides tools to get pricing, company information and more.

> Please note that mcp-yahoo-finance is currently in early development. The functionality and available tools are subject to change and expansion as I continue to develop and improve the server.

Installation

You don't need to manually install mcp-yahoo-finance if you use uv. We'll use uvx to directly run mcp-yahoo-finance.

I would recommend using this method if you simply want to use the MCP server.

Using pip

Using pip.

pip install mcp-yahoo-finance

Using Git

You can also install the package after cloning the repository to your machine.

git clone git@github.com:maxscheijen/mcp-yahoo-finance.git
cd mcp-yahoo-finance
uv sync

Configuration

Claude Desktop

Add this to your claude_desktop_config.json:

{
    "mcpServers": {
        "yahoo-finance": {
            "command": "uvx",
            "args": ["mcp-yahoo-finance"]
        }
    }
}
You can also use docker:
{
    "mcpServers": {
        "yahoo-finance": {
            "command": "docker",
            "args": ["run", "-i", "--rm", "IMAGE"]
        }
    }
}

VSCode

Add this to your .vscode/mcp.json:

{
    "servers": {
        "yahoo-finance": {
            "command": "uvx",
            "args": ["mcp-yahoo-finance"]
        }
    }
}

Examples of Questions

1. "What is the stock price of Apple?"
2. "What is the difference in stock price between Apple and Google?"
3. "How much did the stock price of Apple change between 2024-01-01 and 2025-01-01?"
4. "What are the available options expiration dates for AAPL?"
5. "Show me the options chain for AAPL expiring on 2024-01-19"
6. "What are the call and put options for Tesla?"

Build

Docker:

docker build -t [IMAGE] .

Test with MCP Inspector

npx @modelcontextprotocol/inspector uv run mcp-yahoo-finance
No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.