Artha

Artha

Turns any MCP host into a finance & tax copilot for Indian taxpayers, using live keyless data and deterministic advisory.

Category
访问服务器

README

Artha — Personal Finance & Tax Copilot 🪙

Your money, planned on live data — not guesses. An MCP server (NitroStack TypeScript SDK) that turns any MCP host — Claude, ChatGPT, NitroChat, NitroStudio — into a finance & tax copilot for Indian taxpayers.

NitroStack MCP Data Tests

Artha (अर्थ) — the Sanskrit word for wealth & prosperity.


The problem

Indians routinely overpay tax (wrong regime, wasted deduction caps) and can't see the real return on their investments — because the tools are either paywalled advisory products or demo apps running on mocked numbers. A straight, trustworthy answer to "what's my tax, what are my real returns, and should I invest or prepay my loan?" is genuinely hard to get.

What it is

Ask in plain English — "I earn ₹30L, have an HDFC fund and a home loan — plan my taxes and should I invest or prepay?" — and Artha orchestrates 16 tools over live, keyless, non-mocked data: real mutual-fund NAVs & XIRR from AMFI, real bank verification from Razorpay, and the actual Finance Act 2025 tax law — returning one coherent, cited answer.

Why it stands out

  • 🔴 Real data, provably. Two genuinely live keyless sources (AMFI NAV via MFAPI.in, Razorpay IFSC) + a get_data_freshness tool that timestamps every source on screen. Most demos mock this; Artha doesn't.
  • ⚖️ A deterministic advisory council. "Invest or prepay?" is answered by three pure-logic lenses (tax / growth / safety) reconciled by a weighted vote — the multi-agent debate UX with zero extra LLM calls and zero hallucinated numbers (same input → byte-identical output, proven by tests).
  • 🧩 All three MCP primitives, done right — 16 tools · 8 resources (incl. a live market snapshot) · 3 prompts — plus rate-limiting, input hardening, a global exception filter, and a node --test suite.

Architecture

src/
├── index.ts                 # bootstrap + process-level crash guards
├── app.module.ts            # @McpApp root — imports every module
├── common/                  # framework-agnostic utilities
│   ├── http.ts              #   keyless fetch (timeout, typed errors)
│   ├── xirr.ts              #   XIRR (Newton–Raphson + bisection) & CAGR
│   ├── validate.ts          #   input coercion (numbers, enums, dates)
│   ├── format.ts            #   ₹ / % formatting
│   ├── disclaimer.ts        #   advice disclaimer
│   ├── exception.filter.ts  #   global @ExceptionFilter
│   └── apikey.guard.ts      #   optional env-gated @Guard
├── data/                    # provided market-news dataset (CSV)
└── modules/
    ├── tax/         # old vs new regime + deduction optimizer (Finance Act 2025)
    ├── funds/       # NAV / returns / XIRR + live scheme universe   (api.mfapi.in)
    ├── bank/        # IFSC / branch verification                    (ifsc.razorpay.com)
    ├── compliance/  # statutory tax due-date calendar
    ├── gains/       # capital-gains estimator (equity vs debt rules)
    ├── rates/       # RBI/FD benchmarks · EMI-vs-invest · data freshness
    ├── news/        # market news & sentiment (dataset-backed)
    ├── council/     # ⚖️ deterministic advisory council
    ├── resources/   # 📚 read-only @Resource endpoints
    └── copilot/     # 🧠 orchestrator (plan_my_finances) + prompts

Each domain module follows the NitroStack pattern: *.data.ts → *.service.ts (@Injectable) → *.tools.ts (@Tool controller) → *.module.ts (wiring, exports its service).


MCP surface

🔧 Tools (16)

Tool What it does Live source
calculate_income_tax Old vs new regime, 87A rebate, surcharge, cess; recommends cheaper Finance Act 2025
optimize_deductions Flags 80C over-cap waste & unused 80D/NPS/24(b) headroom —
search_mutual_funds Find AMFI scheme codes (curated + relevance-ranked) api.mfapi.in
get_fund_nav Latest NAV for a scheme api.mfapi.in
calculate_fund_returns Real absolute return + CAGR + XIRR api.mfapi.in
verify_bank_ifsc Bank/branch/address + NEFT/RTGS/IMPS/UPI ifsc.razorpay.com
get_upcoming_deadlines Next statutory dates + days remaining —
get_compliance_calendar Full calendar, filterable —
estimate_capital_gains LTCG/STCG (equity) or slab (debt) tax before selling api.mfapi.in
get_benchmark_rates RBI repo + representative FD rates RBI (dated)
compare_emi_vs_investment Prepay-loan vs invest, projected over a horizon —
get_data_freshness Timestamps every data source (live AMFI ping) api.mfapi.in
get_market_news Filter market news/events by sector/sentiment/date dataset
get_market_sentiment Aggregate sentiment/impact summary dataset
convene_council Deterministic advisory council → weighted recommendation —
plan_my_finances Orchestrates the whole plan (MCP Task, streams progress) all of the above

📚 Resources (8)

finance://tax/slabs/2025-26 · finance://compliance/calendar · finance://funds/popular (live) · finance://market/snapshot (live Nifty-50 NAVs) · finance://market/events · finance://data-sources · finance://methodology · finance://security

💬 Prompts (3)

finance_copilot · tax_optimization · invest_or_prepay


The agentic demo flow

"I'm 40, ₹30L salary, ₹3L in 80C, HDFC Top 100 fund, home loan at 9% with ₹2L spare — plan everything."

plan_my_finances runs the workflow (streaming progress when called as a task): 🧮 tax → 📈 live fund returns → 🧾 deduction audit → ⚖️ invest-vs-prepay → 📅 deadlines → 🧠 one plan. Every number is derived from a tool call — nothing is fabricated. For the invest-vs-prepay call it convenes the deterministic council (three lenses that can genuinely disagree, then reconcile).

Verified example: ₹18L with ₹2L ELSS → old ₹2,96,400 vs new ₹1,50,800 → new saves ₹1,45,600 (80C auto-capped at ₹1.5L); XIRR/CAGR from live NAV history; council reproducible (byte-identical).


Quick start

npm install          # backend deps
npm run widget install   # widget (Next.js) deps
npm run dev          # start the MCP server (stdio + http)

No API keys required — both external APIs are free and public. Then connect NitroStudio, or embed the NitroChat widget on any page.

npm test             # build + node --test suite

Deployment (NitroStack Cloud)

Deploy the repo, then in the project Environment variables set:

NITROSTACK_APP_MODE=universal

Optional: RBI_REPO_RATE, RATES_ASOF, API_KEY (enables the auth guard). The market-news dataset in src/data/ ships automatically.

Security

Surfaced at runtime via the finance://security resource:

  • Auth — optional API-key Guard (off unless API_KEY is set; keyless demo).
  • Input validation — Zod + defensive coercion (numbers, enums, dates) in every service.
  • Rate limiting — @RateLimit(30/min) on all outbound-API tools and orchestrators.
  • Error handling — global ExceptionFilter + process-level guards; no stack traces leak.
  • Privacy — no PII persisted, nothing written to disk, HTTPS + timeouts, no secrets.

Data & freshness

Source Kind Use
AMFI / MFAPI.in 🟢 live (per request) NAV, history, XIRR, scheme master
Razorpay IFSC 🟢 live (per request) Bank / branch verification
RBI repo / FD 🟡 reference (dated, env-overridable) Benchmark "safe" rates

Run get_data_freshness to see the live NAV date + fetch timestamp on screen.

Disclaimer

Informational & educational only — not investment, tax, or financial advice. Figures are estimates; verify with a SEBI-registered adviser or a qualified CA before acting. Tax slabs are FY 2025-26 per the Finance Act 2025 (incometax.gov.in).

Links

Built for the NitroStack × Amrita University Coimbatore MCP Hackathon.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选