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 分