Логотип MCP Erpnext

MCP Erpnext

Организация
Casys-AI

Let AI agents operate your ERPNext — documents, workflows, and interactive viewers

ИздательCasys-AI
Репозиторийmcp-erpnext
ЯзыкTypeScript
Форки
38
Звёзды
97
Доступные инструменты
0
Тип транспортаstdio
ЛицензияMIT
Ссылки
  • Подключайте инструменты к рабочим процессам с ИИ

    MCP Erpnext предоставляет возможности MCP, доступные совместимым ИИ-клиентам и агентам.

  • Доступные инструменты: 0

    Ниже представлены доступные для вызова действия с названиями и описаниями, если сервер их предоставляет.

  • Готовая конфигурация для копирования

    Используйте примеры конфигурации, чтобы настроить этот сервер в предпочитаемом MCP-клиенте.

  • Показатели интереса к открытому проекту

    Звёзды: 97, форки: 38 — в связанном репозитории.

English | 繁體中文

@casys/mcp-erpnext

JSR npm CI MCP M8ven Score License: MIT

[!IMPORTANT] Installing the 3.1 beta: for npm/Node use npx -y @casys/mcp-erpnext@next; for Deno use deno run -A jsr:@casys/mcp-erpnext@^3.1.0-beta/server. Both follow the current prerelease — JSR has no dist-tags, hence the range there. Exact versions are in the CHANGELOG. The beta adds the generic document viewer and attachment workflows, so test it with the MCP host your users actually run before replacing a stable deployment.

Let any MCP-compatible AI agent operate your ERPNext / Frappe instance — documents, workflows, and interactive viewers inside the host (Claude Desktop, Claude Code, VS Code Copilot, or custom).

Works with self-hosted and ERPNext Cloud (frappe.cloud) instances.

Built on @casys/mcp-server — the MCP server framework (concurrency, auth, MCP Apps, observability) that powers this project.

Screenshots

Interactive viewers rendered inside an MCP host, driven entirely by tool results.

What's New

See the CHANGELOG for the full release history, or the latest release for the current version's highlights.

3.1 beta preview: the beta keeps the 3.0 tool surface and adds a generic document viewer, child tables, document attachments, in-view navigation, and active context. 3.1.0-beta.11 adds reversible context selection, compact Kanban details with distinct Timesheet counts, exact selected-document navigation, five more host languages, and correct generic Company columns. It also retains bounded metadata for unpriced Buy lines and adds offline demo import plans. Features remain capability-gated by the MCP host; Buy evidence does not purchase or qualify a live ERP.

Documentation

Organised by what you are doing, following Diátaxis:

Learning — never used this beforeYour first tool call — from nothing to a working response in four steps
Doing — you have a specific goalSeed a blank ERPNext instance · Run the HTTP server · Set up OAuth · Migrate to 2026-07-28
Looking something upTools · Environment variables · DocType coverage
Understanding whyConcepts — link resolution, transports, MRTR, and which cache does what · ERPNext quirks

Quick Start

Prerequisites

Generate API credentials in ERPNext:

  1. Login to ERPNext → top-right menu → My Settings
  2. Section API Access → Generate Keys
  3. Copy API Key and API Secret

Claude Desktop / Claude Code (npm)

json
{
  "mcpServers": {
    "erpnext": {
      "command": "npx",
      "args": ["-y", "@casys/mcp-erpnext"],
      "env": {
        "ERPNEXT_URL": "http://localhost:8000",
        "ERPNEXT_API_KEY": "your-api-key",
        "ERPNEXT_API_SECRET": "your-api-secret"
      }
    }
  }
}

Works with ERPNext Cloud — set ERPNEXT_URL to your Frappe Cloud URL (e.g. https://mycompany.erpnext.com or https://mysite.frappe.cloud). API key authentication works the same way on self-hosted and cloud instances.

VS Code Copilot

Add to .vscode/mcp.json:

json
{
  "servers": {
    "erpnext": {
      "type": "stdio",
      "command": "npx",
      "args": ["-y", "@casys/mcp-erpnext"],
      "env": {
        "ERPNEXT_URL": "http://localhost:8000",
        "ERPNEXT_API_KEY": "your-api-key",
        "ERPNEXT_API_SECRET": "your-api-secret"
      }
    }
  }
}

Deno (stdio)

json
{
  "mcpServers": {
    "erpnext": {
      "command": "deno",
      "args": ["run", "--allow-all", "server.ts"],
      "env": {
        "ERPNEXT_URL": "http://localhost:8000",
        "ERPNEXT_API_KEY": "your-api-key",
        "ERPNEXT_API_SECRET": "your-api-secret"
      }
    }
  }
}

HTTP mode

For a shared, always-on server rather than one process per client: how to run the HTTP server. Note it is breaking for pre-2026 HTTP clients in 3.0.0.

Category filtering

Load only the categories you need:

bash
npx -y @casys/mcp-erpnext --categories=sales,inventory

Fresh Instance Setup

A blank ERPNext instance has no master data, so business tools fail validation until it exists. See Seed a blank ERPNext instance.

UI Viewers

Nine interactive MCP Apps viewers, registered as ui://mcp-erpnext/{name}:

ViewerDescriptionInteractive Features
doc-viewerGeneric ERPNext document with fields and child tablesCapability-gated attachments, typed navigation, guarded Submit/Cancel, and raw JSON fallback.
doclist-viewerGeneric document table with sort, filter, pagination, CSV exportInline details, typed nested navigation, Submit/Cancel, and compact status filters.
invoice-viewerSales Orders, Sales Invoices, and Quotations with line totalsItem, stock, party, and payment navigation plus guarded Submit/Cancel actions.
stock-viewerStock balance table with color-coded qty badgesItem details, recent movements, stock charts, and stock-entry navigation.
chart-viewerUniversal chart renderer (12 types via Recharts)Exact point/series navigation and active-context selection across simple and composed charts.
kanban-viewerRead-write kanban for Task, Opportunity, IssueDrag-and-drop, inline editing, serialized saves, and typed related-document navigation.
kpi-viewerBig number card with delta, sparkline, trendNumber and trend navigation with bounded active-context selection.
funnel-viewerTrapezoid sales funnel with conversion ratesPeriod-aware stage navigation and bounded active-context selection.
buy-evidence-viewerImmutable sealed Buy evidence (recorded session only)Complete, partial, unresolved, and unavailable projections; no live ERP refresh or mutation.

Navigation and active context

Viewers progressively select the best interaction supported by the host:

  • serverTools opens typed list, record, and chart targets inside the current viewer through app.callServerTool(). Back and breadcrumb navigation restore the state of each level.
  • downloadFile lets the host confirm and save an attachment returned as a bounded embedded resource. The viewer never opens an ERPNext file URL directly.
  • updateModelContext lets chart, KPI, and funnel selections join a bounded active-context snapshot. The compact context chip keeps up to eight items and lets users remove one item or clear them all. The snapshot contains selected values, never hidden instructions for the model.
  • message.text keeps app.sendMessage() as a conversational fallback when direct navigation or context replacement is unavailable.
  • Without these capabilities, local inspection remains available and unsupported remote actions are omitted.
  • The Buy evidence viewer is recorded-session only. It does not call server tools, refresh live documents, or mutate ERP state.

The server supplies typed navigation metadata and the exact _availableTools allowed for each viewer, so category-filtered deployments do not expose tools that are not loaded.

Refresh model

Read-only viewers revalidate on focus and through their refresh control. Mutations use an explicit read-only request to fetch committed state; a mutating tool is never replayed automatically. Overlapping or stale responses are ignored when a newer host payload or mutation has already won. A confirmed document change marks every potentially derived snapshot in the current navigation stack as stale; each marker is removed only when that surface has actually been read again. Separate MCP Apps are not synchronized automatically in the 3.1 beta.

Building UI viewers

bash
cd src/ui
npm ci
node build-all.mjs

Buy evidence capture

One read-only tool and one recorded App. They do not purchase, create a BOM/RFQ/PO, refresh live documents, replace generic ERP viewers, or qualify a live ERPNext instance.

  • Tool: erpnext_buy_capture. Closed DocTypes only (Item, BOM, Item Price, Supplier Quotation, Supplier, Price List, UOM, Currency Exchange). Two skipCache reads must agree on modified and the closed projection fingerprint. Return is ephemeral canonical JSON + SHA-256 + byte count. The caller cannot pass sourceInstance, URL, credentials, capturedAt, or a digest. Digital Thread stores those bytes in its own CAS; this server does not keep a second CAS.
  • App: io.casys.mcp-erpnext.buy-evidence 3.1.0-beta.11, resource ui://mcp-erpnext/buy-evidence-viewer (text/html;profile=mcp-app), manifest ui://mcp-erpnext/buy-evidence-manifest (application/json), acceptedActions = viewer.session.apply only. Complete, partial, unresolved, and unavailable projections stay labelled. No live DocViewer refresh, mutation, or app.callServerTool. Session anchor is the sealed Digital Thread artefact (provenance.bundleRef), not a hash of the displayed projection.
  • Schemas: io.casys.mcp-erpnext.buy-source-capture/1.0, io.casys.mcp-erpnext.buy-recorded-result/1.0 and /2.0, io.casys.mcp-erpnext.buy-recorded-session/1.0.
  • Result /2.0 carries bounded excludedLines metadata for selected lines absent from priced lines: exact line ID, quantity, unit, and stated reason. It carries no amount, currency, or price source; covered subtotals remain sealed values and unresolved lines remain visible.
  • The viewer is built with the other MCP Apps (cd src/ui && npm ci && node build-all.mjs). Published JSR/npm artifacts include src/ui/dist/ and the Buy TypeScript module; the HTML resource and generated manifest are what a published installation serves.

Digital Thread owns configuration/seal (buy-configuration/1.0, buy-cost-bundle/1.0, buy.capture-configuration-cost@1, buy.seal-configuration-cost@1). A qualified commerce.read-erpnext-buy-source@1 binding is required before dispatch.

Tools

Record _list tools return interactive results via the doclist-viewer with row click, inline detail, and cross-viewer navigation. The attachment-specific erpnext_file_list tool does not render doclist-viewer. Generic and dedicated document reads use doc-viewer, except Sales Order, Sales Invoice, and Quotation, which retain the specialized invoice surface.

  • Sales — Customers, Sales Orders, Invoices, and Quotations with full CRUD, Submit, and Cancel.
  • Purchasing — Suppliers, Purchase Orders, Purchase Invoices, Receipts, and Supplier Quotations.
  • Inventory — Items, Stock Balance, Warehouses, and Stock Entries.
  • Accounting — Chart of Accounts, Journal Entries, and Payment Entries.
  • HR — Employees, Attendance, Leave Applications, Salary Slips, Payroll Entries, and Expense Claims.
  • Project — Projects, Tasks (with native assignment), and Timesheets.
  • Delivery — Delivery Notes and Shipments.
  • Manufacturing — BOMs, Work Orders, and Job Cards.
  • CRM — Leads, Opportunities, Contacts, and Campaigns.
  • Assets — Assets, Movements, Maintenance records, and Categories.
  • Operations — Generic CRUD, native assignment, attachment listing, upload, host-mediated download, and deny-by-default Frappe method calls (erpnext_doc_*, erpnext_file_*, erpnext_method_call).
  • Kanban — Read-write boards for Task, Opportunity, and Issue with drag-and-drop.
  • Analytics — Charts (bar, area, treemap, radar, scatter, P&L…), KPIs with sparklines, and a sales funnel.
  • Buy — Read-only sealed capture of closed commercial documents (erpnext_buy_capture) and an immutable recorded-session evidence viewer. Not a purchase, BOM/RFQ/PO, or live ERP qualification.
  • Setup — Company creation and assignable user listing.

Full per-tool reference with parameters: docs/tools.md.

Environment Variables

VariableRequiredDescription
ERPNEXT_URLYesERPNext base URL — self-hosted (e.g. http://localhost:8000) or cloud (e.g. https://mycompany.erpnext.com)
ERPNEXT_API_KEYYesAPI Key from User Settings
ERPNEXT_API_SECRETYesAPI Secret from User Settings
ERPNEXT_MAX_UPLOAD_BYTESNoMaximum decoded file-upload size in bytes (positive integer; default: 10 MiB)
ERPNEXT_MAX_DOWNLOAD_BYTESNoMaximum attachment-download size in bytes (positive integer; default: 10 MiB)
ERPNEXT_METHOD_ALLOWLISTNoComma-separated exact method paths or prefix.*; unset means erpnext_method_call denies every method, while * allows all
MCP_MRTR_SIGNING_KEYNoExactly 64 lowercase hex characters; enables signed ambiguous-link elicitation. Single-instance deployments only — see below

MRTR is opt-in. Without this key, or when the client does not advertise elicitation, ambiguous links keep returning the existing actionable ambiguity error instead of prompting for a selection.

Do not run MRTR behind a load balancer with this configuration. The signing key proves a retry token is authentic; it does not make it single-use. That is the job of a replay store, and the default one is process-local. Share the key across two instances and the same signed retry validates on both — creating the purchase order, leave application or expense claim twice, irreversibly once submitted.

A multi-instance deployment must pass a shared atomic mrtr.replayStore to McpApp (Redis satisfies the contract with SET key 1 NX EXAT). The framework logs a warning at startup whenever MRTR is enabled without one — that warning is not noise, it is this paragraph.

Architecture

Tools are grouped by business domain under src/tools/, the Frappe REST client is dependency-free, and each UI viewer is a separate build under src/ui/. Full layout: repository layout.

npm Package

The npm package (@casys/mcp-erpnext) is a single self-contained bundle with zero runtime dependencies. UI viewers are embedded. Requires Node >= 20.

Contributing

Contributions are welcome — see CONTRIBUTING.md to get started, and AGENTS.md for the full architecture and conventions.

License

MIT

Viewers and Buy result fields use the host locale: English, French, Simplified Chinese, Traditional Chinese, Hindi, Bengali, Tamil and Urdu. Chinese script tags take precedence over region tags; zh-TW, zh-HK and zh-MO select Traditional Chinese when no script is specified. Urdu uses right-to-left document direction, and a later host locale change updates the language and direction without reloading the viewer. App-level waiting and rejection screens retain English labels in this beta; host-context support for those shared surface screens remains an upstream MCP View follow-up.

Используйте MCP MCP Erpnext с разными ИИ-моделями

TypingMind подключает инструменты MCP на уровне рабочего пространства, поэтому после подключения MCP Erpnext вы можете использовать их с разными моделями ИИ в TypingMind, не настраивая подключение отдельно для каждой модели. Эта интеграция MCP работает локально на вашем устройстве через коннектор MCP TypingMind.

Руководство по настройке локального коннектора

Выберите этот способ, если серверу MCP нужен доступ к локальным файлам, приложениям или закрытым ресурсам на вашем компьютере.

1

Откройте настройки MCP

В TypingMind откройте «Настройки», затем «Расширенные настройки», перейдите в раздел «Протокол контекста модели» и выберите «Настроить коннектор».

  1. Откройте TypingMind в браузере.
  2. Нажмите значок настроек.
  3. Перейдите в «Расширенные настройки».
  4. Откройте раздел «Протокол контекста модели».
  5. Нажмите «Настроить коннектор» и выберите «Это устройство».
Экран настройки коннектора MCP в TypingMind с выбранным вариантом «Это устройство»
2

Выполните команду коннектора

Выберите «Это устройство», скопируйте команду из TypingMind и выполните её в терминале. Не останавливайте процесс, пока используете MCP.

  1. Скопируйте команду настройки, показанную в TypingMind.
  2. Откройте «Терминал» в macOS или Windows Terminal в Windows.
  3. Вставьте и выполните команду.
  4. Подтвердите установку пакета, если терминал запросит разрешение продолжить.
  5. Не закрывайте окно терминала и не останавливайте процесс, пока используете инструменты MCP.
3

Добавьте MCP Erpnext как сервер

Когда статус коннектора сменится на «Готов», нажмите «Изменить серверы» и вставьте конфигурацию сервера MCP.

  1. Дождитесь, пока статус коннектора сменится на «Готов».
  2. Нажмите «Изменить серверы».
  3. Вставьте конфигурацию сервера MCP для MCP Erpnext.
  4. Сохраните список серверов.
  5. Обновите статус, если хотите убедиться, что коннектор по-прежнему готов к работе.
Настройки MCP в TypingMind с активным сервером и кнопкой «Изменить серверы»
{
  "mcpServers": {
    "mcp-erpnext": {
      "command": "npx",
      "args": [
        "-y",
        "<mcp-server-package>"
      ]
    }
  }
}
4

Используйте подключение с разными моделями

Сохраните список серверов, откройте раздел «Плагины», включите инструменты MCP для MCP Erpnext, затем выберите любую поддерживаемую модель ИИ в TypingMind и используйте инструменты в чате или назначьте их ИИ-агенту.

  1. Откройте страницу «Плагины» в TypingMind.
  2. Включите инструменты MCP для MCP Erpnext.
  3. Начните чат и выберите модель ИИ, которую хотите использовать.
  4. Используйте инструменты MCP в чате или назначьте их ИИ-агенту.
  5. При необходимости переключайтесь на другую модель ИИ без повторного подключения MCP.
Чат TypingMind с включёнными инструментами MCP и выбранной ИИ-моделью
Можете помочь мне с этой задачей с помощью MCP Erpnext?
MCP Erpnext
Конечно. Я всё прочитал.
Вот что я нашёл с помощью MCP Erpnext.

Часто задаваемые вопросы

Для чего используется сервер MCP MCP Erpnext?

MCP Erpnext — это сервер MCP, который позволяет совместимым ИИ-клиентам подключаться к внешним инструментам и получать контекст. В TypingMind достаточно один раз добавить этот сервер MCP, чтобы его инструменты стали доступны в вашем рабочем пространстве с ИИ.

Можно ли использовать сервер MCP MCP Erpnext с несколькими ИИ-моделями в TypingMind?

Да. TypingMind подключает инструменты MCP на уровне рабочего пространства, поэтому вы можете использовать MCP Erpnext с разными ИИ-моделями, например Claude, ChatGPT, Gemini или другими моделями, настроенными в TypingMind, без отдельной настройки сервера MCP для каждой модели.

Зачем использовать MCP MCP Erpnext с TypingMind?

TypingMind — один из лучших интерфейсов для чата с LLM: он объединяет разные ИИ-модели, промпты, плагины, ИИ-агентов, ключи API и инструменты MCP в одном рабочем пространстве. Подключив MCP Erpnext, вы сможете использовать его инструменты MCP с предпочитаемыми моделями, сохраняя удобную организацию работы с чатами в TypingMind.

Как подключить сервер MCP MCP Erpnext к TypingMind?

MCP Erpnext работает через локальный коннектор MCP TypingMind. Этот вариант лучше всего подходит, когда серверу MCP нужен доступ к локальным файлам, настольным приложениям, инструментам командной строки или закрытым ресурсам на вашем компьютере.

Какие инструменты предоставляет сервер MCP MCP Erpnext в TypingMind?

MCP Erpnext предоставляет возможности MCP, которые можно включить на странице «Плагины» в TypingMind и использовать в чате или назначить ИИ-агентам.

Нужно ли передавать TypingMind свои ключи API для использования сервера MCP MCP Erpnext?

Нет. TypingMind ориентирован прежде всего на локальную работу и позволяет вам контролировать выбор провайдеров моделей, ключи API, промпты и конфигурацию MCP. Если MCP Erpnext требует аутентификации, при создании подключения добавьте необходимые заголовки, настройки OAuth или локальную конфигурацию для этого сервера MCP.

Похожие серверы MCP

Все

Создайте свою рабочую ИИ-среду сейчас

Подпишитесь на нашу рассылку, чтобы узнавать о новых функциях и предстоящих розыгрышах 👇