Skip to main content

An MCP server providing finance tools: a yfinance wrapper, computed analytics, and financial calculators.

Project description

Finance MCP

An MCP server of finance tools: a yfinance market-data wrapper, computed analytics, and deterministic financial calculators. (Analysis prompts are planned.)

Immediate roadmap:

  1. Additional yfinance wrappers - get_news (recent headlines for a ticker)

  2. More computed analytics

  • compare_peers (rank a set of tickers across key metrics)
  1. analyze_stock + compare_stocks — user-invoked slash commands that orchestrate the existing 14 tools into a methodology
  2. Public free data requiring keys - add optional extensions for fed data for interest rates, etc.
  3. Portfolio tools - add tools for portfolio analysis to extend specific stock functionality

Tools

Market data (yfinance)

  • get_quote — current price snapshot for one or more tickers: price, change, day/52-week ranges, market cap (batched; cached briefly).
  • get_price_history — OHLCV bars plus a computed summary for a ticker, by period and interval (long windows are truncated; the summary covers the full window).
  • get_financials — income statement, balance sheet, or cash flow (annual or quarterly) as line items by period; values in the company's reporting currency, with an optional line-item filter.
  • get_company_profile — sector, industry, market cap, P/E, beta, business summary, plus recent dividends and stock splits.
  • get_analyst_data — sell-side analyst consensus: price targets, consensus recommendation, and the recent rating trend (analyst counts over the last four months).
  • search_symbols — resolve a company or instrument name to ticker symbol(s), best match first, across all instrument types (equity, ETF, crypto, …).

Analytics

  • get_key_metrics — valuation/profitability/leverage ratios (P/E, EV/EBITDA, margins, ROE, debt/equity, FCF, EPS, …) as reported by Yahoo; units noted per field.
  • analyze_performance — total & annualized return, annualized volatility, max drawdown, and 50/200-day SMAs computed from the daily price series.

Time value & loans

  • time_value_of_money — solve any one of present/future value, payment, rate, or periods (compound interest, annuities, CAGR); supports begin-of-period (annuity-due).
  • loan_schedule — monthly payment, total interest, and optional amortization schedule for a fixed-rate loan/mortgage (nominal APR compounded monthly).

Cashflow valuation

  • npv — net present value of equally-spaced cashflows (cashflow[0] at t=0).
  • irr — internal rate of return; returns all real roots and flags non-uniqueness.
  • mirr — modified IRR; single-valued given finance and reinvestment rates.
  • xnpv / xirr — NPV/IRR of cashflows on actual calendar dates (Actual/365).

Rates & fixed income

  • convert_rate — nominal ↔ effective annual rate (discrete or continuous compounding).
  • bond_price — price plus Macaulay/modified duration and convexity at a given yield (priced on a coupon date).
  • bond_ytm — yield to maturity from a bond's market price.

The calculators are pure and deterministic; the market-data and analytics tools fetch live data (briefly cached) and surface source errors clearly. All tools return typed, structured results and report invalid inputs as clear errors.

Run

uv run mcp-finance        # stdio MCP server

Add to an MCP client (e.g. Claude) as:

{ "mcpServers": { "finance": { "command": "uvx", "args": ["mcp-finance"] } } }

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mcp_finance-0.1.2.tar.gz (134.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mcp_finance-0.1.2-py3-none-any.whl (28.3 kB view details)

Uploaded Python 3

File details

Details for the file mcp_finance-0.1.2.tar.gz.

File metadata

  • Download URL: mcp_finance-0.1.2.tar.gz
  • Upload date:
  • Size: 134.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.17 {"installer":{"name":"uv","version":"0.11.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for mcp_finance-0.1.2.tar.gz
Algorithm Hash digest
SHA256 961e77aba22c9e1d28fe4a57e27a37ed17c902071cf0fa84bf174602c5184dfb
MD5 e4486331f9da6fd7b34c43885efd2ffb
BLAKE2b-256 c593f97a1b614d47697db1c21f39d775e2e2eaad9d22d7b025bcedb3ddf38398

See more details on using hashes here.

File details

Details for the file mcp_finance-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: mcp_finance-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 28.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.17 {"installer":{"name":"uv","version":"0.11.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for mcp_finance-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 52dc59331d05beb114826497ffd09a6e3e615a20a6b9b348f1982a800e4c60a1
MD5 0aaa128cef73a904d445494aaca78da2
BLAKE2b-256 04bb4c888453af3383cf85b724b2b07db10c333e604186bcf8659758fcc03544

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page