Skip to content
Back to search

erpnext-mcp-server

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

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/rakeshgangwar--erpnext-mcp-server/badge.svg)](/listings/rakeshgangwar--erpnext-mcp-server)

HTML

<a href="/listings/rakeshgangwar--erpnext-mcp-server"><img src="/api/listings/rakeshgangwar--erpnext-mcp-server/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

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](https://github.com/modelcontextprotocol/inspector), which is available as a package script:

npm run inspector

The Inspector will provide a URL to access debugging tools in your browser.

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 140 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. # ERPNext MCP Server
  2. A Model Context Protocol server for ERPNext integration
  3. 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.
  4. ## Features
  5. ### Resources
  6. - Access ERPNext documents via `erpnext://{doctype}/{name}` URIs
  7. - JSON format for structured data access
  8. ### Tools
  9. - `get_doctypes` - Get a list of all available DocTypes
  10. - `get_doctype_fields` - Get fields list for a specific DocType
  11. - `get_documents` - Get a list of documents for a specific doctype
  12. - `get_document` - Get a single document by name, including all child tables
  13. - `create_document` - Create a new document in ERPNext
  14. - `update_document` - Update an existing document in ERPNext
  15. - `delete_document` - Permanently delete a document
  16. - `submit_document` - Submit a document (set docstatus to 1)
  17. - `cancel_document` - Cancel a submitted document (set docstatus to 2)
  18. - `call_method` - Call an ERPNext/Frappe whitelisted server-side API method
  19. - `run_report` - Run an ERPNext report
  20. ## Configuration
  21. The server requires the following environment variables:
  22. - `ERPNEXT_URL` - The base URL of your ERPNext instance
  23. - `ERPNEXT_API_KEY` (optional) - API key for authentication
  24. - `ERPNEXT_API_SECRET` (optional) - API secret for authentication
  25. ## Development
  26. Install dependencies:
  27. ```bash
  28. npm install
  29. ```
  30. Build the server:
  31. ```bash
  32. npm run build
  33. ```
  34. For development with auto-rebuild:
  35. ```bash
  36. npm run watch
  37. ```
  38. ## Installation
  39. To use with Claude Desktop, add the server config:
  40. On MacOS: `~/Library/Application Support/Claude/claude_desktop_config.json`
  41. On Windows: `%APPDATA%/Claude/claude_desktop_config.json`
  42. ```json
  43. {
  44. "mcpServers": {
  45. "erpnext": {
  46. "command": "node",
  47. "args": ["/path/to/erpnext-server/build/index.js"],
  48. "env": {
  49. "ERPNEXT_URL": "http://your-erpnext-instance.com",
  50. "ERPNEXT_API_KEY": "your-api-key",
  51. "ERPNEXT_API_SECRET": "your-api-secret"
  52. }
  53. }
  54. }
  55. }
  56. ```
  57. To use with Claude in VSCode, add the server config to:
  58. On MacOS: `~/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json`
  59. On Windows: `%APPDATA%/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json`
  60. ### Debugging
  61. Since MCP servers communicate over stdio, debugging can be challenging. We recommend using the [MCP Inspector](https://github.com/modelcontextprotocol/inspector), which is available as a package script:
  62. ```bash
  63. npm run inspector
  64. ```
  65. The Inspector will provide a URL to access debugging tools in your browser.
  66. ## Usage Examples
  67. ### Get Customer List
  68. ```
  69. <use_mcp_tool>
  70. <server_name>erpnext</server_name>
  71. <tool_name>get_documents</tool_name>
  72. <arguments>
  73. {
  74. "doctype": "Customer"
  75. }
  76. </arguments>
  77. </use_mcp_tool>
  78. ```
  79. ### Get Customer Details
  80. ```
  81. <access_mcp_resource>
  82. <server_name>erpnext</server_name>
  83. <uri>erpnext://Customer/CUSTOMER001</uri>
  84. </access_mcp_resource>
  85. ```
  86. ### Create New Item
  87. ```
  88. <use_mcp_tool>
  89. <server_name>erpnext</server_name>
  90. <tool_name>create_document</tool_name>
  91. <arguments>
  92. {
  93. "doctype": "Item",
  94. "data": {
  95. "item_code": "ITEM001",
  96. "item_name": "Test Item",
  97. "item_group": "Products",
  98. "stock_uom": "Nos"
  99. }
  100. }
  101. </arguments>
  102. </use_mcp_tool>
  103. ```
  104. ### Get Item Fields
  105. ```
  106. <use_mcp_tool>
  107. <server_name>erpnext</server_name>
  108. <tool_name>get_doctype_fields</tool_name>
  109. <arguments>
  110. {
  111. "doctype": "Item"
  112. }
  113. </arguments>
  114. </use_mcp_tool>

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.