
Bahi Mcp
io.github.NayakwadiS由 GitHub 账号 NayakwadiS 发布v0.3.1更新于 Oct 29, 2026
Indian mutual fund data and analytics, NSE/BSE market data, and financial calculators.
概览
本地 MCP 服务器,让助手获取印度共同基金净值数据、NSE/BSE 股票与指数行情,并进行基金分析和财务计算。
- 可以做什么
- 搜索 AMFI 基金方案,读取方案详情、最新净值报价、净值历史与持仓组合市值,并可清除缓存
- 进行基金分析:基于真实净值历史模拟 SIP 收益、多只基金横向对比、滚动收益分布
- 获取 NSE/BSE 股票报价、指数报价(Nifty 50、Sensex、Bank Nifty、India VIX)及 OHLCV 历史
- 计算财务指标:XIRR、CAGR、贷款 EMI、定存/零存整取到期值、一次性投资终值、SIP 预测、SWP、退休所需本金及基金赎回税负估算
- 适用场景
- 适合助手需要回答印度共同基金、NSE/BSE 股票与指数相关问题,或进行投资、贷款、存款和税务计算的场景,避免凭空猜测数字。更适用于研究与规划类对话,而非交易或报税决策。
- 运行要求
- 以本地 Python 包形式运行(需 Python 3.10+),可用 pip 安装或通过 uvx 运行;股票与指数工具需额外安装 yfinance 依赖。访问 AMFI 与 Yahoo Finance 数据需要网络连接。未声明任何账号、API 密钥或环境变量。
安装
在 SourceWeft 中
- 打开 控制台中的 Bahi Mcp,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
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)
Mutual fund analytics
Stocks and market data (NSE/BSE, via Yahoo Finance; unofficial and best-effort)
Calculators
Dates can be DD-MM-YYYY or YYYY-MM-DD.
Install
Requires Python 3.10+.
Or run without installing, using uv:
Configure your MCP client
Claude Desktop
Add to claude_desktop_config.json:
Drop "--with", "yfinance" if you don't need stock data. Restart Claude Desktop.
Cursor and other clients
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
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.
来源:README.md,提交 77b33b2
工具
0版本历史
1- v0.3.1最新Oct 29, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分