Skip to main content
Glama
rakeshgangwar

erpnext-server

ERPNext MCP 서버

ERPNext 통합을 위한 Model Context Protocol 서버

이 서버는 ERPNext/Frappe API와의 통합을 제공하는 TypeScript 기반 MCP 서버입니다. AI 어시스턴트가 Model Context Protocol을 통해 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>

Available Tools

6 tools
create_documentB

Create a new document in ERPNext

ParametersJSON Schema
NameRequiredDescriptionDefault
doctypeYesERPNext DocType (e.g., Customer, Item)
dataYesDocument data

TDQS

B3.1/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It only states that a new document is created; it does not disclose side effects, permissions needed, error behavior, or whether the created document is returned. This is a significant gap for a mutation tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single sentence with no wasted words. It is front-loaded with the verb and resource, making it easy to scan. However, it is somewhat under-specified, so it loses a point for completeness even though the conciseness itself is good.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no output schema and a nested object parameter, the description leaves important context unexplained. It does not mention what the 'data' object should contain, which doctypes are supported, or what the response looks like. This is inadequate for a tool that creates resources.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema already provides 100% coverage for both parameters (doctype and data) with descriptions. The tool description adds no extra parameter meaning, so the baseline 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Create') and resource ('a new document in ERPNext'), which distinguishes it from sibling tools like update_document and get_documents. It is specific enough to convey the core purpose, though it could add a bit more scope detail such as requiring a doctype.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage for creating new documents but gives no explicit guidance on when to choose this over alternatives, nor any exclusions. There is no mention of scenarios where update_document might be more appropriate or of prerequisites for creation.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_doctype_fieldsB

Get fields list for a specific DocType

ParametersJSON Schema
NameRequiredDescriptionDefault
doctypeYesERPNext DocType (e.g., Customer, Item)

TDQS

B3.3/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden of behavioral disclosure. It only states the raw action without mentioning whether the operation is read-only, what the response contains, or any authentication/error behavior. This is a minimal disclosure with no behavioral context beyond the action itself.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single concise sentence that front-loads the verb and object. Every word earns its place, and there is no redundancy or filler. It is appropriately sized for the tool's simplicity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple one-parameter tool, the description is adequate but has gaps. It does not specify what the returned fields list includes (e.g., field names, types, required flags) or explain error handling for invalid doctypes. With no output schema, the description could benefit from a brief note on return structure, but the core purpose is clear.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100% (the 'doctype' parameter has a clear description). The description does not add any additional parameter meaning beyond the schema, but it also doesn't need to since the schema fully explains the parameter. Baseline of 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb+resource construction: 'Get fields list for a specific DocType'. This clearly distinguishes it from sibling tools like get_doctypes (which lists doctypes) and get_documents (which retrieves document data). The scope is well-defined.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description offers no guidance on when to use this tool versus alternatives. It implicitly implies use when needing fields of a specific doctype, but does not state any exclusions or mention sibling tools. No explicit context or prerequisites are provided.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_doctypesA

Get a list of all available DocTypes

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A3.8/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description must carry the behavioral burden. It clearly indicates a read operation ('Get') with no side effects, but it does not disclose potential nuances like authentication requirements, whether custom DocTypes are included, or the exact return structure. This is adequate for a simple list operation but leaves room for ambiguity.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, front-loaded sentence with no filler. It communicates the essential purpose efficiently.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's low complexity (no parameters, no output schema), the description is mostly complete. However, it does not specify the return format (e.g., array of names vs. objects) or any sorting/ordering, which could be ambiguous for an agent. Still, it is sufficient for a basic listing tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has zero parameters, so there is no need for parameter descriptions. The baseline of 4 applies as the description does not need to compensate for schema gaps.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb ('Get a list') and clearly identifies the resource ('all available DocTypes'). It is distinct from sibling tools like get_doctype_fields or get_documents, which operate on different entities.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives. It does not mention, for example, using get_doctype_fields to explore fields of a specific DocType, or that this is a precursor to fetching documents. The usage context is implied but not explicit.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_documentsA

Get a list of documents for a specific doctype

ParametersJSON Schema
NameRequiredDescriptionDefault
doctypeYesERPNext DocType (e.g., Customer, Item)
fieldsNoFields to include (optional)
filtersNoFilters in the format {field: value} (optional)
limitNoMaximum number of documents to return (optional)

TDQS

A3.6/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden for behavioral disclosure. It only states a basic listing operation and does not mention read-only nature, pagination, sorting, return format, or any side effects. The agent cannot predict behavior beyond the name.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, front-loaded sentence that is efficient and free of unnecessary words. It communicates the core purpose without redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool has 4 parameters, a nested filters object, no output schema, and no annotations, the description is too sparse. It does not explain list behavior, filtering interplay, pagination, or return structure, leaving the agent under-informed for a tool of this complexity.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema itself documents all parameters adequately. The description adds no extra meaning beyond the schema (e.g., 'for a specific doctype' merely restates the doctype parameter). Baseline 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb ('Get') and resource ('a list of documents') with a clear qualifier ('for a specific doctype'). This directly contrasts with sibling tools like get_doctypes and get_doctype_fields, making the tool's purpose unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The phrase 'for a specific doctype' implies usage context and helps distinguish from sibling tools, but there is no explicit when-to-use or when-not-to-use guidance. It is clear enough for an agent to select this tool over alternatives, but lacks explicit exclusions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

run_reportC

Run an ERPNext report

ParametersJSON Schema
NameRequiredDescriptionDefault
report_nameYesName of the report
filtersNoReport filters (optional)

TDQS

C2.7/5.0
Behavior1/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full responsibility for behavioral disclosure. It only says 'Run an ERPNext report,' offering no information about side effects, read-only nature, required permissions, or output characteristics. The lack of any behavioral context makes it nearly useless for understanding tool behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, front-loaded sentence with no wasted words. It is efficient, though arguably under-specified. Given the minimal detail required for a two-parameter tool, this level of conciseness is acceptable, but it could be expanded slightly without losing clarity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The tool has no output schema and no annotations, and the description is too brief to convey essential context such as what the report returns, how filters are used, or any constraints. The parameter schema covers the 'what' but not the 'how' or expected behavior, making the description insufficient for an agent to use it correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has descriptions for both parameters ('Report filters (optional)' and 'Name of the report'), achieving 100% coverage. The description itself adds no additional parameter information, so it neither helps nor hurts. The baseline of 3 is appropriate since the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb 'Run' and a resource 'ERPNext report', which distinguishes it from sibling tools that deal with doctypes and documents. However, it lacks detail on what 'run' entails (e.g., returning data), making it clear but slightly under-specified.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no guidance on when to use this tool versus alternatives. The sibling tools are about document operations, so it is implied this is for reports, but no explicit context, prerequisites, or exclusions are provided. The description simply states what it does, not when to use it.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

update_documentC

Update an existing document in ERPNext

ParametersJSON Schema
NameRequiredDescriptionDefault
doctypeYesERPNext DocType (e.g., Customer, Item)
nameYesDocument name/ID
dataYesDocument data to update

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden. It implies mutation but does not disclose whether updates are partial or full replacements, idempotency, error behavior, or required permissions. This is a significant gap for a write operation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, concise sentence that front-loads the verb and resource. It is appropriately short but could be easily expanded with key details without losing brevity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool has three required parameters, a nested data object, and no output schema, the description is too sparse. It does not explain return values, partial update behavior, or how the data object should be structured beyond the schema. The description is inadequate for a mutation tool without annotations.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 100% coverage, with clear descriptions for each parameter (doctype, name, data). The description adds no additional parameter-level meaning, so the baseline of 3 is appropriate since the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states the specific verb 'Update' and resource 'existing document in ERPNext,' which clearly distinguishes it from sibling tools like create_document or get_documents. However, it lacks detail on what kind of document or which fields can be updated, but it is not misleading.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is given on when to use this tool versus alternatives. It does not explain prerequisites, differences from create_document, or any exclusions. The description simply states the operation without context.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

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

  1. 6 tool updatesv0.1.0
    • First observedcreate_document
    • First observedget_doctype_fields
    • First observedget_doctypes
    • First observedget_documents
    • First observedrun_report
    • First observedupdate_document

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
ResponsivenessUnresponsive

Related MCP Connectors

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.
    319
    AGPL 3.0
  • A
    license
    Not graded
    quality
    C
    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.
    8 npm
    MIT