Get the FREE Ultimate OpenClaw Setup Guide →

erpnext

Connect AI assistants to your ERPNext instance via the Model Context Protocol (MCP) using the official Frappe API.

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio rakeshgangwar-erpnext-mcp-server node /path/to/erpnext-server/build/index.js \
  --env ERPNEXT_URL="http://your-erpnext-instance.com" \
  --env ERPNEXT_API_KEY="your-api-key" \
  --env ERPNEXT_API_SECRET="your-api-secret"

How to use

ERPNext MCP Server exposes ERPNext data and capabilities to AI assistants via the Model Context Protocol. It provides tools to authenticate with ERPNext, fetch documents, create and update records, run reports, and inspect DocType schemas. You can reference ERPNext resources using ERPNext-friendly URIs like erpnext://{doctype}/{name} to retrieve structured data in JSON. The available tools include authenticate_erpnext, get_documents, create_document, update_document, run_report, get_doctype_fields, and get_doctypes. Typical usage involves authenticating to obtain a session, then invoking document read/write operations or running reports as part of a conversational workflow. The server is designed to be integrated into Claude Desktop/VSCode workflows via a local MCP configuration, allowing seamless querying of ERPNext data from an AI agent.

How to install

Prerequisites:

  • Node.js and npm installed on your system
  • Access to an ERPNext instance with API credentials (URL, API Key, API Secret)

Installation steps:

  1. Install dependencies for the MCP server
npm install
  1. Build the server (TypeScript project)
npm run build
  1. (Optional) Enable development auto-rebuild on file changes
npm run watch
  1. Run the server locally (example)
node /path/to/erpnext-server/build/index.js
  1. Prepare Claude/Code integration config (see README) and set environment variables per your ERPNext instance, e.g. ERPNEXT_URL, ERPNEXT_API_KEY, ERPNEXT_API_SECRET.
  2. Add the MCP server configuration to Claude/Code as shown in the README to start using the tools.

Additional notes

Notes and tips:

  • Environment variables are required to connect to ERPNext. Keep API keys secure and do not commit them to version control.
  • The MCP server communicates over stdio; debugging can be challenging. Use the MCP Inspector (npm run inspector) to obtain a debugging URL.
  • URIs of the form erpnext://{doctype}/{name} can be used to fetch document details easily.
  • If you update Doctypes or fields in ERPNext, use get_doctype_fields and get_doctypes to refresh your client tooling with new schema.
  • When running in Claude VSCode integration, ensure the path in the mcpServers config points to the built index.js bundle.

Related MCP Servers

Sponsor this space

Reach thousands of developers