Frappe MCP Server
Extends the Frappe integration with ERPNext-specific capabilities such as document submission/cancellation, workflow transitions, and report generation.
Provides tools for interacting with Frappe instances, enabling CRUD operations on documents, calling RPC methods, managing files, workflows, reports, background jobs, realtime events, and more.
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 MCP Serverlist all customers in Frappe"
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 (Full Roadmap Implementation)
A Model Context Protocol (MCP) Server for the Frappe Framework / ERPNext, built using the @modelcontextprotocol/sdk and powered by the frappe-js-sdk client.
This server enables AI models (like Claude) to securely interact with your Frappe instances, perform document CRUD, execute whitelisted python RPC methods, upload/download files, manage workflows, run query/script reports, check background job queues, listen to realtime socket events, and generate PDFs.
๐ Features Checklist
Phase 1: Document Tools: Create, retrieve, update, delete, paginated listing, counting, field-level get/set, document renaming, single DocTypes, and document submit/cancel actions.
Phase 2: RPC Method Calling: Call any whitelisted method path, with optimized wrappers for search autocomplete link fields, report list views, and form schemas.
Phase 3: File Manager: File uploads (via base64 or remote URL downloads), listing attachments, downloading files (retrieved as base64), and file record deletion.
Phase 4: Auth & Session Swapping: Session login/logout, profile checks, permission lookups, and dynamic credentials swapping (
switch_user).Phase 5: Workflow Engine: Document workflow state queries, action list queries, applying workflow transitions, and retrieving workflow log history.
Phase 6: Reporting & Analytics: Running Query/Script reports with custom filters, exporting reports directly to CSV strings, and retrieving dashboard charts or number card values.
Phase 7: Background Jobs: Checking job queues, listing job log entries, and forcing enqueued task execution.
Phase 8: Advanced Integrations: Listening to Socket.io realtime events (emitted to stderr logs), publishing realtime events, retrieving unread bell notifications, rendering HTML print formats, generating binary PDFs (returned as base64), batch bulk edits, enqueuing data imports/exports, downloading templates, and mailing/logging emails.
Phase 9: MCP Resource & Prompt Protocols:
Resources: Dynamic URIs like
schema://{doctype},schema://{doctype}/fields,data://{doctype}/{name},report://{report_name},workflow://{doctype}, anduser://me.Prompts: Ready-to-use AI templates for Sales Orders, approvals, monthly reports, and employee onboarding.
Related MCP server: Frappe MCP Server
โ๏ธ Configuration
Create a .env file in the root directory (refer to .env.example):
# Frappe Server URL (required)
FRAPPE_URL=https://your-frappe-instance.frappe.cloud
# --- Authentication Choices (Pick ONE) ---
# Choice A: API Key & Secret (Recommended for servers/backends)
FRAPPE_API_KEY=your_api_key
FRAPPE_API_SECRET=your_api_secret
# Choice B: OAuth Bearer Token
FRAPPE_TOKEN=your_token
FRAPPE_TOKEN_TYPE=Bearer
# Choice C: Username & Password (Session cookie)
FRAPPE_USERNAME=administrator
FRAPPE_PASSWORD=admin_password
# --- Logging ---
# log levels: debug, info, warn, error
LOG_LEVEL=info๐ Commands
To run in development mode (auto-rebuilding):
npm run devTo compile and bundle for production (outputs to dist/index.js):
npm run buildTo run the unit test suite:
npm run testTo run the compiled production bundle:
npm run start๐งช How to Test
1. Run Automated Unit Tests
We use Vitest to run tests that mock the SDK calls to verify tool schemas, input parameter validation, routing, resource templates, and prompt builders:
npm run test2. Test Manually with MCP Inspector (Recommended)
You can visually interact with the server, list resources, view prompts, and run tools using the official MCP Inspector tool.
To run the inspector on the dev server:
npx -y @modelcontextprotocol/inspector npx tsx src/index.tsTo run the inspector on the compiled production build:
npx -y @modelcontextprotocol/inspector node dist/index.jsThis will output an URL (typically http://localhost:5173) that you can open in your browser to test calling all the tools (like list_documents or call_method) with mock or real inputs.
๐ Integration with Claude Desktop
To connect this server to your Claude Desktop application, edit your claude_desktop_config.json (located at %APPDATA%\Claude\claude_desktop_config.json on Windows or ~/Library/Application Support/Claude/claude_desktop_config.json on macOS):
{
"mcpServers": {
"frappe-mcp": {
"command": "node",
"args": [
"F:/MCP/frappe js mcp/dist/index.js"
],
"env": {
"FRAPPE_URL": "https://your-frappe-instance.frappe.cloud",
"FRAPPE_API_KEY": "your_api_key",
"FRAPPE_API_SECRET": "your_api_secret",
"LOG_LEVEL": "info"
}
}
}
}Ensure you run
npm run buildinsideF:/MCP/frappe js mcpfirst so thatdist/index.jsexists.Replace
"F:/MCP/frappe js mcp/dist/index.js"with the absolute path of your workspace.Restart Claude Desktop after making configuration changes.
๐ณ Docker Deployment
The project includes a multi-stage Dockerfile and docker-compose.yml to compile and containerize the server.
To build the image and run it in a container:
docker compose -f docker/docker-compose.yml up --build -dThe compose config maps environment variables directly into the service.
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.
Latest Blog Posts
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/Codenetic-tech/frappe-js-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server