Skip to main content
Glama
rakeshgangwar

erpnext-server

ERPNext MCP 服务器

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

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

功能特性

资源

  • 通过 erpnext://{doctype}/{name} URI 访问 ERPNext 文档

  • 用于结构化数据访问的 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 - 调用 ERPNext/Frappe 已加入白名单的服务器端 API 方法

  • run_report - 运行 ERPNext 报表

Related MCP server: ERPNext MCP Server

配置

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

  • ERPNEXT_URL - ERPNext 实例的基础 URL

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

若要与 VSCode 中的 Claude 一起使用,请将服务器配置添加到:

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

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>
Install Server
A
license - permissive license
B
quality
F
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity
Issues opened vs closed

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • F
    license
    B
    quality
    D
    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
  • 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.
    289
    AGPL 3.0
  • A
    license
    Not graded
    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.
    13
    MIT

View all related MCP servers

Related MCP Connectors

  • A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…

  • MCP server for AI dialogue using various LLM models via AceDataCloud

  • A TypeScript MCP server for Home Assistant, enabling programmatic management of entities, automati…

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/rakeshgangwar/erpnext-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server