ERPNext MCP Server

ERPNext MCP Server

erpnext_mcp_server•bymanotluijiu

A bench-level MCP server that gives MCP clients STDIO access to ERPNext sites, documents, metadata, database queries and read-only bench operations.

License: Proprietary - AWS Solution Ltd.•Runtime: Awaiting documentation review•Category: databases storage

WHAT IT DOES

  • •Lists the sites on a bench and switches the active site context for subsequent tool calls.
  • •Provides document CRUD operations, counting and search across DocTypes.
  • •Exposes DocType metadata, table structure and safe SELECT-only SQL execution.
  • •Supports workflow actions to submit or cancel documents.

BEST FOR

  • •Querying and managing ERPNext records from an MCP client such as Claude Code.
  • •Managing multiple ERPNext sites from a single bench-level server instance.

ABOUT ERPNEXT_MCP_SERVER

ERPNext MCP Server is cataloged as an MCP server attributed to manotluijiu. A bench-level MCP server that gives MCP clients STDIO access to ERPNext sites, documents, metadata, database queries and read-only bench operations. It is categorized under databases storage. See the capability inspector for recorded interfaces and their independent review status; consult upstream documentation for the current interface.

HOW TO INSTALL

Installation configuration is not reviewed. No executable setup is offered for this entry; inspect the source repository before proceeding.

LICENSE

Catalog license label: Proprietary - AWS Solution Ltd.. Check the source repository's current license and terms before using, modifying or distributing this software.

能力检查器

能力定义尚未审核。未核验的采集内容不会作为可信接口展示。

Tools (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

Resources (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

Prompts (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

NEWSLETTER - COMING LATER

Newsletter subscriptions are not open yet

Email delivery is not connected. This page does not collect email addresses or create subscriptions.

Browse the registry for current listings instead.

Community Reviews

Coming later

Reviews for ERPNext MCP Server are not available yet

Review publishing and storage are not connected. This page does not collect or publish ratings or comments, including after sign-in.

FREQUENTLY ASKED QUESTIONS

How does the server limit access for safety?

SQL is limited to SELECT queries, file access is restricted to specific paths, and bench commands are read-only.

上游原版 README

在 GitHub 查看同一版本原文

README.md · 5a13bec0b95f · 采集于 2026-11-13 11:14:40 UTC

保留上游原文,不做 AI 改写。为安全起见过滤脚本、表单和不安全链接。

当前显示最后一次成功采集的文档快照,请以来源页面为准。

ERPNext MCP Server

Framework-level MCP Server for Frappe/ERPNext — works like Doppio CLI, not site-specific.

Built by AWS Solution Ltd. | Contact: moocoding@gmail.com

Overview

Unlike typical Frappe apps that install per-site, this MCP server runs at the bench framework level:

  • One server instance serves all sites on the bench
  • Site context switches dynamically via tool calls
  • No installation to each site needed
┌─────────────────────────────────────────────────────┐
│  MCP Client (Claude, Hermes, etc.)                 │
│  (running on another machine)                        │
└────────────────────┬────────────────────────────────┘
                     │ stdio
┌────────────────────▼────────────────────────────────┐
│  ERPNext MCP Server                                 │
│  (this bench)                                       │
│                                                     │
│  • list_sites     → all bench sites               │
│  • switch_site    → change context                 │
│  • get_document   → query current site             │
│  • execute_sql    → safe SELECT queries            │
│  • bench_command  → read-only bench operations     │
│  • ... + 15 more tools                            │
└─────────────────────────────────────────────────────┘

Prerequisites

  • Frappe/ERPNext v15+ installed on a bench
  • Python 3.10+ (uses bench's virtual environment)
  • MCP client (Claude Code, Hermes Agent, etc.)

Quick Start

1. Verify Python Environment

cd ~/frappe-bench
./env/bin/python --version  # Should be Python 3.10+

2. Test Locally

# Set your default site
export FRAPPE_SITE=your-site.domain.com
export BENCH_PATH=/path/to/your/frappe-bench

# Run the server
./env/bin/python -m erpnext_mcp_server.mcp.server

3. Configure MCP Client

For Claude Code

Add to .mcp.json in your project:

{
  "mcpServers": {
    "erpnext": {
      "command": "python",
      "args": ["-m", "erpnext_mcp_server.mcp.server"],
      "env": {
        "FRAPPE_SITE": "your-site.domain.com",
        "BENCH_PATH": "/home/youruser/frappe-bench"
      }
    }
  }
}

For Hermes Agent

In your Hermes configuration:

mcp_servers:
  erpnext:
    command: ssh
    args:
      - user@your-server
      - 'cd /path/to/bench && FRAPPE_SITE=your-site.com ./env/bin/python -m erpnext_mcp_server.mcp.server'

For Other MCP Clients

The server uses STDIO transport (stdin/stdout). Any MCP client that supports stdio will work:

{
  "mcpServers": {
    "erpnext": {
      "command": "/path/to/frappe-bench/env/bin/python",
      "args": ["-m", "erpnext_mcp_server.mcp.server"],
      "env": {
        "FRAPPE_SITE": "your-site.domain.com",
        "BENCH_PATH": "/path/to/frappe-bench"
      }
    }
  }
}

Available Tools

Site Management

ToolArgumentsDescription
list_sites—List all sites on this bench
switch_sitesiteSwitch to a different site
current_site—Get current site name

Document CRUD

ToolArgumentsDescription
get_documentdoctype, nameGet document by ID
list_documentsdoctype, filters?, limit?List documents with filters
create_documentdoctype, dataCreate new document
update_documentdoctype, name, dataUpdate existing document
delete_documentdoctype, nameDelete/cancel document
count_documentsdoctype, filters?Count matching documents

Metadata

ToolArgumentsDescription
list_doctypesmodule?List all DocTypes
get_doctype_metadoctypeGet field definitions

Database

ToolArgumentsDescription
execute_sqlquery, limit?Execute SELECT query (safe)
get_table_infotableGet table structure

System Info

ToolArgumentsDescription
get_system_info—System and DB info
get_versions—Installed app versions
bench_commandcommandRun read-only bench commands

Workflow

ToolArgumentsDescription
submit_documentdoctype, nameSubmit (docstatus 0→1)
cancel_documentdoctype, nameCancel submitted doc
ToolArgumentsDescription
searchquery, doctype?, limit?Search across DocTypes

Files

ToolArgumentsDescription
read_filepath, lines?Read file (safe paths only)
list_filespath, recursive?List directory

Usage Examples

Python Client Test

import subprocess
import json

proc = subprocess.Popen(
    ["./env/bin/python", "-m", "erpnext_mcp_server.mcp.server"],
    stdin=subprocess.PIPE,
    stdout=subprocess.PIPE,
    cwd="/path/to/frappe-bench",
    env={"FRAPPE_SITE": "your-site.domain.com"}
)

# Initialize
init_msg = {
    "jsonrpc": "2.0", "id": 1,
    "method": "initialize",
    "params": {
        "protocolVersion": "2024-11-05",
        "capabilities": {},
        "clientInfo": {"name": "test", "version": "1.0"}
    }
}
proc.stdin.write((json.dumps(init_msg) + "\n").encode())
proc.stdin.flush()

# List sites
list_msg = {
    "jsonrpc": "2.0", "id": 2,
    "method": "tools/call",
    "params": {"name": "list_sites", "arguments": {}}
}
proc.stdin.write((json.dumps(list_msg) + "\n").encode())
proc.stdin.flush()

proc.stdin.close()
print(proc.stdout.read().decode())

Claude Code Usage

Once configured, simply ask Claude:

> List all customers in ERPNext
> Create a new Sales Order for customer ABC
> What is the total outstanding for Invoice INV-001?

Claude will use the MCP tools to query ERPNext directly.

Architecture

erpnext_mcp_server/
├── __init__.py
├── hooks.py
├── mcp/
│   ├── __init__.py
│   ├── __main__.py          # Entry point
│   ├── server.py            # Main MCP server
│   └── config.py            # Configuration
└── doctype/                 # Settings DocTypes (optional)

Design Principles

  1. Framework Level — Runs at bench level, not per-site
  2. Lazy Loading — Frappe imported only when needed
  3. Site Context — Switches context dynamically per tool call
  4. Security First — SQL limited to SELECT, files restricted to safe paths

Security

RestrictionDetails
SQLOnly SELECT queries allowed
FilesOnly sites/, apps/, logs/, config/ paths
Bench commandsRead-only operations only
Site accessEnforced via Frappe permissions

Environment Variables

VariableRequiredDefaultDescription
FRAPPE_SITEYes—Default site name
BENCH_PATHNo/home/frappe/frappe-benchBench directory
FRAPPE_STREAM_LOGGINGNo1Disable file logging

Troubleshooting

"site does not exist" error

# Verify site exists
ls ~/frappe-bench/sites/  | grep your-site

# Check site config
cat ~/frappe-bench/sites/your-site.domain.com/site_config.json

Connection refused

The server uses stdio transport, not HTTP. Ensure your MCP client is connecting via stdin/stdout pipes.

Permission denied

Ensure the user running the server has:

  • Read access to bench directory
  • Database access for the site
  • Permission to execute bench commands

License

Proprietary - AWS Solution Ltd.

Support


Built with Frappe Framework | MCP Protocol | STDIO Transport

Install configuration

Are you the maintainer?

Claim this server with your GitHub account to request manual ownership verification.

README Embed Badge
Markdown

Link to the catalog listing for ERPNext MCP Server from your README. This badge does not certify ownership, compatibility or security.

[![MCP catalog listing](https://img.shields.io/badge/MCP-awesome--mcp-orange?style=flat-square)](https://awesome-mcp.com/servers/erpnext_mcp_server)

REPOSITORY STATS

GitHub StarsUnavailable
ForksUnavailable

Public repository statistics could not be verified. Check the configured source address; unavailable counts are not zero.

下载与拉取统计

来源、范围和时段分别列出;不相加,不代表安装人数、活跃用户或安全审核。

尚无已审核的包 / 镜像标识,暂不展示下载统计。

Related databases storage MCP Servers

Alternative and complementary servers in the same category

View all in databases storage →
AIStor MCP server
mcp-server-aistor•minio

This is a Model Context Protocol (MCP) server for interacting with AIStor object stores.

Repository stats unavailable
Databases & Storage
InfluxDB v2 MCP Server
influxdb-mcp-server•idoru

A Model Context Protocol (MCP) server that exposes access to an InfluxDB v2 instance using the InfluxDB OSS API v2.

Repository stats unavailable
Databases & Storage