Purpose
tally-prime-mcp is an MCP server for letting Claude read and write accounting data through TallyPrime's XML port. It is aimed at use cases that require batch or conversational entry and adjustment of vouchers and master data in TallyPrime.
Key capabilities
- Read, create, modify, and delete TallyPrime data, covering vouchers, material invoices, inventory journals, ledgers, stock items, groups, stock groups, godowns, units, and cost centres.
- Automatically back up the company data folder before every write to
Desktop\Tally Backups, and check whether every file was copied successfully; if the backup fails, the change is not executed. - When modifying a ledger's opening balance, or modifying a stock item's opening quantity, rate, value, or godown, a two-step confirmation is used: the first call does not write and returns the current value and the new value; after the user confirms, retry with
confirm_opening_change: true. - Delete operations require
confirm: true; all write tools supportdry_run: trueto preview the XML. - When modifying, only the specified fields are changed, preserving GST, bank information, address, bill references, and other content.
- Supports read-only mode (
TALLY_READONLY=true) to block all writes.
How to use
- Load the company in TallyPrime, press F1 → Settings → Connectivity, set TallyPrime acts as to Server or Both, and note the port number (default 9000). Keep Tally open during use.
- Claude Desktop: install and sign in to Claude Desktop, download
tally-prime-mcp-1.1.0.mcpbfrom the Releases page, double-click it and click Install, then fill in the host, port, and company in the extension settings. Start a new conversation and ask "Check Tally status"; it should return "TallyPrime Server is Running" and list the companies. - Claude Code or other MCP clients: Node.js 18 or later is required; add the server to the MCP configuration, and configure it via the environment variable
TALLY_HOST、TALLY_PORT、TALLY_COMPANY、TALLY_READONLY、TALLY_AUTO_BACKUP、TALLY_BACKUP_DIR、TALLY_BACKUP_KEEP、TALLY_TIMEOUT_MS(default 180000). - Restoring a backup: close TallyPrime, copy the numbered folder from the backup (e.g.
021047) back to the company data folder (tally_statuscan display the path), then reopen Tally.
Applicable scenarios
The examples given in the materials include: recording payments, creating sales invoices, modifying invoice quantities and recalculating taxes, transferring inventory between warehouses, modifying material GST rates and HSN, creating warehouses and stock groups and moving materials.
Limitations and notes
- This tool writes to the books; the official recommendation is to test on a copy of the company first, keep backups enabled, and review Claude's proposals before approving deletions or opening balance changes. The software is provided "as-is" under the MIT License.
- Educational (unlicensed) TallyPrime only accepts entry dates on the 1st, 2nd, and 31st of each month; other dates will report "Voucher date is missing".
- Tally does not calculate GST amounts on import; CGST/SGST/IGST ledger lines need to be passed in (Claude can calculate them).
- Modifying or deleting a voucher requires a unique voucher number on that date.
list_vouchersMonthly data takes about 5 seconds; the fiscal year is assumed to start in April.- Vouchers are identified by date + voucher number + type; matching by GUID/REMOTEID will silently create duplicates, so modification/deletion will reject vouchers without a number or with duplicate numbers on the same date.
- When modifying a voucher, the complete voucher must be sent; the server will first fetch it, modify only the specified content, and send it back.
- Names use
LANGUAGENAME.LIST; the old-style top-levelNAME.LISTrenaming followed by deletion previously caused Tally to crash (Memory Access Violation). - Opening stock resides in the material's warehouse batch allocation; modifying the material-level figure alone will be ignored during alter.
- Verified on TallyPrime 6.1; end-to-end test
test/e2e.mjsran 36 checks through the MCP protocol, all passed. The test expects a ledger namedMISC、ROUND OFF、SALES RD、CGST、SGSTand voucher typeSALES GST-RDin the active company; the test file needs to be adjusted to your own master data.