MCP ExplorerExplorer

Mcp Finance

@nimitmk7on a year ago
4 MIT
FreeCommunity
AI Systems
A Model Context Protocol Server to help your LLM access financial data

Overview

What is Mcp Finance

mcp-finance is a Model Context Protocol Server designed to assist your MCP client or LLM in accessing financial data such as stock prices, company information, news, and earnings dates. It utilizes the yfinance Python library for data retrieval.

Use cases

Use cases for mcp-finance include developing financial analysis tools, creating stock market dashboards, integrating financial data into applications, and assisting traders in making informed decisions based on up-to-date information.

How to use

To use mcp-finance, first install the required environment by following the setup instructions for your operating system. Then, clone the repository and configure the server settings in your Claude Client by editing the claude_desktop_config.json file with the appropriate command and arguments.

Key features

Key features of mcp-finance include fetching the latest stock prices, obtaining basic company information, retrieving historical stock data, accessing the latest stock news, getting earnings announcement dates, and fetching data for major US market indices.

Where to use

mcp-finance can be used in various fields such as finance, investment analysis, stock trading, and any application requiring real-time or historical financial data.

Content

Introduction

This is a MCP server that helps your MCP client/LLM get access to financial data like stock price, company info, and company news.
It is powered by the yfinance Python library and MarketAux API.

Tools available:

  1. Get Stock Price: Fetch the latest stock price for a symbol.
  2. Get Company Info: Fetch basic company info(Name, Sector, Industry, Website, Business Summary)
  3. Get Historical Data: Fetch historical data for a stock
  4. Get Stock News: Fetch latest news related to a stock symbol
  5. Get Market Indices: Fetch the latest data for major US market indices.

Setup your environment

1. Installing uv

For MacOS/Linux

curl -LsSf https://astral.sh/uv/install.sh | sh

For Windows

powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"

Make sure to restart your terminal afterwards to ensure that the uv command gets picked up.

2. Setting up the server

Now, let’s create and set up our project:

Cloning the repo

git clone [email protected]:nimitmk7/mcp-finance.git

Set up environment variables:

# Create .env file for your API keys
cp .env.example .env

# Set API key in .env
MARKETAUX_API_KEY=your-marketaux-api-key

Adding the server to Claude Client

If you are using Claude Desktop Client, you can go to Settings -> Developer, and press on the button ‘Edit Config’. It will open claude_desktop_config.json. Put the following configuration with your relevant details in the file:

For Mac Users

{
 "mcpServers": { 
   "mcp-finance": {
     "command": "/Users/<username>/.local/bin/uv", 
     "args": [
               "--directory",
               "/Users/<username>/<path-to-dir>/mcp-finance",
               "run",
               "mcp_finance.py"
           ]
   }
 }
}

For Windows users

{
  "mcpServers": { 
    "mcp-finance": {
      "command": "C:\\Users\\<username>\\.local\\bin\\uv.exe", 
      "args": [
                "--directory",
                "C:\\Users\\<username>\\<path-to-dir>\\mcp-finance",
                "run",
                "mcp_finance.py"
            ]
    }
  }
}

If you already have some MCP servers, just add the mcp-finance config in the list of configs of MCP servers.
Restart the Claude Desktop client after these steps.

3. Verify the setup

  1. In the UI, click on the hammer icon and check whether our server tools are present in the list of available tools.

4. Example Usage

Try asking Claude questions like:

  • “What is the price of Nvidia stock right now”
  • "How much has the share price of Google changed over 1 month "
  • “Get me latest news for Microsoft”

Tools

No tools

Comments

Recommend MCP Servers

View All MCP Servers