MCP server exposing Indian financial and government APIs — GSTIN, IFSC, PAN, UPI, pincode, HSN/SAC — for AI agents. Zero auth. Offline-first.
Project description
🇮🇳 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.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mcp_india_stack-0.4.2.tar.gz.
File metadata
- Download URL: mcp_india_stack-0.4.2.tar.gz
- Upload date:
- Size: 10.1 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9f8bbee5079ac5a7c5fdbb03abb6f1004c98400045681c3a097bc07d1751466f
|
|
| MD5 |
a804aa961c59660b70c7c04cba6fcd76
|
|
| BLAKE2b-256 |
84deb3748a85b7aa488b5a5ed977a9584607d75139b03b70294219c65281a992
|
Provenance
The following attestation bundles were made for mcp_india_stack-0.4.2.tar.gz:
Publisher:
publish.yml on rehan1020/MCP-India-Stack
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mcp_india_stack-0.4.2.tar.gz -
Subject digest:
9f8bbee5079ac5a7c5fdbb03abb6f1004c98400045681c3a097bc07d1751466f - Sigstore transparency entry: 1732204539
- Sigstore integration time:
-
Permalink:
rehan1020/MCP-India-Stack@2aeba8aa62120ce10cab84eb0a23a1cab4a6ec4d -
Branch / Tag:
refs/tags/v0.4.2 - Owner: https://github.com/rehan1020
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@2aeba8aa62120ce10cab84eb0a23a1cab4a6ec4d -
Trigger Event:
push
-
Statement type:
File details
Details for the file mcp_india_stack-0.4.2-py3-none-any.whl.
File metadata
- Download URL: mcp_india_stack-0.4.2-py3-none-any.whl
- Upload date:
- Size: 10.2 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c6e8888fa47e3d7b3f7b6f1be979a444aaa02d8c57fdbe5909f9b5c9afe0de1c
|
|
| MD5 |
8922a05fb21eb76118edbcd2a73de887
|
|
| BLAKE2b-256 |
72802860e5b5a332c8d5d7f2302a128a3af7e4c89cf4e92e3a485cf7022dba47
|
Provenance
The following attestation bundles were made for mcp_india_stack-0.4.2-py3-none-any.whl:
Publisher:
publish.yml on rehan1020/MCP-India-Stack
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mcp_india_stack-0.4.2-py3-none-any.whl -
Subject digest:
c6e8888fa47e3d7b3f7b6f1be979a444aaa02d8c57fdbe5909f9b5c9afe0de1c - Sigstore transparency entry: 1732204564
- Sigstore integration time:
-
Permalink:
rehan1020/MCP-India-Stack@2aeba8aa62120ce10cab84eb0a23a1cab4a6ec4d -
Branch / Tag:
refs/tags/v0.4.2 - Owner: https://github.com/rehan1020
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@2aeba8aa62120ce10cab84eb0a23a1cab4a6ec4d -
Trigger Event:
push
-
Statement type: