Skip to main content
Glama
vaijaaaaa

Tally MCP Server

by vaijaaaaa

Tally MCP Server

A Model Context Protocol (MCP) server that lets Claude read from and write to TallyPrime via its built-in XML/HTTP gateway.

How it works

Claude Desktop  <--stdio-->   ┐
                               ├─ this MCP server  <--HTTP/XML-->  TallyPrime (localhost:9000)
Remote MCP client <--HTTP-->  ┘

Locally, Claude Desktop launches this server as a stdio process. Remotely, it can also run as an HTTP server. Either way, tool calls get translated into Tally's XML request format, sent to Tally's HTTP gateway, and returned as cleaned-up JSON. There's also an optional local SQL cache (PGLite) for ad-hoc queries beyond the fixed report tools.

Related MCP server: TallyMind MCP

Prerequisites

  • Node.js 18+

  • TallyPrime installed, running, with a company open

  • Tally's HTTP gateway enabled: F1 (Help) > Settings > Connectivity > Client/Server configuration and set TallyPrime acts as to Both or Server, port 9000 (default).

Setup

npm install
npm run build

Configure Claude Desktop

Option A — Extension (recommended): package as a .dxt and install with one click. See docs/EXTENSION_PACKAGING.md.

Option B — manual config: edit your Claude Desktop config file:

  • Windows: %APPDATA%\Claude\claude_desktop_config.json

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json

Add:

{
  "mcpServers": {
    "tally": {
      "command": "node",
      "args": ["D:\\Projects\\Tally-MCP-Server\\dist\\index.js"],
      "env": {
        "TALLY_URL": "http://localhost:9000"
      }
    }
  }
}

Restart Claude Desktop. You should see a hammer/tools icon indicating the tally server is connected.

Available tools

17 tools total — read (ledgers, stock, groups, voucher types, cost centres, day book, ledger vouchers, company info, P&L, balance sheet, trial balance, stock summary, bills receivable/payable), write (create ledger, group, stock item, voucher), and SQL cache (sync_to_sql, query_sql). Full reference with args: docs/TOOLS.md.

Dates use DD-MM-YYYY format, matching Tally's convention.

Running remotely (HTTP)

TALLY_MCP_TOKEN=<secret> npm run start:http

See docs/HTTP_DEPLOYMENT.md.

Docs

Project structure

src/
  tally.ts        Tally HTTP client: sends XML, handles connection/timeout errors
  clean.ts        Normalizes Tally's raw XML->JSON into predictable JSON
  templates.ts     Renders the Nunjucks XML templates in templates/
  db.ts             PGLite SQL cache: sync_to_sql / query_sql
  tools.ts        MCP tool definitions + XML request builders
  server.ts       Shared MCP Server construction (used by both entry points)
  index.ts        stdio entry point (local Claude Desktop)
  http-server.ts   HTTP entry point (remote clients)
templates/
  *.xml.njk       Nunjucks templates for each Tally XML request shape
manifest.json      Claude Desktop Extension (.dxt) manifest

Environment variables

Variable

Default

Purpose

TALLY_URL

http://localhost:9000

Tally's HTTP gateway address

PORT

3939

Port for npm run start:http

TALLY_MCP_TOKEN

(unset)

Bearer token required on the HTTP server's /mcp endpoint if set

Troubleshooting

  • "Could not reach TallyPrime" — Tally isn't running, or the HTTP gateway isn't enabled on port 9000.

  • "Tally returned an empty response" — Tally is running but no company is open.

  • create_ledger / create_voucher fails with errors — check that the parent group / ledger names exactly match what exists in Tally (names are case-sensitive and must match exactly).

Roadmap / not yet supported

  • Editing or deleting existing vouchers/ledgers/masters

  • Inventory vouchers (Stock Journal, Manufacturing Journal, etc.)

  • GST-specific reports (GSTR-1, GSTR-3B)

  • Multi-company support (currently always targets whichever company is open)

Available Tools

2 tools
get_stock_itemsA

Get all stock items from TallyPrime

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A3.5/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 burden for behavioral disclosure. It only states 'Get all stock items' without mentioning potential side effects, constraints, or whether the operation is read-only.

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?

Single sentence, perfectly concise with no extraneous information. Front-loaded and efficient.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple list tool with no parameters and no output schema, the description is adequate but fails to specify what fields are returned or any limitations like pagination. Additional context would improve agent understanding.

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?

No parameters exist, so description needs no parameter explanation. Baseline 4 for zero-parameter tools applies 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?

Description clearly states the action (get) and resource (stock items) from TallyPrime, effectively distinguishing it from sibling tool get_voucher_types which deals with a different entity.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance on when to use this tool or when to prefer alternatives. It simply describes the function without context for selection.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_voucher_typesA

Get all voucher types configured in TallyPrime (e.g. Payment, Sales, Journal)

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?

Straightforward read operation with no parameters; no annotations to contradict. Slightly limited by lacking detail on return format or authorization needs.

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?

Single sentence, concise and front-loaded with clear action and context.

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?

Covers purpose and examples; lacks output schema to fully describe return format, but acceptable for a simple list retrieval.

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?

No parameters, so baseline 4; description adds value by naming resource and examples, though no further meaning 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?

Specifically states 'Get all voucher types configured in TallyPrime' with concrete examples (Payment, Sales, Journal), clearly distinguishing it from sibling tool 'get_stock_items'.

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?

Implied usage for retrieving voucher types, but no explicit guidance on when to use versus alternatives or exclusion criteria.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 2 tool updatesv1.0.1
    • First observedget_stock_items
    • First observedget_voucher_types

TDQS

A3.6/5.0

Scored across 2 tools

Disambiguation5/5

Both tools have clearly distinct purposes: one retrieves stock items, the other retrieves voucher types. No overlap between them.

Naming Consistency5/5

Both tools follow a consistent 'get_noun' snake_case pattern, making the naming predictable.

Tool Count2/5

Only 2 tools for a Tally integration is far too few. Typical Tally servers include many more operations (create, update, delete) for various entities.

Completeness1/5

Only read operations for two entities are provided. Missing all mutation operations and other essential entities like ledgers, journals, or invoices.

Maintenance

ActivityNo data
ResponsivenessNo issues

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
    An 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.
    4
    MIT
  • A
    license
    A
    quality
    A
    maintenance
    A 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.
    23
    MIT
  • F
    license
    Not graded
    quality
    C
    maintenance
    An 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.
    -