KH

kiran-harbak/frappe_mcp_server

Developer tools

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

2 stars 35 forks 品質 53 トレンド 8

A server that implements the Anthropic Model Control Protocol (MCP) server for accessing Frappe.

概要

A Model Context Protocol (MCP) server for Frappe Framework that exposes Frappe's functionality to AI assistants through the official REST API, with a focus on document CRUD operations, schema handling, and detailed API instructions. This MCP server allows AI assistants to interact with Frappe applications through a standardized interface using the official Frappe REST API. It provides tools for: - Document operations (create, read, update, delete, list) - Schema and metadata handling - DocType discovery and exploration - Detailed API usage instructions and examples The server includes comprehensive error handling, validation, and helpful responses to make it easier for AI assistants to work with Frappe. - Node.

README

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

Frappe MCP Server

A Model Context Protocol (MCP) server for Frappe Framework that exposes Frappe’s functionality to AI assistants through the official REST API, with a focus on document CRUD operations, schema handling, and detailed API instructions.

Overview

This MCP server allows AI assistants to interact with Frappe applications through a standardized interface using the official Frappe REST API. It provides tools for:

  • Document operations (create, read, update, delete, list)
  • Schema and metadata handling
  • DocType discovery and exploration
  • Detailed API usage instructions and examples

The server includes comprehensive error handling, validation, and helpful responses to make it easier for AI assistants to work with Frappe.

Installation

Prerequisites

  • Node.js 18 or higher
  • A running Frappe instance (version 15 or higher)
  • API key and secret from Frappe (optional but recommended)

Setup

  1. Install via npm:
npm install -g frappe-mcp-server

Alternatively, run directly with npx:

npx frappe-mcp-server

(no installation needed)

Configuration

The server can be configured using environment variables:

  • FRAPPE_URL: The URL of your Frappe instance (default: http://localhost:8000)
  • FRAPPE_API_KEY: Your Frappe API key
  • FRAPPE_API_SECRET: Your Frappe API secret

Getting API Credentials

To get API credentials from your Frappe instance:

  1. Go to User > API Access > New API Key
  2. Select the user for whom you want to create the key
  3. Click “Generate Keys”
  4. Copy the API Key and API Secret

Usage

Starting the Server

npx frappe-mcp-server

Or with environment variables:

FRAPPE_URL=https://your-frappe-instance.com FRAPPE_API_KEY=your_api_key FRAPPE_API_SECRET=your_api_secret npx frappe-mcp-server

Integrating with AI Assistants

To use this MCP server with an AI assistant, you need to configure the assistant to connect to this server. The exact configuration depends on the AI assistant platform you’re using.

For Claude, add the following to your MCP settings configuration file:

{
  "mcpServers": {
    "frappe": {
      "command": "npx",
      "args": ["frappe-mcp-server"], // Assumes frappe-mcp-server is in MCP server path
      "env": {
        "FRAPPE_URL": "https://your-frappe-instance.com",
        "FRAPPE_API_KEY": "your_api_key",
        "FRAPPE_API_SECRET": "your_api_secret"
      },
      "disabled": false,
      "alwaysAllow": []
    }
  }
}

Available Tools

Document Operations

  • create_document: Create a new document in Frappe
  • get_document: Retrieve a document from Frappe
  • update_document: Update an existing document in Frappe
  • delete_document: Delete a document from Frappe
  • list_documents: List documents from Frappe with filters

Schema Operations

  • get_doctype_schema: Get the complete schema for a DocType including field definitions, validations, and linked DocTypes
GitHub で README 全文を見る

インストール

npx frappe-mcp-server
MCP 初心者?mcpskill.org のガイドから始めましょう →

設定

{ "mcpServers": { "frappe": { "command": "npx", "args": ["frappe-mcp-server"], // Assumes frappe-mcp-server is in MCP server path "env": { "FRAPPE_URL": "https://your-frappe-instance.com", "FRAPPE_API_KEY": "your_api_key", "FRAPPE_API_SECRET": "your_api_secret" }, "disabled": false, "alwaysAllow": [] } } }