Frappe MCP Server A8fbb839

MCP安全风控

提供方 mascor

安全风控 未标注 Token 社区 / 第三方 Claude DesktopClaudeCursor

一个安全的、具有审计日志功能的模型上下文协议(MCP)服务器,用于Frappe,通过严格的权限控制实现对Frappe数据的安全访问。

一句话选型结论

按资料字段整理

Frappe MCP Server A8fbb839 属于安全风控类 MCP 服务器,传输方式未标注,Token,可直接接入 Claude Desktop、Claude、Cursor,没有现成安装命令,需按官方文档接入。接入前先确认权限范围;涉及写入、删除或付款的操作,建议先在测试环境验证。

分类安全风控 传输方式未标注 鉴权Token 部署方式未标注
GitHub 星标 2 仓库热度,无公开仓库时显示未标注
工具数 7 暴露给模型的工具数量
资源 / 提示词 0 / 0 资源与提示词模板数量
维护方 社区 / 第三方 核验等级 仅资料核对

工具与能力

安全风控
数量来自来源目录的标注,具体工具清单以官方文档为准
工具数量7暴露给模型可调用的工具个数
资源数量0可读取的资源条目
提示词数量0内置提示词模板数量

能力标签

支持客户端

适用场景

安全访问Python本地部署数据管理API控制审计日志Frappe集成

安装与配置

未标注 Token
上游未给出传输方式
  1. 1
    准备运行环境

    按官方文档确认运行环境(常见为 Node.js 或 Python),装好后再执行安装命令。

  2. 2
    安装服务

    复制上面的安装命令执行;命令里带占位符的位置,换成自己的密钥或路径。

  3. 3
    写入客户端配置

    在客户端的 MCP 配置里填好启动命令和参数,保存后完全退出客户端再打开,让新配置生效。

  4. 4
    验证是否可用

    连接成功后客户端会列出约 7 个工具,随便调一个只读工具确认能返回结果。

典型使用场景

3 类
按分类与标签整理的常见用法,具体以官方文档为准
资产与漏洞排查

盘点资产、扫漏洞、看暴露面。

日志与审计

汇总日志、查异常行为。

合规检查

按规则检查配置与权限是否合规。

选择建议

选之前先看这几条
按条目字段给出的判断,不替你决定用不用

值得选的地方

  • 资料标注 7 个工具,职责相对集中,接入后不容易误操作。
  • 已适配 Claude Desktop、Claude、Cursor,换客户端不用重新研究配置。

先想清楚的地方

  • 没有现成安装命令,需要按官方文档自己填启动命令和参数。
  • 使用前要准备好Token对应的凭据,并按最小权限配置。
  • 版本更新与行为细节以官方仓库为准。

更适合

  • 需要在安全风控场景里让模型直接调用外部能力的人。
  • 已经在用 Claude Desktop、Claude 的用户,接入路径最短。
  • 想先快速试一下、能接受在本地或自有环境跑服务的人。

不太适合

  • 不方便管理密钥或第三方授权的人。
  • 需要厂商级 SLA 和技术支持的生产环境。

同类对比

6 个同类
同分类里挑最接近的几条,字段以各自详情页为准
MCP 服务器工具数传输方式部署方式安装命令最后核验
Frappe MCP Server A8fbb839当前 7 未标注 未标注 无 2026-05-17
Cyber Strike AI 75 未标注 未标注 无 2026-05-17
mcp-for-beginners 未标注 stdio · 本地进程 本地部署 有 2026-04-13
casdoor 未标注 stdio · 本地进程 本地部署 有 2026-04-12
kubeshark 未标注 stdio · 本地进程 本地部署 有 2026-04-11
Modelcontextprotocol C22988b0 未标注 stdio · 本地进程 本地部署 有 2026-05-17

服务器档案

安全风控
字段来自项目仓库与公开索引,中文说明由本站标注
提供方mascor上游标注的维护方 mascor
分类安全风控本站按上游分类展示
连接方式未标注上游未给出传输方式
鉴权方式Token远程服务建议用最小权限凭据
维护方社区 / 第三方核验等级 仅资料核对
包名 / 运行时未标注 · 未标注本地安装时用到的包标识与运行时
部署类型未标注上游给出的部署形态
最近核验2026-05-17上游最后核验时间

详细介绍

16.6 KB
来自项目仓库与上游目录的原文,未做删改

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:bash bench get-app https://github.com/mascor/frappe-mcp-server

  2. Install on your site:bash bench --site <your-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:```bash
bench --site <your-site> execute mcp_server.setup.setup_mcp

This will:
- Create a user `mcp@example.com` (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.```bash
curl -X POST https://&lt;yoursite&gt;/api/method/mcp_server.api.ping \
     -H &quot;Authorization: token &lt;api_key&gt;:&lt;api_secret&gt;&quot;

search_docs

Search for documents with filters.```json
{
"doctype": "ToDo",
"filters": {"status": "Open"}
}


#### `create_doc`
Create a new document.```json
{
    &quot;doctype&quot;: &quot;ToDo&quot;,
    &quot;data&quot;: {
        &quot;description&quot;: &quot;New Task from MCP&quot;
    }
}

update_doc

Update an existing document.```json
{
"doctype": "ToDo",
"name": "TODO-0001",
"data": {
"status": "Closed"
}
}


## Audit Log
Check **MCP Audit Log** in Desk to see a history of all requests, including success/failure status, latency, and diffs.

## License
MIT

## Quick Connect: MCP Client

To connect to this server from an AI Client (like Claude Desktop or Cursor), use the official Python Client:

**frappe-mcp-client**

Follow the installation and setup instructions in the client repository to get started.

# Frappe MCP Server - Test Report

## Available Commands

| Command | Description | Parameters |
|---------|-------------|------------|
| `ping` | Check server connection | None |
| `search_docs` | Search documents | `doctype` (required), `filters` (optional), `fields` (optional) |
| `get_doc` | Get a specific document | `doctype` (required), `name` (required) |
| `create_doc` | Create a new document | `doctype` (required), `data` (required) |
| `update_doc` | Update an existing document | `doctype` (required), `name` (required), `data` (required) |
| `get_meta` | Get DocType metadata | `doctype` (required) |
| `delete_doc` | Delete a document | `doctype` (required), `name` (required) |

---

## Test Results Summary

### Section A: Standard DocType Operations

| Test | DocType | Operation | Status |
|------|---------|-----------|--------|
| A1 | Note | create_doc | ✅ PASS |
| A2 | Note | get_doc | ✅ PASS |
| A3 | Note | update_doc | ✅ PASS |
| A4 | Note | search_docs | ✅ PASS |
| A5 | Note | delete_doc | ✅ PASS |
| A6 | Event | create_doc | ✅ PASS |
| A7 | Event | get_meta | ✅ PASS |
| A8 | Event | delete_doc | ✅ PASS |

### Section B: Filters and Fields

| Test | Description | Status |
|------|-------------|--------|
| B1 | search_docs with filters | ✅ PASS |
| B2 | search_docs with fields | ✅ PASS |
| B3 | search_docs with filters + fields | ✅ PASS |

### Section C: Edge Cases / Error Handling

| Test | Description | Expected | Status |
|------|-------------|----------|--------|
| C1 | get_doc non-existent document | 404 Not Found | ✅ PASS |
| C2 | create_doc missing required field | 417 Expectation Failed | ✅ PASS |
| C3 | update_doc non-existent document | 404 Not Found | ✅ PASS |
| C4 | delete_doc non-existent document | 404 Not Found | ✅ PASS |
| C5 | get_meta non-existent DocType | 403 Forbidden | ✅ PASS |

### Section D: Permissions

| Test | Description | Status |
|------|-------------|--------|
| D1 | search_docs on allowed DocType (User) | ✅ PASS |
| D2 | get_meta on non-allowed DocType (Role) | ✅ PASS (403) |

---

## 🎉 Final Result: 18/18 Tests Passed

---

## Test Examples

### 1. ping
Check server connection status.

**Response:**```json
{
  &quot;status&quot;: &quot;ok&quot;,
  &quot;site&quot;: &quot;your-site.example.com&quot;,
  &quot;user&quot;: &quot;mcp_user@example.com&quot;
}

2. get_meta

Get the structure of a DocType.

Request:```
doctype: "ToDo"


**Response:**```json
{
  &quot;doctype&quot;: &quot;ToDo&quot;,
  &quot;fields&quot;: [
    {
      &quot;fieldname&quot;: &quot;status&quot;,
      &quot;label&quot;: &quot;Status&quot;,
      &quot;fieldtype&quot;: &quot;Select&quot;,
      &quot;options&quot;: &quot;Open\\nClosed\\nCancelled&quot;,
      &quot;reqd&quot;: 0,
      &quot;default&quot;: &quot;Open&quot;
    },
    {
      &quot;fieldname&quot;: &quot;priority&quot;,
      &quot;label&quot;: &quot;Priority&quot;,
      &quot;fieldtype&quot;: &quot;Select&quot;,
      &quot;options&quot;: &quot;High\\nMedium\\nLow&quot;,
      &quot;reqd&quot;: 0,
      &quot;default&quot;: &quot;Medium&quot;
    },
    {
      &quot;fieldname&quot;: &quot;date&quot;,
      &quot;label&quot;: &quot;Due Date&quot;,
      &quot;fieldtype&quot;: &quot;Date&quot;,
      &quot;reqd&quot;: 0,
      &quot;default&quot;: &quot;Today&quot;
    },
    {
      &quot;fieldname&quot;: &quot;description&quot;,
      &quot;label&quot;: &quot;Description&quot;,
      &quot;fieldtype&quot;: &quot;Text Editor&quot;,
      &quot;reqd&quot;: 1
    }
  ],
  &quot;issingle&quot;: 0,
  &quot;istable&quot;: 0
}

3. create_doc

Create a new document.

Request:```
doctype: "ToDo"
data: {
"status": "Open",
"priority": "High",
"description": "Test task created via MCP"
}


**Response:**```json
{
  &quot;name&quot;: &quot;abc123xyz&quot;,
  &quot;owner&quot;: &quot;mcp_user@example.com&quot;,
  &quot;creation&quot;: &quot;2026-01-21 10:18:41.295624&quot;,
  &quot;modified&quot;: &quot;2026-01-21 10:18:41.295624&quot;,
  &quot;modified_by&quot;: &quot;mcp_user@example.com&quot;,
  &quot;docstatus&quot;: 0,
  &quot;status&quot;: &quot;Open&quot;,
  &quot;priority&quot;: &quot;High&quot;,
  &quot;date&quot;: &quot;2026-01-21&quot;,
  &quot;description&quot;: &quot;Test task created via MCP&quot;,
  &quot;doctype&quot;: &quot;ToDo&quot;
}

4. search_docs

Search for documents with optional filters and fields.

Request (basic):```
doctype: "ToDo"


**Response:**```json
[
  {&quot;name&quot;: &quot;todo001&quot;},
  {&quot;name&quot;: &quot;todo002&quot;},
  {&quot;name&quot;: &quot;todo003&quot;}
]

Request (with filters and fields):```
doctype: "ToDo"
filters: {"status": "Open"}
fields: ["name", "status", "priority", "description"]


**Response:**```json
[
  {
    &quot;name&quot;: &quot;todo001&quot;,
    &quot;status&quot;: &quot;Open&quot;,
    &quot;priority&quot;: &quot;Medium&quot;,
    &quot;description&quot;: &quot;Test task 1&quot;
  },
  {
    &quot;name&quot;: &quot;todo002&quot;,
    &quot;status&quot;: &quot;Open&quot;,
    &quot;priority&quot;: &quot;High&quot;,
    &quot;description&quot;: &quot;Test task 2&quot;
  }
]

5. get_doc

Get a specific document by name.

Request:```
doctype: "ToDo"
name: "abc123xyz"


**Response:**```json
{
  &quot;name&quot;: &quot;abc123xyz&quot;,
  &quot;owner&quot;: &quot;mcp_user@example.com&quot;,
  &quot;status&quot;: &quot;Open&quot;,
  &quot;priority&quot;: &quot;High&quot;,
  &quot;date&quot;: &quot;2026-01-21&quot;,
  &quot;description&quot;: &quot;Test task created via MCP&quot;,
  &quot;creation&quot;: &quot;2026-01-21 10:18:41.295624&quot;,
  &quot;modified&quot;: &quot;2026-01-21 10:18:41.295624&quot;,
  &quot;modified_by&quot;: &quot;mcp_user@example.com&quot;,
  &quot;docstatus&quot;: 0
}

6. update_doc

Update an existing document.

Request:```
doctype: "ToDo"
name: "abc123xyz"
data: {
"status": "Closed",
"priority": "Low"
}


**Response:**```json
{
  &quot;name&quot;: &quot;abc123xyz&quot;,
  &quot;owner&quot;: &quot;mcp_user@example.com&quot;,
  &quot;creation&quot;: &quot;2026-01-21 10:18:41.295624&quot;,
  &quot;modified&quot;: &quot;2026-01-21 10:18:59.096886&quot;,
  &quot;modified_by&quot;: &quot;mcp_user@example.com&quot;,
  &quot;docstatus&quot;: 0,
  &quot;status&quot;: &quot;Closed&quot;,
  &quot;priority&quot;: &quot;Low&quot;,
  &quot;date&quot;: &quot;2026-01-21&quot;,
  &quot;description&quot;: &quot;Test task created via MCP&quot;,
  &quot;doctype&quot;: &quot;ToDo&quot;
}

7. delete_doc

Delete a document.

Request:```
doctype: "ToDo"
name: "abc123xyz"


**Response:**```json
{
  &quot;status&quot;: &quot;deleted&quot;,
  &quot;name&quot;: &quot;abc123xyz&quot;
}

Error Response (document not found):```
HTTP 404 Not Found


---

## Setup Requirements

1. **Install the MCP Server app** on your Frappe site```bash
   bench get-app https://github.com/[repo]/frappe-mcp-server
   bench --site [your-site] install-app mcp_server
   ```

2. **Create an API user** (e.g., `mcp_user@example.com`)

3. **Generate API keys** for the user
   - Go to User → API Access → Generate Keys

4. **Assign appropriate roles** to the API user (e.g., System Manager)

5. **Configure the Allowlist**
   - Go to &quot;MCP Doctype Allowlist&quot;
   - Add DocTypes you want to expose via MCP
   - Configure allowed operations (Read, Create, Update, Delete, Meta)

6. **Configure the MCP client** with the API credentials

---

## Allowlist Configuration

The MCP Server uses an Allowlist to control which DocTypes are accessible. For each DocType you can configure:

| Option | Description |
|--------|-------------|
| **Allow Read (Get, Search)** | Permits `get_doc` and `search_docs` |
| **Allow Create** | Permits `create_doc` |
| **Allow Update** | Permits `update_doc` |
| **Allow Delete** | Permits `delete_doc` |
| **Allow Meta (Schema)** | Permits `get_meta` |
| **Max Page Length** | Limits results for `search_docs` (0 = default) |
| **Allowed Fields (Read)** | Restrict which fields are returned (empty = all) |
| **Allowed Filters** | Restrict which fields can be used in filters (empty = all) |

---

## Error Codes

| HTTP Code | Meaning | Common Causes |
|-----------|---------|---------------|
| `200` | Success | Operation completed |
| `403` | Forbidden | DocType not in Allowlist or operation not permitted |
| `404` | Not Found | Document or DocType does not exist |
| `417` | Expectation Failed | Validation error (e.g., missing required field) |
| `500` | Internal Server Error | Server-side error (check logs) |

---

## Troubleshooting

| Issue | Cause | Solution |
|-------|-------|----------|
| `403 Forbidden` | Missing permissions | Assign roles to API user or add `@frappe.whitelist()` decorator |
| `403 Forbidden` on all calls | Missing Allowlist entry | Add DocType to MCP Doctype Allowlist |
| `403 Forbidden` on specific operation | Operation not enabled | Enable the operation in Allowlist |
| `403 Forbidden` with filters | Filter field not allowed | Add field to Allowed Filters or leave empty for all |
| `404 Not Found` | Document doesn&#x27;t exist | Verify document name |
| `417 Expectation Failed` | Module not found | Install/reinstall the MCP Server app |
| `417 Expectation Failed` | Validation error | Check required fields in DocType |
| `500 Internal Server Error` | Code error | Run `bench --site [site] logs` |

---

## Security Notes

- Only DocTypes explicitly added to the Allowlist are accessible
- Each operation (Read, Create, Update, Delete, Meta) must be explicitly enabled
- API authentication is required for all operations
- Consider restricting sensitive DocTypes (User, Role, etc.) in production

---

# Security Audit Report

## Overview

The Frappe MCP Server has undergone comprehensive security testing to ensure it is safe for production use. All 15 security tests have passed successfully.

---

## Security Test Results

### Authentication &amp; Authorization

| Test | Description | Result |
|------|-------------|--------|
| S1 | Sensitive fields (password, api_key, api_secret) not accessible | ✅ PASS |
| S2 | System DocTypes (DocType) blocked | ✅ PASS |
| S3 | Role DocType blocked | ✅ PASS |
| S4 | System Settings blocked | ✅ PASS |
| S5 | Email Account (credentials) blocked | ✅ PASS |
| S6 | Allowlist self-modification blocked | ✅ PASS |

### Injection Attacks

| Test | Description | Result |
|------|-------------|--------|
| S7 | SQL Injection in filters | ✅ PASS |
| S8 | SQL Injection in document name | ✅ PASS |
| S12 | XSS in document content | ✅ PASS (sanitized) |
| S14 | Path Traversal attack | ✅ PASS |

### Data Protection

| Test | Description | Result |
|------|-------------|--------|
| S9 | Error Log access blocked | ✅ PASS |
| S10 | Scheduled Job Log access blocked | ✅ PASS |
| S11 | File DocType access blocked | ✅ PASS |
| S13 | Sensitive fields auto-filtered from User | ✅ PASS |
| S15 | Privilege escalation prevented | ✅ PASS |

---

## Security Features

### 1. Allowlist-Based Access Control

Only DocTypes explicitly added to the **MCP Doctype Allowlist** are accessible via the API. Each DocType can be configured with granular permissions:

- Allow Read (Get, Search)
- Allow Create
- Allow Update
- Allow Delete
- Allow Meta (Schema)

### 2. Automatic Sensitive Field Filtering

The following fields are **automatically removed** from all API responses, regardless of user permissions or Allowlist configuration:

- `api_key`
- `api_secret`
- `password`
- `new_password`
- `reset_password_key`

This server-side filter prevents credential leakage even if the User DocType is in the Allowlist.

### 3. Input Sanitization

- **SQL Injection Protection**: All user inputs are parameterized through Frappe&#x27;s ORM
- **XSS Protection**: HTML content is automatically sanitized (e.g., `` → ``)
- **Path Traversal Protection**: DocType names are validated against the Allowlist

### 4. Protected System DocTypes

The following sensitive DocTypes are blocked by default (not in Allowlist):

- `DocType` - System schema
- `Role` - Permission roles
- `System Settings` - Global configuration
- `Email Account` - Email credentials
- `Error Log` - System errors (may contain sensitive data)
- `Scheduled Job Log` - Background job logs
- `File` - Uploaded files
- `MCP Doctype Allowlist` - Prevents self-modification

---

## Security Best Practices

### For Production Deployment

1. **Minimize Allowlist**: Only add DocTypes that are strictly necessary
2. **Restrict Operations**: Enable only required operations (Read/Create/Update/Delete)
3. **Use Field Restrictions**: Limit which fields can be read or used in filters
4. **Separate API User**: Create a dedicated user for MCP with minimal roles
5. **Monitor Access**: Regularly review API access logs
6. **Rotate API Keys**: Periodically regenerate API credentials

### Allowlist Configuration Example```
DocType: Customer
├── Allow Read: ✅
├── Allow Create: ❌
├── Allow Update: ❌
├── Allow Delete: ❌
├── Allow Meta: ✅
├── Allowed Fields: [&quot;name&quot;, &quot;customer_name&quot;, &quot;email&quot;]
└── Allowed Filters: [&quot;name&quot;, &quot;customer_name&quot;]

This configuration allows read-only access to Customer records with restricted fields.


Tested Attack Vectors

SQL Injection```python

Attempted attack

search_docs(doctype="ToDo", filters={"status": "Open'; DROP TABLE tabToDo; --"})

Result: Query safely parameterized, no data loss


### XSS (Cross-Site Scripting)```python
# Attempted attack
create_doc(doctype=&quot;ToDo&quot;, data={&quot;description&quot;: &quot;&lt;script&gt;alert(&#x27;XSS&#x27;)&lt;/script&gt;&quot;})

# Result: Content sanitized to &quot;&amp;lt;script&amp;gt;alert(&#x27;XSS&#x27;)&amp;lt;/script&amp;gt;&quot;

Path Traversal```python

Attempted attack

get_doc(doctype="../../../etc/passwd", name="root")

Result: 403 Forbidden (DocType not in Allowlist)


### Privilege Escalation```python
# Attempted attack
update_doc(doctype=&quot;User&quot;, name=&quot;attacker@example.com&quot;, data={&quot;user_type&quot;: &quot;Administrator&quot;})

# Result: 403 Forbidden (Update not allowed on User DocType)

Compliance Summary

Category Status
Authentication ✅ API Key/Secret required
Authorization ✅ Allowlist-based access control
Data Protection ✅ Sensitive fields auto-filtered
Input Validation ✅ SQL/XSS/Path Traversal protected
Audit Trail ✅ Standard Frappe logging

Final Result```

╔══════════════════════════════════════════════════════════════╗
║ SECURITY AUDIT PASSED ║
║ ║
║ 15/15 Tests Successful ║
║ ║
║ ✅ Ready for Production Deployment ║
╚══════════════════════════════════════════════════════════════╝
```

常见问题

6 问
答案由本站依据条目字段整理,不引用上游原文
Frappe MCP Server A8fbb839 怎么安装?

资料没有给出安装命令,请到官方仓库或文档按说明接入;这类条目多数是生态应用,或尚未发布可安装包。

Frappe MCP Server A8fbb839 怎么在 Claude Desktop、Claude、Cursor 里配置?

它的传输方式未标注,在客户端的 MCP 配置里填好启动命令和参数,保存后完全退出客户端再打开,配置才会生效。

Frappe MCP Server A8fbb839 收费吗?

本站不代收费用,也没有标注具体价格。是否收费取决于服务本身和背后的接口额度,正式使用前按官方说明确认。

Frappe MCP Server A8fbb839 需要 API Key 吗?

资料标注需要Token认证,使用前准备好对应凭据,并按最小权限配置。

Frappe MCP Server A8fbb839 支持哪些客户端?

资料标注支持 Claude Desktop、Claude、Cursor;其他客户端只要能配置 MCP Server,也能用同样的命令或地址接入。

Frappe MCP Server A8fbb839 能提供哪些能力?

资料显示约 7 个工具;能力标签包括 安全访问、审计日志、Python、Claude、数据管理。具体工具清单以官方文档为准。

热门专题

按标签挑服务器
全部专题 →

服务器信息以作者仓库与官方文档为准;分类、传输方式与鉴权方式的中文说明为中文整理,最近核验 2026-05-17。