npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

frappe-dev-mcp-server

v1.0.1

Published

Model Context Protocol server for Frappe/ERPNext development with AI assistance for DocTypes, bench commands, app management, and database operations

Readme

Frappe Dev MCP Server

MCP Registry npm version License: MIT

A comprehensive Model Context Protocol (MCP) server that provides AI assistants with powerful tools for Frappe/ERPNext development. This server enables AI assistants to help with creating DocTypes, running bench commands, managing apps, generating APIs, and performing database operations.

🚀 Features

  • 📋 DocType Management: Create, modify, and analyze Frappe DocTypes with AI assistance
  • ⚡ Bench Commands: Execute bench commands directly through AI conversations
  • 📱 App Development: Create, install, and manage Frappe applications
  • 🔗 API Generation: Generate custom API endpoints with proper error handling
  • 🗄️ Database Operations: Run migrations, execute queries, and manage data
  • 📊 Reporting: Generate reports and financial statements
  • 🎨 UI Components: Create Vue.js components using frappe-ui
  • 📈 Document Operations: Full CRUD operations on Frappe documents

📦 Installation

Via NPM (Recommended)

npm install -g frappe-dev-mcp-server

Via GitHub

git clone https://github.com/SajmustafaKe/frappe-dev-mcp-server.git
cd frappe-dev-mcp-server
npm install
npm run build

⚙️ Configuration

Environment Variables

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 the current working directory.

🔧 Usage

With Claude Desktop

Add the following configuration to your Claude Desktop config file:

macOS/Linux: ~/Library/Application Support/Claude/claude_desktop_config.json Windows: %APPDATA%\Claude\claude_desktop_config.json

{
  "mcpServers": {
    "frappe-dev": {
      "command": "npx",
      "args": ["frappe-dev-mcp-server"],
      "env": {
        "FRAPPE_PATH": "/path/to/your/frappe/bench"
      }
    }
  }
}

With Other MCP Clients

The server implements the standard MCP protocol over stdio transport:

# Global installation
npx frappe-dev-mcp-server

# Local build
node dist/index.js

With VS Code + MCP Extension

Add to your MCP settings:

{
  "servers": {
    "frappe-dev": {
      "command": "npx",
      "args": ["frappe-dev-mcp-server"],
      "env": {
        "FRAPPE_PATH": "/path/to/your/frappe/bench"
      }
    }
  }
}

🛠️ Available Tools

📋 DocType Operations

frappe_create_doctype

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

Parameters:

  • app_name (string): Name of the Frappe app
  • doctype_name (string): Name of the DocType
  • module (string): Module where DocType belongs
  • fields (array): Field definitions with fieldname, label, fieldtype, etc.
  • is_submittable (boolean): Whether the DocType is submittable
  • is_child (boolean): Whether this is a child DocType

frappe_get_doctype_schema

Retrieves the complete schema/structure of a DocType.

frappe_get_doctype_list

Lists all available DocTypes in the system.

⚡ Bench Operations

frappe_run_bench_command

Executes bench commands for Frappe development.

Parameters:

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

📱 App Management

frappe_create_app

Creates a new Frappe app with proper structure.

frappe_install_app

Installs a Frappe app on a specific site.

frappe_get_app_structure

Retrieves the directory structure of a Frappe app.

🔗 API Development

frappe_create_api_endpoint

Creates custom API endpoints with proper error handling.

Parameters:

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

🗄️ Database Operations

frappe_migrate_database

Runs database migrations for a site.

frappe_create_document

Creates a new document in the database.

frappe_get_document

Retrieves a document by DocType and name.

frappe_update_document

Updates an existing document.

frappe_delete_document

Deletes a document from the database.

frappe_list_documents

Lists documents with optional filtering.

💡 Example Usage

AI Conversation Examples

Creating a DocType

You: "Create a Customer Order DocType in my_app with customer link, order date, and total amount fields"

AI: I'll create the Customer Order DocType for you.

The AI will use frappe_create_doctype with:

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

You: "Migrate the database for my_site.local"

AI: I'll run the migration for you.

Uses frappe_run_bench_command:

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

Creating API Endpoints

You: "Create an API endpoint to get customer orders"

AI: I'll create a custom API endpoint for customer orders.

📊 Reporting and Analytics

The server includes tools for generating financial statements, running query reports, and creating custom reports that integrate seamlessly with ERPNext's reporting system.

🏗️ Development

Local Development

  1. Clone the repository:

    git clone https://github.com/SajmustafaKe/frappe-dev-mcp-server.git
    cd frappe-dev-mcp-server
  2. Install dependencies:

    npm install
  3. Make your changes in the src/ directory

  4. Build and test:

    npm run build
    npm run dev  # For development mode

Testing

Test the server with any MCP-compatible client:

# Test tool listing
echo '{"jsonrpc":"2.0","id":1,"method":"tools/list"}' | node dist/index.js

# Test a specific tool
echo '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"frappe_get_doctype_list","arguments":{"site":"your-site"}}}' | node dist/index.js

📋 Requirements

  • Node.js: Version 18 or higher
  • Frappe Framework: Properly configured bench environment
  • Database: MariaDB/MySQL with Frappe sites
  • Permissions: Access to bench commands and site directories

🤝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

🔗 Links

📞 Support

If you encounter any issues or have questions:

  1. Check the Issues page
  2. Create a new issue if your problem isn't already reported
  3. Provide detailed information about your Frappe setup and the issue

Made with ❤️ for the Frappe/ERPNext community