If you're building on Frappe or ERPNext, this server plugs AI assistance directly into your development workflow. It exposes tools for generating DocType JSON definitions and Python controllers, executing bench commands, creating API endpoints, and managing apps and migrations. You can scaffold a complete DocType with fields, links, and validation rules, run migrations against specific sites, or spin up new apps with boilerplate. It connects to your local bench environment via the FRAPPE_PATH variable and works over stdio with Claude Desktop or SSE for GitHub Copilot Chat. Reach for this when you want to skip the manual file editing and bench command syntax lookups that come with standard Frappe development.
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.
Clone or download this repository
Install dependencies:
npm install
Build the server:
npm run build
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.
The server now supports SSE transport for use with GitHub Copilot Chat:
Build and run the SSE server:
npm run build
npm run sse
The server will be automatically discovered by GitHub Copilot Chat at http://localhost:3000/sse
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"
}
}
}
}
Run the server directly:
node dist/index.js
Creates a new Frappe DocType with JSON definition and Python controller.
Parameters:
app_name: Name of the Frappe appdoctype_name: Name of the DocTypemodule: Module where DocType belongsfields: Array of field definitionsis_submittable: Whether the DocType is submittable (default: false)is_child: Whether this is a child DocType (default: false)Executes bench commands for Frappe development.
Parameters:
command: Bench command to executesite: Site name (optional)cwd: Working directory (optional)Gets the directory structure of a Frappe app.
Parameters:
app_name: Name of the Frappe appCreates a custom API endpoint for a Frappe app.
Parameters:
app_name: Name of the Frappe appendpoint_name: Name of the API endpointmethod: HTTP method (get, post, put, delete) (default: get)code: Python code for the API endpointRuns database migration for a Frappe site.
Parameters:
site: Site name to migrateInstalls a Frappe app on a site.
Parameters:
app_name: Name of the app to installsite: Site nameCreates a new Frappe app.
Parameters:
app_name: Name of the new apptitle: Title of the apppublisher: Publisher namedescription: App description (optional){
"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
}
]
}
{
"command": "migrate",
"site": "my_site.local"
}
To modify the server:
src/ directorynpm run build to compile TypeScriptnpm run dev for development modeMIT License - see LICENSE file for details
FRAPPE_PATHPath to your Frappe/ERPNext bench directory (defaults to current directory if not specified)