How buildswithpaul/frappe_assistant_core works
Frappe Assistant Core provides two access paths to ERPNext: external MCP clients use OAuth-authenticated tool calls under the ERP user's permissions, while opt-in FAC Chat offers an in-Frappe interface backed by FAC Cloud. The graph preserves the MCP protocol, tool/plugin and audit layers, plus chat, administration, and workflow capabilities documented in the README. Some chat and OAuth wiring is documented rather than shown in sampled source; those links cite the README, and unsampled implementation details are not inferred.
Main entry points: App.vue Chat interface · base_tool.py Tool execution · server.py MCP server · list_documents.py Document tools
Components 24
MCP access
- MCP server
frappe_assistant_core/mcp/server.py - MCP handlers
frappe_assistant_core/api/handlers - MCP adapter
frappe_assistant_core/mcp/tool_adapter.py
Tools and governance
- Plugin manager
frappe_assistant_core/utils/plugin_manager.py - Plugin base
frappe_assistant_core/plugins/base_plugin.py - Tool execution
frappe_assistant_core/core/base_tool.py - Document tools
frappe_assistant_core/plugins/core/tools/list_documents.py - Search tools
frappe_assistant_core/plugins/core/tools/search_tools.py - Report search
frappe_assistant_core/plugins/core/tools/report_search.py - SQL analysis
frappe_assistant_core/plugins/data_science/tools/run_database_query.py - Audit log
frappe_assistant_core/utils/audit_trail.py
FAC Chat
- Chat interface
frappe_assistant_core/chat/frontend/src/App.vue - Desk widget
frappe_assistant_core/chat/frontend/src/widget/panel/main.js - Stream manager
frappe_assistant_core/chat/frontend/src/stores/chat/streamManager.js - Chat API
frappe_assistant_core/chat/api/chat - Chat records
frappe_assistant_core/chat/doctype/fac_chat_conversation/fac_chat_conversation.py - Memory, RAG, workflows
frappe_assistant_core/chat/api
Administration and identity
- OAuth endpoints
frappe_assistant_core/api/oauth_discovery.py - Admin APIs
frappe_assistant_core/api/admin_api.py - Assistant settings
frappe_assistant_core/assistant_core/doctype/assistant_core_settings/assistant_core_settings.py - Skills and prompts
frappe_assistant_core/api/handlers/prompts.py
Other components
- MCP client
- Frappe user
- FAC Cloud
Connections 21
- MCP client → MCP server: sends MCP requests
- MCP server → MCP handlers: dispatches prompts/resources
frappe_assistant_core/mcp/server.py - MCP server → MCP adapter: adapts tool calls
frappe_assistant_core/mcp/server.py - MCP adapter → Document tools: adapts tool
frappe_assistant_core/mcp/tool_adapter.py - Plugin manager → Plugin base: discovers plugins
frappe_assistant_core/utils/plugin_manager.py - Plugin manager → Tool execution: loads tools
frappe_assistant_core/utils/plugin_manager.py - Document tools → Tool execution: extends execution
frappe_assistant_core/plugins/core/tools/list_documents.py - Document tools → Search tools: uses search
frappe_assistant_core/plugins/core/tools/list_documents.py - SQL analysis → Tool execution: extends execution
frappe_assistant_core/plugins/data_science/tools/run_database_query.py - Tool execution → Audit log: records executions
frappe_assistant_core/core/base_tool.py - MCP client → OAuth endpoints: authenticates
- OAuth endpoints → Assistant settings: reads OAuth settings
frappe_assistant_core/api/oauth_discovery.py - Admin APIs → Assistant settings: updates settings
- Frappe user → Chat interface: uses chat
- Frappe user → Desk widget: opens widget
- Stream manager → Chat API: cancels stream
frappe_assistant_core/chat/frontend/src/stores/chat/streamManager.js - Chat interface → FAC Cloud: uses managed service
- Desk widget → FAC Cloud: uses managed service
- Chat API → Chat records: stores conversations
- Chat interface → Memory, RAG, workflows: offers chat capabilities
- Skills and prompts → Chat interface: provides prompt capability