bahi-mcp MCP Server
Indian mutual fund data and analytics, NSE/BSE market data, and financial calculators.
bahi-mcp scores 43 (Fair), licensed MIT and written in Python. It installs as a local process. It declares 20 tools. Filed under Finance. GitHub shows 2 stars. Install configs are generated for 10 clients. Being listed in the registry is not the same as being vendor-official.
Fair trust
43 of 100 from six public signals. Nobody can buy a point.
- OSI-style license: mit.
License, quality and maintenance
Where the 43 comes from
0 + 20 + 2 + 10 + 4 + 7 = 43. Each factor is capped, so no single signal can carry a listing.
Active in the official MCP registry, plus a known vendor namespace.
Registry: 0 of 30 points.How recently the repository saw a commit or release.
Maintenance: 20 of 20 points.GitHub stars and weekly downloads, on a log scale.
Popularity: 2 of 20 points.A clear, OSI-style open-source license.
License: 10 of 10 points.Not archived, a secure install path, a pinned version.
Security: 4 of 10 points.A real summary, a README with depth, listed tools.
Docs: 7 of 10 points.Install
Pick your client, copy the config, paste it in.
Needs Cursor or VS Code installed on this device. The button opens the app and asks you to confirm before it adds the server.
{ "mcpServers": { "nayakwadis-bahi-mcp": { "command": "uvx", "args": [ "bahi-mcp" ] } }}
Environment variables
This server does not declare environment variables.
Tools20Tool docs quality grade D
All capabilitiescalculate_cagrtoolCAGR between two values over a date range
calculate_emitoolLoan EMI, total payment, total interest
Future value of a one-time investment
Monthly SIP simulation on a fund's real NAV history: invested, units, value, absolute return, XIRR
calculate_swptoolDoes a corpus last under a monthly withdrawal?
calculate_xirrtoolXIRR for any dated cash flows
clear_cachetoolDrop cached AMFI data so the next call fetches fresh NAVs
compare_fundstoolSide-by-side 1/3/5-year returns, volatility, max drawdown and Sharpe ratio for 1 to 5 funds
estimate_mf_taxtoolCapital gains tax estimate on a fund redemption; use purchase/sale dates for exact 12-month classification
get_index_quotetoolNifty 50, Sensex, Bank Nifty, Nifty IT, India VIX
get_nav_historytoolNAV history with optional date range (capped to keep responses small)
Current value of a list of holdings (scheme code + units)
About
bahi-mcp
MCP server that gives AI assistants (Claude, Cursor, VS Code and others) access to Indian mutual fund data, NSE/BSE market data and financial calculators.
Bahi (बही) is the traditional Indian ledger. This server keeps the numbers straight so your assistant doesn't guess them.
Disclaimer: bahi-mcp provides information and calculations from public data sources (AMFI via the
mftoollibrary, and Yahoo Finance for stocks) and from assumptions you supply. It is not investment or tax advice and the author is not a SEBI-registered adviser. Data may be delayed or inaccurate, and tax rules change. Verify before making decisions.
What you can ask
- "Compare these three flexi-cap funds on 3-year return, volatility and max drawdown."
- "How often has this fund beaten 12% on rolling 3-year returns?"
- "If I had invested ₹10,000 a month in scheme 119551 since January 2020, what would it be worth today, and what is my XIRR?"
- "What's the Nifty at, and how has RELIANCE done over the last year?"
- "How much tax would I pay if I sell this equity fund after 14 months with a ₹2 lakh gain?"
- "How much corpus do I need to retire at 55 if I spend ₹60,000 a month today?"
Tools
Mutual fund data (AMFI)
| Tool | What it does |
|---|---|
search_schemes | Search schemes by name, returns AMFI scheme codes |
get_scheme_quote | Latest NAV and quote for a scheme code |
get_scheme_details | Fund house, type, category, start date |
get_nav_history | NAV history with optional date range (capped to keep responses small) |
get_portfolio_value | Current value of a list of holdings (scheme code + units) |
clear_cache | Drop cached AMFI data so the next call fetches fresh NAVs |
Mutual fund analytics
| Tool | What it does |
|---|---|
calculate_sip_returns | Monthly SIP simulation on a fund's real NAV history: invested, units, value, absolute return, XIRR |
compare_funds | Side-by-side 1/3/5-year returns, volatility, max drawdown and Sharpe ratio for 1 to 5 funds |
get_rolling_returns | Distribution of rolling returns: min, max, mean, median, how often positive or above a threshold |
Stocks and market data (NSE/BSE, via Yahoo Finance; unofficial and best-effort)
| Tool | What it does |
|---|---|
get_stock_quote | Latest price, day and 52-week range for an NSE/BSE stock |
get_index_quote | Nifty 50, Sensex, Bank Nifty, Nifty IT, India VIX |
get_stock_history | OHLCV history for a stock or index |
Calculators
| Tool | What it does |
|---|---|
calculate_xirr | XIRR for any dated cash flows |
calculate_cagr | CAGR between two values over a date range |
calculate_emi | Loan EMI, total payment, total interest |
calculate_fd / calculate_rd | Fixed and recurring deposit maturity |
calculate_lumpsum_value | Future value of a one-time investment |
project_sip | SIP projection at an assumed return, with optional yearly step-up |
calculate_swp | Does a corpus last under a monthly withdrawal? |
plan_retirement | Corpus needed and the monthly SIP to build it |
estimate_mf_tax | Capital gains tax estimate on a fund redemption; use purchase/sale dates for exact 12-month classification |
Dates can be DD-MM-YYYY or YYYY-MM-DD.
Install
Requires Python 3.10+.
pip install bahi-mcp # mutual funds + calculators
pip install "bahi-mcp[stocks]" # adds NSE/BSE stock and index data
Or run without installing, using uv:
uvx bahi-mcp
uvx --with yfinance bahi-mcp # with stock data
Configure your MCP client
Claude Desktop
Add to claude_desktop_config.json:
{
"mcpServers": {
"bahi-mcp": {
"command": "uvx",
"args": ["--with", "yfinance", "bahi-mcp"]
}
}
}
Drop "--with", "yfinance" if you don't need stock data. Restart Claude Desktop.
Cursor and other clients
{
"mcpServers": {
"bahi-mcp": {
"command": "uvx",
"args": ["--with", "yfinance", "bahi-mcp"]
}
}
}
For Cursor, save this in ~/.cursor/mcp.json. Remove "--with", "yfinance" if you don't need stock data.
Notes on data and accuracy
- Mutual fund data comes from AMFI through
mftool(3.4 or newer). NAVs are published after market close, usually by about 9 PM IST. mftool caches NAVs for 24 hours, so useclear_cacheafter the evening update to see the latest. - Stock data comes from Yahoo Finance through
yfinance. It is unofficial, can be delayed, rate-limited or change without notice. Don't use it for trading decisions. - Tax estimates follow the configured FY 2026-27 assumptions for equity funds (STCG 20%, LTCG 12.5% above the remaining ₹1.25 lakh annual exemption); provide purchase and sale dates for exact calendar 12-month classification, or holding days for an approximate 365-day cutoff. The exemption is shared across eligible gains in a financial year. Debt funds are modelled at slab rate only for units bought on/after 1 April 2023. Surcharge, loss set-off and older indexation rules are not modelled; verify current law and consult a tax professional.
- Projections (
project_sip,calculate_swp,plan_retirement) assume constant returns. Real markets don't behave that way.
Development
git clone https://github.com/NayakwadiS/bahi-mcp
cd bahi-mcp
python -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
pip install -e ".[dev,stocks]"
pytest
python -m bahi_mcp # runs the server over stdio
Layout in src/bahi_mcp/:
analytics.py,fund_analytics.py,calculators.py: pure Python, no network, fully tested offlinedata.py: AMFI access throughmftoolmarket.py: stock and index access throughyfinanceserver.py: the MCP tool definitions
Roadmap
- Portfolio overlap and fund-to-fund correlation
- Document search over factsheets and SEBI/RBI circulars
- Hosted version with caching
Contributing
Issues and pull requests are welcome.
License
MIT. See LICENSE.
Frequently asked questions
What is bahi-mcp MCP Server?
Indian mutual fund data and analytics, NSE/BSE market data, and financial calculators.
How do I install bahi-mcp MCP Server in Claude Desktop, Cursor, or VS Code?
Pick your client in the Install section on this page and copy the generated config into the client's config file. Step-by-step guides: Claude Desktop, Cursor, and VS Code. bahi-mcp MCP Server runs locally from the PyPI package bahi-mcp with the command uvx bahi-mcp.
Is bahi-mcp MCP Server free and open source?
Yes. bahi-mcp MCP Server is released under the MIT license, an OSI-approved open-source license, so you can use, modify, and self-host it under those terms.
Does bahi-mcp MCP Server support remote (HTTP) connections?
No remote endpoint is listed for bahi-mcp MCP Server. It runs locally on your machine over stdio, started by your MCP client.
What tools does bahi-mcp MCP Server provide?
bahi-mcp MCP Server provides 20 tools, including calculate_cagr, calculate_emi, calculate_lumpsum_value, and calculate_sip_returns. See the full tool list for descriptions and parameters.
How is bahi-mcp MCP Server's trust score calculated?
bahi-mcp MCP Server scores 43 out of 100 (Fair). The score adds six capped public signals: registry status, maintenance, popularity, license, documentation, and security. Nobody can pay for points. Read the methodology for the full formula.
Reviews
No reviews yet—Be the first to review
No published reviews yet. Used it? Tell the next person how it went.
Sign inA verified email is required to review this server.
Add badge to your README
Paste either snippet into the repository README. The image links to this listing.