Frappe Dev MCP Server

io.github.SajmustafaKePublished by GitHub account SajmustafaKev1.0.1Updated Oct 24, 2026

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

VerifiedSTDIODesktop onlyDatabasesDeveloper Tools

Overview

AI-generated overview

A local MCP server that lets an AI assistant scaffold and manage Frappe/ERPNext apps, DocTypes, API endpoints and bench commands.

What you can do
Create DocTypes with JSON definitions and Python controllers, and generate custom API endpoints with supplied Python code for an app's HTTP methods (get, post, put, delete). Run bench commands, including database migrations, and install or create Frappe apps on a site. Inspect a Frappe app's directory structure and manage app-level development tasks.
When to use it
Useful when developing on a Frappe/ERPNext bench and you want an assistant to generate DocType and API scaffolding, inspect app layouts, or run bench and migration commands without switching to a terminal.
Requirements
Runs as a local Node.js process (Node.js 18+), installed from the npm package and built before use. Needs a Frappe/ERPNext bench environment with bench commands available, and the FRAPPE_PATH environment variable pointing to the bench directory (it otherwise defaults to a hardcoded path).
Before you install
It writes files into your bench (DocTypes, controllers, API endpoints) and runs bench commands, migrations and app installs, which change code and database state. The bench command tool accepts an arbitrary command and working directory, so review what the assistant runs. Point FRAPPE_PATH at the intended bench, since the default is a hardcoded path.

Installation

In SourceWeft

  1. Open Frappe Dev MCP Server in the dashboard and add it to a workspace.
  2. Enable the server for the chats that should use its tools.

Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.

Other MCP clients

Follow the launch instructions in the repository.

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

Source: README.md at commit 17b38f1

Tools

0
SourceWeft has not started this package in its sandbox yet, so its tools are not known.

Version history

1
  1. v1.0.1LatestSep 16, 2026

Score

50% of the applicable checks met

How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.

  • Reached in the last 30 days25 pts

    Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.

  • Auth declared10 pts

    Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.

  • Tools listed15 pts

    Answer tools/list without a credential, or ship a package that starts in a sandbox without one.

  • DescriptionRequired15 pts
  • Logo10 pts
  • Documentation15 pts
  • License10 pts