StockMCP

StockMCP

3

The Yahoo Finance Model Context Protocol (MCP) for LLaMA 3.2 3B integrates Yahoo Finance capabilities with LLaMA, allowing real-time financial data access and market insights. It enhances financial data queries while maintaining LLaMA's versatility for non-financial queries.

Yahoo Finance Model Context Protocol (MCP) for LLaMA 3.2 3B

This project provides a Model Context Protocol (MCP) integrating Yahoo Finance API with LLaMA 3.2 3B. It enables users to acquire real-time financial data directly within the LLaMA model environment.

Features

  • Retrieve real-time stock prices and market news
  • Detailed company information and historical stock data
  • Customizable data retrieval periods and intervals

Requirements

  • Python 3.8+
  • LLaMA 3.2 3B and Ollama
  • Necessary Python libraries: ollama, yfinance, requests, pandas

Installation

Follow the steps to clone the repository, pull the LLaMA model, and install dependencies.

Usage

Instructions on running the MCP using Ollama for an interactive session enriching financial queries with Yahoo Finance data.

How It Works

Queries are analyzed to determine if they are finance-related. Financial queries are enhanced with data from the Yahoo Finance API, while non-financial queries are processed normally by LLaMA.

Troubleshooting

Common issues and instructions to resolve them, such as connection errors and model downloading.