GSTR-1 MCP Server
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
๐งพ GSTR-1 MCP Server
An MCP (Model Context Protocol) server that enables AI assistants to file Indian GST GSTR-1 returns via the GST portal sandbox APIs.
Works with Claude Desktop, Kiro, ChatGPT (with MCP plugin), Cursor, Windsurf, and any MCP-compatible client.
What It Does
This server wraps the Indian GST portal's GSTR-1 APIs into 8 tools that AI assistants can call:
# | Tool | Description |
1 |
| Full auth flow โ generates app key, requests OTP, gets auth token |
2 |
| Upload invoice data (b2b, b2cl, b2cs, hsn sections) |
3 |
| Poll async processing status until COMPLETED |
4 |
| Initiate filing after data validation |
5 |
| Get section summaries + checksum for filing |
6 |
| Request Electronic Verification Code OTP |
7 |
| Final submission with EVC OTP โ returns ARN |
8 |
| Convert GSTR-1 Excel workbook to API JSON |
Related MCP server: india-stack-mcp
Prerequisites
uv โ Python package manager (install guide)
curl -LsSf https://astral.sh/uv/install.sh | shGST Sandbox Public Key Certificate โ bundled in
certs/directory (no download needed for sandbox)GSP Credentials โ
client-idandclient-secretfrom your GSP onboarding
Quick Start
1. Clone the repo
git clone https://github.com/vishnu27597/gstr1-mcp-server.git
cd gstr1-mcp-server2. Set up environment
cp .env.example .env
# Edit .env with your credentials and cert path3. Configure your MCP client
Add the server to your MCP client's configuration file.
MCP Client Setup
Kiro
Edit ~/.kiro/settings/mcp.json (or .kiro/settings/mcp.json in your workspace):
{
"mcpServers": {
"gstr1": {
"command": "uv",
"args": [
"--directory", "/absolute/path/to/gstr1-mcp-server",
"run", "gstr1-mcp-server"
],
"env": {
"GST_CLIENT_ID": "3jXXbtwkLpt+dd5bAxQKBxTAHGv4nnLl+nwcapkmvK8=",
"GST_CLIENT_SECRET": "aox4PGWgcFv3MCRUPxf30TQ8t2v6c48mhptufG1QEAk5uu048yfUlPp4tIG5gY2gr4eYTRe6+5p7ehbqXZdvXg==",
"GST_USERNAME": "TN_NT2.21475",
"GST_STATE_CD": "33"
}
}
}
}Claude Desktop
Edit ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):
{
"mcpServers": {
"gstr1": {
"command": "uv",
"args": [
"--directory", "/absolute/path/to/gstr1-mcp-server",
"run", "gstr1-mcp-server"
],
"env": {
"GST_CLIENT_ID": "3jXXbtwkLpt+dd5bAxQKBxTAHGv4nnLl+nwcapkmvK8=",
"GST_CLIENT_SECRET": "aox4PGWgcFv3MCRUPxf30TQ8t2v6c48mhptufG1QEAk5uu048yfUlPp4tIG5gY2gr4eYTRe6+5p7ehbqXZdvXg==",
"GST_CERT_PATH": "/path/to/GSTN_G2B_SANDBOX_UAT_public.cert.cer",
"GST_USERNAME": "TN_NT2.21475",
"GST_STATE_CD": "33",
"GST_BASE_URL": "https://staging-passthrough.gsp.amazon.dev"
}
}
}
}Cursor
Edit .cursor/mcp.json in your project root:
{
"mcpServers": {
"gstr1": {
"command": "uv",
"args": [
"--directory", "/absolute/path/to/gstr1-mcp-server",
"run", "gstr1-mcp-server"
],
"env": {
"GST_CLIENT_ID": "3jXXbtwkLpt+dd5bAxQKBxTAHGv4nnLl+nwcapkmvK8=",
"GST_CLIENT_SECRET": "aox4PGWgcFv3MCRUPxf30TQ8t2v6c48mhptufG1QEAk5uu048yfUlPp4tIG5gY2gr4eYTRe6+5p7ehbqXZdvXg==",
"GST_CERT_PATH": "/path/to/GSTN_G2B_SANDBOX_UAT_public.cert.cer",
"GST_USERNAME": "TN_NT2.21475",
"GST_STATE_CD": "33",
"GST_BASE_URL": "https://staging-passthrough.gsp.amazon.dev"
}
}
}
}Environment Variables
Variable | Required | Description | Example |
| Yes | GSP client ID (Base64 encoded) |
|
| Yes | GSP client secret (Base64 encoded) |
|
| No | Override path to |
|
| Yes | Taxpayer username for sandbox |
|
| Yes | 2-digit state code |
|
| No | API base URL (defaults to sandbox) |
|
Filing Workflow
Here's how an AI assistant uses the tools to file a GSTR-1 return:
Step 1: generate_taxpayer_session
โ (returns access_token)
Step 2: save_gstr1_data (with invoice JSON payload)
โ (returns reference_id)
Step 3: check_return_status (poll until COMPLETED)
โ
Step 4: proceed_to_file
โ (returns reference_id)
โ check_return_status (poll until COMPLETED)
โ
Step 5: get_gstr1_summary
โ (returns sec_sum + chksum)
Step 6: generate_evc_otp
โ (OTP sent to taxpayer)
Step 7: file_gstr1 (with OTP + sec_sum + chksum)
โ (returns ARN โ filing acknowledgement)Example: Save a B2B Invoice
Ask your AI assistant:
"File my GSTR-1 for March 2026. My GSTIN is 33CMNPP5324B9Z0, username TN_NT2.21475. I have one B2B invoice: invoice number TEST-INV-001, dated 15-03-2026, value โน10,000, to buyer GSTIN 33GSPTN0161G1ZH, 18% GST intra-state."
The assistant will:
Call
generate_taxpayer_sessionto authenticateCall
save_gstr1_datawith the invoice payloadCall
check_return_statusto confirm processingContinue through the filing workflow
Example: Convert Excel and File
"Convert my GSTR-1 Excel at /path/to/GSTR1_output_032026.xlsx and file it for March 2026."
The assistant will:
Call
convert_excel_to_payloadto read the ExcelCall
generate_taxpayer_sessionto authenticateCall
save_gstr1_datawith the converted payloadComplete the filing workflow
Sandbox Details
Property | Value |
Base URL |
|
Auth API |
|
Returns API |
|
Sandbox OTP |
|
Test GSTIN |
|
Test Username |
|
State Code |
|
Counter-party GSTIN |
|
Token Expiry | 360 minutes |
API Payload Rules
Intra-state (seller state = POS): use
camt(CGST) +samt(SGST). Neveriamt.Inter-state (seller state โ POS): use
iamt(IGST). Nevercamt/samt.Invoice date:
DD-MM-YYYYin API payloadReturn period:
MMYYYYformat (e.g.032026), must not be future monthBatching: Multiple
save_gstr1_datacalls allowed. System stores the union. Same invoice number replaces previous.
Development
# Install dependencies
uv sync
# Run the server locally
uv run gstr1-mcp-server
# Run tests
uv run pytestProject Structure
gstr1-mcp-server/
โโโ pyproject.toml # Package config + dependencies
โโโ README.md
โโโ LICENSE # MIT
โโโ .env.example # Credential template
โโโ .gitignore
โโโ certs/
โ โโโ GSTN_G2B_SANDBOX_UAT_public.cert.cer # Bundled sandbox cert
โโโ schemas/
โ โโโ gstr1_schema.json # Official GSTR-1 upload schema v2.4
โ โโโ sample_payload.json # Sample GSTR-1 payload from GST portal
โโโ src/
โโโ gstr1_mcp_server/
โโโ __init__.py
โโโ server.py # MCP server + 8 tool definitions
โโโ crypto.py # AES/RSA encryption for GST APIs
โโโ gst_api.py # HTTP client + session management
โโโ excel_converter.py # GSTR-1 Excel โ API JSON converterLicense
MIT
References
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogโฆ
This server cannot be deployed
Maintenance
Related MCP Connectors
India GST e-invoicing for AI agents - generate, query, cancel IRNs at the IRP via a GSP. Stateless.
Build WhatsApp, Sheets and Gmail automations for Indian businesses; check GST credit.
PDF tools + invoice extraction, bank statement parsing, GST reconciliation & GSTIN validation.
Malaysian SME accounting, e-Invoice and payroll for your AI. 95 tools; writes are approved drafts.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to generate India GST e-invoices (IRN) via Sandbox GSP, computing tax splits automatically.MIT
- AlicenseNot gradedqualityCmaintenanceEnables AI agents to manage Indian enterprise systems by providing tools for accounting (TallyPrime), invoicing (Zoho Books), and GST compliance (validation, e-invoice generation, and GSTR-2B reconciliation), with dry-run-first writes and an audit trail.2Apache 2.0
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to build and structurally validate Indian GST e-invoice JSON payloads (INV/CRN/DBN) and render IRP-returned signed QR strings as PNG images.1Apache 2.0
- AlicenseAqualityCmaintenanceEnables converting Indian GST tax invoices into government INV-01 JSON payloads via OCR and deterministic extraction, with tools to validate GSTINs and re-validate payloads, and reports exactly what it couldn't read.3MIT