ERPNext MCP Server
Provides full CRUD operations, workflow management, custom fields, and DocType management for ERPNext, enabling AI agents to interact with and manage ERPNext documents, workflows, and metadata.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@ERPNext MCP ServerCreate a new sales invoice for Customer A"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
ERPNext MCP Server
MCP (Model Context Protocol) Server for ERPNext with full CRUD operations, workflow management, custom fields, and DocType management.
Built with MCP SDK 1.25.1 - the latest stable version.
Features
Document Operations
get_document- Get a single document by DocType and nameget_documents- List documents with filtering, field selection, and paginationcreate_document- Create new documentsupdate_document- Update existing documentsdelete_document- Delete documentssubmit_document- Submit submittable documents (Draft → Submitted)cancel_document- Cancel submitted documents
DocType Management
get_doctypes- List all available DocTypesget_doctype_fields- Get field definitions for a DocTypeget_doctype_meta- Get complete DocType metadatacreate_doctype- Create new custom DocTypesadd_doctype_field- Add fields to existing DocTypescreate_custom_field- Create custom fields (survives updates)create_property_setter- Override DocType/field properties
Workflow Management
get_workflow- Get active workflow for a DocTypecreate_workflow- Create new workflows with states and transitionsupdate_workflow- Update existing workflows
Reports
run_report- Execute ERPNext reports with filters
Authentication
authenticate_erpnext- Authenticate with username/password (alternative to API key)
Related MCP server: yt-mcp-server-odoo
Installation
npm install @kai-oesterling/erpnext-mcp-serverOr clone and build:
git clone https://github.com/Kai-Oesterling/erpnext-mcp-server.git
cd erpnext-mcp-server
npm install
npm run buildConfiguration
Set environment variables:
export ERPNEXT_URL=https://erp.example.com
export ERPNEXT_API_KEY=your_api_key
export ERPNEXT_API_SECRET=your_api_secret
# Optional: Enable debug logging
export ERPNEXT_DEBUG=trueCreating API Keys in ERPNext
Go to User settings in ERPNext
Navigate to "API Access" section
Generate new API Key and Secret
Use these credentials in environment variables
Usage
With Claude Desktop
Add to your Claude Desktop config (~/Library/Application Support/Claude/claude_desktop_config.json on macOS):
{
"mcpServers": {
"erpnext": {
"command": "node",
"args": ["/path/to/erpnext-mcp-server/build/index.js"],
"env": {
"ERPNEXT_URL": "https://erp.example.com",
"ERPNEXT_API_KEY": "your_api_key",
"ERPNEXT_API_SECRET": "your_api_secret"
}
}
}
}With MCP Inspector
npx @modelcontextprotocol/inspector node build/index.jsStandalone
npm startDevelopment
# Watch mode
npm run watch
# Run with tsx (no build needed)
npm run dev
# Build
npm run buildError Handling
This server includes detailed error extraction from ERPNext responses:
Parses
_server_messagesfor validation errorsExtracts exception details from ERPNext responses
Provides meaningful HTTP status messages
Includes debug logging when
ERPNEXT_DEBUG=true
Resources
The server also exposes MCP resources:
erpnext://DocTypes- List all available DocTypeserpnext://{doctype}/{name}- Access individual documents
License
MIT
Author
Kai Oesterling kai@oesterling.org
Credits
Based on the original erpnext-mcp-server by Rakesh Gangwar. Extended with workflows, custom fields, DocType creation, and improved error handling.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/Kai-Oesterling/erpnext-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server