Skip to main content
Glama
erpnext-server

erpnext-server

MCP-сервер для ERPNext

Сервер протокола Model Context Protocol для интеграции с ERPNext

Это MCP-сервер на базе TypeScript, обеспечивающий интеграцию с API ERPNext/Frappe. Он позволяет ИИ-ассистентам взаимодействовать с данными и функциональностью ERPNext через протокол Model Context Protocol.

Возможности

Ресурсы

  • Доступ к документам ERPNext через URI erpnext://{doctype}/{name}

  • Формат JSON для доступа к структурированным данным

Инструменты

  • get_doctypes - Получить список всех доступных DocType

  • get_doctype_fields - Получить список полей для конкретного DocType

  • get_documents - Получить список документов для конкретного doctype

  • get_document - Получить один документ по имени, включая все дочерние таблицы

  • create_document - Создать новый документ в ERPNext

  • update_document - Обновить существующий документ в ERPNext

  • delete_document - Безвозвратно удалить документ

  • submit_document - Отправить документ (установить docstatus в 1)

  • cancel_document - Отменить отправленный документ (установить docstatus в 2)

  • call_method - Вызвать разрешенный (whitelisted) серверный метод API ERPNext/Frappe

  • run_report - Запустить отчет ERPNext

Related MCP server: ERPNext MCP Server

Конфигурация

Сервер требует следующие переменные окружения:

  • ERPNEXT_URL - Базовый URL вашего экземпляра ERPNext

  • ERPNEXT_API_KEY (опционально) - API-ключ для аутентификации

  • ERPNEXT_API_SECRET (опционально) - API-секрет для аутентификации

Разработка

Установите зависимости:

npm install

Соберите сервер:

npm run build

Для разработки с автоматической пересборкой:

npm run watch

Установка

Для использования с Claude Desktop добавьте конфигурацию сервера:

В MacOS: ~/Library/Application Support/Claude/claude_desktop_config.json В 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"
      }
    }
  }
}

Для использования с Claude в VSCode добавьте конфигурацию сервера в:

В MacOS: ~/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json В Windows: %APPDATA%/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json

Отладка

Поскольку MCP-серверы обмениваются данными через stdio, отладка может быть затруднительна. Мы рекомендуем использовать MCP Inspector, который доступен в виде скрипта пакета:

npm run inspector

Инспектор предоставит URL для доступа к инструментам отладки в вашем браузере.

Примеры использования

Получение списка клиентов

<use_mcp_tool>
<server_name>erpnext</server_name>
<tool_name>get_documents</tool_name>
<arguments>
{
  "doctype": "Customer"
}
</arguments>
</use_mcp_tool>

Получение деталей клиента

<access_mcp_resource>
<server_name>erpnext</server_name>
<uri>erpnext://Customer/CUSTOMER001</uri>
</access_mcp_resource>

Создание нового товара

<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>

Получение полей товара

<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 tools
create_documentB

Create a new document in ERPNext

Inputs: doctype (required), data (required).

get_doctype_fieldsB

Get fields list for a specific DocType

Inputs: doctype (required).

get_doctypesA

Get a list of all available DocTypes

Inputs: no named parameters.

get_documentsA

Get a list of documents for a specific doctype

Inputs: doctype (required), fields, filters, limit.

run_reportC

Run an ERPNext report

Inputs: report_name (required), filters.

update_documentC

Update an existing document in ERPNext

Inputs: doctype (required), name (required), data (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.2/5.0

    Scored across 6 tools

    Disambiguation5/5

    Each tool has a clearly distinct purpose with no ambiguity: creating documents, retrieving document lists, updating documents, getting metadata about DocTypes and their fields, and running reports. The descriptions clearly differentiate between document operations, metadata queries, and report execution.

    Naming Consistency5/5

    All tool names follow a consistent verb_noun pattern using snake_case, such as create_document, get_documents, and update_document. This predictability makes it easy for agents to understand and select the appropriate tool based on naming conventions.

    Tool Count5/5

    With 6 tools, this server is well-scoped for ERPNext operations, covering core CRUD actions (create, get, update), metadata retrieval (doctypes and fields), and reporting. Each tool earns its place without being overwhelming or insufficient for the domain.

    Completeness4/5

    The tool set provides strong coverage for document lifecycle (create, get, update) and metadata, with a report execution tool. A minor gap exists in the lack of a delete_document tool, which agents might need to work around, but core workflows are well-supported.

    Maintenance

    ActivityInactive
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      B
      quality
      Not graded
      maintenance
      A demonstration TypeScript MCP server that showcases basic MCP concepts with simple tools (greeting, calculator), text resources, and prompt templates for learning the Model Context Protocol.
      2
      MIT
    • A
      license
      Not graded
      quality
      A
      maintenance
      MCP server that enables LLMs to interact with ERPNext/Frappe sites for document CRUD, search, reports, workflows, and analytics, respecting user permissions and logging all actions.
      337
      AGPL 3.0
    • A
      license
      B
      quality
      B
      maintenance
      Model Context Protocol (MCP) server for ERPNext - manage timesheets, leave applications, projects, and software releases via Claude, Gemini, or any MCP-compatible AI assistant.
      52
      MIT