no use tools

Local 2025-09-01 01:09:40 0

A Model Context Protocol server that provides tools for interacting with Yahoo Finance, allowing users to retrieve stock prices, company information, and perform financial data comparisons.


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 [email protected]: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?"

Build

Docker:

docker build -t [IMAGE] .

Test with MCP Inspector

npx @modelcontextprotocol/inspector uv run mcp-yahoo-finance

Acknowledgements

[
  {
    "description": "Get the current stock price based on stock symbol.",
    "name": "get_current_stock_price",
    "parameters": {
      "additionalProperties": false,
      "properties": {
        "symbol": {
          "description": "Stock symbol in Yahoo Finance format.",
          "type": "string"
        }
      },
      "required": [
        "symbol"
      ],
      "type": "object"
    }
  },
  {
    "description": "Get the stock price for a given stock symbol on a specific date.",
    "name": "get_stock_price_by_date",
    "parameters": {
      "additionalProperties": false,
      "properties": {
        "date": {
          "description": "The date in YYYY-MM-DD format.",
          "type": "string"
        },
        "symbol": {
          "description": "Stock symbol in Yahoo Finance format.",
          "type": "string"
        }
      },
      "required": [
        "symbol",
        "date"
      ],
      "type": "object"
    }
  },
  {
    "description": "Get the stock prices for a given date range for a given stock symbol.",
    "name": "get_stock_price_date_range",
    "parameters": {
      "additionalProperties": false,
      "properties": {
        "end_date": {
          "description": "The end date in YYYY-MM-DD format.",
          "type": "string"
        },
        "start_date": {
          "description": "The start date in YYYY-MM-DD format.",
          "type": "string"
        },
        "symbol": {
          "description": "Stock symbol in Yahoo Finance format.",
          "type": "string"
        }
      },
      "required": [
        "symbol",
        "start_date",
        "end_date"
      ],
      "type": "object"
    }
  },
  {
    "description": "Get historical stock prices for a given stock symbol.",
    "name": "get_historical_stock_prices",
    "parameters": {
      "additionalProperties": false,
      "properties": {
        "interval": {
          "description": "The interval beween data points. Defaults to 1d. Valid intervals: 1d, 5d, 1wk, 1mo, 3mo",
          "type": "string"
        },
        "period": {
          "description": "The period for historical data. Defaults to 1mo. Valid periods: 1d, 5d, 1mo, 3mo, 6mo, 1y, 2y, 5y, 10y, ytd, max",
          "type": "string"
        },
        "symbol": {
          "description": "Stock symbol in Yahoo Finance format.",
          "type": "string"
        }
      },
      "required": [
        "symbol"
      ],
      "type": "object"
    }
  },
  {
    "description": "Get dividends for a given stock symbol.",
    "name": "get_dividends",
    "parameters": {
      "additionalProperties": false,
      "properties": {
        "symbol": {
          "description": "Stock symbol in Yahoo Finance format.",
          "type": "string"
        }
      },
      "required": [
        "symbol"
      ],
      "type": "object"
    }
  },
  {
    "description": "Get income statement for a given stock symbol.",
    "name": "get_income_statement",
    "parameters": {
      "additionalProperties": false,
      "properties": {
        "freq": {
          "description": "At what frequency to get cashflow statements. Defaults to yearly. Valid freqencies: yearly, quarterly, trainling",
          "type": "string"
        },
        "symbol": {
          "description": "Stock symbol in Yahoo Finance format.",
          "type": "string"
        }
      },
      "required": [
        "symbol"
      ],
      "type": "object"
    }
  },
  {
    "description": "Get cashflow for a given stock symbol.",
    "name": "get_cashflow",
    "parameters": {
      "additionalProperties": false,
      "properties": {
        "freq": {
          "description": "At what frequency to get cashflow statements. Defaults to yearly. Valid freqencies: yearly, quarterly, trainling",
          "type": "string"
        },
        "symbol": {
          "description": "Stock symbol in Yahoo Finance format.",
          "type": "string"
        }
      },
      "required": [
        "symbol"
      ],
      "type": "object"
    }
  },
  {
    "description": "Get earning dates.",
    "name": "get_earning_dates",
    "parameters": {
      "additionalProperties": false,
      "properties": {
        "limit": {
          "description": "max amount of upcoming and recent earnings dates to return. Default value 12 should return next 4 quarters and last 8 quarters. Increase if more history is needed.",
          "type": "string"
        },
        "symbol": {
          "description": "Stock symbol in Yahoo Finance format.",
          "type": "string"
        }
      },
      "required": [
        "symbol"
      ],
      "type": "object"
    }
  },
  {
    "description": "Get news for a given stock symbol.",
    "name": "get_news",
    "parameters": {
      "additionalProperties": false,
      "properties": {
        "symbol": {
          "description": "Stock symbol in Yahoo Finance format.",
          "type": "string"
        }
      },
      "required": [
        "symbol"
      ],
      "type": "object"
    }
  }
]