跳过安装。2 分钟内即可运行。
在 cloud.anythingmcp.com 开始免费试用,一键添加 TallyPrime,然后将你的 AI 客户端(Claude、ChatGPT、Copilot 或 Cursor)指向生成的 MCP 端点。无需 Docker,无需 git clone,无需任何工程经验。
摘要
通过 XML/HTTP 接口读取 TallyPrime(Tally Solutions)会计数据:公司、分类账(Ledger)、科目组、库存商品、Trial Balance、Balance Sheet、Profit and Loss、Day Book、分类账明细,以及未结的应收和应付款。只读。
试试这样问
TallyPrime 的示例提示
点击任意提示即可复制,然后粘贴到 Claude、ChatGPT、Cursor、Gemini、Copilot 或 OpenClaw 中,在该连接器上运行。
Claude 是 AI,可能会出错。请核对回答。
💡 TallyPrime 运行在你自己的电脑上,所以 AnythingMCP 必须能访问到它。 在同一网络中运行 AnythingMCP(见下文),或使用 cloud.anythingmcp.com,并通过安全隧道或 VPN 连接到 TallyPrime 端口。该端口没有密码:切勿在没有访问控制的情况下将其暴露到互联网。
TallyPrime + Gemini
通过 XML/HTTP 接口读取 TallyPrime(Tally Solutions)会计数据:公司、分类账(Ledger)、科目组、库存商品、Trial Balance、Balance Sheet、Profit and Loss、Day Book、分类账明细,以及未结的应收和应付款。只读。
前提条件
完整的设置说明已内置在连接器中 (在 store 中选择连接器时可见)。所需环境变量:
TALLY_URL
步骤 1 — 获取凭证
- 在 TallyPrime 中按 F1 (Help) → Settings → Connectivity → Client/Server configuration(旧版本中为 Exchange → Data Synchronization)。把 TallyPrime acts as 设为 Server(或 Both),启用 ODBC,保留端口(默认 9000)并确认。如有提示,请重启 TallyPrime。
- 打开(加载)你要读取的公司。只有在运行中的 TallyPrime 里打开的公司才可见。
- 让 AnythingMCP 能访问该端口(见下方 网络),并把地址和端口填入
TALLY_URL,例如http://192.168.1.20:9000,端口后面不要加任何内容。在同一网络中的浏览器里打开该地址,会显示 "TallyPrime Server is Running"。 - 安装连接器并运行
tallyprime_list_companies。它会列出已打开的公司及其准确名称,其他所有工具都需要这个名称。
网络:TallyPrime 运行在你自己的电脑或服务器上,因此 AnythingMCP 必须能访问到它。AnythingMCP Cloud 无法访问 192.168.x.x 或 10.x.x.x 这样的局域网地址。请在同一网络中运行自托管的 AnythingMCP(需在其出站地址允许列表中放行 TallyPrime 主机),或通过安全隧道或 VPN 发布该端口。Tally 端口没有密码:任何能访问它的人都能读取和导入数据,因此切勿在前面没有访问控制的情况下将其开放到互联网。
只读:AI 读取公司、分类账、科目组、凭证类型、库存商品、Trial Balance、Balance Sheet、Profit and Loss、Day Book、分类账明细,以及未结的应收和应付款。它不会创建或修改任何凭证或主数据。
名称和格式要准确:公司、分类账、科目组和凭证类型的名称必须与 TallyPrime 中完全一致(例如 Sharma & Sons)。日期格式为 YYYYMMDD(20250401),印度的财年从 4 月 1 日到次年 3 月 31 日:超出公司账簿范围的期间会返回空报表。金额遵循 Tally 的符号约定:借方为负,贷方为正。
从哪里开始:运行 tallyprime_list_companies 之后,用 tallyprime_get_trial_balance 查看总览,用 tallyprime_get_bills_receivable 查看谁欠你钱(需要在客户分类账上启用逐笔账单明细),用 tallyprime_get_ledger_vouchers 获取单个往来方的对账单,用 tallyprime_get_day_book 列出一个较短期间内的凭证。长期间的大型报表可能需要几秒钟,并返回大量数据,因此请把期间控制在一个月左右。
常见错误:"Could not set SVCurrentCompany" 表示该公司没有在 TallyPrime 中打开,或名称不一致。当 Tally 报告失败时,连接器会将其作为错误返回,并附上 Tally 的原文。
版本 1 不过账凭证,也不创建或编辑分类账、科目组或库存商品。
步骤 2 — 安装 adapter
curl -fsSL https://raw.githubusercontent.com/HelpCode-ai/anythingmcp/main/docker-compose.quickstart.yml -o docker-compose.yml
printf 'JWT_SECRET=%s\nENCRYPTION_KEY=%s\n' "$(openssl rand -hex 32)" "$(openssl rand -hex 32)" > .env
docker compose up -d
步骤 3 — 在 Gemini 中添加连接器
你的服务器 URL: 在 AnythingMCP 中打开 MCP Servers → 此连接器所在的服务器,复制它的 URL(
https://cloud.anythingmcp.com/mcp/…)。本指南中出现YOUR_SERVER_ID的地方都用它替换。
Gemini CLI 从 ~/.gemini/settings.json(Windows 上为 %USERPROFILE%\.gemini\settings.json)读取 MCP 服务器。添加:
{
"mcpServers": {
"anythingmcp": {
"httpUrl": "https://cloud.anythingmcp.com/mcp/YOUR_SERVER_ID",
"headers": { "X-API-Key": "YOUR_MCP_API_KEY" }
}
}
}
- 在 AnythingMCP 的 MCP Servers → 你的服务器 → API keys 中创建 MCP API 密钥,并用它替换
YOUR_MCP_API_KEY。 - 保存文件并重启
gemini。 - 在 Gemini CLI 中运行
/mcp(或在终端运行gemini mcp list),anythingmcp应显示为已连接。 - 开始输入提示,Gemini CLI 现在可以调用
TallyPrime的工具。
可用工具
| Tool | What it does |
|---|---|
tallyprime_list_companies | List the companies currently open (loaded) in TallyPrime with their name, financial year start and books-beginning date |
tallyprime_list_ledgers | List every ledger (accounting head: customers, suppliers, banks, expenses, taxes) of a company with its parent group, opening and closing… |
tallyprime_list_ledgers_in_group | List the ledgers under one group, including its sub-groups, with parent, opening and closing balance |
tallyprime_get_ledger | Get one ledger master: parent group, opening and closing balance, mailing name, address, state, PIN code, country, phone, mobile and e-mail |
tallyprime_list_groups | List the account groups of a company (the chart of accounts) with each group's parent |
tallyprime_list_voucher_types | List the voucher types of a company (Sales, Purchase, Receipt, Payment, Journal, Contra, Credit Note, Debit Note and any custom ones) with… |
tallyprime_list_stock_items | List the stock items of a company with stock group, base unit, opening quantity and value, and closing quantity and value for the current… |
tallyprime_get_trial_balance | Get the Trial Balance for a period, exploded down to ledgers: closing debit and credit balance per group and ledger |
tallyprime_get_balance_sheet | Get the Balance Sheet as at the end of a period: liabilities and assets by primary group with their closing amounts |
tallyprime_get_profit_and_loss | Get the Profit and Loss account for a period: income and expenses by group (sales, purchases, direct and indirect expenses and incomes) and… |
tallyprime_get_day_book | Get the Day Book: every voucher entered in a period with date, voucher type, number, party, narration, ledger entries and amounts, and… |
tallyprime_get_day_book_by_type | Get the vouchers of one voucher type in a period (for example only Sales or only Receipt vouchers) with full ledger entries and amounts |
tallyprime_get_ledger_vouchers | Get the ledger account (statement) of one ledger for a period: opening balance, every voucher posted to it with date, type, number, counter… |
tallyprime_get_bills_receivable | Get outstanding receivables: every open sales bill with bill date, reference, party, pending amount, due date and days overdue |
tallyprime_get_bills_payable | Get outstanding payables: every open purchase bill with bill date, reference, party, pending amount, due date and days overdue |
tallyprime_get_ledger_outstandings | Get the open bills of one party ledger: bill date, reference, opening and pending amount, due date and days overdue |
tallyprime_get_group_outstandings | Get the outstanding balance of every ledger in one group, e.g. all customers under Sundry Debtors or all suppliers under Sundry Creditors… |
示例提示
- “显示我们公司 2026 年 9 月的 Trial Balance,并指出任何异常余额。”
- “哪些客户欠我们钱?他们的哪些账单逾期超过 60 天?”
- “给我 Sharma & Sons 上个月的分类账对账单,包括期末余额。”
- “列出上周录入的所有 Sales 凭证,以及每张凭证的往来方和金额。”
FAQ
Gemini CLI 从哪里读取 MCP 服务器? 用户级配置位于 ~/.gemini/settings.json,项目级配置位于项目内的 .gemini/settings.json。gemini mcp list 会列出每个服务器及其连接状态。
下一步
这份指南对你有帮助吗?