Provides comprehensive access to ERPNext ERP system with generic, doctype-agnostic CRUD operations, search and filtering capabilities, dynamic schema discovery, and enterprise-grade security features including multi-layer permission controls and audit logging.
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 Servershow me the top 5 customers by total sales this month"
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
A comprehensive Model Context Protocol (MCP) server for ERPNext that provides generic, doctype-agnostic access to any ERPNext document type with robust permission controls, audit logging, and enterprise-grade security.
ποΈ Architecture Overview
Core Components
π§ Generic Client: Works with any ERPNext doctype (Customer, Item, Sales Order, etc.)
π‘οΈ Permission System: Multi-layer access control with field-level restrictions
π Audit System: Comprehensive logging of all operations
β‘ Performance: Built-in caching and rate limiting
π Discovery: Dynamic tool generation based on configured doctypes
π Quick Start
1. Installation
2. Configuration
Create config/config.json:
3. Run Server
π Permission Model
Multi-Layer Security Architecture
The permission system operates on four security layers:
1. Operation-Level Permissions
2. Field-Level Access Control
3. Conditional Validation
4. Audit & Monitoring
Permission Examples
Restrictive Configuration (Read-only analyst)
Operational Configuration (Sales user)
π οΈ Available Tools & Usage
System Tools
test_connection
Test ERPNext server connectivity
list_doctypes
Show all configured doctypes and permissions
get_doctype_permissions
Get detailed permissions for specific doctype
Generic Document Operations
get_generic_document
Get any document by doctype and name
list_generic_documents
List documents for any doctype with filters
create_generic_document
Create document for any doctype
Doctype-Specific Tools
For each configured doctype, the server automatically generates:
list_{doctype}_documents- List documentsget_{doctype}_document- Get specific documentsearch_{doctype}_documents- Search documentscreate_{doctype}_document- Create new documentupdate_{doctype}_document- Update documentdelete_{doctype}_document- Delete document (if permitted)
Example Usage with Claude
Data Analysis
β Uses list_customer_documents with filters
Data Entry
β Uses create_customer_document with validation
Information Retrieval
β Uses get_sales_invoice_document
Search & Discovery
β Uses search_item_documents
Environment Variables
π Security Considerations
Authentication
Uses ERPNext API Key/Secret authentication
No passwords stored in configuration
Supports ERPNext user-level permissions
Generate API Key & Secret
Click on "Generate Keys" or "Add API Key"
Set appropriate permissions for the API user:
User: Select or create a dedicated API user
Roles: Assign necessary permissions (e.g., "System Manager", "Sales Manager")
Network Security
HTTPS-only connections to ERPNext
Configurable request timeouts
Connection pooling with limits
Audit Trail
All operations are logged with:
Timestamp and user context
Operation type and target doctype
Success/failure status and reasons
Data accessed/modified (field names only)
IP address and session information
Example audit log:
π§ͺ Testing & Validation
Test Connection
Validate Permissions
πββοΈ Deployment
Claude Desktop Integration
Add to claude_desktop_config.json: