RE

rakeshgangwar/erpnext-mcp-server

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

127 stars 43 forks 质量 77 趋势 16MIT

rakeshgangwar/erpnext-mcp-server 是从 https://github.com/rakeshgangwar/erpnext-mcp-server. 导入的 MCP 服务器候选

概览

rakeshgangwar/erpnext-mcp-server 是从 https://github.com/rakeshgangwar/erpnext-mcp-server. 导入的 MCP 服务器候选

概述(AI 翻译)

用于ERPNext集成的模型上下文协议服务器

这是一个基于TypeScript的MCP服务器,支持与ERPNext/Frappe API的集成。它使AI助手能够通过模型上下文协议与ERPNext的数据和功能交互。

特色

资源

  • 通过erpnext://{doctype}/{name}URI访问ERPNext文档
  • 结构化数据访问的JSON格式

工具

  • get_doctypes - 获取所有可用文档类型的列表
  • get_doctype_fields - 获取特定文档类型的字段列表
  • get_documents - 获取特定文档类型的文档列表
  • get_document - 按名称获取单一文档,包含所有子表
  • create_document - 在ERPNext创建新文档
  • update_document - 在ERPNext中更新现有文档
  • delete_document - 永久删除文档
  • submit_document - 提交文档(将文档状态设置为1)
  • cancel_document - 取消提交的文档(将文档状态设为2)
  • call_method - 调用ERPNext/Frappe白名单的服务器端API方法
  • run_report - 运行ERPNext报告

配置

服务器需要以下环境变量:

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。

ERPNext MCP Server

A Model Context Protocol server for ERPNext integration

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.

Features

Resources

  • Access ERPNext documents via erpnext://{doctype}/{name} URIs
  • JSON format for structured data access

Tools

  • get_doctypes - Get a list of all available DocTypes
  • get_doctype_fields - Get fields list for a specific DocType
  • get_documents - Get a list of documents for a specific doctype
  • get_document - Get a single document by name, including all child tables
  • create_document - Create a new document in ERPNext
  • update_document - Update an existing document in ERPNext
  • delete_document - Permanently delete a document
  • submit_document - Submit a document (set docstatus to 1)
  • cancel_document - Cancel a submitted document (set docstatus to 2)
  • call_method - Call an ERPNext/Frappe whitelisted server-side API method
  • run_report - Run an ERPNext report

Configuration

The server requires the following environment variables:

  • ERPNEXT_URL - The base URL of your ERPNext instance
  • ERPNEXT_API_KEY (optional) - API key for authentication
  • ERPNEXT_API_SECRET (optional) - API secret for authentication

Development

Install dependencies:

npm install

Build the server:

npm run build

For development with auto-rebuild:

npm run watch

Installation

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, which is available as a package script:

npm run inspector

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

Usage Examples

Get Customer List


erpnext
get_documents

{
  "doctype": "Customer"
}

Get Customer Details


erpnext
erpnext://Customer/CUSTOMER001
在 GitHub 查看完整 README

安装

This server does not publish a one-line install command.

Open the repository installation guide 新手?先看 mcpskill.org 教程 →

配置

{ "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" } } } }