Frappe Dev MCP Server

io.github.SajmustafaKe由 GitHub 帳號 SajmustafaKe 發布v1.0.1更新於 Oct 24, 2026

MCP server for Frappe/ERPNext development with AI assistance for DocTypes, bench commands, and APIs

已驗證STDIO僅桌面資料庫開發者工具

概覽

AI 產生的概覽

本機 MCP 伺服器,讓 AI 助理為 Frappe/ERPNext 產生並管理應用程式、DocType、API 端點,並執行 bench 指令。

可以做什麼
建立 DocType,產生 JSON 定義與 Python 控制器;為應用程式產生自訂 API 端點,並依指定的 HTTP 方法(get、post、put、delete)寫入 Python 程式碼。執行 bench 指令,包括資料庫遷移,以及在站台上安裝或建立 Frappe 應用程式。檢視 Frappe 應用程式的目錄結構,處理應用程式層級的開發工作。
適用情境
適合在 Frappe/ERPNext bench 上開發時使用,讓助理產生 DocType 與 API 骨架、檢視應用程式結構,或直接執行 bench 與遷移指令,不必切換到終端機。
執行需求
以本機 Node.js 程序執行(需 Node.js 18 以上),從 npm 套件安裝並先建置。需要可用的 Frappe/ERPNext bench 環境與 bench 指令,並設定 FRAPPE_PATH 環境變數指向 bench 目錄(未設定時使用寫死的預設路徑)。
安裝前請注意
它會將檔案寫入 bench(DocType、控制器、API 端點),並執行 bench 指令、遷移與應用程式安裝,會改變程式碼與資料庫狀態。bench 指令工具接受任意指令與工作目錄,請確認助理實際執行的內容。請將 FRAPPE_PATH 指向預期的 bench,因為預設值是寫死的路徑。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Frappe Dev MCP Server,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

Frappe/ERPNext MCP Server

A Model Context Protocol (MCP) server that provides AI assistance for Frappe/ERPNext development. This server offers tools to help with creating DocTypes, running bench commands, managing apps, and other Frappe development tasks.

Features

  • DocType Creation: Automatically generate DocType JSON definitions and Python controllers
  • Bench Commands: Execute bench commands for development workflows
  • App Management: Create, install, and manage Frappe apps
  • API Endpoints: Generate custom API endpoints
  • Database Operations: Run migrations and database management
  • App Structure Analysis: Get detailed app directory structures

Installation

  1. Clone or download this repository

  2. Install dependencies:

    bash
    npm install
  3. Build the server:

    bash
    npm run build

Configuration

Set the FRAPPE_PATH environment variable to point to your Frappe bench directory:

bash
export FRAPPE_PATH="/path/to/your/frappe/bench"

If not set, it defaults to /Users/mac/ERPNext/mkahawa.

Usage

With GitHub Copilot Chat (SSE Transport)

The server now supports SSE transport for use with GitHub Copilot Chat:

  1. Build and run the SSE server:

    bash
    npm run buildnpm run sse
  2. The server will be automatically discovered by GitHub Copilot Chat at http://localhost:3000/sse

With Claude Desktop (Stdio Transport)

Add the following configuration to your Claude Desktop config file (~/Library/Application Support/Claude/claude_desktop_config.json on macOS):

json
{  "mcpServers": {    "frappe-dev": {      "command": "node",      "args": ["/Users/mac/ERPNext/mkahawa/frappe-mcp-server/dist/index.js"],      "env": {        "FRAPPE_PATH": "/Users/mac/ERPNext/mkahawa"      }    }  }}

With other MCP clients

Run the server directly:

bash
node dist/index.js

Available Tools

frappe_create_doctype

Creates a new Frappe DocType with JSON definition and Python controller.

Parameters:

  • app_name: Name of the Frappe app
  • doctype_name: Name of the DocType
  • module: Module where DocType belongs
  • fields: Array of field definitions
  • is_submittable: Whether the DocType is submittable (default: false)
  • is_child: Whether this is a child DocType (default: false)

frappe_run_bench_command

Executes bench commands for Frappe development.

Parameters:

  • command: Bench command to execute
  • site: Site name (optional)
  • cwd: Working directory (optional)

frappe_get_app_structure

Gets the directory structure of a Frappe app.

Parameters:

  • app_name: Name of the Frappe app

frappe_create_api_endpoint

Creates a custom API endpoint for a Frappe app.

Parameters:

  • app_name: Name of the Frappe app
  • endpoint_name: Name of the API endpoint
  • method: HTTP method (get, post, put, delete) (default: get)
  • code: Python code for the API endpoint

frappe_migrate_database

Runs database migration for a Frappe site.

Parameters:

  • site: Site name to migrate

frappe_install_app

Installs a Frappe app on a site.

Parameters:

  • app_name: Name of the app to install
  • site: Site name

frappe_create_app

Creates a new Frappe app.

Parameters:

  • app_name: Name of the new app
  • title: Title of the app
  • publisher: Publisher name
  • description: App description (optional)

Example Usage

Creating a DocType

javascript
{  "app_name": "my_app",  "doctype_name": "Customer Order",  "module": "Orders",  "fields": [    {      "fieldname": "customer",      "label": "Customer",      "fieldtype": "Link",      "options": "Customer",      "reqd": true    },    {      "fieldname": "order_date",      "label": "Order Date",      "fieldtype": "Date",      "reqd": true    },    {      "fieldname": "total_amount",      "label": "Total Amount",      "fieldtype": "Currency",      "reqd": true    }  ]}

Running Bench Commands

javascript
{  "command": "migrate",  "site": "my_site.local"}

Development

To modify the server:

  1. Edit files in the src/ directory
  2. Run npm run build to compile TypeScript
  3. Test with npm run dev for development mode

Requirements

  • Node.js 18+
  • Frappe/ERPNext bench environment
  • Access to Frappe bench commands

License

MIT License - see LICENSE file for details

來源:README.md,提交 17b38f1

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v1.0.1最新Sep 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分