ERPNext MCP Server
Provides tools for interacting with ERPNext, enabling AI assistants to manage documents, run reports, and perform CRUD operations on various DocTypes such as Customers, Items, etc.
Provides integration with the Frappe API, allowing access to ERPNext data through the underlying Frappe framework, including document management and report execution.
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 Serverlist customers"
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 Model Context Protocol server for ERPNext integration
This is a TypeScript-based MCP server that provides integration with ERPNext/Frappe API. It enables AI assistants to interact with ERPNext data and functionality through the Model Context Protocol.
Features
Resources
Access ERPNext documents via
erpnext://{doctype}/{name}URIsJSON format for structured data access
Tools
authenticate_erpnext- Authenticate with ERPNext using username and passwordget_documents- Get a list of documents for a specific doctypecreate_document- Create a new document in ERPNextupdate_document- Update an existing document in ERPNextrun_report- Run an ERPNext reportget_doctype_fields- Get fields list for a specific DocTypeget_doctypes- Get a list of all available DocTypes
Related MCP server: Frappe MCP Server
Configuration
The server requires the following environment variables:
ERPNEXT_URL- The base URL of your ERPNext instanceERPNEXT_API_KEY(optional) - API key for authenticationERPNEXT_API_SECRET(optional) - API secret for authentication
Development
Install dependencies:
npm installBuild the server:
npm run buildFor development with auto-rebuild:
npm run watchInstallation
To use with Claude Desktop, add the server config:
On MacOS: ~/Library/Application Support/Claude/claude_desktop_config.json
On Windows: %APPDATA%/Claude/claude_desktop_config.json
{
"mcpServers": {
"erpnext": {
"command": "node",
"args": ["/path/to/erpnext-server/build/index.js"],
"env": {
"ERPNEXT_URL": "http://your-erpnext-instance.com",
"ERPNEXT_API_KEY": "your-api-key",
"ERPNEXT_API_SECRET": "your-api-secret"
}
}
}
}To use with Claude in VSCode, add the server config to:
On MacOS: ~/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json
On Windows: %APPDATA%/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json
Debugging
Since MCP servers communicate over stdio, debugging can be challenging. We recommend using the MCP Inspector, which is available as a package script:
npm run inspectorThe Inspector will provide a URL to access debugging tools in your browser.
Usage Examples
Authentication
<use_mcp_tool>
<server_name>erpnext</server_name>
<tool_name>authenticate_erpnext</tool_name>
<arguments>
{
"username": "your-username",
"password": "your-password"
}
</arguments>
</use_mcp_tool>Get Customer List
<use_mcp_tool>
<server_name>erpnext</server_name>
<tool_name>get_documents</tool_name>
<arguments>
{
"doctype": "Customer"
}
</arguments>
</use_mcp_tool>Get Customer Details
<access_mcp_resource>
<server_name>erpnext</server_name>
<uri>erpnext://Customer/CUSTOMER001</uri>
</access_mcp_resource>Create New Item
<use_mcp_tool>
<server_name>erpnext</server_name>
<tool_name>create_document</tool_name>
<arguments>
{
"doctype": "Item",
"data": {
"item_code": "ITEM001",
"item_name": "Test Item",
"item_group": "Products",
"stock_uom": "Nos"
}
}
</arguments>
</use_mcp_tool>Get Item Fields
<use_mcp_tool>
<server_name>erpnext</server_name>
<tool_name>get_doctype_fields</tool_name>
<arguments>
{
"doctype": "Item"
}
</arguments>
</use_mcp_tool>Available Tools
6 toolscreate_documentB
Create a new document in ERPNext
| Name | Required | Description | Default |
|---|---|---|---|
| data | Yes | Document data | |
| doctype | Yes | ERPNext DocType (e.g., Customer, Item) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden. It only states that a new document is created; it does not disclose side effects, permissions needed, error behavior, or whether the created document is returned. This is a significant gap for a mutation tool.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single sentence with no wasted words. It is front-loaded with the verb and resource, making it easy to scan. However, it is somewhat under-specified, so it loses a point for completeness even though the conciseness itself is good.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
With no output schema and a nested object parameter, the description leaves important context unexplained. It does not mention what the 'data' object should contain, which doctypes are supported, or what the response looks like. This is inadequate for a tool that creates resources.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema already provides 100% coverage for both parameters (doctype and data) with descriptions. The tool description adds no extra parameter meaning, so the baseline 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action ('Create') and resource ('a new document in ERPNext'), which distinguishes it from sibling tools like update_document and get_documents. It is specific enough to convey the core purpose, though it could add a bit more scope detail such as requiring a doctype.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage for creating new documents but gives no explicit guidance on when to choose this over alternatives, nor any exclusions. There is no mention of scenarios where update_document might be more appropriate or of prerequisites for creation.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_doctype_fieldsB
Get fields list for a specific DocType
| Name | Required | Description | Default |
|---|---|---|---|
| doctype | Yes | ERPNext DocType (e.g., Customer, Item) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden of behavioral disclosure. It only states the raw action without mentioning whether the operation is read-only, what the response contains, or any authentication/error behavior. This is a minimal disclosure with no behavioral context beyond the action itself.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single concise sentence that front-loads the verb and object. Every word earns its place, and there is no redundancy or filler. It is appropriately sized for the tool's simplicity.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple one-parameter tool, the description is adequate but has gaps. It does not specify what the returned fields list includes (e.g., field names, types, required flags) or explain error handling for invalid doctypes. With no output schema, the description could benefit from a brief note on return structure, but the core purpose is clear.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100% (the 'doctype' parameter has a clear description). The description does not add any additional parameter meaning beyond the schema, but it also doesn't need to since the schema fully explains the parameter. Baseline of 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses a specific verb+resource construction: 'Get fields list for a specific DocType'. This clearly distinguishes it from sibling tools like get_doctypes (which lists doctypes) and get_documents (which retrieves document data). The scope is well-defined.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description offers no guidance on when to use this tool versus alternatives. It implicitly implies use when needing fields of a specific doctype, but does not state any exclusions or mention sibling tools. No explicit context or prerequisites are provided.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_doctypesA
Get a list of all available DocTypes
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description must carry the behavioral burden. It clearly indicates a read operation ('Get') with no side effects, but it does not disclose potential nuances like authentication requirements, whether custom DocTypes are included, or the exact return structure. This is adequate for a simple list operation but leaves room for ambiguity.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, front-loaded sentence with no filler. It communicates the essential purpose efficiently.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's low complexity (no parameters, no output schema), the description is mostly complete. However, it does not specify the return format (e.g., array of names vs. objects) or any sorting/ordering, which could be ambiguous for an agent. Still, it is sufficient for a basic listing tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool has zero parameters, so there is no need for parameter descriptions. The baseline of 4 applies as the description does not need to compensate for schema gaps.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses a specific verb ('Get a list') and clearly identifies the resource ('all available DocTypes'). It is distinct from sibling tools like get_doctype_fields or get_documents, which operate on different entities.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is provided on when to use this tool versus alternatives. It does not mention, for example, using get_doctype_fields to explore fields of a specific DocType, or that this is a precursor to fetching documents. The usage context is implied but not explicit.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_documentsA
Get a list of documents for a specific doctype
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Maximum number of documents to return (optional) | |
| fields | No | Fields to include (optional) | |
| doctype | Yes | ERPNext DocType (e.g., Customer, Item) | |
| filters | No | Filters in the format {field: value} (optional) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden for behavioral disclosure. It only states a basic listing operation and does not mention read-only nature, pagination, sorting, return format, or any side effects. The agent cannot predict behavior beyond the name.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, front-loaded sentence that is efficient and free of unnecessary words. It communicates the core purpose without redundancy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool has 4 parameters, a nested filters object, no output schema, and no annotations, the description is too sparse. It does not explain list behavior, filtering interplay, pagination, or return structure, leaving the agent under-informed for a tool of this complexity.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the schema itself documents all parameters adequately. The description adds no extra meaning beyond the schema (e.g., 'for a specific doctype' merely restates the doctype parameter). Baseline 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses a specific verb ('Get') and resource ('a list of documents') with a clear qualifier ('for a specific doctype'). This directly contrasts with sibling tools like get_doctypes and get_doctype_fields, making the tool's purpose unambiguous.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The phrase 'for a specific doctype' implies usage context and helps distinguish from sibling tools, but there is no explicit when-to-use or when-not-to-use guidance. It is clear enough for an agent to select this tool over alternatives, but lacks explicit exclusions.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
run_reportC
Run an ERPNext report
| Name | Required | Description | Default |
|---|---|---|---|
| filters | No | Report filters (optional) | |
| report_name | Yes | Name of the report |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries full responsibility for behavioral disclosure. It only says 'Run an ERPNext report,' offering no information about side effects, read-only nature, required permissions, or output characteristics. The lack of any behavioral context makes it nearly useless for understanding tool behavior.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, front-loaded sentence with no wasted words. It is efficient, though arguably under-specified. Given the minimal detail required for a two-parameter tool, this level of conciseness is acceptable, but it could be expanded slightly without losing clarity.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The tool has no output schema and no annotations, and the description is too brief to convey essential context such as what the report returns, how filters are used, or any constraints. The parameter schema covers the 'what' but not the 'how' or expected behavior, making the description insufficient for an agent to use it correctly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has descriptions for both parameters ('Report filters (optional)' and 'Name of the report'), achieving 100% coverage. The description itself adds no additional parameter information, so it neither helps nor hurts. The baseline of 3 is appropriate since the schema does the heavy lifting.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses a specific verb 'Run' and a resource 'ERPNext report', which distinguishes it from sibling tools that deal with doctypes and documents. However, it lacks detail on what 'run' entails (e.g., returning data), making it clear but slightly under-specified.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
There is no guidance on when to use this tool versus alternatives. The sibling tools are about document operations, so it is implied this is for reports, but no explicit context, prerequisites, or exclusions are provided. The description simply states what it does, not when to use it.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
update_documentC
Update an existing document in ERPNext
| Name | Required | Description | Default |
|---|---|---|---|
| data | Yes | Document data to update | |
| name | Yes | Document name/ID | |
| doctype | Yes | ERPNext DocType (e.g., Customer, Item) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden. It implies mutation but does not disclose whether updates are partial or full replacements, idempotency, error behavior, or required permissions. This is a significant gap for a write operation.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, concise sentence that front-loads the verb and resource. It is appropriately short but could be easily expanded with key details without losing brevity.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool has three required parameters, a nested data object, and no output schema, the description is too sparse. It does not explain return values, partial update behavior, or how the data object should be structured beyond the schema. The description is inadequate for a mutation tool without annotations.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has 100% coverage, with clear descriptions for each parameter (doctype, name, data). The description adds no additional parameter-level meaning, so the baseline of 3 is appropriate since the schema does the heavy lifting.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states the specific verb 'Update' and resource 'existing document in ERPNext,' which clearly distinguishes it from sibling tools like create_document or get_documents. However, it lacks detail on what kind of document or which fields can be updated, but it is not misleading.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is given on when to use this tool versus alternatives. It does not explain prerequisites, differences from create_document, or any exclusions. The description simply states the operation without context.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
6 tool updates
v0.1.0- First observed
create_document - First observed
get_doctype_fields - First observed
get_doctypes - First observed
get_documents - First observed
run_report - First observed
update_document
TDQS
Each tool targets a distinct aspect: listing doctypes, fetching fields, retrieving documents, creating, updating, and running reports. There is no overlap between these operations.
All tools use a verb_noun pattern (get_, create_, update_, run_), but pluralization is inconsistent: get_doctypes and get_documents are plural, while get_doctype_fields, create_document, and update_document use singular forms.
With 6 tools, the server is well-scoped and covers core ERPNext interactions without unnecessary bloat. Each tool has a clear purpose.
The set covers create, read (list), and update, but lacks a delete_document operation. Also, get_documents only implies listing, with no explicit get by ID, which may require workarounds. Reports add some breadth.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Model Context Protocol server for the Apideck Unified API. Connect any MCP-compatible agent framework to 100+ accounting systems, HRIS platforms, file storage providers, and more through one integration. More information https://www.apideck.com/mcp-server
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
Automate 1,000+ services from any MCP-compatible AI agent: build Applets, run actions and queries.
- odooOAuthcom.odooconsole
Odoo ERP for AI agents: hosted OAuth endpoint, gated writes, one endpoint for every instance.
Related MCP Servers
- AlicenseBqualityDmaintenanceEnables AI assistants to interact with ERPNext/Frappe instances through the REST API, allowing document management, report execution, and DocType operations using natural language.6MIT
- AlicenseNot gradedqualityDmaintenanceAllows AI assistants to interact with Frappe applications through the official REST API, enabling document CRUD operations, schema handling, and detailed API instructions.1432ISC
- AlicenseNot gradedqualityCmaintenanceEnables AI models to securely interact with Frappe Framework/ERPNext instances, supporting document CRUD, RPC methods, file management, workflows, reporting, and more via the Model Context Protocol.143ISC
- AlicenseNot gradedqualityCmaintenanceEnables AI assistants to interact with ERPNext data and functionality through the Model Context Protocol, including document CRUD, report running, and API method calls.MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- 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/jagmohan0908/mcp-erp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server