MF

mascor/frappe-mcp-server

Developer tools

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る

4 stars 5 forks 品質 62 トレンド 20MIT

A secure MCP (Model Context Protocol) server for Frappe/ERPNext. Expose your Frappe data to AI agents like Claude with granular permissions and audit logging.

概要

A secure, audit-logged server for Frappe. This app allows you to expose specific DocTypes and operations to MCP clients (like AI agents) with strict granular permissions, ensuring secure and controlled access to your Frappe data. - : dedicated MCP User access via Token or API Key. - : Explicitly allow specific DocTypes and operations (Create, Read, Update, Delete). - : Restrict which fields can be read or written. - : Every request is logged with latency, status, and payload summaries. - : All filters and inputs are validated against the allowlist. You can use the included setup script to quickly configure the server with a default user and token: This will: - Create a user [email protected] (if not exists). - Generate a secure X-MCP-Token and save it in . - Enable the MCP Server. Alternatively, go to in Desk and configure manually. By default, . You must explicitly allow DocTypes. 1. Go to . 2. Create a new record for the DocType you want to expose (e.g., ToDo). 3.

README

以下は原文 README の抜粋です。原文を見る。

MCP Server for Frappe

A secure, audit-logged Model Context Protocol (MCP) server for Frappe. This app allows you to expose specific DocTypes and operations to MCP clients (like AI agents) with strict granular permissions, ensuring secure and controlled access to your Frappe data.

Features

  • Secure Authentication: dedicated MCP User access via Token or API Key.
  • Granular Allowlist: Explicitly allow specific DocTypes and operations (Create, Read, Update, Delete).
  • Field-Level Control: Restrict which fields can be read or written.
  • Audit Logging: Every request is logged with latency, status, and payload summaries.
  • Strict Validation: All filters and inputs are validated against the allowlist.

Installation

  1. Get the app:

    bench get-app https://github.com/mascor/frappe-mcp-server
    
  2. Install on your site:

    bench --site  install-app mcp_server
    

Configuration

1. Setup MCP User & Settings

You can use the included setup script to quickly configure the server with a default user and token:

bench --site  execute mcp_server.setup.setup_mcp

This will:

  • Create a user [email protected] (if not exists).
  • Generate a secure X-MCP-Token and save it in MCP Server Settings.
  • Enable the MCP Server.

Alternatively, go to MCP Server Settings in Desk and configure manually.

2. Configure Allowlist

By default, no access is allowed. You must explicitly allow DocTypes.

  1. Go to MCP Doctype Allowlist.
  2. Create a new record for the DocType you want to expose (e.g., ToDo).
  3. Check the operations you want to allow (Allow Read, Allow Create, etc.).
  4. (Optional) restricting fields and filters in the child tables for tighter security.

Usage

The server exposes standard MCP tools via the API.

Authentication

The server supports API Key authentication (recommended for MCP clients).

Include the Authorization header in all requests.

Tools

mcp_ping

Health check and version info.

curl -X POST https:///api/method/mcp_server.api.ping \
     -H "Authorization: token :"

search_docs

Search for documents with filters.

{
    "doctype": "ToDo",
GitHub で README 全文を見る

インストール

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

Open the repository installation guide MCP 初心者?mcpskill.org のガイドから始めましょう →