Get the FREE Ultimate OpenClaw Setup Guide →

mcp

Frappe MCP allows Frappe apps to function as MCP servers

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio frappe-mcp python -m frappe_mcp

How to use

Frappe MCP lets a Frappe Framework app function as a Streamable HTTP MCP server. You define an MCP instance in your app, register tools (via the @mcp.tool decorator or by manually adding Tool definitions), and register an entry point function to load your tools. Once running, the MCP endpoint is accessible at the standard REST path for a registered MCP instance (e.g., http://<SITE_NAME:PORT>/api/method/app.mcp.handle_mcp). Tools expose their input schemas automatically from Python function signatures and docstrings, enabling integration with LLMs and automated input validation. The README emphasizes that the server currently focuses on Tools support, with potential future additions for Resources, Prompts, and streaming.

To use the server, install the package (pip install frappe-mcp) or install via UV. Then run the server using the Python module entry point and ensure your tools are registered within the loaded modules so MCP can discover them. Tools are defined with clear input schemas derived from type annotations and docstrings, making it straightforward to expose functionality such as fetching data or performing actions through an LLM-driven workflow. The MCP endpoint expects calls to a handle_mcp function which orchestrates tool invocation and response formatting according to the MCP spec.

How to install

Prerequisites:

  • Python 3.8+ installed on the system
  • Access to install Python packages (pip/virtualenv)

Installation steps:

  1. Create a virtual environment (optional but recommended): python -m venv .venv source .venv/bin/activate # on Unix/macOS ..venv\Scripts\activate # on Windows
  2. Install frappe-mcp from PyPI: pip install frappe-mcp
  3. Verify installation by importing in Python or running a minimal script that creates an MCP instance and loads tools as described in the README.
  4. Run the MCP server using the module entry point (as configured in mcp_config): python -m frappe_mcp

If you prefer UV (async) environments, you can explore integrating with your UV setup, but note that the official Python SDK guidance in the README mentions async-only usage and that Frappe MCP is implemented to work with a non-async WSGI stack in the Frappé ecosystem.

Additional notes

Tips and considerations:

  • The MCP server is experimental and may have bugs or breaking changes; keep versions pinned and monitor for updates.
  • Tools input schemas are inferred from function signatures and docstrings when using the @mcp.tool decorator, which helps auto-generate the required input for the MCP spec.
  • The documentation notes that OAuth setup may be required depending on your Frappé version; ensure you configure OAuth clients if your Frappé instance uses OAuth2 updates.
  • The current focus is on Tools; future updates may add Resources, Prompts, and streaming features via SSE.
  • The MCP endpoint is typically exposed at /api/method/app.mcp.handle_mcp on your Frappé site; ensure proper routing and authentication as per your deployment.
  • Maintain your tooling imports inside the handle_mcp loader function to guarantee your tools are registered when the endpoint is invoked.

Related MCP Servers

Sponsor this space

Reach thousands of developers