mcp
Frappe MCP allows Frappe apps to function as MCP servers
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:
- Create a virtual environment (optional but recommended): python -m venv .venv source .venv/bin/activate # on Unix/macOS ..venv\Scripts\activate # on Windows
- Install frappe-mcp from PyPI: pip install frappe-mcp
- Verify installation by importing in Python or running a minimal script that creates an MCP instance and loads tools as described in the README.
- 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
mcp-agent
Build effective agents using Model Context Protocol and simple workflow patterns
mcp-reddit
A Model Context Protocol (MCP) server that provides tools for fetching and analyzing Reddit content.
mcp-aktools
📈 提供股票、加密货币的数据查询和分析功能MCP服务器
edumcp
EDUMCP is a protocol that integrates the Model Context Protocol (MCP) with applications in the education field, dedicated to achieving seamless interconnection and interoperability among different AI models, educational applications, smart hardware, and teaching AGENTs.
TradingAgents mode
TradingAgents-MCPmode 是一个创新的多智能体交易分析系统,集成了 Model Context Protocol (MCP) 工具,实现了智能化的股票分析和交易决策流程。系统通过多个专业化智能体的协作,提供全面的市场分析、投资建议和风险管理。
lihil
2X faster ASGI web framework for python, offering high-level development, low-level performance.