Tally MCP Server
Author: CA. Dhananjay Gokhale
MCP (Model Context Protocol) is an innovative technique in the space of AI developed by Anthropic LLC. It lays down standards & specification to enable LLM to communicate with API and local resources, thereby automating things. Tally MCP server enables popular LLM to connect with Tally Prime ERP.
Ensure below things are pre-installed and setup:
TallyPrime acts as = Server
Port = 9000
Note: Kindly avoid using Educational version of Tally Prime, which has limitations of date range. It will result in invalid / partial data being fed to LLM, leading to highly degraded & incorrect responses.
Download the Tally MCP Server from below link
https://ai.icai.org/assets/upload/material/1766393040_tally_mcp_server_v6.zip
| Platform | Local | Remote | |
| Claude AI | ✓ | ✓ | |
| ChatGPT | x | ✓ | |
| Gemini | x | x | |
| Grok | x | x | |
| Mistral AI | x | ✓ | |
| Perplexity | ✓ | x |
This mode of setup is to be used when MCP Client (like Claude Desktop, Perplexity etc.) and Tally Prime both exists in local PC. MCP Client software itself runs the MCP Server internally in such scenario.
Simply download & extract zip file somewhere on the disk. Assuming that we downloaded & extracted zip file on below path (folder)
D:\Software\Tally MCP Server
Desktop version of Claude AI supports loading of local MCP server. Ensure you have Pro / Team / Max / Enterprise subscription of Claude, which supports higher limit compared to Free. MCP makes multiple calls to Tally for validation and inference, which might exhaust free limits quickly.
Go to menu > File > Settings > Developer
This will open My Computer window. Right click and edit claude_desktop_config.json file (via Notepad) with as below JSON
{
"mcpServers": {
"Tally Prime": {
"command": "node",
"args": ["D:\\Software\\Tally MCP Server\\dist\\index.mjs"]
}
}
}
Note: single slash in folder path needs to be substituted with double slash
Save the file. Close Claude Desktop (menu > File > Exit) and again re-launch it.
Verify by clicking on Tools button and check if Tally Prime appears in the list (screenshot below)
list-master
Extracts list of specific master for auto-completion and validation if master exists, during inference by LLM
Input
| Argument | Description |
| targetCompany (optional) | Company name of the target company in Tally. Skipping this defaults to Active company |
| collection | Valid collection of Tally |
Output List (or array) of queries master
Collections that can be queried:
chart-of-accounts
Extracts Chart of Accounts (or Group hierarchy) useful for preparing Balance Sheet, Profit and Loss, Trial Balance
Input
| Argument | Description |
| targetCompany (optional) | Company name of the target company in Tally. Skipping this defaults to Active company |
Output Tabular output with columns as below
| Column | Description |
| group | Ledger name |
| parent | Group under which ledger exists |
| bs_pl | BS (Balance Sheet) / PL (Profit & Loss) |
| dr_cr | D (Debit) / C (Credit) |
| affects_gross_profit | Y (Yes) / N (No) |
trial-balance
Extracts Trial Balance for the specified period
Input
| Argument | Description |
| targetCompany (optional) | Company name of the target company in Tally. Skipping this defaults to Active company |
| fromDate | Period start date (useful for opening balance) |
| toDate | Period end date for closing balance |
Output Tabular output with columns as below
| Column | Description |
| ledger | Ledger name |
| group | Group under which ledger exists |
| opening_balance | Opening Balance for the specified fromDate |
| net_debit | Net Debit during the specified period |
| net_credit | Net Credit during the specified period |
| closing_balance | Closing Balance for the specified fromDate |
balance-sheet
Extracts Balance Sheet as on date
Input
| Argument | Description |
| targetCompany (optional) | Company name of the target company in Tally. Skipping this defaults to Active company |
| toDate | as on date of Balance Sheet |
Output Tabular output with columns as below
| Column | Description |
| ledger | Ledger name |
| group | Group under which ledger exists |
| closing_balance | Closing Balance as on date |
profit-loss
Extracts Profit & Loss for the period
Input
| Argument | Description |
| targetCompany (optional) | Company name of the target company in Tally. Skipping this defaults to Active company |
| fromDate | Period start date |
| toDate | Period end date |
Output Tabular output with columns as below
| Column | Description |
| ledger | Ledger name |
| group | Group under which ledger exists |
| amount | Amount of net activity (-ve = Expense / +ve = Income) |
ledger-balance
Returns closing balance of ledger as on specified date
Input
| Argument | Description |
| targetCompany (optional) | Company name of the target company in Tally. Skipping this defaults to Active company |
| ledgerName | Ledger of which to query balance |
| toDate | specific date for closing balance |
Output Closing Balance of ledger (if exists)
| Sign | Description |
| Negative (-) | Debit |
| Positive (+) | Credit |
Note: If specified ledger does not exists, LLM might invoke list-master tool to fetch list of ledgers. It will attempt to find closest possible ledger name for this list and re-run this action. This might produce un-predictable response.
ledger-account
Extracts ledger account for the specified ledger for the given period
Input
| Argument | Description |
| targetCompany (optional) | Company name of the target company in Tally. Skipping this defaults to Active company |
| ledgerName | Ledger of which to query balance |
| fromDate | period start date |
| toDate | period end date |
Output Tabular output with columns as below
| Column | Description |
| date | Date of voucher |
| voucher_type | Voucher Type |
| voucher_number | Voucher Number |
| party_ledger | Party ledger or opposite side ledger |
| amount | Amount (negative = Debit / positive = Credit) |
| narration | Narration or Remarks of voucher |
stock-item-balance
Returns available quantity of stock item as on specified date
Input
| Argument | Description |
| targetCompany (optional) | Company name of the target company in Tally. Skipping this defaults to Active company |
| itemName | Stock Item of which to query available quantity |
| toDate | specific date as on which to check quantity |
Output Available Quantity of stock item (if exists)
Note: If specified stock item does not exists, LLM might invoke list-master tool to fetch list of stock items. It will attempt to find closest possible stock item name for this list and re-run this action. This might produce un-predictable response.
stock-item-account
Extracts account statement for stock item vouchers for the specified item for the given period
Input
| Argument | Description |
| targetCompany (optional) | Company name of the target company in Tally. Skipping this defaults to Active company |
| itemName | Ledger of which to query balance |
| fromDate | period start date |
| toDate | period end date |
Output Tabular output with columns as below
| Column | Description |
| date | Date of voucher |
| voucher_type | Voucher Type |
| voucher_number | Voucher Number |
| party_ledger | Party ledger or opposite side ledger |
| quantity | Quantity (negative = Outward / positive = Inward) |
| amount | Amount (negative = Debit / positive = Credit) |
| narration | Narration or Remarks of voucher |
| tracking_number | Tracking number to reconcile pending quantity received by ignoring excess / missing quantity in actual purchase (against receipt note) and sales (against delivery note) |
bills-outstanding
Extracts bill-wise outstanding Receivables / Payables report
Input
| Argument | Description |
| targetCompany (optional) | Company name of the target company in Tally. Skipping this defaults to Active company |
| nature | receivable / payable |
| toDate | Date on which outstanding position to fetch |
Output Tabular output with columns as below
| Column | Description |
| date | Date of purchase / sales invoice |
| reference_number | Invoice number of purchase / sales invoice |
| outstanding_amount | Pending amount as on date |
| party_name | Ledger name of the party |
| overdue_days | Count of days by which invoice is overdue |