Artha
Turns any MCP host into a finance & tax copilot for Indian taxpayers, using live keyless data and deterministic advisory.
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.
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_freshnesstool 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 --testsuite.
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 unlessAPI_KEYis 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
- NitroStack docs: https://docs.nitrostack.ai
- Demo script: DEMO.md ยท Community posts: COMMUNITY.md
Built for the NitroStack ร Amrita University Coimbatore MCP Hackathon.
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
Neon Database
MCP server for interacting with Neon Management API and databases
E2B
Using MCP to run code via e2b.
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.