crenyaMCP guide
Put an assistant on your Frappe or ERPNext site in three steps: install the free frappe_mcp app, set it up in MCP Settings, then connect the crenyaMCP app or any other MCP client. Everyone signs in as themselves and sees only what their roles allow.
- 1Install the appAdd the free frappe_mcp app to your Frappe or ERPNext site.
- 2Open MCP SettingsReview who may connect, what is blocked, and whether changes are allowed.
- 3Connect crenyaMCPSign in with your own ERPNext login, click Allow, and start asking.
Overview
- frappe_mcp is a Frappe app, MIT licensed, that you install on your site. It adds an MCP server at
https://<your-site>/api/method/frappe_mcp.api.mcp, standard OAuth sign-in and the MCP Settings page your administrator controls. Source: github.com/crenya/frappe_mcp. - crenyaMCP is the app people use: chat, voice, photos and PDFs, approvals and a morning brief, on Mac, Windows, Linux, iPhone and Android. It signs in with a crenya account and runs on your crenya plan, so there are no AI keys to manage.
- Any MCP client also works with the same site: AI chat apps with custom connectors, coding assistants and editors that support remote MCP servers.
Works with Frappe v15 and v16, with or without ERPNext. It knows ERPNext, HRMS, Frappe CRM, Helpdesk, Education, LMS, Lending, Healthcare, India Compliance and KSA compliance when they are installed.
Install the frappe_mcp app
Self-hosted bench
cd ~/frappe-bench
bench get-app https://github.com/crenya/frappe_mcp
bench --site <your-site> install-app frappe_mcp
bench --site <your-site> set-config host_name https://<your-site>host_name must be the exact public HTTPS address people type, because the OAuth sign-in addresses are built from it.Frappe Cloud
- On a private bench group, add an app from GitHub:
https://github.com/crenya/frappe_mcp. - Deploy the bench, then install frappe_mcp on your site from the site's Apps tab.
Updating
cd ~/frappe-bench
bench update --apps frappe_mcp # or: cd apps/frappe_mcp && git pull, then bench --site <your-site> migratebench migrate.Set up the site
- The site is served over HTTPS and reachable from where people will use it.
host_nameinsite_config.jsonis the public address (see above).- Open OAuth Provider Settings and set Skip Authorization to Force, so every new client shows the Allow / Deny screen.
- Open MCP Settings (search for it in the awesome bar, or open it from the Apps screen) and review the options below.
- In System Settings, untick Show Full Error and Allow Reporting of Issues to the Developer on production sites.
MCP Settings
| Setting | What it does |
|---|---|
| Enabled | Master switch for the connector. Untick it to cut off every client at once. |
| Max Rows | Most rows one call may return (default 200, hard cap 1000). |
| Log Requests | Write an MCP Request Log row for every tool call and every refused request. |
| Allowed Roles | Only users with one of these roles may use the connector. Left empty, every desk user may; website users never can. |
| Blocked DocTypes | Never readable through MCP, whatever the user's permissions. Filled on install with users, roles, OAuth and token records, logs, integration settings, payroll and bank DocTypes, and more. Review it for your site. |
| Payroll Roles | Roles that may use Salary Slip, Salary Structure and Salary Structure Assignment through MCP, still within their own permissions. |
| Administration Roles | Roles that may manage users, permissions, customisation, scripts, print formats, workflows and settings through MCP. Empty by default: nobody can. |
| Allowed Redirect URIs | OAuth callbacks allowed for clients that register themselves. Holds the common chat-app callbacks by default; add a client's own callback here if it needs one. |
| Allow Desktop and Phone Apps | Also accept the callbacks desktop and phone apps use (127.0.0.1, localhost and ::1 on any port, and the crenyaMCP phone app's crenyamcp://callback). On by default; the crenyaMCP app needs it. |
Allow changes
Out of the box the assistant only reads. To let it create drafts, submit, cancel, amend, delete or press buttons such as Make Sales Invoice, open the Write Access section of MCP Settings:
| Setting | What it does |
|---|---|
| Allow Write | Master switch for every change. Off by default: the assistant can only read. |
| Write Mode | Drafts Only: drafts can be created and edited, but submit and cancel are refused, so people post from ERPNext. Full allows them. |
| Max Document Amount | Refuse saving any document above this total in company currency. 0 means no limit. |
| Tag Documents Created via MCP | Tags new documents MCP, so any list can be filtered by it. |
| Write Allowed Roles | Only these roles may make changes. Left empty, anyone allowed to use the connector may, within their permissions. |
| Write Blocked DocTypes | Readable but never changed. Filled with the DocTypes that configure the system: DocType, Custom Field, Role, Server Script, Workflow, Print Format and so on. |
| Blocked Methods | Server functions the assistant may never run, one dotted path per line; a path ending in .* blocks everything under it. |
Every change runs as the signed-in user with Frappe's normal permission, validation and workflow checks, is written to MCP Request Log and noted on the document's timeline. A good start is Write Mode = Drafts Only with a Max Document Amount.
Settings and naming series
Users whose roles allow it (for example a System Manager) can ask for administrative changes such as a naming series start number or a value in Selling, Buying, Stock or Accounts Settings. System configuration (DocType, Role, Custom Field, scripts, workflows, print formats, System and Website Settings) is write-blocked by default; add any other settings DocType to Write Blocked DocTypes to keep it out of reach. The crenyaMCP app always asks before any settings change, cancel, amend or delete, whatever approval mode is chosen.
Payroll
Salary Slip, Salary Structure and Salary Structure Assignment are blocked by default. To let payroll staff use them, add their roles (for example HR Manager) to Payroll Roles. Everyone else stays blocked, and an employee who asks for all salaries sees nothing beyond what their own permissions allow.
Administration
Users, roles, permissions, custom fields, scripts, print formats, workflows and system settings are blocked by default. To let your administrators manage them by asking, add their roles (for example System Manager) to Administration Roles. They can then create and disable users, give roles and user permissions, change role permissions, add custom fields and property setters, write client and server scripts and print formats, and change settings.
- Their own ERPNext permissions still decide (server scripts need Script Manager and must be switched on for the site). Allow Write must be on, and nothing is changed under Drafts Only.
- Never through MCP: DocType definitions, OAuth and stored credentials, logs, MCP Settings itself, the Administrator user, and a person's own roles. API keys and password-reset keys are never shown.
- Every change waits for approval in the app and is in the request log.
The crenyaMCP app
Install
- Mac (Apple silicon): .dmg. Open it and drag crenyaMCP to Applications.
- Windows 10 and 11: installer.
- Linux (Ubuntu, Debian): .deb, then
sudo apt install ./crenyaMCP_0.4.2_amd64.deb. Or the AppImage for any distribution: make it executable and run it; it updates itself. - iPhone and Android: in testing on TestFlight and Google Play. Ask us for an invite.
The Mac and Windows apps and the Linux AppImage update themselves.
Sign in and connect a site
- Open the app and choose Sign in with Crenya. Your browser opens the crenya sign-in; come back to the app after.
- Enter your site address, for example
erp.yourcompany.com, and sign in with your own ERPNext login. Click Allow. - Add more sites from the site menu at the top left (desktop) or the site name at the top (phone).
Using it
Ask
Ask in plain words, typed or spoken, in English, മലയാളം, हिन्दी, العربية, Manglish and more:
- “What needs me today? Brief me, most urgent first.”
- “Sales by month this financial year, as a chart.”
- “Which customers owe us more than 60 days?”
- “ee aazhcha leave il aaranu?”
The answer shows the steps taken, links every document back to your desk, and ends with suggested next questions you can tap.
Attach
Attach or paste PDFs, photos, Excel sheets and screenshots, or snap a bill with the phone camera: “Book this bill as a purchase invoice”. On desktop the app can also read files from folders you allow in Settings, and attach files to ERPNext documents after you approve.
Bills with missing masters
When a bill names a supplier or items your site does not have yet, the assistant checks every line at once, then proposes the new records the way an accountant would: whether each item is stock, a service or a fixed asset, which expense account a service books to, which asset category an asset belongs to, and the tax details your country needs (GSTIN and HSN in India, VAT number in Saudi Arabia, TRN in the UAE). Nothing is created until you confirm; then it prepares the draft purchase invoice.
Approvals
| Mode | What happens |
|---|---|
| Ask for every change | You approve each create, update, submit and action. |
| Auto-approve drafts | Drafts and attachments go ahead; submitting and payments still ask. |
| Autopilot | Drafts, submitting and actions such as payments go ahead, so one request is done end to end. |
Cancel, amend, delete and settings changes always ask. Choose the mode in Settings › Approvals. The site's own MCP Settings still apply on top: with Allow Write off, no mode can change anything.
Excel, PDF and Word
Ask for any list, register or report “in Excel”, “as a PDF” or “in Word” and crenyaMCP saves the file with every row: Excel keeps numbers as numbers, PDFs print ₹ and Indian number grouping. Ask for “the PDF of invoice …” to get the document exactly as your site prints it. Files go to Downloads (on phones, the app's Documents) with Open and Show buttons.
Remember
Say how you like answers (“always show amounts in lakhs”, “my company is …”) and the app remembers it; see and remove these in Settings › Remembered.
Your apps, including custom ones
The assistant reads a map of every app installed on your site from the site itself: which DocTypes each app has and which of them hold records, their status values, reports and workflows. Your own custom apps work the same way, with no setup. Ask about them by name: “How many inventory receipts are still open?”
Frappe's apps come with a short guide: ERPNext, Frappe HR, CRM, Helpdesk, Lending, Healthcare, Education, LMS, India Compliance, Payments, Insights, Raven, Gameplan, Wiki, Drive, Webshop, Builder, WhatsApp and more. Line items such as invoice items can be totalled directly, so “sales by brand this quarter” needs no custom report.
For developers
An app can add its own tools and a guide from its hooks.py. Tools run as the signed-in user. Any tool not marked read-only is treated as a change: it needs Allow Write, and is refused under Drafts Only.
# your_app/hooks.py
mcp_tools = ["your_app.mcp.get_tools"]
mcp_guide = "your_app/mcp_guide.md"
# your_app/mcp.py
def get_tools():
return {
"open_job_cards": {
"func": open_job_cards,
"description": "Open job cards by workstation.",
"inputSchema": {"type": "object", "properties": {}},
"annotations": {"readOnlyHint": True},
}
}Other MCP clients
frappe_mcp is a standard remote MCP server (Streamable HTTP) with OAuth 2.1 sign-in, so any MCP client can use https://<your-site>/api/method/frappe_mcp.api.mcp. Each person signs in as themselves.
Chat apps with custom connectors
Add a custom connector, paste the URL, click Connect, sign in with your ERPNext login and click Allow.
Command-line assistants
Most add a remote server in one line, then open the sign-in in your browser:
<client> mcp add --transport http erp https://<your-site>/api/method/frappe_mcp.api.mcpEditors with a JSON config
{ "mcpServers": { "erp": { "url": "https://<your-site>/api/method/frappe_mcp.api.mcp" } } }Desktop clients that receive the sign-in on 127.0.0.1 or localhost work out of the box. A client with its own callback needs it added to Allowed Redirect URIs.
A client that cannot sign in with OAuth can send an API key header instead: Authorization: token <api_key>:<api_secret> (keys from your User, API Access). Step-by-step setup for each client is in the repository README.
Security and privacy
- Every call runs as the signed-in user, through Frappe's own permission checks: roles, user permissions and field permissions apply exactly as in the desk.
- MCP Settings adds limits on top: allowed roles, blocked DocTypes, row caps, write switches and blocked methods, all enforced on the site.
- Sign-in is your site's OAuth with PKCE. crenyaMCP never sees your ERPNext password, and keeps its sign-in tokens on the device (in the system keychain where there is one).
- To answer, the question and the records the assistant reads are sent to Crenya AI (api.crenya.ai) and processed by third-party AI providers, some of which run servers in China and may use the data to train their models. Restrict what it can read with Blocked DocTypes and roles. Details: privacy notice.
- Every change, and every call when Log Requests is on, is written to MCP Request Log.
Revoking access
- One person: delete their OAuth Bearer Token rows, or remove their role from Allowed Roles.
- One client: delete its OAuth Bearer Tokens, then its OAuth Client (named “… (MCP)”).
- Everyone: untick Enabled in MCP Settings.
For administrators
- Playbooks (MCP Playbook) hold step-by-step procedures with your company rules, such as AR follow-up or supplier invoice entry. Edit the starters or add your own; Roles limits who sees each.
- Digests (MCP Digest) email a summary on a schedule, such as receivables or stock to reorder, without any AI.
- Agents (MCP Agent) run a playbook unattended in your own AI client on a schedule and email the report.
- Review MCP Request Log regularly. It is kept 30 days by Log Settings.
Production checklist
- HTTPS with host_name set to the public address.
- OAuth Provider Settings: Skip Authorization = Force.
- MCP Settings: Allowed Roles, Blocked DocTypes and Max Rows reviewed.
- Allow Write off, or on with Write Allowed Roles, Write Mode and Max Document Amount set.
- Only trusted roles can run Query and Script reports (they run their own SQL).
Troubleshooting
| You see | What to do |
|---|---|
| 401 before signing in | Expected: it is the challenge that starts the sign-in. |
| Sign-in fails or loops | The address you entered must match host_name exactly, with https:// and no redirect to another host. |
| Redirect URI not allowed | Tick Allow Desktop and Phone Apps, or add the client's callback (redirect_uri= in the sign-in page address) to Allowed Redirect URIs. |
| “Write access is disabled” | Allow Write is off in MCP Settings, or your role is not in Write Allowed Roles. |
| A DocType is “blocked” | It is in Blocked DocTypes (or a payroll DocType without Payroll Roles). |
| A report fails | Give the filters its form normally fills in (company, dates). Prepared (background) reports cannot run through MCP. |
Still stuck? Write to info@crenya.com or open an issue on GitHub.