Tally MCP
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.
README
Tally MCP
An MCP (Model Context Protocol) server that connects Claude directly to TallyPrime, using Tally's built-in XML-HTTP gateway. Point Claude Desktop or Claude Code at your Tally instance and ask it to read ledgers, pull a trial balance, summarise a day book, or draft (and, once you approve, post) vouchers — all without manual export/import.
Built and open-sourced by a Chartered Accountancy firm in India that uses it for their own client accounting workflows. Not officially affiliated with Tally Solutions or Anthropic.
What you can do with it
Once connected, you can ask Claude things like:
- "Show me the trial balance as on 31-03-2026"
- "Pull the ledger for ABC Traders and summarise the last 10 entries"
- "List all stock items with GST rate 18%"
- "Create a sales voucher dated today: Debtor XYZ ₹1,18,000, Sales ₹1,00,000, Output CGST ₹9,000, Output SGST ₹9,000" — Claude shows you a preview first; nothing is written to Tally until you approve it.
⚠️ Safety model — read this before use
This connector can have full read/write access to whichever Tally company is open. Three layers of protection are built in:
- Dry-run by default. Every write tool (
tally_create_voucher,tally_create_ledger,tally_create_stock_item) returns a preview of the exact XML it would send and does nothing to Tally unless called with"confirm": true. The tool descriptions instruct Claude to always show you the preview and get your go-ahead first — but read what it shows you before approving; don't rely on Claude alone as the control point. - Company lock.
.envrequiresTALLY_COMPANY_NAME. Before any write, the server re-checks that this exact company is the one open in Tally. If a different company has been opened since the server started, the write is blocked, not silently redirected. - Audit log. Every tool call — read or write, dry-run or real — is
appended to
audit/tally-mcp-audit.logas JSON lines: timestamp, tool, inputs, XML sent, Tally's response, and status.
There's also a global kill switch: set DRY_RUN_ONLY=true in .env to
force every write tool into preview-only mode regardless of confirm —
useful while testing against real data for the first time.
This is a template for a safety-conscious integration, not a guarantee.
Review the code, especially src/tallyClient.ts and src/tools/writeTools.ts,
before pointing it at production accounting data.
Prerequisites
- Node.js 18+
- TallyPrime with ODBC/HTTP connectivity enabled (Gateway of Tally → F1 (Help) → Settings → Connectivity → enable HTTP, default port 9000)
- The company you want to connect to must be open in Tally before you start the MCP server
Setup
git clone https://github.com/<your-username>/tally-mcp.git
cd tally-mcp
npm install
cp .env.example .env
Edit .env:
TALLY_URL=http://localhost:9000
TALLY_COMPANY_NAME=<exact company name as shown in Tally>
DRY_RUN_ONLY=false
Build:
npm run build
Smoke-test it starts cleanly:
npm start
# Expect: [tally-mcp] Connected. Tally URL: ..., Company lock: "...", DRY_RUN_ONLY: false
# Ctrl+C to stop.
Connect to Claude Desktop
Add to your Claude Desktop MCP config (claude_desktop_config.json):
{
"mcpServers": {
"tally": {
"command": "node",
"args": ["/absolute/path/to/tally-mcp/dist/index.js"],
"env": {
"TALLY_URL": "http://localhost:9000",
"TALLY_COMPANY_NAME": "Your Company Name",
"DRY_RUN_ONLY": "false"
}
}
}
}
Restart Claude Desktop. You should see "tally" listed under connected tools/MCP servers.
Connect to Claude Code
claude mcp add tally -- node /absolute/path/to/tally-mcp/dist/index.js
Set env vars via your shell, a wrapper script, or .env in the working
directory (loaded automatically via dotenv).
Tool reference
Read (no confirmation needed)
| Tool | Purpose |
|---|---|
tally_get_company_info |
List companies open in Tally — use to verify connectivity |
tally_list_ledgers |
Full Chart of Accounts with closing balances |
tally_get_ledger |
Single ledger detail + voucher history |
tally_get_daybook |
All vouchers in a date range |
tally_get_trial_balance |
Trial balance as on a date |
tally_list_stock_items |
Inventory list with qty/rate/HSN/GST |
Write (dry-run by default, needs "confirm": true)
| Tool | Purpose |
|---|---|
tally_create_voucher |
Sales / Purchase / Payment / Receipt / Journal / Contra / Credit Note / Debit Note |
tally_create_ledger |
New ledger master under a parent group |
tally_create_stock_item |
New stock item with HSN + GST rate |
Architecture
Claude (Desktop/Code)
│ MCP protocol (stdio)
▼
tally-mcp server (Node.js/TypeScript)
│ XML over HTTP
▼
TallyPrime (XML-HTTP gateway, default port 9000)
src/
├── index.ts # MCP server entry point, tool registry
├── config.ts # .env loading + validation
├── types.ts # Shared TypeScript types
├── tallyClient.ts # HTTP transport to Tally + company-lock check
├── zodToJsonSchema.ts # Zod → MCP tool schema converter
├── xml/
│ ├── builder.ts # Builds Tally XML requests
│ └── parser.ts # Parses Tally XML responses
├── tools/
│ ├── readTools.ts # Read-only tool handlers
│ └── writeTools.ts # Write tool handlers (dry-run/confirm gate)
└── audit/
└── auditLogger.ts # Append-only JSONL audit trail
Known limitations / roadmap
tally_alter_vouchertypes exist but the tool isn't wired up yet — altering an existing voucher needs an extra lookup-by-voucher-number step in Tally's XML schema. PRs welcome.- No dedicated GST report tool (GSTR-1/3B summary) yet —
tally_get_daybook+tally_get_ledgercover most reconciliation needs today, but a purpose-built GST summary tool would be a good addition. - Credentials are plain
.env. Fine for local/single-user use; if you're deploying this for a team or multiple client instances, consider wiring in a proper secrets manager instead. - Single company per running server instance — the
TALLY_COMPANY_NAMElock in.envassumes one server process per Tally company. Multi- company support (company name as a per-call parameter instead of an.envlock) is a reasonable Phase 2 if there's interest.
Contributions on any of the above are welcome — see CONTRIBUTING.md.
License
MIT — see LICENSE. This software connects to a live accounting system;
you are responsible for reviewing dry-run previews and securing your own
Tally connection. See SECURITY.md for operational guidance.
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.