Sandbox
@buildswithpaul/Frappe_Assistant_Core

MCP connector for ERPNext and LLM clients

Frappe Assistant Core exposes ERPNext functionality through Model Context Protocol so an LLM can query data, run reports, update records, and use custom tools. It works through OAuth, respects the current user's permissions, and records each action in an audit log.

307 stars181 forksPythonUpdated 10d ago
Who it's for

Builders who want their agent to use ERPNext records, reports, and workflows without leaving site permissions.

What it delivers

You can ask an MCP-compatible LLM to handle ERPNext tasks instead of doing them by hand.

What it does

ERPNext tool access

Provides built-in tools for document CRUD, search, reports, approvals, schema lookup, analytics, file extraction, and dashboards.

OAuth-based authentication

Connects through OAuth 2.0 with PKCE so the LLM acts as a real ERPNext user without seeing the password.

Permission-scoped calls

Checks ERPNext roles and permissions on every tool call so the model only sees allowed data.

Audit logging

Records each call in the Assistant Audit Log with caller, tool, arguments, and result status.

Skills and prompt templates

Lets admins publish reusable Skills and Prompt Templates from Frappe so users get consistent, guided prompts.

External app hooks

Lets other Frappe apps add their own tools and skills through `assistant_tools` and `assistant_skills` hooks.

How to get it

  1. 1Run
    cd frappe-bench
    bench get-app https://github.com/buildswithpaul/Frappe_Assistant_Core
    bench --site <your-site> install-app frappe_assistant_core

README

Frappe Assistant Core

Talk to your ERPNext site. FAC lets Claude, ChatGPT, and other MCP-ready LLMs work directly with your invoices, customers, stock, workflows, and custom apps — inside your ERPNext permissions, with every call logged.

Version Python License MCP Tools

CI Frappe Cloud Stars Forks Sponsors


What you get

Once FAC is installed, your team can ask an LLM for things they'd normally do by hand:

"Show me overdue invoices from our top five customers."

"Update this lead's status to Qualified and set next action date to Monday."

"Run the monthly revenue report and summarise the top movers."

"How much stock of SKU-1234 do we have across all warehouses?"

Behind that simple interaction, FAC exposes 24 built-in tools for the things your team does every day — document CRUD, search, reports, workflows, analytics, file extraction, and dashboards. Admins can publish Skills (reusable instructions that teach the LLM how to handle a specific job) and Prompt Templates (saved starting points users can pick from the admin UI) so answers stay consistent and use the right reports. The LLM authenticates over OAuth 2.0 as a real ERPNext user, so it only sees data that user can already see in the desk. Every call is recorded in the Assistant Audit Log.

It's a Frappe app, so developers can extend the toolset from their own Frappe apps through a hook — your data model, your business logic, scoped per your app.

Your data stays in your site. You control which LLM connects.


Quick start

Two install paths depending on how you run Frappe.

On Frappe Cloud (recommended)

  1. Go to your site's Apps tab in the Frappe Cloud dashboard.
  2. Find Frappe Assistant Core in the marketplace and click Install.
  3. Frappe Cloud installs and migrates the app for you.

Marketplace: https://cloud.frappe.io/marketplace/apps/frappe_assistant_core

On self-hosted bench

cd frappe-bench
bench get-app https://github.com/buildswithpaul/Frappe_Assistant_Core
bench --site <your-site> install-app frappe_assistant_core

Connect your LLM

Once installed, the same four steps work for any MCP-compatible client. Example shown for Claude Desktop:

  1. Go to Desk → FAC Admin and copy the MCP Endpoint URL.
  2. In Claude Desktop → Settings → Connectors → Add Custom Connector, paste the URL and click Add.
  3. Click Connect, log in with your ERPNext account, and authorize.
  4. Ask Claude something — for example, "List all customers created this month."

For ChatGPT, Claude Web, and MCP Inspector walkthroughs, see the Getting Started guide.


Skills and Prompt Templates

FAC gives you two ways to shape what the LLM does with your data.

Skills are reusable instructions you give the LLM — stored as FAC Skill documents inside your site. Each skill has a skill_id, a description, and markdown content describing how to handle a specific task using the available tools. The LLM lists skills on connect and pulls them on demand, so every time someone asks about, say, the monthly sales close, the answer is consistent and uses the right reports.

Prompt Templates are saved starting points for the user's side of the conversation — Jinja-templated prompts with typed arguments (dropdowns, dates, booleans). Authors publish them from the admin page; users pick one, fill in the arguments, and the rendered prompt is sent to the LLM. Use them for frequently-asked analyses like "Sales Analysis", "Manufacturing Analysis", or your own industry-specific workflows.

Both live in Frappe, so they're version-controlled with your site, shareable across users, and can be shipped by external Frappe apps through the assistant_skills hook.


Tools at a glance

FAC ships 24 tools across four plugins: Core (Frappe operations), Data Science (Python execution, analytics, file extraction), Visualization (dashboards and charts), and Custom Tools (the registry for tools contributed by external apps).

CategoryTools
Documentsget_document, list_documents, create_document, update_document, delete_document, submit_document
Searchsearch, search_documents, search_doctype, search_link, fetch
Reportsreport_list, report_requirements, generate_report
Approvalsget_pending_approvals, run_workflow
Schemaget_doctype_info
Analyticsrun_python_code, run_database_query, analyze_business_data
Filesextract_file_content
Dashboardscreate_dashboard, create_dashboard_chart, list_user_dashboards

Full specification for each tool is in the Tool Reference.


Schema access is live

FAC reads your schema from Frappe's metadata API at the moment a tool is called. It keeps no schema copy of its own — no snapshot table, no embedded or vector index of your data model, and no sync command. There is nothing to re-run and no staleness window to reason about.

In practice that means:

  • Custom DocTypes, Custom Fields, and Property Setters are visible on the next tool call. Create a field in the desk and the LLM sees it immediately. get_doctype_info returns custom fields merged inline with standard fields, along with child-table field definitions, Link targets, and the DocType's permission rules.
  • Renames, added options, and changed labels take effect the same way — they come from the same live metadata read.
  • Permissions are evaluated per call against the requesting user, never snapshotted. FAC asks Frappe on each call, so a role change applies as soon as Frappe applies it.

FAC does cache a few operational things — whether the server is enabled, the MCP and OAuth endpoint URLs, and dashboard/health statistics. None of them describe your schema or your data.

If you reach FAC through another product that embeds or orchestrates it, that layer may maintain its own schema cache with its own refresh behaviour. Staleness seen through a wrapper is worth tracing there first; FAC itself has no such step.

Implementation details are in Architecture Overview.


Extend with your own tools

If you have a Frappe app and want the LLM to reach into it, use the assistant_tools hook in your app's hooks.py. This is the recommended path — tools travel with the app, survive upgrades, and stay scoped to your data model. The same pattern works for Skills via the assistant_skills hook.

If you need to modify core FAC behaviour instead, write an internal plugin.

See the External App Development guide for the hook contract, and the Plugin Development guide for internal plugins.


Authentication & security

FAC uses OAuth 2.0 with PKCE for LLM connections — the LLM never sees the user's Frappe password. Every tool call is scoped to the calling user's Frappe and ERPNext roles and permissions: if the user cannot read a DocType in the desk, they cannot read it through the LLM either. Every call is logged to Assistant Audit Log with caller, tool, arguments, and result status, so admins always have a full record of what the LLM did.

For setup and advanced configuration:


Documentation


Sponsor and professional services

Frappe Assistant Core is built and maintained in the open. If it saves your team time, please consider sponsoring ongoing maintenance and new features on GitHub Sponsors — recurring or one-time contributions.

Professional implementation, customization, training, and enterprise support are delivered by our official services partner Promantia. Reach them at ai-support@promantia.com, or register your project at https://erp.promantia.in/fac-registration/new. Full details in COMMERCIAL.md.

The software itself remains completely free and open source under AGPL-3.0. Professional services are optional.


License

AGPL-3.0 — see LICENSE.

For dual-licensing, new partnerships, or sponsorship inquiries, contact jypaulclinton@gmail.com.

Contributing

Contributions welcome. See Contributing.md for the pull-request workflow and coding standards.

Files in the repo

Repository payload21 top-level entries
  • .github
  • client_packages
  • docs
  • frappe_assistant_core
  • screenshots
  • scripts
  • __init__.py
  • .editorconfig
  • .eslintrc
  • .gitignore
  • .pre-commit-config.yaml
  • .releaserc
  • .semgrepignore
  • COMMERCIAL.md
  • commitlint.config.js
  • Contributing.md
  • LICENSE
  • package.json
  • pyproject.toml
  • README.md
  • yarn.lock

Discussion (0)

Ask about usage, or say what you built with it

Sign in to join the discussion.

No comments yet. Be the first to say what this is good for.

More connectors

Real-time global intelligence dashboard. AI-powered news aggregation, geopolitical monitoring, and infrastructure tracking in a unified situational awareness interface

86k

High-performance code intelligence MCP server. Indexes codebases into a persistent knowledge graph — average repo in milliseconds. 158 languages, sub-ms queries, 99% fewer tokens. Single static binary, zero dependencies.

43k

Universal provider proxy for OpenAI Codex & Claude Code — use any LLM (Claude, Gemini, Grok, DeepSeek, Ollama…) with Codex CLI, App, SDK, and Claude Code

14k
okf-memory/
okf-agent-memory

Git-native persistent memory for AI coding agents. Implements Google OKF v0.2 with sub-300µs in-memory BM25 search, embedded MCP server, and progressive disclosure. Slashes token bloat by 80% with zero external databases or dependencies. Built in pure Go.

547
2akouwu/
reverify

Stop your AI from making things up — it proposes, deterministic tools decide, every claim checked against ground truth with evidence. Grounded facts and context survive resets. Reverse engineering is the proving ground. MCP server + CLI.

1.1k
t8y2/dbxConnectors

20 MB lightweight cross-platform database client for 90+ databases, including MySQL, PostgreSQL, SQLite, Redis, MongoDB, DuckDB, SQL Server, and Dameng. Built-in AI, MCP Server, CLI, desktop and Docker. | 轻量级跨平台数据库管理工具,支持 MySQL、PostgreSQL、SQLite、Redis、MongoDB、达梦等 90+ 数据库,提供桌面端、Docker、CLI、内置 AI 助手和 MCP Server。

19k