LedgerGate
Provides tools for governed financial automation in ERPNext, enabling AI agents to manage customer and supplier master data, create and update invoice drafts, generate PDF artifacts, perform accounting and bank reconciliation, and execute approval-gated financial operations via ERPNext/Frappe REST APIs.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
LedgerGate for ERPNext
Governed financial automation for AI agents. Typed MCP tools for customer and supplier master data, invoice drafts, PDF artifacts, accounting, bank reconciliation and approval-gated execution.
Alpha / 0.1.0. The 34-tool catalog is implemented. Fixture-based regression and MCP protocol tests are available. Production read-only compatibility has been exercised; live write, submission, banking, SMTP and external approval-broker acceptance require a disposable ERPNext test company and operator validation before production use.
Why LedgerGate?
Frappe's native MCP is an excellent general-purpose interface. LedgerGate complements it with financial intent, document-state checks, decimal arithmetic, duplicate protection, a durable operation journal, frozen approval payloads and private PDF artifacts. It does not replace ERPNext's accounting engine, tax determination or permissions.
34 typed domain tools; no arbitrary DocType, RPC, SQL or credential selection.
Automatically create/update scoped routine drafts and party records with stable source IDs; never auto-submit.
A separate privileged execution plane; local interactive approval by default, optional explicitly trusted external broker (e.g. Paperclip) for a single approval.
Read-back verification, replay detection, unknown-outcome quarantine, manual reconciliation and auditable state transitions.
Native ERPNext Print Formats/letterheads; visible DRAFT watermark; authenticated PDF resources and frozen attachments.
Company configuration and ERP credentials injected at runtime. No customer data or secrets shipped.
flowchart TD
A[MCP client / Paperclip] --> R[Routine MCP: 34 tools]
R --> S[(Durable operation journal)]
R --> D[ERPNext draft-only identity]
A --> H[Native human approval]
H --> O[Separate privileged connector]
O --> S
O --> E[ERPNext operator identity]
D --> ERP[ERPNext]
E --> ERP
R --> P[Private PDF resources]Related MCP server: paperware_mcp
Quick start
Python 3.12+; tested locally with Python 3.14 and MCP SDK 1.30.0. ERPNext/Frappe REST API v1 is used for portability; read-only checks have been run against an ERPNext/Frappe 17 development instance. ERPNext 15/16 compatibility is intended, not yet certified.
uv sync --locked --extra test
uv run pytest -q
cp .env.example .env.draft
chmod 600 .env.draft
# Edit .env.draft in your own secure editor; use a dedicated draft-only ERPNext user.
docker compose up -d draft
curl -fsS http://127.0.0.1:8080/healthThe service exposes Streamable HTTP at /mcp, with a separate bearer credential. A reverse proxy must provide HTTPS for remote access. The default published port is loopback-only. For stdio clients, inject environment variables through the client's secret facility and use ledgergate stdio.
Tool catalog
See 34 tools and permission policy, generated machine-readable schemas, deployment, Paperclip integration, security model, ERPNext compatibility, and comparison with alternatives, verification evidence and staging acceptance checklist.
Approval and execution
A routine action returns a durable operation ID and a verified ERP document ID. A high-risk action returns a frozen PROPOSED record, not a financial commitment. An operator must review the full payload and its hash. The default CLI path is ledgergate approve-execute OPERATION_ID in a trusted interactive terminal; see deployment instructions for separate credentials. The optional privileged MCP exposes only execute_frozen_operation, and only when a trusted broker mode is explicitly enabled. An MCP client setting "Ask first" is not cryptographic proof of a human decision to this server. Configure and test the actual trust boundary before enabling it.
Unknown outcomes stop further writes until reconciled; do not retry an uncertain operation with a fresh source ID.
Costs and licensing
Apache-2.0 licensed software, self-hostable without a LedgerGate subscription. ERPNext, infrastructure, mail, hosted MCP clients and external providers retain their own licenses and charges. No commercial relationship or endorsement by ERPNext, Frappe, Paperclip or the MCP project is implied.
Development
See CONTRIBUTING and SECURITY. No live write tests in CI. Only synthetic fixtures belong in this repository. We welcome issues and contributions for version compatibility, ERPNext Workflow integration, transactional concurrency, multi-company authorization, e-invoicing and a signed approval-attestation protocol.
Acknowledgments
Built on the Model Context Protocol Python SDK and Frappe/ERPNext REST and Print Format APIs. The design is informed by established safe-mode/immutable-plan patterns and MCP ecosystem projects described in comparison; third-party implementation code was not copied.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Malaysian SME accounting, e-Invoice and payroll for your AI. 95 tools; writes are approved drafts.
Read-only finance and operations controls for AI agents with evidence and safe next actions.
Deterministic European sovereign engine with 90 tools across 20 vertical suites for AI agents: EU Tax/KYB, FatturaPA/Peppol, AI Act, GDPR, DORA, NIS2, Italian Tenders (D.Lgs 36/2023), CBAM, EUDR, and Labour Law. Zero-Data-Retention with verifiable SHA-256 PDF/A audit certificates.
AI-native accounting MCP server: books, bank rec, invoices, bills, inventory, close & reports.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceA governed MCP server for ERPNext that provides AI agents with access to 51 doctypes and 265 tools through a PLAN-CONSENT-EXECUTE-PROVE workflow, deny-by-default.8AGPL 3.0
- AlicenseNot gradedqualityCmaintenanceEnables AI agents to directly interact with ERPNext/Frappe business data and operations, including document management, submissions, cancellations, reports, PDF generation, file uploads, and whitelisted method calls, with per-request permission enforcement.MIT
- AlicenseNot gradedqualityCmaintenanceEnables AI agents to manage Indian enterprise systems by providing tools for accounting (TallyPrime), invoicing (Zoho Books), and GST compliance (validation, e-invoice generation, and GSTR-2B reconciliation), with dry-run-first writes and an audit trail.2Apache 2.0
- AlicenseNot gradedqualityBmaintenanceEnables MCP clients to read ERPNext master data, sales and purchase invoices, accounting reports, and banking records, and to create or update draft invoices and journal entries within a fixed tool set. Access is constrained by external OAuth tokens and the permissions of a single dedicated ERPNext agent user.Apache 2.0