Skip to main content
Glama
tourscale-repos

Frappe MCP

Frappe MCP

用于 erp.tourscale.com 上 TourScale ERPNext / FranOS 实例的只读模型上下文协议 (MCP) 服务器。允许智能体查询加盟商、加盟协议、FBU、资产、COI 以及 ERPNext 发票/总账条目。

暴露的功能

工具

用途

whoami

连接探测 — 返回 API 用户身份

list_franchisees(status, brand, limit)

带可选过滤器的加盟商列表

get_franchisee(name)

按名称获取完整的加盟商文档 (例如 FZE-00001)

list_fas(franchisee, status, expiring_within_days, limit)

加盟协议;合规监控的过期窗口键

get_fa(name)

包含子表(品牌/特许权使用费/区域)的单个 FA

list_fbus(franchisee, brand, limit)

FBU 列表

get_fbu(name)

包含经营地址的单个 FBU

list_assets(franchisee, asset_type, limit)

车辆/船只列表

list_cois(franchisee, expiring_within_days, limit)

保险证明,带续保窗口过滤器

frappe_list_docs(doctype, filters_json, fields_json, limit, order_by)

针对任何文档类型的通用逃生舱

frappe_get_doc(doctype, name)

通用按名称获取

frappe_count(doctype, filters_json)

记录计数

erpnext_list_invoices(franchisee, status, date_from, date_to, limit)

销售发票列表

erpnext_gl_entries(account, party, date_from, date_to, limit)

总账条目

Related MCP server: easypaydirect-mcp

身份验证工作原理

通过 API 密钥 + 密钥(Frappe 原生身份验证方案:Authorization: token <key>:<secret>)以 claude-mcp@tourscale.com 用户身份与 ERPNext REST API 通信。

该用户在 ERPNext 上拥有 System Manager 角色。MCP 层是信任边界 — 上述工具在设计上是只读的。请勿随意添加写入工具;需要进行变更的智能体应调用狭窄、特定用途的工具,而不是通用的 CRUD。

如需轮换密钥:在 bench --site erp.tourscale.local console 中重新运行 generate_keys 流程,更新主环境中的 FRAPPE_API_KEY + FRAPPE_API_SECRET,然后重启 ts-frappe-mcp。

部署

  • 容器:tourscale-net 上的 ts-frappe-mcp

  • 端口:绑定到 127.0.0.1:8096(仅限回环 — 通过本地智能体客户端或 SSH 隧道访问)

  • Compose 条目位于 /opt/tourscale/docker-compose.services.yml

  • 环境变量文件:/opt/tourscale/frappe-mcp/.env(源自主环境)

本地开发

FRAPPE_API_URL=https://erp.tourscale.com \
FRAPPE_API_KEY=... \
FRAPPE_API_SECRET=... \
python3 server.py

然后通过任何 MCP 客户端(Claude Code、FastMCP 调试工具等)调用工具。

Related MCP Connectors

Related MCP Servers

  • 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.
    316
    AGPL 3.0
  • A
    license
    A
    quality
    A
    maintenance
    Read-only MCP server for Easy Pay Direct / NMI payment gateway, enabling natural language queries of transactions, subscriptions, and customer vault records.
    7
    241 npm
    MIT
  • A
    license
    Not graded
    quality
    C
    maintenance
    MCP server that enables Claude, ChatGPT, and other LLMs to interact with ERPNext sites through natural language, supporting document CRUD, search, reports, workflows, and custom tools, while respecting user permissions and logging all calls.
    AGPL 3.0
  • A
    license
    Not graded
    quality
    D
    maintenance
    Read-only MCP server for Omie ERP, enabling AI assistants to query financial data, accounts payable/receivable, bank reconciliation, invoices, and movements via natural language.
    12
    MIT