Skip to main content
Glama
Artha

Artha

by GVR2007

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.

Related MCP server: itr-mcp

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).

Built for the NitroStack ร— Amrita University Coimbatore MCP Hackathon.

Available Tools

16 tools
calculate_fund_returnsA

Compute REAL returns for a lump-sum mutual fund investment using live NAV history. Finds the NAV on/before the investment date, values the units at the latest NAV, and returns absolute return, CAGR and XIRR (annualized). The schemeCode MUST come from search_mutual_funds output for the exact fund โ€” NEVER guess a code or reuse one from memory, or you will compute returns for the wrong fund.

Inputs: schemeCode (required), investedDate (required), investedAmount (required).

calculate_income_taxA

Calculate and compare Indian income tax under the OLD vs NEW regime for FY 2025-26 (AY 2026-27), using real Finance Act 2025 slabs, Section 87A rebate, surcharge and 4% cess. Returns a full slab-by-slab breakdown for both regimes and recommends the cheaper one. Deductions (80C, 80D, NPS, home-loan interest, HRA) only apply to the old regime.

Inputs: grossIncome (required), ageGroup, deductions, isSalaried.

compare_emi_vs_investmentA

EMI vs Investment Comparator โ€” answers "should I prepay my loan or invest the surplus?" by projecting the loan interest saved (a guaranteed return) against a realistic investment return (equity ~12% or FD) over a horizon, and recommending the better option.

Inputs: amount (required), loanRatePct (required), horizonYears, compareAgainst, +1 more.

convene_councilA

Deterministic advisory council for "should I invest my surplus or prepay my loan?" decisions. In a single call it evaluates three lenses โ€” tax minimization, long-term growth (equity vs loan rate) and liquidity/safety โ€” and reconciles them into one weighted recommendation with agreement level and confidence. Pure/deterministic (zero extra LLM calls, reproducible). Supports task augmentation: pass task: {} to stream each lens deliberating.

Inputs: income (required), hasLoan (required), surplus (required), regime, +5 more.

estimate_capital_gainsA

Capital Gains Estimator โ€” before selling/redeeming a mutual fund, estimates the capital-gains tax you'd owe (FY 2025-26 rules). Applies equity rules (STCG 20% / LTCG 12.5% above the โ‚น1.25L exemption) or debt rules (slab rate) based on fund type and holding period. Provide a schemeCode to value the holding from LIVE NAV, or pass currentValue directly.

Inputs: fundType (required), investedDate (required), investedAmount (required), income, +4 more.

get_benchmark_ratesA

Repo/FD Rate Checker โ€” returns the current RBI repo rate and representative bank fixed-deposit rates, so "safe" returns can be compared against mutual fund returns. Each value carries an as-of date and source (RBI has no free live API, so these are authoritative dated values, overridable via env).

Inputs: no named parameters.

get_compliance_calendarA

Get the full Indian tax compliance calendar (all statutory due dates), optionally filtered by category (ITR, Advance Tax, TDS, Investment, Audit, GST).

Inputs: category.

get_data_freshnessA

Data Freshness Indicator โ€” reports when each live data source was last fetched and its latest data date, making it visibly clear the numbers are current and real (not hardcoded). Performs a live AMFI ping.

Inputs: no named parameters.

get_fund_navA

Get the latest Net Asset Value (NAV) for a mutual fund scheme from live MFAPI.in data. The schemeCode MUST be obtained from search_mutual_funds output for the exact scheme the user means โ€” NEVER guess a code or reuse one from memory. A wrong code silently returns a completely different fund.

Inputs: schemeCode (required).

get_market_newsA

Search a market news & events dataset โ€” filter by sector, sentiment, impact, index, company, date range, or headline text. Returns the matching events, newest first. (Curated dataset, not a live news feed.)

Inputs: to, from, index, limit, +5 more.

get_market_sentimentA

Summarize sentiment across the market news & events dataset (optionally filtered by sector/index/date). Returns counts by sentiment and impact, the top sectors in the news, and a net bullish/bearish read.

Inputs: to, from, index, sector.

get_upcoming_deadlinesA

List upcoming Indian tax & compliance deadlines (ITR filing, advance tax, tax-saving investment cut-offs) for AY 2026-27 / FY 2026-27, sorted soonest-first with the number of days remaining. Use this to remind a taxpayer what is due next.

Inputs: limit, withinDays.

optimize_deductionsA

Deduction Optimizer โ€” audits a taxpayer's Chapter VI-A deductions (80C, 80D, NPS 80CCD(1B), home-loan interest 24(b)) against their statutory caps. Flags amounts OVER the cap that earn no tax benefit, and UNUSED headroom, quantifying the exact extra tax that could be saved by filling each allowance. Applies to the OLD regime.

Inputs: grossIncome (required), regime, ageGroup, deductions.

plan_my_financesA

One-shot personal finance & tax plan. Given your income (and optionally a mutual fund holding and a bank IFSC), this orchestrates the tax calculator, live mutual-fund NAV/XIRR, IFSC verification and the compliance calendar into a single coherent plan with a summary and action items. Supports task augmentation โ€” pass task: {} to run it asynchronously with live progress updates.

Inputs: grossIncome (required), fund, ifsc, ageGroup, +3 more.

search_mutual_fundsA

Search Indian mutual fund schemes by name. Popular funds resolve via a curated verified-code map (handles renamed funds, e.g. "HDFC Top 100" โ†’ "HDFC Large Cap Fund"), backed by the live, relevance-ranked MFAPI.in dataset for the long tail. ALWAYS call this first to obtain a scheme code, then pass the returned schemeCode verbatim to get_fund_nav or calculate_fund_returns.

Inputs: query (required), limit.

verify_bank_ifscA

Verify an Indian bank IFSC code and return the bank name, branch, full address and supported payment rails (NEFT/RTGS/IMPS/UPI) using the free, live Razorpay IFSC API. Useful before setting up a refund/payout account.

Inputs: ifsc (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelogโ€ฆ

    TDQS

    A4.1/5.0

    Scored across 16 tools

    Disambiguation4/5

    Most tools have clearly distinct purposes, but compare_emi_vs_investment and convene_council both address the same 'invest or prepay' decision from different angles, which could cause misselection. Additionally, get_upcoming_deadlines and get_compliance_calendar overlap somewhat, though the descriptions distinguish them.

    Naming Consistency5/5

    All 16 tools follow a consistent snake_case verb_noun pattern (e.g., search_mutual_funds, calculate_income_tax, verify_bank_ifsc, plan_my_finances). The verbs are diverse but clearly map to actions, and no mixed conventions like camelCase are present.

    Tool Count4/5

    At 16 tools, the count is slightly above the typical 3-15 range, but the broad scope of Indian personal finance, mutual funds, tax, compliance, and planning justifies each tool. It feels on the heavier side but remains well-scoped and manageable.

    Completeness5/5

    The tool set provides comprehensive coverage of the domain: mutual fund search, NAV, returns, capital gains estimation, tax calculation and optimization, deadlines, compliance calendar, market news/sentiment, and a full financial planner. No significant gaps are apparent for the stated purpose.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      B
      maintenance
      An offline-first MCP server for Indian financial, tax, and government APIs, providing tools for identity validation (PAN, Aadhaar, GSTIN), tax calculations (Income Tax, TDS, GST), and master data lookups (IFSC, Pincode, HSN/SAC) with zero authentication required.
      76
      92 PyPI
      87
      MIT
    • A
      license
      A
      quality
      B
      maintenance
      Local-first MCP server for Indian income tax computation, enabling users to compute taxes, compare regimes, plan advance tax, and parse Form 26AS without sending data to the cloud.
      16
      106 npm
      11
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      A standalone MCP server for Indian personal income-tax work (ITR-1/2/3/4 + post-filing notices) with 8 deterministic tools, running fully offline with no API keys.
      22 PyPI
      MIT
    • A
      license
      B
      quality
      B
      maintenance
      Enables MCP-capable AI apps to locally ingest and validate Indian income-tax documents such as AIS, 26AS, Form 16, and trade data, store them per assessment year, render AIS summaries, and identify missing supporting documents with download guides.
      16
      MIT