Frappe/ERPNext MCP Server

Frappe/ERPNext MCP Server

Provides AI assistance for Frappe/ERPNext development with tools for creating DocTypes, running bench commands, and managing apps.

Category
Visit Server

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:

    npm install
    
  3. Build the server:

    npm run build
    

Configuration

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

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:

    npm run build
    npm 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):

{
  "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:

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

{
  "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

{
  "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

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured