tally-prime-mcp
Tally Prime MCP Server (Read & Write)
An MCP server that lets Claude read, add, modify and delete data in TallyPrime over Tally's XML port. It covers vouchers, item invoices, stock journals, ledgers, stock items, groups, stock groups, godowns, units and cost centres.
Before every change it backs up the company data folder to Desktop\Tally Backups.
Changing an opening balance or opening stock always asks you first.
⬇ Download the latest release (tally-prime-mcp-1.1.0.mcpb, one-click install for Claude Desktop)
⚠️ This tool writes to your books of account. Test it on a copy of your company first, keep backups switched on, and review what Claude proposes before approving deletes or opening-balance changes. Provided as-is under the MIT License.
1. Set up TallyPrime
Open TallyPrime and load the company.
Press F1 (Help) → Settings → Connectivity.
TallyPrime acts as =
Server(orBoth)Note the Port number (default is
9000).
Keep Tally open whenever you want Claude to use it.
Related MCP server: Tally MCP Server
2. Install in Claude Desktop (easiest, nothing else needed)
Install the Claude Desktop app and sign in.
Download
tally-prime-mcp-1.1.0.mcpbfrom the Releases page.Double-click it, then click Install.
In the extension's settings:
Setting | Default | Meaning |
Tally host |
| Host or IP of the PC running TallyPrime |
Tally port |
| Change this to the port from step 1 (usually |
Read-only mode | off | Blocks every write tool |
Backup before every change | on | Copies the company data folder before each create/alter/delete |
Backup folder |
| Where backups go |
Backups to keep per company | 30 | Older automatic backups are removed (0 = keep all; each is about the size of the company folder) |
Start a new chat and ask: "Check Tally status". It should answer "TallyPrime Server is Running" and list your company.
3. Claude Code or another MCP client (optional)
Needs Node.js 18 or newer.
git clone https://github.com/gargcamanish-tech/tally-prime-mcp.git
cd tally-prime-mcp
npm installClaude Code (change the path and port):
claude mcp add --scope user tally-write -e TALLY_PORT=9000 -- node "C:\path\to\tally-prime-mcp\src\index.js"Other clients, add to their MCP config:
"tally-write": {
"command": "node",
"args": ["C:\\path\\to\\tally-prime-mcp\\src\\index.js"],
"env": { "TALLY_PORT": "9000" }
}Environment variables: TALLY_HOST, TALLY_PORT, TALLY_COMPANY, TALLY_READONLY=true, TALLY_AUTO_BACKUP=false,
TALLY_BACKUP_DIR, TALLY_BACKUP_KEEP, TALLY_TIMEOUT_MS (default 180000).
Tools (21)
Area | Tools |
Status & backups |
|
Read |
|
Vouchers |
|
Ledgers |
|
Stock items |
|
Other masters |
|
Advanced |
|
Safety rules built in
Backup first: each write copies the company folder (path read from Tally) to
Desktop\Tally Backups\<company> <date time> <tool>and checks every file was copied. If the backup fails, the change is not made.Opening balance / opening stock: changing a ledger's opening balance, or a stock item's opening quantity, rate, value or godown, takes two steps. The first call writes nothing and returns the current vs new figures; Claude must show you and get your yes. Only then is it repeated with
confirm_opening_change: true.Deletes need
confirm: true. Every write tool also supportsdry_run: trueto preview the XML.Alter changes only the fields you name; everything else is kept: GST and bank details, addresses, bill references.
Read-only mode (
TALLY_READONLY=true) blocks all writes.
Restoring a backup
Close TallyPrime, then copy the numbered folder (e.g. 021047) from inside the backup over the company's data folder
(tally_status shows the path). Reopen Tally.
Examples you can ask Claude
"Record a payment of ₹12,500 from HDFC Bank to Rent on 1 Oct 2025, narration 'October rent'."
"Make a sales invoice to S P Enterprises: 1200 KG SUGAR-17011490-5% @ 42.05, SALES RD, CGST and SGST 2.5% each."
"Change the quantity in invoice A908 to 1000 KG and recompute the taxes."
"Transfer 50 KG sugar from Main Location to Godown 2 on 1 Oct 2025."
"Change the GST rate of SUGAR-17011490-5% to 12% and the HSN to 17019990."
"Create godown 'Shop' and stock group 'Sweeteners'; move the sugar item into it."
Good to know
Educational (unlicensed) TallyPrime only accepts entry dates on the 1st, 2nd and 31st. Other dates fail with "Voucher date is missing".
GST amounts are not calculated by Tally on import; pass the CGST/SGST/IGST ledger lines (Claude can compute them).
Altering or deleting a voucher needs a voucher number that is unique on that date.
list_voucherstakes about 5 s per month of data; financial years are assumed to start in April.
Verified on TallyPrime 6.1
Tested on a live GST trading company; all test objects were removed afterwards.
test/e2e.mjs runs 36 checks through the MCP protocol, and all pass:
ledger create, rename and partial alter (address and GSTIN kept);
opening-balance confirmation;
units, stock groups, godowns and groups;
stock item create, rename, GST/HSN change and opening-stock confirmation (10 → 20);
journal, GST item invoice with bill reference, and stock journal godown transfer: each created, altered and deleted;
closing stock correct;
an automatic backup before every write;
every master type deleted, with Tally still running.
Things learned about this Tally version
A voucher is identified by date + voucher number + type. Matching by GUID/REMOTEID silently creates a duplicate, so alter/delete refuse vouchers with no number, or with a number repeated on the same date.
Alter must send the whole voucher, so the server fetches it, changes only what was asked, and sends it back.
Names use
LANGUAGENAME.LIST. The older top-levelNAME.LISTrename, followed by a delete, crashed Tally (Memory Access Violation). The current method was retested several times without a crash.Opening stock lives in the item's godown batch allocation; the item-level figures alone are ignored on alter.
Development
npm install
TALLY_PORT=9000 TALLY_BACKUP_DIR=<temp folder> npm run e2e # creates, alters and deletes test entries
npx @anthropic-ai/mcpb pack . tally-prime-mcp.mcpbThe e2e test expects ledgers named MISC, ROUND OFF, SALES RD, CGST, SGST and a voucher type SALES GST-RD
in the active company; adjust test/e2e.mjs for your own masters.
License
MIT © 2026 Manish Bansal
Available Tools
21 toolsalter_ledgerA
Modify a ledger: rename (new_name), group, opening balance, bill-wise, address, state, pincode, GSTIN, PAN, contacts. Only given fields change. Opening balance changes are two-step: the first call only returns current vs new values for the user to approve.
Inputs: name (required), pan, email, group, +21 more.
alter_masterA
Modify / rename an account group, stock group, godown, unit or cost centre. Only given fields change.
Inputs: name (required), type (required), parent, aliases, +7 more.
alter_stock_itemA
Modify a stock item: rename (new_name), group, unit, opening stock, GST rate, HSN, description. Only given fields change. Opening stock changes are two-step: the first call only returns current vs new opening figures; ask the user, then repeat with confirm_opening_change: true.
Inputs: name (required), unit, group, aliases, +16 more.
alter_voucherA
Modify an existing voucher. Identify it with master_id (preferred). Only the fields given in changes are modified; everything else (GST details, bank details, addresses...) is sent back unchanged. changes.ledger_entries REPLACES all ledger lines (for item invoices: the party/tax lines); changes.inventory_entries REPLACES all item lines; changes.stock_in / stock_out REPLACE the Stock Journal lines. Totals must still balance. An existing single bill reference on a ledger is kept automatically if you omit bill_allocations for it.
Inputs: changes (required), date, guid, company, +4 more.
backup_dataA
Take a backup of the company data folder now (copied to Desktop\Tally Backups). Write tools already do this automatically.
Inputs: company.
create_ledgerC
Create a ledger (party, bank, expense, income, tax...).
Inputs: name (required), group (required), pan, email, +19 more.
create_masterA
Create an account group, stock group, godown, unit (name = symbol, e.g. "KG") or cost centre.
Inputs: name (required), type (required), parent, aliases, +6 more.
create_stock_itemC
Create a stock item with unit, group, opening stock, GST rate and HSN.
Inputs: name (required), unit, group, aliases, +14 more.
create_voucherA
Create a voucher in Tally (Payment, Receipt, Journal, Contra, Sales, Purchase, Credit/Debit Note, Stock Journal or any custom type). Accounting vouchers: give ledger_entries only (Debits must equal Credits). Item invoices: give inventory_entries (stock items, each posting to a sales/purchase ledger) plus ledger_entries for the party and any tax / round-off ledgers; items count as Cr when going out (sales) and Dr when coming in (purchase). Stock Journal (godown transfer, manufacturing, adjustment): give stock_out (source/consumption) and/or stock_in (destination/production). GST is not computed automatically: pass CGST/SGST/IGST ledger lines with amounts.
Inputs: date (required), voucher_type (required), company, dry_run, +11 more.
delete_masterA
Permanently delete a ledger, group, stock item, stock group, godown, unit or cost centre (a backup is taken first). Tally refuses if it is still used by vouchers or other masters. Requires confirm: true; get the user's approval first.
Inputs: name (required), type (required), confirm (required), company, +1 more.
delete_voucherA
Permanently delete a voucher from Tally (a backup is taken first). Identify it with master_id (preferred). Requires confirm: true. Show the user the voucher (get_voucher) and get their approval before calling this.
Inputs: confirm (required), date, guid, company, +4 more.
get_masterB
Full details of one master. Ledger: group, opening balance, bill-wise, address, state, pincode, GSTIN, PAN, contacts. Stock item: group, unit, opening stock, GST rate, HSN. Others: parent etc.
Inputs: name (required), type (required), company.
get_voucherB
Get one voucher in full by master_id (or guid, or date + voucher_number + voucher_type).
Inputs: date, guid, company, master_id, +3 more.
import_raw_xmlA
Advanced escape hatch: import raw Tally XML objects (the content that goes inside ), e.g. a or with ACTION="Create"/"Alter"/"Delete". Prefer the specific tools.
Inputs: xml (required), report (required), company, dry_run.
list_backupsA
List the automatic/manual data backups (newest first) with their folders.
Inputs: no named parameters.
list_ledgersB
List ledgers with their group and opening/closing balance (positive = Cr, negative = Dr as Tally reports).
Inputs: group, search, company.
list_mastersB
List masters of a type: group, stock_group, godown, unit, cost_centre (also ledger / stock_item, names only).
Inputs: type (required), parent, search, company.
list_stock_itemsC
List stock items with group, base unit and closing quantity/value.
Inputs: search, company.
list_vouchersA
List vouchers in a date range with their entries. Each row has master_id, which alter_voucher / delete_voucher use. Roughly 5 seconds per month of data, so keep ranges short.
Inputs: to (required), from (required), item, limit, +4 more.
list_voucher_typesB
List voucher types with their base type (e.g. "SALES GST-RD" -> Sales).
Inputs: company.
tally_statusA
Check the connection to TallyPrime, list loaded companies and show backup settings.
Inputs: no named parameters.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 21 tools
Most tools map cleanly to a distinct resource plus action, so an agent can usually choose correctly. Minor overlap exists because list_masters can also list ledger/stock_item names only, and delete_master spans ledger/stock item deletion while create/alter use dedicated tools, but the descriptions make this workable.
The set follows a strong verb_noun convention throughout: list_*, get_*, create_*, alter_*, delete_*, backup_data, import_raw_xml. The only slight deviation is tally_status, but it remains clear and readable.
Twenty-one tools is on the heavy side, but the domain is broad: vouchers, ledgers, stock items, masters, backups, status, and a raw XML escape hatch. Most tools earn their place, though the set is near the upper end of what feels comfortable.
The surface covers full lifecycle operations for vouchers, ledgers, stock items, and other masters, plus list/get, backups, status, and an advanced raw XML fallback. No obvious CRUD dead ends are present for the core accounting workflows.
Maintenance
Related MCP Connectors
AI for Tally Prime and Tally ERP 9. Hosted MCP server to ask your accounts in any language.
MCP server unifying ERPs, CRMs, APIs and knowledge base for Claude, ChatGPT and Gemini.
Hosted Amazon Seller and Vendor MCP server for Claude, ChatGPT, Cursor, Codex, Gemini, Copilot.
Hosted SQL Server MCP server for Claude, ChatGPT and Cursor, with each action switched per account.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceAn MCP server for TallyPrime ERP that fixes common gaps such as hardcoded localhost, lack of connection diagnostics and dry-run safety, missing GST tools, and session state loss, providing a smoother integration with Claude Desktop.7MIT
- AlicenseAqualityCmaintenanceAn MCP server that lets Claude read from and write to TallyPrime via its built-in XML/HTTP gateway.233ISC
- AlicenseAqualityBmaintenanceA read-only MCP server that connects Claude Desktop to TallyPrime, enabling natural-language auditing and analysis of accounting data directly from the local Tally installation.39MIT
- AlicenseNot gradedqualityDmaintenanceAn MCP server that connects Claude to TallyPrime, allowing natural language queries for reading ledgers, trial balances, and daybooks, and creating vouchers with a dry-run and confirmation safety model.MIT