erpnext
Connect AI assistants to your ERPNext instance via the Model Context Protocol (MCP) using the official Frappe API.
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:
- Install dependencies for the MCP server
npm install
- Build the server (TypeScript project)
npm run build
- (Optional) Enable development auto-rebuild on file changes
npm run watch
- Run the server locally (example)
node /path/to/erpnext-server/build/index.js
- 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.
- 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
bitbucket
Bitbucket MCP - A Model Context Protocol (MCP) server for integrating with Bitbucket Cloud and Server APIs
ironcurtain
A secure* runtime for autonomous AI agents. Policy from plain-English constitutions. (*https://ironcurtain.dev)
mcp-batchit
🚀 MCP aggregator for batching multiple tool calls into a single request. Reduces overhead, saves tokens, and simplifies complex operations in AI agent workflows.
crawl4ai
🕷️ A lightweight Model Context Protocol (MCP) server that exposes Crawl4AI web scraping and crawling capabilities as tools for AI agents. Similar to Firecrawl's API but self-hosted and free. Perfect for integrating web scraping into your AI workflows with OpenAI Agents SDK, Cursor, Claude Code, and other MCP-compatible tools.
crawlbase
Crawlbase MCP Server connects AI agents and LLMs with real-time web data. It powers Claude, Cursor, and Windsurf integrations with battle-tested web scraping, JavaScript rendering, and anti-bot protection enabling structured, live data inside your AI workflows.
dockashell
DockaShell is an MCP server that gives AI agents isolated Docker containers to work in. MCP tools for shell access, file operations, and full audit trail.