Frappe API MCP Server

Local setup required. This server has to be cloned and prepared on your machine before you register it in Claude Code.
1

Set the server up locally

Run this once to clone and prepare the server before adding it to Claude Code.

Run in terminal
git clone https://github.com/danielsebastianc/frappe-api-mcp.git
cd frappe-api-mcp
npm install
2

Register it in Claude Code

After the local setup is done, run this command to point Claude Code at the built server.

Run in terminal
claude mcp add -e "FRAPPE_BASE_URL=${FRAPPE_BASE_URL}" -e "FRAPPE_AUTH_TOKEN=${FRAPPE_AUTH_TOKEN}" frappe-api -- node "<FULL_PATH_TO_FRAPPE_API_MCP>/dist/index.js"

Replace <FULL_PATH_TO_FRAPPE_API_MCP>/dist/index.js with the actual folder you prepared in step 1.

Required:FRAPPE_BASE_URLFRAPPE_AUTH_TOKEN
README.md

Interact with Frappe and ERPNext sites through their REST API endpoints.

frappe-api-mcp

Model Context Protocol (MCP) server that exposes a single frappe_api tool to call Frappe REST endpoints under /api.

What it provides

  • Tool name: frappe_api
  • Methods: GET, POST, PUT, PATCH, DELETE
  • Input: path (required), method, query, body, headers
  • Auth: uses FRAPPE_AUTH_TOKEN as the Authorization header unless overridden

Requirements

  • Node.js 18+
  • A reachable Frappe/ERPNext site

Local setup

git clone https://github.com/danielsebastianc/frappe-api-mcp.git
cd frappe-api-mcp
npm install
cp .env.example .env

Set these environment variables before running:

  • FRAPPE_BASE_URL (example: http://localhost:8000)
  • FRAPPE_AUTH_TOKEN (example: token api_key:api_secret)

Run

npm start

Test

npm test

OpenCode MCP config example

Do not put real secrets in committed config files. Prefer environment injection.

{
  "mcp": {
    "frappe_api": {
      "type": "local",
      "command": ["node", "/path/to/your/folder/mcp/frappe-api-server.mjs"],
      "environment": {
        "FRAPPE_BASE_URL": "http://localhost:8000",
        "FRAPPE_AUTH_TOKEN": "token api_key:api_secret"
      }
    }
  }
}

Tools (1)

frappe_apiCalls Frappe REST endpoints under /api to perform CRUD operations.

Environment Variables

FRAPPE_BASE_URLrequiredThe base URL of your Frappe/ERPNext site
FRAPPE_AUTH_TOKENrequiredThe authorization token for API access

Configuration

claude_desktop_config.json
{"mcpServers": {"frappe_api": {"command": "node", "args": ["/path/to/your/folder/mcp/frappe-api-server.mjs"], "env": {"FRAPPE_BASE_URL": "http://localhost:8000", "FRAPPE_AUTH_TOKEN": "token api_key:api_secret"}}}}

Try it

Fetch the list of customers from the ERPNext site using the frappe_api tool.
Create a new task in the project module using a POST request to the frappe_api.
Update the status of the sales order with ID SO-001 to 'Completed'.
Delete the document with ID 123 from the custom doctype.

Frequently Asked Questions

What are the key features of Frappe API?

Supports standard HTTP methods: GET, POST, PUT, PATCH, DELETE. Exposes a unified frappe_api tool for all REST interactions. Handles authentication via Authorization headers. Enables natural language interaction with site data.

What can I use Frappe API for?

Automating data entry into ERPNext modules via Claude. Querying business metrics and reports directly from an ERPNext instance. Managing document lifecycles through conversational commands. Integrating custom Frappe doctypes into AI-driven workflows.

How do I install Frappe API?

Install Frappe API by running: git clone https://github.com/danielsebastianc/frappe-api-mcp.git && cd frappe-api-mcp && npm install

What MCP clients work with Frappe API?

Frappe API works with any MCP-compatible client including Claude Desktop, Claude Code, Cursor, and other editors with MCP support.

Turn this server into reusable context

Keep Frappe API docs, env vars, and workflow notes in Conare so your agent carries them across sessions.

Need the old visual installer? Open Conare IDE.
Open Conare