Frappe HRMS MCP Server
Provides tools for interacting with a Frappe or Frappe HRMS instance, including schema discovery, document listing/creation/updating, workflow actions such as submit and cancel, and HR helpers for leave, attendance, and salary slips.
Click on "Install 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 HRMS MCP ServerWhat's the leave balance for employee John Doe?"
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 HRMS Model Context Protocol (MCP) Server
MCP server exposing any Frappe / Frappe HRMS instance as tools for LLM agents. Operates over Frappe's standard REST API and whitelisted RPC methods — no app modifications required.
Frappe HRMS MCP Server
An MCP server that exposes a Frappe or Frappe HRMS site to an MCP-compatible client. It provides schema discovery, generic document operations, workflow actions, and focused HR helpers. The server does not modify the Frappe site or install a Frappe app; it calls Frappe's REST resources and whitelisted RPC methods using an API key and secret.
What This Server Does
The Python process registers MCP tools with the selected transport. Each tool
validates its input with Pydantic, calls the Frappe API through the shared
FrappeClient, and returns JSON text to the MCP client. Frappe remains the
source of truth for permissions, validation, workflows, and stored data.
flowchart LR
A[MCP client or agent] -->|tool call| B[MCP server]
B --> C[Pydantic input validation]
C --> D[Domain or generic tool]
D --> E[FrappeClient]
E -->|Authorization: token key:secret| F[Frappe REST API]
E -->|GET or POST /api/method| G[Frappe whitelisted RPC]
F --> H[Frappe permissions and business rules]
G --> H
H --> E
E --> D
D --> B
B -->|JSON result or structured error| ARequest paths
Generic documents use
/api/resource/<DocType>for list, get, create, update, and admin-only delete operations.Schema discovery uses the whitelisted
frappe.desk.form.load.getdoctypemethod, with a DocType resource fallback.Leave-balance lookup calls the HRMS method
hrms.hr.doctype.leave_application.leave_application.get_leave_balance_on.All requests use the configured timeout and the Frappe token header.
Related MCP server: Frappe Assistant Core
Operating Modes
The server has two modes. Mode controls which MCP tools are registered; it does not bypass Frappe permissions.
Capability | Production | Admin |
Discovery, schema, links | Yes | Yes |
Read, create, update | Yes | Yes |
Submit, cancel, history | Yes | Yes |
HR helpers | Yes | Yes |
| Not registered | Registered |
| Not registered | Registered |
Production is the default and is the recommended mode for routine agents. Admin mode is intended for controlled setup or migration work. Bulk creation is implemented as a sequence of individual create requests; it is not a single transaction and may return both successes and errors.
Tool Reference
Discovery
Tool | Behavior |
| Lists the curated HRMS DocType registry, optionally by category. |
| Returns field names, labels, field types, required flags, defaults, link options, and whether the DocType is submittable. |
| Lists existing names from a target DocType, with optional substring search. |
The registry contains 54 curated HRMS DocTypes across Core HR, Attendance & Shifts, Leave Management, Payroll, Expenses & Travel, Recruitment, and Lifecycle. Schema lookup can also inspect a DocType outside that registry.
Generic documents and workflows
Tool | Behavior |
| Lists any DocType with fields, filters, ordering, and pagination. |
| Fetches one document, including child tables returned by Frappe. |
| Creates a document and returns the created record. |
| Updates supplied fields on an existing document. |
| Updates |
| Updates |
| Lists |
| Permanently deletes a document; Admin mode only. |
| Creates documents sequentially and reports per-item successes and errors; Admin mode only. |
HR helpers
Tool | Behavior |
| Searches employee name, then employee ID, then company email. The default status filter is |
| Reads submitted Leave Allocations and queries HRMS for each leave type's balance. |
| Creates a Leave Application with status |
| Lists non-cancelled attendance for one employee and date range. |
| Creates an Attendance record with status and optional working hours. |
| Lists non-cancelled Salary Slips with optional employee and date filters. |
Prerequisites
Python 3.10 or newer is recommended.
A reachable Frappe or Frappe HRMS site.
An API user with only the DocType and action permissions required by the tools you intend to expose.
Dependencies installed from
requirements.txt.
Install into a virtual environment:
python3 -m venv .venv
.venv/bin/python -m pip install -r requirements.txtConfiguration
Set these environment variables or put them in a .env file in the project
root (the current working directory is checked first):
FRAPPE_BASE_URL=https://erp.example.com
FRAPPE_API_KEY=your_api_key
FRAPPE_API_SECRET=your_api_secret
FRAPPE_MCP_MODE=production
FRAPPE_REQUEST_TIMEOUT=30Variable | Default | Description |
|
| Frappe site base URL; trailing slash is removed. |
| Empty | API key used in the token authorization header. |
| Empty | API secret paired with the key. |
|
| Default mode; any value other than |
|
| HTTP timeout in seconds. |
The CLI --mode argument overrides FRAPPE_MCP_MODE. The CLI --http and
--port options select Streamable HTTP and its listening port; the default
port is 8800.
Run It
Local stdio transport
.venv/bin/python run.py
.venv/bin/python run.py --mode adminStdio is the default and is suitable for desktop clients that launch the server process. The process reads MCP messages from stdin and writes protocol output to stdout.
Streamable HTTP transport
.venv/bin/python run.py --http --port 8800
.venv/bin/python run.py --http --mode admin --port 8801Place HTTP behind TLS and an authenticated, access-controlled reverse proxy when it is reachable outside a trusted local network. The application itself uses the configured Frappe API credentials for upstream calls; do not treat the HTTP listener as an authentication boundary unless your deployment adds one.
MCP Client Configuration
Example stdio configuration for clients that support an mcpServers map:
{
"mcpServers": {
"frappe-hr-production": {
"command": "/absolute/path/to/mcp/.venv/bin/python",
"args": ["/absolute/path/to/mcp/run.py", "--mode", "production"]
},
"frappe-hr-admin": {
"command": "/absolute/path/to/mcp/.venv/bin/python",
"args": ["/absolute/path/to/mcp/run.py", "--mode", "admin"]
}
}
}Keep production and admin configurations separate. Do not place API secrets in
the client configuration; provide them through the process environment or a
protected .env file.
Recommended Agent Sequence
For a write operation, an agent should:
Call
hrms_list_doctypeswhen the exact DocType is uncertain.Call
frappe_get_doctype_schemato inspect required fields and field types.Call
frappe_get_link_optionsfor referenced records such as Department or Leave Type.Create or update the document.
Call
frappe_submit_documentseparately when the business operation requires submission.Read the resulting document or history when confirmation is needed.
The server does not infer business approvals or silently retry writes.
Errors and Limitations
Errors are returned as JSON text. Upstream Frappe errors preserve the HTTP
status code and a safe message. Common cases include missing credentials
(401), permission failures (403), missing records (404), conflicts
(409), validation failures (417), connection failures (502), and
timeouts (504).
This project does not provide a local database, queue, transaction boundary, audit store, rate limiter, or retry policy. Frappe's permissions and audit behavior apply, but deployment owners should provide network controls, credential rotation, monitoring, and backups appropriate to their environment.
Production Checklist
Use HTTPS for
FRAPPE_BASE_URLand protect API credentials as secrets.Create a dedicated Frappe API user with least-privilege roles.
Run production mode for routine agents; expose admin mode only for a short, controlled setup window.
Put Streamable HTTP behind TLS, authentication, and network restrictions.
Set an explicit
FRAPPE_REQUEST_TIMEOUTfor the deployment.Monitor the MCP process and the Frappe site for failed requests and permission errors.
Test the exact DocTypes and HRMS version used by your site before enabling write tools in production.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
No tool schema history has been recorded yet.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
- mcp-serverOAuthio.klokin
MCP server exposing klokin time-tracking operations (employees, time entries, stores) to AI clients.
- OneOAuthai.withone
Search, document and execute authenticated API calls across 700+ apps via one MCP server
MCP server unifying ERPs, CRMs, APIs and knowledge base for Claude, ChatGPT and Gemini.
Model Context Protocol server for the Apideck Unified API. Connect any MCP-compatible agent framework to 100+ accounting systems, HRIS platforms, file storage providers, and more through one integration. More information https://www.apideck.com/mcp-server
Related MCP Servers
AlicenseNot gradedqualityDmaintenanceAllows Frappe Framework apps to function as MCP servers, exposing Python-defined tools for LLM interaction.158MIT- AlicenseNot gradedqualityAmaintenanceMCP 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.303AGPL 3.0
- AlicenseNot gradedqualityBmaintenanceEnables ERPNext management, file operations, read-only database access, and ERPNext API integration through a standardized MCP server.4MIT
- AlicenseNot gradedqualityDmaintenanceA comprehensive MCP server for ERPNext providing generic, doctype-agnostic access to any ERPNext document type with robust permission controls, audit logging, and enterprise-grade security.MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/LRAbduallah/frappe-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server