Skip to main content

finance-tools-mcp: A Financial Analysis MCP Server

https://github.com/VoxLink-org/finance-tools-mcp

Overview

The finance-tools-mcp is a Model Context Protocol (MCP) server designed to provide comprehensive financial insights and analysis capabilities to Large Language Models (LLMs). Modified from investor-agent, it integrates with various data sources and analytical libraries to offer a suite of tools for detailed financial research and analysis.

Finance Tools MCP server

Tools Offered

The server exposes a variety of tools via the MCP, allowing connected clients (like LLMs) to access specific financial data and perform analyses:

  • Ticker Data Tools:

    • get_ticker_data: Provides a comprehensive report for a given ticker, including overview, news, key metrics, performance, dates, analyst recommendations, and upgrades/downgrades.
    • get_options: Retrieves options data with the highest open interest for a ticker, with filtering options for date range, strike price, and option type (Calls/Puts).
    • get_price_history: Fetches historical price data digest for a specified period, including OHLCV samples, Technical Indicators, Risk Metrics, and other quantitative analysis.
    • get_financial_statements: Accesses financial statements (income, balance, cash flow) for a ticker, available quarterly or annually.
    • get_institutional_holders: Lists major institutional and mutual fund holders for a ticker.
    • get_earnings_history: Provides earnings history with estimates and surprises for a ticker.
    • get_insider_trades: Retrieves recent insider trading activity for a ticker.
    • get_ticker_news_tool: Fetches the latest Yahoo Finance news for a specific ticker.
  • Fear & Greed Index Tools:

    • get_current_fng_tool: Gets the current CNN Fear & Greed Index score and rating.
    • get_historical_fng_tool: Retrieves historical CNN Fear & Greed Index data for a specified number of days.
    • analyze_fng_trend: Analyzes trends in the CNN Fear & Greed Index over a specified period.
  • Calculation Tools:

    • calculate: Evaluates mathematical expressions using Python's math syntax and NumPy.
  • Macro Data Tools:

    • get_current_time: Provides the current time.
    • get_fred_series: Retrieves data for a specific FRED series ID.
    • search_fred_series: Searches for popular FRED series by keyword.
    • cnbc_news_feed: Fetches the latest breaking world news from CNBC, BBC, and SCMP.

Time Series Data Processing and Optimization

The server utilizes yfinance to retrieve historical price data (OHLCV - Open, High, Low, Close, Volume) for tickers. This raw data undergoes significant processing and analysis to provide valuable insights, particularly optimized for consumption by LLMs.

Key aspects of the time series data handling include:

  • Comprehensive Analysis: The data is analyzed using libraries like ta-lib-python to calculate a wide range of technical indicators. Additionally, custom functions compute basic statistics, risk metrics, recognize common chart patterns, and calculate Fibonacci retracement levels.
  • Structured Digest: The results of this analysis are compiled into a structured digest format (generate_time_series_digest_for_LLM) that is easy for LLMs to parse and understand, including sections for statistics, summary, technical indicators, risk metrics, patterns, Fibonacci levels, and a data sample.
  • Smart Sampling for LLMs: To provide LLMs with a representative view of historical data without overwhelming the context window, a "smart sampling" strategy is employed (get_latest_data_sample). This method samples the data with varying resolutions:
    • High Resolution: Recent data points are included daily.
    • Medium Resolution: Intermediate data points are sampled weekly.
    • Low Resolution: Older data points are sampled monthly. This hybrid approach ensures that the LLM receives detailed information about recent price movements while still having context about longer-term trends, all within a manageable number of data points.

This optimized processing and presentation of time series data allows LLMs to quickly grasp key trends, indicators, and patterns, facilitating more informed financial analysis.

Sample Report

alt text

Prerequisites

  • Python: 3.10 or higher
  • Package Manager: uv

Installation

First, install uv if you haven't already:

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

Then, you can run the finance-tools-mcp MCP server using uvx:

uvx finance-tools-mcp

If you want to use your own FRED API key, you can set it as an environment variable:

FRED_API_KEY=YOUR_API_KEY uvx finance-tools-mcp

You can also run the server using Server-Sent Events (SSE) transport:

uvx finance-tools-mcp --transport sse

Or with the FRED API key and SSE transport:

FRED_API_KEY=YOUR_API_KEY uvx finance-tools-mcp --transport sse

Usage with MCP Clients

To integrate finance-tools-mcp with an MCP client (for example, Claude Desktop), add the following configuration to your claude_desktop_config.json:

{
  "mcpServers": {
    "investor": {
        "command": "path/to/uvx/command/uvx",
        "args": ["finance-tools-mcp"],
    }
  }
}

Debugging

You can leverage the MCP inspector to debug the server:

npx @modelcontextprotocol/inspector uvx finance-tools-mcp

or

npx @modelcontextprotocol/inspector uv --directory  ./ run finance-tools-mcp

For log monitoring, check the following directories:

  • macOS: ~/Library/Logs/Claude/mcp*.log
  • Windows: %APPDATA%\Claude\logs\mcp*.log

Development

For local development and testing:

  1. Use the MCP inspector as described in the Debugging section.
  2. Test using Claude Desktop with this configuration:
{
  "mcpServers": {
    "investor": {
      "command": "path/to/uv/command/uv",
      "args": ["--directory", "path/to/finance-tools-mcp", "run", "finance-tools-mcp"],
    }
  }
}

License

This MCP server is licensed under the MIT License. See the LICENSE file for details.

Samples

Todo

  • Add supporting levels and resistance levels for stocks
  • Add Fibonacci retracement levels for stocks
  • Add moving average confluence levels for stocks
  • Add option model for prediction
  • Add predictive model by using finance sheets and other features

Data Sources

  • fintel.com
  • investing.com
  • yahoo.com
  • fred.stlouisfed.org
  • cnn cnbc and reddit

Metadata

Release files for finance-tools-mcp 0.1.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for finance-tools-mcp 0.1.6
File Size Uploaded Provenance
finance_tools_mcp-0.1.6.tar.gz 655.1 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for finance-tools-mcp 0.1.6
File Interpreter ABI Platform
finance_tools_mcp-0.1.6-py3-none-any.whl Python 3 none any Details

Total release size: 730.4 kB

Release files / finance_tools_mcp-0.1.6.tar.gz

Download URL finance_tools_mcp-0.1.6.tar.gz
Size 655.1 kB
Tags Source
SHA-256 checksum
How to use checksums
05f75ddd518208a46621e8d31062d6767d48196387e4c2e33c389dab7219cbe2
BLAKE2b-256 checksum
How to use checksums
94c1bf9a399fd9cdf9d53785348b701b8de2eb32d742167965904a210da287eb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 19, 2025.

Transparency log

Release files / finance_tools_mcp-0.1.6-py3-none-any.whl

Download URL finance_tools_mcp-0.1.6-py3-none-any.whl
Size 75.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
04215cfc1c52120228e5abb4e9077a32d13ba4ec8134f90002f6f295070cb422
BLAKE2b-256 checksum
How to use checksums
eccbfafa9c81d4a075362877449924a4e1529bad21a1f7b6a492a15ce54b179c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 19, 2025.

Transparency log

Security for finance-tools-mcp 0.1.6

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for finance_tools_mcp-0.1.6.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 19, 2025.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page