About Finance_mcp_server
An MCP server that provides LLMs with real-time stock and financial data through Yahoo Finance. It is for AI client users who need to query and compare market information, and also offers stock information resource URIs.
Key features
- 01Look up current stock prices
- 02Retrieve historical price data
- 03View company profiles and financial metrics
- 04Compare multiple stocks
- 05Search stocks by name or keyword
- 06Access stock information through URIs
Use cases
- 01Check current prices of publicly traded companies
- 02Analyze historical performance over a chosen period
- 03Compare financial metrics across stocks
MCP support
The server exposes stock lookup, historical data, metrics, comparison, and search tools to MCP clients, along with stock information resource URIs.
Configuration
Local server config is the same for every client. Copy it into your client’s MCP config file.
We haven’t collected a package or remote endpoint for this server. Follow the instructions in the project README.
Tools
Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.
Details
From the project READMEFinance_mcp-server
A Model Context Protocol (MCP) server that provides real-time financial data to Large Language Models through Yahoo Finance.
This project creates an MCP server that allows AI models like Claude to access real-time stock and financial data through the Yahoo Finance API. The server implements the Model Context Protocol standard, enabling seamless integration with various MCP clients including Claude Desktop, Cursor, Winds AI, and others.
🚀 Features
- Real-time Stock Price Lookup: Get current prices for any publicly traded company
- Historical Data Analysis: Retrieve stock performance over custom time periods
- Company Information: Access detailed company profiles and financial metrics
- Stock Comparison: Compare multiple stocks based on various metrics
- Stock Search: Find relevant stocks by company name or keywords
- Resource Access: Use structured URI schemes for financial data access
📋 Requirements
💻 Installation
-
Clone this repository:
git clone https://github.com/dino65-dev/Finance_mcp-server.git -
Create a virtual environment:
python -m venv venv On Windows: venv\Scripts\activate
Create a virtual environment (recommended) for faster creation:
pip install uv
uv venv
On Windows: venv\Scripts\activate
- Install dependencies:
pip install -r requirements.txt
🔧 Usage
Running the Server
Start the server by running:
python yfinance_mcp_server.py
The server will run as a stdin/stdout process that communicates via the MCP protocol.
Integrating with MCP Clients
Claude Desktop
- Open Claude Desktop
- Go to Settings
- Add an MCP configuration with:
{ "mcpServers": { "yfinance": { "command": "python", "args": [ "/absolute/path/to/yfinance_mcp_server.py" ] } } } - Save and restart Claude Desktop
Cursor
- Open Cursor and access settings
- Navigate to MCP section
- Add a new global MCP server with the configuration:
{ "yfinance": { "command": "python", "args": [ "/absolute/path/to/yfinance_mcp_server.py" ] } } - Start a new chat to use the financial tools
📊 Available Tools
The server provides the following tools:
-
get_stock_price: Get current stock pricesExample: Get the current price of Apple stock -
get_historical_data: Retrieve historical price dataExample: Get the stock history for TSLA over the past 3 months -
get_stock_metric: Access specific financial metricsExample: What is Amazon's market capitalization? -
compare_stocks: Compare multiple stocks by metricsExample: Compare the P/E ratios of Google, Microsoft, and Apple -
search_stocks: Find stocks by name or keywordExample: Find stocks related to artificial intelligence
🔍 Resource URIs
Access stock information directly through resource URIs:
finance://SYMBOL/info- Get basic information about a stock
📄 License
This project is licensed under the MIT License - see the LICENSE file for details.
🙏 Acknowledgements
- Yahoo Finance for providing financial data
- yfinance for the Python API
- Anthropic for the MCP specification
📞 Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Comments
New to MCP?
From what the protocol is to installing your first server, these answers cover most first questions.
An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.