tally-mcp-server
This MCP server exposes TallyPrime/Tally.ERP 9 accounting and inventory data to MCP-compatible clients.
List Companies – Retrieve all companies available in the connected Tally instance.
List Ledgers – Fetch all ledger accounts with opening and closing balances.
List Groups – Get accounting groups (chart-of-accounts categories) like Sundry Debtors, Bank Accounts, Direct Expenses.
List Stock Items – Retrieve inventory stock items with closing quantity, rate, and value.
Day Book – Query vouchers (sales, purchases, receipts, payments, journals) posted between two dates (format: YYYYMMDD).
Outstanding Balances – Fetch ledgers within a specific group (default: Sundry Debtors for receivables; change to Sundry Creditors for payables) with current closing balances.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@tally-mcp-serverShow outstanding balances for all customer ledgers"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
tally-mcp-server
An MCP (Model Context Protocol) server that exposes TallyPrime data to any MCP-compatible client (Claude Desktop, Claude Code, etc.) over Tally's classic XML HTTP API - the integration method supported by every Tally.ERP 9 / TallyPrime release.
Available tools
Tool key | What it returns |
| Companies known to the running Tally instance |
| All ledger accounts, with opening/closing balances |
| All accounting groups (chart-of-accounts categories) |
| All inventory items, with closing qty/rate/value |
| Vouchers posted between two dates ( |
| Ledgers in a group with closing balance (receivables/payables) |
Related MCP server: Tally Prime MCP Server
How it talks to Tally
TallyPrime can act as an HTTP server and accept an XML "envelope":
<ENVELOPE><HEADER>...</HEADER><BODY>...</BODY></ENVELOPE>. Two request
shapes are used here:
Built-in reports (e.g.
list_companies) - just name the report, no TDL needed.Custom collections (everything else) - an inline TDL
<COLLECTION>naming a native Tally object type (Ledger,Group,StockItem,Voucher) and the fields to fetch. This is the standard technique for "give me all X" pulls and is what most third-party Tally integrations use.
Docs: https://help.tallysolutions.com/developer-reference/introduction/integration-with-tallyprime/
1. Enable Tally as an HTTP server
In TallyPrime: F1 (Help) → Settings → Connectivity → Client/Server
configuration → set "TallyPrime acts as" to Server, and note the port
(default 9000).
2. Install
npm install
cp .env.example .env
# edit .env if your Tally isn't on localhost:90003. Run standalone (for testing)
npm startThe server speaks MCP over stdio, so running it directly won't print
anything to stdout - that's expected. Ctrl+C to stop.
4. Connect it to an MCP client
Example Claude Desktop config (claude_desktop_config.json):
{
"mcpServers": {
"tally": {
"command": "node",
"args": ["/absolute/path/to/tally-mcp-server/src/index.js"]
}
}
}Project structure
src/
├── index.js # MCP server bootstrap - wires everything together
├── config.js # Reads TALLY_HOST / TALLY_PORT / etc. from .env
├── tally/
│ ├── client.js # Generic transport: builds/sends the XML envelope,
│ │ # parses the XML response into a plain object
│ └── endpoints/
│ ├── index.js # Registry - list every supported Tally API here
│ ├── companies.js # Built-in report example
│ ├── ledgers.js # Custom TDL collection example
│ ├── groups.js
│ ├── stockItems.js
│ ├── dayBook.js # Collection example with runtime params (dates)
│ └── outstanding.js # Collection example with a filter
└── tools/
└── index.js # Turns every registered endpoint into an MCP toolThe split matters:
tally/client.jsonly knows how to transport a request (build the XML envelope, POST it, parse the XML response, surface errors). It has zero Tally-report-specific knowledge.tally/endpoints/*.jseach describe one Tally API: what to request (request: { kind, ... }), any input parameters it needs, and how to turn Tally's parsed XML into a clean shape.tools/index.jsloops over the endpoint registry and callsserver.tool(...)for each one - so a new endpoint becomes a working MCP tool automatically, with no changes to the server or client code.
Adding a new Tally API
Say you want to add "List Cost Centres":
Create
src/tally/endpoints/costCentres.js, modeled ongroups.js:import { asArray } from "../client.js"; export default { key: "list_cost_centres", title: "List Cost Centres", description: "Returns cost centres from TallyPrime.", inputSchema: {}, request: { kind: "collection", collectionName: "MCP CostCentres", type: "CostCentre", fetch: ["NAME", "PARENT", "CATEGORY"], }, parseResponse(parsedXml) { const entries = asArray(parsedXml?.ENVELOPE?.COSTCENTRE); return entries.map((e) => ({ name: e["@_NAME"] ?? e.NAME, parent: e.PARENT, category: e.CATEGORY, })); }, };Register it in
src/tally/endpoints/index.js(import + add to theendpointsarray).Restart the server.
list_cost_centresis now a callable MCP tool - nothing else needs to change.
If an endpoint needs runtime parameters (dates, a filter value, etc.),
add zod validators to inputSchema and read them in request.staticVariables(params)
and/or request.buildFilterValue(params) - see dayBook.js and
outstanding.js for examples.
Troubleshooting
"Could not reach TallyPrime" - Tally isn't running, isn't configured as a server, or
TALLY_HOST/TALLY_PORTin.envdon't match.Empty results or
<LINEERROR>- the report/collectionidor TDL field names may need adjusting for your Tally release or company configuration. Turn on Tally's "Test Client" / check the Tally log screen while a request runs to see exactly what it received.Unexpected shape in
list_companies-parseResponse()tries a few likely XML shapes and falls back to returning the raw parsed payload with awarningfield so you can see exactly what Tally sent back and adjust the parser.Numbers coming back as strings/numbers inconsistently - Tally's XML doesn't strongly type values;
fast-xml-parserdoes its best guess. If you need guaranteed types, cast explicitly insideparseResponse().
To test MCP sever in browser
npx @modelcontextprotocol/inspector node src/index.jsAvailable Tools
6 toolsday_bookA
Returns all vouchers (sales, purchases, receipts, payments, journals, etc.) posted in TallyPrime between two dates.
| Name | Required | Description | Default |
|---|---|---|---|
| toDate | Yes | End date, format YYYYMMDD (e.g. 20240430) | |
| fromDate | Yes | Start date, format YYYYMMDD (e.g. 20240401) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries full responsibility for behavioral disclosure. It states the operation (returns vouchers) but does not disclose return format, ordering, pagination, or inclusion/exclusion criteria (e.g., whether cancelled vouchers are included).
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, front-loaded sentence that directly states the action and scope. Every word is informative, with no filler or repetition.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple read-only list tool with fully documented parameters, the description is sufficient to understand the tool's core function. However, without an output schema or annotations, it could be richer by indicating result structure or limitations, but this is not critical.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema already describes both fromDate and toDate with patterns and examples, achieving 100% coverage. The description only rephrases the date range without adding new parameter semantics beyond the schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses a specific verb 'Returns' and explicitly names the resource 'vouchers' with scope 'between two dates'. It clearly distinguishes from sibling tools like list_ledgers or outstanding_balances, which serve different purposes.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies the tool is for retrieving vouchers in a date range but does not explicitly state when to prefer it over alternatives or provide exclusions. There is no guidance on use cases such as 'for day book reports' or 'instead of listing ledgers'.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_companiesA
Returns the list of companies available in the connected TallyPrime instance.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden of behavioral disclosure. It states that the tool returns a list, implying a read-only operation, and mentions the 'connected' instance as a prerequisite. However, it does not describe potential error conditions, data format, or behavior if the connection is inactive.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, clear, well-structured sentence that covers the essential information without unnecessary words. It is front-loaded with the verb and resource.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple zero-parameter list tool, the description is complete: it states what the tool returns and in what context. There is no missing information that would prevent an agent from invoking it correctly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool has zero parameters, and the schema coverage is 100% (vacuously). The description does not need to add parameter semantics, and the baseline for zero parameters is 4, which is appropriate here.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action ('Returns') and the specific resource ('list of companies'), and distinguishes it from sibling tools that handle other entities like ledgers, groups, and stock items. It also provides context ('connected TallyPrime instance') that anchors the scope.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides clear context on when to use the tool: when you need the list of companies in the connected TallyPrime instance. It does not explicitly mention alternatives or exclusions, but the resource name and phrasing make its usage straightforward.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_groupsA
Returns all accounting groups (chart-of-accounts categories) from TallyPrime, e.g. Sundry Debtors, Bank Accounts, Direct Expenses.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden. The word 'Returns' implies a read-only operation and 'all' indicates full scope, but it does not disclose authentication needs, company scope, or output format. This is sufficient for a simple list tool but lacks detailed behavioral context.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single sentence that is front-loaded with the main action ('Returns all accounting groups') and enriched by relevant examples. Every word earns its place with no redundancy or filler.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a zero-parameter, no-output-schema tool, the description adequately defines what is returned and provides illustrative examples. It is slightly incomplete in not clarifying whether results are scoped to a specific company or describing the return shape, but overall it gives enough context for a simple list tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool has zero parameters, and schema coverage is 100% (empty schema). Per guidelines, the baseline for 0 parameters is 4. The description adds no parameter-specific semantics, but none are needed.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool 'Returns all accounting groups (chart-of-accounts categories) from TallyPrime' and gives concrete examples like 'Sundry Debtors, Bank Accounts, Direct Expenses'. This specific verb+resource combination distinguishes it from sibling list tools such as list_ledgers and list_companies.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies when to use the tool (when you need accounting groups) but does not explicitly discuss alternatives or exclusion criteria. Unlike the high benchmark, it does not mention 'use list_ledgers for ledgers' or similar, leaving usage guidance to inference.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_ledgersA
Returns all ledger accounts (parties, banks, cash, expense/income heads, etc.) from TallyPrime, with opening and closing balances.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Without annotations, the description carries the burden of transparency. It explicitly indicates a read operation ('Returns') and adds context about the data included (opening and closing balances, account types). It does not disclose limitations like pagination or company filtering, but for a simple list tool, the description is sufficiently transparent.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, well-structured sentence that front-loads the main action and provides essential detail (account types and balances) without any fluff or repetition.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The description is mostly complete for a no-parameter list tool, but it does not clarify whether the ledger accounts are for the current company or all companies, which is relevant given a sibling tool list_companies exists. This minor ambiguity prevents a perfect score.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has no parameters, so there are no parameter semantics to clarify. The description adds no parameter-specific information, but the absence of parameters means the baseline of 4 applies.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool 'Returns all ledger accounts' and lists specific types (parties, banks, cash, expense/income heads), distinguishing it from sibling tools like list_companies or list_stock_items. The verb 'Returns' and resource specification are precise, making the purpose unambiguous.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description does not explicitly provide when-to-use or exclusions, but the clear purpose implies usage when ledger accounts with balances are needed. Sibling tools are not mentioned, so no direct alternatives are referenced, but the intended use is reasonably inferred.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_stock_itemsA
Returns all inventory stock items from TallyPrime with closing quantity, rate, and value.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full transparency burden. It clearly indicates a read-only operation ('Returns') and specifies the return fields. It does not mention potential caveats like pagination, latency, or failure modes, but for a zero-parameter list tool with a straightforward purpose, the disclosure is adequate.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single sentence that is front-loaded with the action and resource. It contains no redundant words and earns its place by naming the specific data fields returned. This is a model of conciseness.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple, zero-parameter list tool with no output schema, the description is sufficiently complete. It tells the user exactly what the tool returns and from where. The absence of an output schema is compensated by explicitly naming the return fields. No additional context is needed.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool has zero parameters, so per the rubric the baseline is 4. The description does not need to add parameter semantics because there are none. It correctly focuses on the output instead.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses a specific verb ('Returns') and clearly identifies the resource ('inventory stock items from TallyPrime') along with the fields returned (closing quantity, rate, value). It clearly distinguishes from sibling tools like list_ledgers or list_companies by naming a distinct resource type.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description does not explicitly state when to use this tool versus alternatives, nor does it mention exclusions or alternative tools. However, the resource type is clear enough that the usage context is implied: use when needing stock items. No explicit when-to-use guidance is provided, so it does not reach level 4.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
outstanding_balancesA
Returns ledgers in a given account group (default: Sundry Debtors, i.e. receivables) with their current closing balance. Pass group: 'Sundry Creditors' for payables.
| Name | Required | Description | Default |
|---|---|---|---|
| group | No | Account group to filter by. Defaults to 'Sundry Debtors' (receivables). Use 'Sundry Creditors' for payables. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden. It indicates a read operation via 'Returns' and offers group options, but it does not disclose potential edge cases such as empty results, sorting, or error behavior. This is a moderate level of transparency.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two concise sentences, front-loaded with the primary action and additional usage detail. Every sentence contributes value, with no redundancy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple one-parameter read tool, the description provides essential information: return type, group selection, and example usage. It lacks output structure details but that is acceptable given the implied return list.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema already covers the parameter 'group' with a full description matching the tool description, so the description adds little new semantic value. Baseline is 3 due to high schema coverage.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses the specific verb 'Returns' and identifies the resource 'ledgers in a given account group' with the additional detail of 'current closing balance.' It clearly distinguishes from sibling tools like list_ledgers by focusing on balances within a group.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
It states the default group (Sundry Debtors) and instructs how to get payables via 'Sundry Creditors,' providing clear context. It does not explicitly name alternative tools or state when not to use it, but the guidance is sufficient for a simple query tool.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
TDQS
Each tool targets a distinct Tally entity: companies, ledgers, groups, stock items, vouchers, and balance status. There is no overlap in the data returned, so an agent can easily select the right tool.
Most tools follow a list_* pattern (list_companies, list_ledgers, list_groups, list_stock_items), but day_book and outstanding_balances deviate. Despite this, the names remain descriptive and predictable.
Six tools is a well-scoped set for a TallyPrime integration, covering the primary read operations without being sparse or overwhelming.
The tool set provides comprehensive read-only coverage of accounting entities: masters, transactions, and balances. Minor gaps exist, such as no voucher-level detail beyond day_book, but the core reporting needs are met.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
AI for Tally Prime and Tally ERP 9. Hosted MCP server to ask your accounts in any language.
Headless API-first double-entry accounting & bookkeeping engine. 84 MCP tools over HTTP.
MCP server for Codat — companies, connections, invoices, bills and financial statements.
An MCP server that provides access to Testiny projects, test cases and test runs
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceThis read-only MCP Server allows you to connect to Tally data from Claude Desktop through CData JDBC Drivers. For full CRUD support, check out our MCP Server for Tally (https://www.cdata.com/drivers/tally/download/mcp).2MIT
- AlicenseNot gradedqualityBmaintenanceEnables Large Language Models to access and query Tally Prime ERP data, including financial reports, masters, and inventory summaries, via the Model Context Protocol.71MIT
- AlicenseNot gradedqualityCmaintenanceConnects Tally Prime ERP data to AI assistants via MCP, enabling natural language queries for financial reports, stock summaries, and ledger balances.MIT
- FlicenseAqualityAmaintenanceAn MCP server that lets Claude read from and write to TallyPrime via its built-in XML/HTTP gateway.232
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/tejash-bhandari-dev/tally-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server