MCP-India-Stack Server
MCP server for Indian APIs โ GSTIN, IFSC, PAN, UPI, pincode, HSN/SAC. Zero auth. Offline-first. For AI agents.
Documentation
๐ฎ๐ณ MCP India Stack
A high-performance, offline-first Model Context Protocol (MCP) server equipping AI agents with Indian financial, tax, and government APIs. Zero authentication required.
โจ Key Features
- Offline-First Architecture: Bundles compressed datasets for zero-latency lookups (IFSC, Pincodes, HSN/SAC). No API rate limits.
- Zero Authentication: No API keys, secrets, or subscriptions required. All logic runs locally.
- Background Auto-Updates: Non-blocking CDN fetching ensures your datasets never go stale without impacting request latency.
- Comprehensive Coverage: 58 dedicated tools for identity validation (PAN, Aadhaar, GSTIN, TAN, PRAN), tax calculation (Income Tax, TDS, GST), savings calculators (EPF, PPF, SIP), and master data lookups.
- Enterprise-Ready: Thread-pool accelerated bulk validation tools for processing large batches of vendor or customer data.
๐ Quick Start
Installation
pip install mcp-india-stack
Claude Desktop Configuration
Add the following to your claude_desktop_config.json file to enable the India Stack in Claude Desktop:
Windows (%APPDATA%\Claude\claude_desktop_config.json):
{
"mcpServers": {
"mcp-india-stack": {
"command": "python",
"args": ["-m", "mcp_india_stack"]
}
}
}
macOS/Linux (~/Library/Application Support/Claude/claude_desktop_config.json or ~/.config/Claude/claude_desktop_config.json):
{
"mcpServers": {
"mcp-india-stack": {
"command": "python3",
"args": ["-m", "mcp_india_stack"]
}
}
}
๐ ๏ธ Tool Catalog
๐ Lookup Tools
lookup_ifscโ Bank branch details from IFSC codelookup_pincodeโ India pincode details and post officeslookup_hsn_codeโ HSN/SAC code lookup by code or keyworddecode_state_codeโ GST state code metadatalookup_bbps_billerโ BBPS biller directory lookuplookup_bankโ Basic bank master lookup by name or code
โ Validation Tools
validate_gstinโ GSTIN structure and checksumvalidate_panโ PAN format and entity type decodevalidate_upi_vpaโ UPI VPA structure and provider decodevalidate_aadhaarโ Aadhaar number with Verhoeff checksum (masked output)validate_voter_idโ Voter ID (EPIC) format with legacy detectionvalidate_driving_licenseโ DL format with state/RTO/year decodevalidate_passportโ Indian passport number formatvalidate_cinโ Company Identification Number with full field decodevalidate_dinโ Director Identification Number formatvalidate_fssaiโ FSSAI license number validation and decodevalidate_epf_codeโ EPF establishment code validatorvalidate_esic_codeโ ESIC employer code validatorvalidate_tanโ TAN validatorvalidate_pranโ PRAN validator for NPSvalidate_llpinโ LLPIN validatordecode_isinโ ISIN decoder with Luhn validationdecode_digilocker_uriโ DigiLocker URI decoder and validator mapperdecode_pan_typeโ Decode PAN entity type from the 4th character
๐ฑ Identity & Contact
validate_mobile_numberโ Mobile number with operator/circle detection
โก Bulk Operations
bulk_validate_gstinโ Parallel GSTIN batch validationbulk_validate_panโ Parallel PAN batch validationbulk_validate_ifscโ Parallel IFSC batch validationbulk_validate_aadhaarโ Parallel Aadhaar batch validation
๐งฎ Tax & Financial Calculators (FY2025-26)
calculate_income_taxโ Old vs new regime comparison with surcharge, rebate, cesscalculate_tdsโ TDS rate lookup and computation for 15+ sectionscalculate_gstโ GST breakdown (CGST/SGST/IGST/cess) with HSN lookupcalculate_surchargeโ Surcharge and marginal relief calculatorcalculate_hra_exemptionโ HRA exemption calculator for salary planningcalculate_capital_gainsโ Capital gains with Section 54/54F exemptioncalculate_advance_taxโ Advance tax estimatorcalculate_gst_late_feeโ GST late filing penaltycalculate_income_tax_interestโ Sections 234A/B/C interestcalculate_presumptive_taxโ 44AD/44ADA presumptive taxget_regulatory_deadlinesโ Tax & regulatory compliance calendar
๐ฐ Savings & Investment Calculators
calculate_epf_esicโ EPF/ESIC contribution calculatorcalculate_emiโ Loan EMI with amortization schedulecalculate_gratuityโ Gratuity under Payment of Gratuity Actcalculate_ppf_maturityโ PPF maturity projectionscalculate_fd_maturityโ Fixed Deposit maturitycalculate_rd_maturityโ Recurring Deposit maturitycalculate_sip_returnsโ SIP returns with inflation adjustmentcalculate_step_up_sipโ Step-up SIP comparisoncalculate_nps_projectionโ NPS corpus and pensioncalculate_sukanya_samriddhiโ SSY and SCSS calculator
๐ Real Estate
calculate_home_vs_rentโ Buy vs rent financial comparisoncalculate_leave_encashment_taxโ Section 10(10AA) leave encashment
๐ผ HR & Payroll
calculate_professional_taxโ State-wise professional taxcalculate_salary_restructuringโ Tax-optimized salary restructuring
๐ฆ Banking & Payments
calculate_neft_rtgs_imps_chargesโ Transaction charges
๐ Account Aggregator (Offline)
build_aa_consent_requestโ AA consent request buildervalidate_aa_consent_artifactโ AA consent validatordecode_aa_fi_typeโ AA FI type decoder
๐ Agent Workflows & Resources
Prompt Workflows (Overview)
Built-in prompt templates to guide AI agents through complex multi-step tasks:
vendor_kycโ GSTIN, PAN, and IFSC verification sequence.salary_plannerโ Income, HRA, and optimized take-home salary planning.invoice_auditโ Cross-referencing GSTINs, HSN codes, and applicable GST rates.
Server Resources (Overview)
Dynamic JSON resources provided directly to the LLM context:
india://statusโ Version, DB connectivity, and runtime flagsindia://changelogโ Structured changelog resourceindia://schema/*โ JSON schemas for all tool outputs
๐ก Data Architecture & Freshness
This package bundles static datasets for offline-first workflows (approx. 10-11MB compressed footprint), covering IFSCs, Pincodes, HSN/SAC masters, and curated UPI handles.
An optional auto-update mechanism fetches the latest versions from the jsDelivr CDN in the background:
- Non-blocking: Stale data triggers a background refresh; the current request immediately uses existing cached data to ensure zero latency.
- Opt out: Set the
MCP_INDIA_STACK_NO_AUTO_UPDATE=1environment variable to disable all update checks. - Manual refresh: Run
mcp-india-stack --refresh-allto synchronously refresh all datasets from the CDN. - Cache location: Platform-specific via
platformdirs(e.g.,~/.cache/mcp-india-stackon Linux).
โ ๏ธ Limitations
- Stateless Validation: GSTIN, Aadhaar, Voter ID, DL, Passport, CIN, and DIN validators check structural formatting and checksums only. They do not verify active registration status with government issuing authorities.
- Algorithmic Constraints: PAN validation is structural; the PAN check character logic is not publicly verifiable.
- Tax Estimates: All tax calculations are algorithmic estimates based on FY2025-26 rules. Actual liability may differ. Always consult a Chartered Accountant.
- Static Rates: HSN/SAC rates are static references and may vary based on specific conditions or new government notifications.
โ๏ธ Legal & Attribution
See NOTICES for detailed dataset attribution, licensing details, and third-party acknowledgments.
๐ Launch Notes
This repository is release-ready for GitHub launch with:
0.4.2package metadata and changelog coverage.- A complete MCP server-card under
docs/.well-known/mcp/server-card.json. - Local setup and publishing steps in
SETUP.md. - Contribution guidance and versioning policy in
CONTRIBUTING.md.
Bug fixes in v0.4.2 (Round 2 โ Deep Code Audit)
- Capital Gains: Asset-type-specific LTCG thresholds โ real estate 24mo, gold/debentures 36mo, crypto always 30% flat.
- EPF/ESIC: Employee EPF correctly capped at โน15K wage ceiling. Added
voluntary_pf_on_actualfor VPF. - HRA: Removed Bangalore/Hyderabad/Pune from metro cities. Only Delhi/Mumbai/Chennai/Kolkata get 50%.
- Presumptive Tax: Full 7-slab new regime coverage with 87A rebate (was truncated at 3 slabs).
- GST Late Fee: GSTR9 cap enforced (0.25% of turnover). Nil return rate corrected to โน20/day.
- Income Tax Interest: Section 234C uses cumulative paid vs required (not single-quarter).
- Advance Tax: Installments show incremental
installment_amount(not confusing cumulative). - Salary Restructuring: Removed obsolete โน19,200 conveyance exemption. Standard deduction (โน75K) shown.
Bug fixes in v0.4.1
- Security: Masked Aadhaar number leakage in response fields.
- Validation: Fixed mobile number over-counting digits issue.
- Tax Rules: Corrected Presumptive Tax (44AD/44ADA) thresholds to FY25-26 rules.
- Financial: Fixed Step-up SIP compounding return calculation.
- Data: Added missing HSN codes (8517, 9401, 2523, 3004, 8708) with correct GST rates.
- Professional Tax: Fixed annual total calculations based on correct monthly slabs.
- Income Tax: Fixed 80D deduction cap for senior citizens.
- ISIN: Fixed Luhn checksum multi-digit expansion logic.
- EMI Calculator: Improved error responses to not leak fallback fields on invalid inputs.
- Advance Tax: Added support for overriding internal computations with user-provided
tax_liability.
Offline-First Guarantee: All tools in this package work without an internet connection. No API keys required. No data is sent to any external server. All datasets are bundled in the package at install time.
