Tally MCP ServerRecord inserted or updated successfully.
AI & Data Analytics

Tally MCP Server

Author: CA. Dhananjay Gokhale

Watch on Youtube

Tally Prime MCP Server

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.

Pre-requisites

  1. Tally Prime (Silver / Gold)
  2. Node JS

Ensure below things are pre-installed and setup:

  1. Ensure to download & install Node JS from official website
  2. XML Port of Tally Prime must be enabled (F1 > Settings > Connectivity > Client/Server configuration) with below settings

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

Download the Tally MCP Server from below link

https://ai.icai.org/assets/upload/material/1766393040_tally_mcp_server_v6.zip


PlatformLocalRemote
Claude AI
ChatGPTx
Geminixx
Grokxx
Mistral AIx
Perplexityx


Setup (Local)

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




Claude Desktop (Local)

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)



Available Tools

list-master

Extracts list of specific master for auto-completion and validation if master exists, during inference by LLM

Input


ArgumentDescription


targetCompany (optional)Company name of the target company in Tally. Skipping this defaults to Active company
collectionValid collection of Tally


Output List (or array) of queries master

Collections that can be queried:

  1. Group
  2. Ledger
  3. VoucherType
  4. Unit
  5. Godown
  6. StockGroup
  7. StockItem
  8. CostCentre
  9. CostCategory
  10. AttendanceType
  11. Company
  12. Currency
  13. GSTIN
  14. GSTClassification

chart-of-accounts

Extracts Chart of Accounts (or Group hierarchy) useful for preparing Balance Sheet, Profit and Loss, Trial Balance

Input



ArgumentDescription


targetCompany (optional)Company name of the target company in Tally. Skipping this defaults to Active company

Output Tabular output with columns as below

ColumnDescription


groupLedger name
parentGroup under which ledger exists
bs_plBS (Balance Sheet) / PL (Profit & Loss)
dr_crD (Debit) / C (Credit)
affects_gross_profitY (Yes) / N (No)

trial-balance

Extracts Trial Balance for the specified period

Input

ArgumentDescription


targetCompany (optional)Company name of the target company in Tally. Skipping this defaults to Active company
fromDatePeriod start date (useful for opening balance)
toDatePeriod end date for closing balance

Output Tabular output with columns as below

ColumnDescription


ledgerLedger name
groupGroup under which ledger exists
opening_balanceOpening Balance for the specified fromDate
net_debitNet Debit during the specified period
net_creditNet Credit during the specified period
closing_balanceClosing Balance for the specified fromDate

balance-sheet

Extracts Balance Sheet as on date

Input

ArgumentDescription


targetCompany (optional)Company name of the target company in Tally. Skipping this defaults to Active company
toDateas on date of Balance Sheet

Output Tabular output with columns as below


ColumnDescription

ledgerLedger name
groupGroup under which ledger exists
closing_balanceClosing Balance as on date

profit-loss

Extracts Profit & Loss for the period

Input

ArgumentDescription

targetCompany (optional)Company name of the target company in Tally. Skipping this defaults to Active company
fromDatePeriod start date
toDatePeriod end date

Output Tabular output with columns as below

ColumnDescription

ledgerLedger name
groupGroup under which ledger exists
amountAmount of net activity (-ve = Expense / +ve = Income)

ledger-balance

Returns closing balance of ledger as on specified date

Input

ArgumentDescription

targetCompany (optional)Company name of the target company in Tally. Skipping this defaults to Active company
ledgerNameLedger of which to query balance
toDatespecific date for closing balance

Output Closing Balance of ledger (if exists)

SignDescription

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

ArgumentDescription

targetCompany (optional)Company name of the target company in Tally. Skipping this defaults to Active company
ledgerNameLedger of which to query balance
fromDateperiod start date
toDateperiod end date

Output Tabular output with columns as below

ColumnDescription

dateDate of voucher
voucher_typeVoucher Type
voucher_numberVoucher Number
party_ledgerParty ledger or opposite side ledger
amountAmount (negative = Debit / positive = Credit)
narrationNarration or Remarks of voucher

stock-item-balance

Returns available quantity of stock item as on specified date

Input

ArgumentDescription

targetCompany (optional)Company name of the target company in Tally. Skipping this defaults to Active company
itemNameStock Item of which to query available quantity
toDatespecific 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

ArgumentDescription

targetCompany (optional)Company name of the target company in Tally. Skipping this defaults to Active company
itemNameLedger of which to query balance
fromDateperiod start date
toDateperiod end date

Output Tabular output with columns as below

ColumnDescription

dateDate of voucher
voucher_typeVoucher Type
voucher_numberVoucher Number
party_ledgerParty ledger or opposite side ledger
quantityQuantity (negative = Outward / positive = Inward)
amountAmount (negative = Debit / positive = Credit)
narrationNarration or Remarks of voucher
tracking_numberTracking 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

ArgumentDescription

targetCompany (optional)Company name of the target company in Tally. Skipping this defaults to Active company
naturereceivable / payable
toDateDate on which outstanding position to fetch

Output Tabular output with columns as below

ColumnDescription

dateDate of purchase / sales invoice
reference_numberInvoice number of purchase / sales invoice
outstanding_amountPending amount as on date
party_nameLedger name of the party
overdue_daysCount of days by which invoice is overdue