About Enterich
Enterich is an MCP server for ERPNext accounting, using external OAuth and the permissions of a dedicated ERPNext user. Its fixed, read/write-separated tools can create or update drafts, but people submit documents in ERPNext.
Key features
- 01Fixed set of accounting tools
- 02Separate read and write operations
- 03Create and update drafts only
- 04Bound by the ERPNext agent user's rights
- 05Validate tokens through external authorization
Use cases
- 01Look up invoices, accounts, and bank records
- 02Generate receivables, payables, and ledger reports
- 03Prepare accounting drafts for human review
MCP support
Enterich exposes fixed ERPNext accounting tools to MCP clients over Streamable HTTP. It implements protected-resource authorization and validates each access token.
Configuration
Local server config is the same for every client. Copy it into your client’s MCP config file.
docker run -i --rm -e ENTERICH_RESOURCE_URL -e ENTERICH_ISSUER -e ENTERICH_JWKS_URL -e ENTERICH_CLIENT_ID -e ENTERICH_SUBJECT -e ENTERICH_REQUIRED_SCOPES -e ENTERICH_TOKEN_ALGORITHMS -e ENTERICH_CLOCK_LEEWAY -e ENTERICH_ERPNEXT_URL -e ENTERICH_ERPNEXT_HOST -e ENTERICH_ERPNEXT_PUBLIC_URL -e ENTERICH_ERPNEXT_API_KEY -e ENTERICH_ERPNEXT_API_SECRET -e ENTERICH_COMPANY -e ENTERICH_TOOLS -e ENTERICH_MAX_DRAFTS_PER_HOUR -e ENTERICH_TIMEZONE -e ENTERICH_HOST -e ENTERICH_PORT -e ENTERICH_LOG_LEVEL ghcr.io/interlusion/enterich:0.5.0ENTERICH_RESOURCE_URLThe MCP endpoint exactly as clients enter it, https; its path is the one servedENTERICH_ISSUERThe authorization server's issuer, httpsENTERICH_JWKS_URLThe authorization server's signing keys, httpsENTERICH_CLIENT_IDThe OAuth client the agent's tokens are issued toENTERICH_SUBJECTThe agent identity's subENTERICH_REQUIRED_SCOPESScopes required in the token, space-separatedENTERICH_TOKEN_ALGORITHMSSecretToken signing algorithms accepted, comma-separatedENTERICH_CLOCK_LEEWAYSeconds of clock leeway for token times, 0 to 60ENTERICH_ERPNEXT_URLThe base URL Enterich calls ERPNext atENTERICH_ERPNEXT_HOSTThe Host header sent to ERPNext, by default the URL's hostENTERICH_ERPNEXT_PUBLIC_URLThe base URL people open ERPNext at, for links in resultsENTERICH_ERPNEXT_API_KEYSecretThe ERPNext agent user's API keyENTERICH_ERPNEXT_API_SECRETSecretThe ERPNext agent user's API secretENTERICH_COMPANYThe assigned company, exactly as named in ERPNextENTERICH_TOOLSThe operations to offer, comma-separated; by default allENTERICH_MAX_DRAFTS_PER_HOURMost drafts of each type the agent may create in an hour; unset, no limitENTERICH_TIMEZONEIANA time zone for today's date, the ERPNext site'sENTERICH_HOSTThe listen addressENTERICH_PORTThe listen portENTERICH_LOG_LEVELThe level for libraries' log lines: DEBUG, INFO, WARNING or ERRORLocal servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.
ghcr.io/interlusion/enterich:0.5.0Streamable HTTPTools
Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.
Details
From the project README
Enterich
An MCP server for ERPNext with hard limits: a short, fixed list of tools, tokens from an external OAuth authorization server, and only the rights of one ERPNext user.
Status: Every operation is tested against a model of ERPNext v16's API, and weekly against a real ERPNext v16 site. The changelog lists the releases.
What it is
- A separate service, not a Frappe app. It calls ERPNext's REST API with the API key of a dedicated agent user and holds no other ERPNext credential. Whatever the service does, ERPNext's role for that user is the upper limit.
- A resource server for the MCP authorization spec. It serves the protected resource metadata, answers a missing token with 401, and checks every access token itself (issuer, audience, client, subject). Sign-in happens at an external authorization server such as Keycloak.
- A fixed list of operations, each with its own purpose and input schema, read and write separated. No generic document access, method calls or file access.
- Client-neutral. It speaks plain MCP (Streamable HTTP) and doesn't rely on any client asking before a write.
What it is not
- Not a general ERPNext API bridge: tools that take a DocType, report name, method name, field list, filter expression or file path as input are out of scope.
- Not a way to post: no tool submits, cancels, amends, deletes or discards a document. The agent prepares drafts; a person reviews and submits them in ERPNext (reviewing drafts).
- Not affiliated with or endorsed by Frappe Technologies. ERPNext and Frappe are their trademarks.
Tools
Enterich offers 37 tools. A deployment may offer fewer (ENTERICH_TOOLS); every tool works on one company, within the rights ERPNext gives the agent user.
Master data (REQ-003)
Items.
| Tool | Title | Kind |
|---|---|---|
list_items | List items | read |
get_item | Get item | read |
Order to cash (REQ-004)
Customers, sales invoices, receivables.
| Tool | Title | Kind |
|---|---|---|
list_customers | List customers | read |
get_customer | Get customer | read |
list_sales_invoices | List sales invoices | read |
get_sales_invoice | Get sales invoice | read |
list_sales_tax_templates | List sales tax templates | read |
report_accounts_receivable | Accounts receivable | read |
create_draft_sales_invoice | Create draft sales invoice | create draft |
update_draft_sales_invoice | Update draft sales invoice | update draft |
create_draft_sales_return | Create draft sales return | create draft |
update_draft_sales_return | Update draft sales return | update draft |
Procure to pay (REQ-005)
Suppliers, purchase invoices, payables.
| Tool | Title | Kind |
|---|---|---|
list_suppliers | List suppliers | read |
get_supplier | Get supplier | read |
list_purchase_invoices | List purchase invoices | read |
get_purchase_invoice | Get purchase invoice | read |
list_purchase_tax_templates | List purchase tax templates | read |
report_accounts_payable | Accounts payable | read |
create_draft_purchase_invoice | Create draft purchase invoice | create draft |
update_draft_purchase_invoice | Update draft purchase invoice | update draft |
create_draft_purchase_return | Create draft purchase return | create draft |
update_draft_purchase_return | Update draft purchase return | update draft |
Record to report (REQ-006)
Accounts, cost centres, journal entries, ledger, trial balance.
| Tool | Title | Kind |
|---|---|---|
list_accounts | List accounts | read |
list_cost_centers | List cost centres | read |
list_journal_entries | List journal entries | read |
get_journal_entry | Get journal entry | read |
report_general_ledger | General ledger | read |
report_trial_balance | Trial balance | read |
create_draft_journal_entry | Create draft journal entry | create draft |
update_draft_journal_entry | Update draft journal entry | update draft |
Bank and cash (REQ-007)
Bank accounts, bank transactions, payments.
| Tool | Title | Kind |
|---|---|---|
list_bank_accounts | List bank accounts | read |
list_bank_transactions | List bank transactions | read |
get_bank_transaction | Get bank transaction | read |
list_payment_entries | List payment entries | read |
get_payment_entry | Get payment entry | read |
create_draft_payment_entry | Create draft payment entry | create draft |
update_draft_payment_entry | Update draft payment entry | update draft |
Scope
Enterich is maintained for our own use. Contributions are welcome (contributing); support isn't promised. Report vulnerabilities privately, as the security policy describes.
Documentation
Start at docs/README.md. The most important parts:
- Requirement specifications: the core, and the operations by accounting area
- Architecture and decisions
- Configuration
Licence
Apache-2.0. Why: ADR-006.
Comments
New to MCP?
From what the protocol is to installing your first server, these answers cover most first questions.
An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.