pan-mcp
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.
pan-mcp
A Model Context Protocol (MCP) server for Indian PAN (Permanent Account Number) validation. It lets Claude Code, Claude Desktop, Cline, and any other MCP client validate a PAN's format locally, offline, without an API key.
A PAN is the 10-character tax ID issued by India's Income Tax Department — e.g. ABCCX1234C. This server fills a real gap: there are few MCP servers for Indian data, and PAN verification is high-intent for AI coding and research agents.
What it does
One tool:
Tool | Description | Needs API key? |
| Pure local format + holder-type validation. Works offline, no key. | No |
pan_validate is fully offline — it checks the PAN structure and the holder-type character with no network call, so it always works.
Related MCP server: mcp-india-stack
Quick start
npm install
npm startThat starts the server on stdio (the default transport, recommended for local use). Point your MCP client at it:
{
"mcpServers": {
"pan": {
"command": "node",
"args": ["C:/Users/Aditya Shah/Desktop/Code/pan-mcp/server.js"]
}
}
}Tip: on Windows, write the absolute path with forward slashes (
C:/...) or quote it.
Using it in Claude Code / Claude Desktop
Once connected, you can ask things like:
"Is
ABCCX1234Ca valid PAN?" → usespan_validate"Validate this PAN:
ABCD1234C" → usespan_validate
Examples
pan_validate
{ "name": "pan_validate", "arguments": { "pan": "ABCCX1234C" } }{
"valid": true,
"parsed": {
"pan": "ABCCX1234C",
"firstPart": "ABCCX",
"digits": "1234",
"lastChar": "C",
"holderTypeChar": "C"
}
}The validator is strict: it rejects wrong lengths, non-alphanumeric input, a digit in the first letter block, a letter in the digit block, and a 4th character that isn't C. It also normalizes input — lowercase, and spaces or dashes between groups like ABCDE-6789-M are accepted.
How the validator works
A PAN has the structure AAAAA9999C:
AAAAA 5 letters (always alphabetic)
9999 4 digits
C 1 letter — the 4th character is always 'C', encoding the holder typePattern — must match
/^[A-Z]{5}[0-9]{4}[A-Z]$/(10 characters total).Character 4 — the holder-type position; it is always the letter
C.Normalization — input is trimmed, uppercased, and grouped spaces/dashes are stripped before validation.
There is no checksum for a PAN — the format and holder-type rules above are the whole validation.
Data source & licensing
There is no data source — PAN validation is a pure local format algorithm, so no API key and no network call are needed. This project is licensed MIT.
Development
npm test # unit tests for the validator
npm start # run the MCP server on stdioThe tests cover accepted PANs, wrong length, wrong pattern, and trim/lowercase/uppercase normalization.
Project layout
pan-mcp/
├── server.js # MCP server: tool handlers + transport
├── lib/
│ └── pan.js # Offline validation
├── scripts/
│ └── test.mjs # Unit tests (npm test)
├── .gitignore
└── package.jsonTool 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
Validate Indian GSTINs locally (Verhoeff), extract PAN, identify issuing state.
Validate IBAN, BIC, VAT, national IDs, phones, postal codes offline; 240+ identifiers.
LatAm Validate MCP — validate Latin-American banking and tax identifiers.
Validate and normalize postal codes offline for 252 countries and territories. Format check only.
Related MCP Servers
- AlicenseCqualityDmaintenanceEnables access to the Pan Card Verification API for validating Indian PAN card details. It provides a dedicated tool for performing PAN verification through a standardized MCP interface.1MIT
- AlicenseAqualityAmaintenanceAn 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.7688MIT
- AlicenseNot gradedqualityDmaintenanceValidates Indian GSTIN numbers with structural checks, embedded PAN extraction, state-code lookup, and mod-36 check character validation, all via local compute.MIT
- AlicenseAqualityBmaintenanceEnables AI agents to validate Indian identifiers (GSTIN, PAN, Aadhaar format, IFSC) and look up pincodes, state/GST codes, Central Government holidays, and compliance due dates entirely offline. Every result is deterministic and carries its data source and freshness, while making clear that a well-formed number is not proof of registration.834 npmMIT