Skip to main content
Glama
tejash-bhandari-dev

tally-mcp-server

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

list_companies

Companies known to the running Tally instance

list_ledgers

All ledger accounts, with opening/closing balances

list_groups

All accounting groups (chart-of-accounts categories)

list_stock_items

All inventory items, with closing qty/rate/value

day_book

Vouchers posted between two dates (fromDate, toDate)

outstanding_balances

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:9000

3. Run standalone (for testing)

npm start

The 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 tool

The split matters:

  • tally/client.js only 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/*.js each 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.js loops over the endpoint registry and calls server.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":

  1. Create src/tally/endpoints/costCentres.js, modeled on groups.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,
        }));
      },
    };
  2. Register it in src/tally/endpoints/index.js (import + add to the endpoints array).

  3. Restart the server. list_cost_centres is 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_PORT in .env don't match.

  • Empty results or <LINEERROR> - the report/collection id or 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 a warning field 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-parser does its best guess. If you need guaranteed types, cast explicitly inside parseResponse().

To test MCP sever in browser

npx @modelcontextprotocol/inspector node src/index.js

Available Tools

6 tools
day_bookA

Returns all vouchers (sales, purchases, receipts, payments, journals, etc.) posted in TallyPrime between two dates.

ParametersJSON Schema
NameRequiredDescriptionDefault
toDateYesEnd date, format YYYYMMDD (e.g. 20240430)
fromDateYesStart date, format YYYYMMDD (e.g. 20240401)

TDQS

A3.6/5.0
Behavior2/5

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.

Conciseness5/5

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.

Completeness4/5

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.

Parameters3/5

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.

Purpose5/5

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.

Usage Guidelines3/5

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.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A4.3/5.0
Behavior3/5

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.

Conciseness5/5

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.

Completeness5/5

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.

Parameters4/5

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.

Purpose5/5

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.

Usage Guidelines4/5

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.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A4/5.0
Behavior3/5

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.

Conciseness5/5

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.

Completeness4/5

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.

Parameters4/5

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.

Purpose5/5

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.

Usage Guidelines3/5

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.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A4.2/5.0
Behavior4/5

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.

Conciseness5/5

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.

Completeness4/5

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.

Parameters4/5

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.

Purpose5/5

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.

Usage Guidelines3/5

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.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A4.3/5.0
Behavior4/5

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.

Conciseness5/5

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.

Completeness5/5

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.

Parameters4/5

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.

Purpose5/5

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.

Usage Guidelines3/5

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.

ParametersJSON Schema
NameRequiredDescriptionDefault
groupNoAccount group to filter by. Defaults to 'Sundry Debtors' (receivables). Use 'Sundry Creditors' for payables.

TDQS

A4/5.0
Behavior3/5

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.

Conciseness5/5

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.

Completeness4/5

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.

Parameters3/5

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.

Purpose5/5

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.

Usage Guidelines4/5

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

A4.1/5.0
Disambiguation5/5

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.

Naming Consistency4/5

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.

Tool Count5/5

Six tools is a well-scoped set for a TallyPrime integration, covering the primary read operations without being sparse or overwhelming.

Completeness4/5

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

ActivityMaintained
ResponsivenessSyncing

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

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    This 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).
    2
    MIT
  • A
    license
    Not graded
    quality
    B
    maintenance
    Enables Large Language Models to access and query Tally Prime ERP data, including financial reports, masters, and inventory summaries, via the Model Context Protocol.
    71
    MIT
  • A
    license
    Not graded
    quality
    C
    maintenance
    Connects Tally Prime ERP data to AI assistants via MCP, enabling natural language queries for financial reports, stock summaries, and ledger balances.
    MIT
  • F
    license
    A
    quality
    A
    maintenance
    An MCP server that lets Claude read from and write to TallyPrime via its built-in XML/HTTP gateway.
    23
    2

Latest Blog Posts

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