Frappe MCP Server
Provides comprehensive integration with Frappe Framework, enabling full CRUD operations on documents, schema introspection of DocTypes, execution of query reports and financial statements, calling whitelisted methods, and secure API authentication for managing Frappe-based applications.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Frappe MCP Server show me the sales orders from last week"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Frappe MCP Server (Python + uv + Docker)
A modern, containerized Python implementation of the Model Context Protocol (MCP) server for Frappe Framework, built with FastMCP, uv for dependency management, and Docker for deployment.
Features
Document Operations: Full CRUD operations for Frappe documents
Schema Introspection: DocType field definitions and structure analysis
Report Generation: Query reports, financial statements, and data exports
Method Calling: Execute whitelisted Frappe methods
Authentication: Secure API key/secret authentication
Related MCP server: Frappe MCP Server
Quick Start
Prerequisites
Docker and Docker Compose
Access to a Frappe site with API credentials
Setup
git clone https://github.com/appliedrelevance/frappe_mcp_server_uv.git
cd frappe_mcp_server_uv
cp .env.example .env
# Edit .env with your Frappe credentials
docker-compose up -d frappe-mcp-serverAvailable MCP Tools
Document Operations
create_document: Create new Frappe documentsget_document: Retrieve document by DocType and nameupdate_document: Update existing documentsdelete_document: Delete documentslist_documents: Query documents with filterscall_method: Execute whitelisted Frappe methods
Schema Operations
get_doctype_schema: Get complete DocType structureget_field_options: Get Link/Select field optionsget_doctype_list: List available DocTypesget_frappe_usage_info: Combined schema and usage information
Report Operations
run_query_report: Execute Frappe query reportsget_report_meta: Get report metadata and structurelist_reports: List available reportsrun_doctype_report: Generate DocType-based reportsget_financial_statements: Access P&L, Balance Sheet, Cash Flow
Helper Operations
ping: Server health checkversion: Get server version informationvalidate_auth: Check API credential status
Development
# Install with development dependencies
uv sync --dev
# Run tests
uv run pytest
# Format code
uv run black src/ && uv run isort src/License
ISC License - see LICENSE file for details.
Available Tools
24 toolsamend_documentA
Amend a document in Frappe (create a new amended version of a cancelled document).
This tool handles document amendment by creating a new document with an amended name
(e.g., DOC-001-1, DOC-001-2) and copying all relevant field values from the original
cancelled document, establishing proper linkage via the 'amended_from' field.
Args:
doctype: DocType name
name: Document name (case-sensitive) - must be a cancelled document
Returns:
Success message with new amended document name if successful, or detailed
error information if amendment fails due to validation errors or constraints.
Inputs: doctype (required), name (required). Returns: result
call_methodC
Execute a whitelisted Frappe method.
Args:
method: Method name to call (whitelisted)
params: Parameters to pass to the method (optional)
Inputs: method (required), params. Returns: result
cancel_documentA
Cancel a document in Frappe (change docstatus from 1 to 2).
This tool handles document cancellation using Frappe's cancellation workflow,
including proper validation and error handling to provide clear feedback
for corrective action.
Args:
doctype: DocType name
name: Document name (case-sensitive)
Returns:
Success message if cancelled, or detailed error information if cancellation
fails due to validation errors, linked documents, or permission issues.
Inputs: doctype (required), name (required). Returns: result
count_documentsA
Count documents in Frappe with optional filters.
This tool addresses the filtering limitation that existed in previous implementations
by using Frappe's native count functionality via the REST API with a custom filter language.
Args:
doctype: DocType name
filters: Filter string (optional). Uses custom syntax to bypass MCP validation issues.
Filter Syntax:
- Simple equality: "field:value" -> {"field": "value"}
- Operators: "field:operator:value" -> {"field": ["operator", value]}
- Multiple filters: "field1:value1,field2:operator:value2"
Supported Operators:
- Equality: = (default), !=
- Comparison: <, >, <=, >=
- Pattern: like, not_like (use % for wildcards)
- Lists: in, not_in (separate values with |)
- Null checks: is:null, is:not_null, is_not:null
- Ranges: between (separate values with |)
Examples:
- "status:Unreconciled" -> Status equals Unreconciled
- "amount:>:100" -> Amount greater than 100
- "name:like:%admin%" -> Name contains 'admin'
- "status:in:Open|Working|Pending" -> Status in list
- "date:between:2025-01-01|2025-12-31" -> Date in range
- "phone:is:not_null" -> Phone is not null
Tool Examples:
- count_documents("User") -> Count all users
- count_documents("Bank Transaction", "status:Unreconciled") -> Count unreconciled transactions
- count_documents("Bank Transaction", "unallocated_amount:>:0") -> Count with unallocated amount
- count_documents("Task", "status:in:Open|Working|Pending") -> Count tasks with multiple statuses
- count_documents("User", "name:like:%admin%") -> Count users with 'admin' in name
- count_documents("Payment Entry", "posting_date:between:2025-01-01|2025-12-31") -> Count in date range
- count_documents("Contact", "phone:is:not_null") -> Count contacts with phone numbers
Inputs: doctype (required), filters. Returns: result
create_documentB
Create a new document in Frappe.
Args:
doctype: DocType name
values: Document field values. Required fields must be included.
For Link fields, provide the exact document name.
For Table fields, provide an array of row objects.
Inputs: doctype (required), values (required). Returns: result
delete_documentB
Delete a document from Frappe.
This tool handles document deletion with comprehensive error handling,
providing detailed feedback about why deletions fail and actionable
guidance for resolving common deletion blockers.
Args:
doctype: DocType name
name: Document name (case-sensitive)
Returns:
Success message if deleted, or detailed error information with
corrective actions for linked documents, permissions, or constraints.
Inputs: doctype (required), name (required). Returns: result
get_doctype_listA
Get a list of available DocTypes, optionally filtered by module.
Args:
module: Module name to filter by (optional)
limit: Maximum number of DocTypes to return (default: 50)
Inputs: module, limit. Returns: result
get_doctype_schemaA
Get the complete schema for a DocType including field definitions, validations, and linked DocTypes.
Use this to understand the structure of a DocType before creating or updating documents.
Args:
doctype: DocType name
Inputs: doctype (required). Returns: result
get_documentB
Retrieve a document from Frappe.
Args:
doctype: DocType name
name: Document name (case-sensitive)
Inputs: doctype (required), name (required). Returns: result
get_field_optionsA
Get available options for a Link or Select field.
For Link fields, returns documents from the linked DocType.
For Select fields, returns the predefined options.
Args:
doctype: DocType name
fieldname: Field name
limit: Maximum number of options to return (default: 20)
Inputs: doctype (required), fieldname (required), limit. Returns: result
get_financial_statementsB
Get standard financial reports (P&L, Balance Sheet, Cash Flow).
Args:
report_type: Type of financial statement
('Profit and Loss Statement', 'Balance Sheet', 'Cash Flow')
company: Company name
from_date: Start date (YYYY-MM-DD format, optional)
to_date: End date (YYYY-MM-DD format, optional)
periodicity: Periodicity (Monthly, Quarterly, Half-Yearly, Yearly)
Inputs: report_type (required), company (required), from_date, to_date, +1 more. Returns: result
get_frappe_usage_infoB
Get combined information about a DocType or workflow, including schema metadata and usage guidance.
Args:
doctype: DocType name (optional if workflow is provided)
workflow: Workflow name (optional if doctype is provided)
Inputs: doctype, workflow. Returns: result
get_report_columnsA
Get the column structure for a specific report.
Args:
report_name: Name of the report
filters: Filter string (optional). Uses custom syntax to bypass MCP validation issues.
Filter Syntax: Use the same string-based syntax as count_documents and list_documents.
Examples: "status:Open", "date:>=:2025-01-01", "status:in:Open|Working"
Inputs: report_name (required), filters. Returns: result
get_report_metaC
Get metadata for a specific report including columns and filters.
Args:
report_name: Name of the report to get metadata for
Inputs: report_name (required). Returns: result
list_documentsA
List documents from Frappe with filters.
Args:
doctype: DocType name
filters: Filter string (optional). Uses custom syntax to bypass MCP validation issues.
fields: Comma-separated field names (optional). E.g. "name,customer,total"
limit: Maximum number of records to return (optional). E.g. "20"
order_by: Field to order by (optional, can include 'desc' like 'creation desc')
Filter Syntax:
- Simple equality: "field:value" -> {"field": "value"}
- Operators: "field:operator:value" -> {"field": ["operator", value]}
- Multiple filters: "field1:value1,field2:operator:value2"
Supported Operators:
- Equality: = (default), !=
- Comparison: <, >, <=, >=
- Pattern: like, not_like (use % for wildcards)
- Lists: in, not_in (separate values with |)
- Null checks: is:null, is:not_null, is_not:null
- Ranges: between (separate values with |)
Examples:
- list_documents("Bank Transaction", "status:Unreconciled") -> List unreconciled transactions
- list_documents("Task", "status:in:Open|Working", "name,subject", "10") -> List open tasks with specific fields
- list_documents("User", "name:like:%admin%") -> List users with 'admin' in name
Inputs: doctype (required), filters, fields, limit, +1 more. Returns: result
list_reportsC
Get a list of all available reports in the system.
Args:
module: Filter reports by module (optional)
limit: Maximum number of reports to return (default: 50)
Inputs: module, limit. Returns: result
pingB
A simple tool to check if the server is responding.
Inputs: no named parameters. Returns: result
run_doctype_reportB
Run a standard doctype report with filters and sorting.
Args:
doctype: DocType to generate report for
fields: Fields to include in report (optional)
filters: Filter string (optional). Uses custom syntax to bypass MCP validation issues.
limit: Maximum number of records (default: 100)
order_by: Field to order by (optional)
Filter Syntax: Use the same string-based syntax as count_documents and list_documents.
Examples: "status:Open", "date:>=:2025-01-01", "status:in:Open|Working"
Inputs: doctype (required), fields, filters, limit, +1 more. Returns: result
run_query_reportA
Execute a Frappe query report with filters.
Args:
report_name: Name of the report to run
filters: Filter string (optional). Uses custom syntax to bypass MCP validation issues.
Filter Syntax: Use the same string-based syntax as count_documents and list_documents.
Examples: "status:Open", "date:>=:2025-01-01", "status:in:Open|Working"
Inputs: report_name (required), filters. Returns: result
submit_documentA
Submit a document in Frappe (change docstatus from 0 to 1).
This tool handles document submission using Frappe's submission workflow,
including proper validation and error handling to provide clear feedback
for corrective action.
Args:
doctype: DocType name
name: Document name (case-sensitive)
Returns:
Success message if submitted, or detailed error information if submission
fails due to validation errors or missing required fields.
Inputs: doctype (required), name (required). Returns: result
test_hardcoded_filterC
Test hardcoded filter to verify Frappe API filtering works. This bypasses all parameter validation issues.
Inputs: doctype (required). Returns: result
update_documentC
Update an existing document in Frappe.
Args:
doctype: DocType name
name: Document name (case-sensitive)
values: Field values to update
Inputs: doctype (required), name (required), values (required). Returns: result
validate_authB
Validate API credentials and return authentication status.
Inputs: no named parameters. Returns: result
versionA
Get version information for the Frappe MCP server.
Inputs: no named parameters. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 24 tools
Most tools have distinct purposes, but there is some overlap between list_documents, run_doctype_report, and run_query_report, which could cause confusion in selecting the right tool for listing or reporting tasks. However, descriptions help clarify their specific uses, and other tools like create_document, update_document, and cancel_document are clearly differentiated.
Tool names follow a highly consistent verb_noun pattern throughout, such as create_document, update_document, list_documents, and get_doctype_schema. All tools use snake_case with clear, descriptive names, making them predictable and easy to understand without any deviations or mixed conventions.
With 24 tools, the count is slightly high but reasonable for a comprehensive Frappe server covering document management, reporting, and system operations. It includes core CRUD operations, financial statements, and utility tools, though it may feel heavy compared to simpler servers but aligns well with the domain's complexity.
The tool set provides complete coverage for Frappe document management, including full CRUD lifecycle (create, get, update, delete, submit, cancel, amend), schema exploration, reporting, and financial statements. There are no obvious gaps; agents can perform all essential operations without dead ends, supported by utility tools like ping and version.
Maintenance
Related MCP Connectors
ERPNext MCP server for ChatGPT, Claude and any AI agent: create sales invoice, submit invoice, create payment entry, list overdue invoices and create customer in your own ERPNext account. Cotlet works in the account through your Cloud Browser, a real Chrome where you sign in to ERPNext yourself; Cotlet does not store your password and you need no ERPNext API key. About the official ERPNext API: Yes. ERPNext has a full REST API (checked 14 Oct 2026): any record, including customers, sales invoices and payment entries, can be listed, created, updated and deleted, and whitelisted methods can be called. Setup and FAQ: https://cotlet.dev/integrations/erpnext-api-mcp-server
Headless API-first double-entry accounting & bookkeeping engine. 84 MCP tools over HTTP.
Malaysian SME accounting, e-Invoice and payroll for your AI. 77 tools; writes are approved drafts.
Document sharing, invoicing, and personal finance platform. 15+ AI tools via OAuth 2.1.
Related MCP Servers
- AlicenseBqualityDmaintenanceEnables AI assistants to interact with ERPNext/Frappe instances through the REST API, allowing document management, report execution, and DocType operations using natural language.6MIT
- AlicenseNot gradedqualityDmaintenanceAllows AI assistants to interact with Frappe applications through the official REST API, enabling document CRUD operations, schema handling, and detailed API instructions.182 npm2ISC
- AlicenseNot gradedqualityDmaintenanceEnables AI models to securely interact with Frappe Framework/ERPNext instances, supporting document CRUD, RPC methods, file management, workflows, reporting, and more via the Model Context Protocol.182 npmISC
- AlicenseNot gradedqualityDmaintenanceIntegrates with ERPNext/Frappe API to enable AI assistants to interact with ERPNext data and create custom applications including DocTypes, workflows, scripts, and more.MIT