Finance_mcp_server
About
A Model Context Protocol (MCP) server that provides real-time financial data to Large Language Models through Yahoo Finance.
Details
- Author
- dino65-dev
- Downloads
- 266
- Categories
- Finance, AI
Jump to
- Real-time stock price lookup for publicly traded companies.
- Historical data analysis over custom time periods.
- Detailed company profiles and financial metrics.
- Compare multiple stocks using various metrics.
- Search stocks by company name or keywords.
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:
- Download and install Highlight from highlightai.com/download
- Navigate to the plugins tab and select "Add Custom Plugin"
-
Configure the plugin with the settings below
Plugin Name
Finance_mcp_serverCommand (node, npx, python, etc.)Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.
- Enable "Start Automatically" if you want the plugin to start when Highlight launches
From the repository
Install Python 3.9+, clone the repository, create a virtual environment, and install dependencies with pip install -r requirements.txt. Start the server by running python yfinance_mcp_server.py. Then configure an MCP client (e.g., Claude Desktop or Cursor) with a JSON configuration pointing to the server script.
Claude Desktop / Cursor
Paste into your MCP client config file to install this server.
{
"mcpServers": {
"finance_mcp_server": {
"Finance_mcp-server": {
"command": "python",
"args": [
"-m",
"venv",
"venv"
]
}
}
}
}
McpServers
{
"Finance_mcp-server": {
"command": "python",
"args": [
"-m",
"venv",
"venv"
]
}
}
Finance_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
- Python 3.9 or higher
- yfinance package
- mcp package
π» Installation
1. Clone this repository:
git clone https://github.com/dino65-dev/Finance_mcp-server.git
2. 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
3. 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
1. Open Claude Desktop
2. Go to Settings
3. Add an MCP configuration with:
{
"mcpServers": {
"yfinance": {
"command": "python",
"args": [
"/absolute/path/to/yfinance_mcp_server.py"
]
}
}
}
4. Save and restart Claude Desktop
Cursor
1. Open Cursor and access settings
2. Navigate to MCP section
3. Add a new global MCP server with the configuration:
{
"yfinance": {
"command": "python",
"args": [
"/absolute/path/to/yfinance_mcp_server.py"
]
}
}
4. Start a new chat to use the financial tools
π Available Tools
The server provides the following tools:
1. get_stock_price: Get current stock prices
Example: Get the current price of Apple stock
2. get_historical_data: Retrieve historical price data
Example: Get the stock history for TSLA over the past 3 months
3. get_stock_metric: Access specific financial metrics
Example: What is Amazon's market capitalization?
4. compare_stocks: Compare multiple stocks by metrics
Example: Compare the P/E ratios of Google, Microsoft, and Apple
5. search_stocks: Find stocks by name or keyword
Example: Find stocks related to artificial intelligence
π Resource URIs
Access stock information directly through resource URIs:
- finance://SYMBOL/info - Get basic information about a stock
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.
