ERPNext and Frappe REST/RPC MCP Server for Agentic AI!
pip install erpnext-agent==2.5.1 Copy PIP instructions
ERPNext and Frappe Framework enterprise resources planner. Built with the highest architectural standards, incorporating dynamic facades, custom API routing, and FastMCP tool decoration.
Documentation — Installation, deployment, usage across the MCP, API, and CLI interfaces, and guidance for provisioning the ERPNext / Frappe platform are maintained in the official documentation.
Erpnext MCP provides a high-performance, model-optimized interface to Erpnext capabilities. It isolates the model from underlying API transport complexity, ensuring safe, idempotent, and highly traceable system interactions.
The operator can configure tool filtering via multiple input channels:
When query strings or parameters are provided, an LLM-free Knowledge Graph resolution layer (using DynamicToolOrchestrator) matches query intents against known tool tags, names, or descriptions, with safe fallback and automated 24-hour background cache refreshing.
Pick the extra that matches what the operator want to run:
# Connector-focused MCP server (includes the shared graph engine) uv pip install "erpnext-agent[mcp]" # Agent runtime (adds model orchestration to the shared graph engine) # Everything (development) uv pip install "erpnext-agent[all]" # or: python -m pip install "erpnext-agent[all]" Container images (:mcp) One multi-stage docker/Dockerfile builds the MCP-only image (--target mcp):
Knowledge-graph database ( medulla )
Scion SDK core dependency ( medulla ). The [mcp] extra keeps deployments can use the bundled engine. For production or shared state, run medulla as a dedicated database service and configure the runtime to use it. Deployment recipes (single-node + Raft HA), connection configuration, and architecture diagrams are documented in the medulla deployment guide .
The operator can start the FastMCP server in stdio mode via Python module execution:
import asyncio from erpnext_agent.mcp_server import get_mcp_instance async def main(): mcp = get_mcp_instance() # Execute stdio loop or launch server print("MCP Server ready.") if __name__ == "__main__": asyncio.run(main()) For direct shell start, ran:
python -m erpnext_agent.mcp_server Configuration The package is fully configurable via the environment variables listed below.
Each action-routed tool can be disabled individually via its toggle env var (set to false): AUTHENTICATIONTOOL, RESOURCETOOL (see the MCP Tools table above).
A local template is provided inside .env.example. Copy this file as .env and fill out the operator's specific service endpoint parameters before starting execution.
Auto-generated from the live MCP server — do not edit by hand.
Install the connector-focused [mcp] extra. Examples use erpnext-agent[mcp] to add FastMCP / FastAPI through scion-sdk; the required Scion SDK core still carries medulla. The [agent-runtime] extra additionally enables model orchestration.
{ "mcpServers": { "erpnext-mcp": { "command": "uvx", "args": [ "--from", "erpnext-agent[mcp]", "erpnext-mcp" ], "env": { "AUTHENTICATIONTOOL": "True", "INGESTTOOL": "True", "RESOURCETOOL": "True" } } } } Runtime references require an alias-aware launcher such as Arbora. Other launchers must omit those entries and inject the resolved values through their own runtime secret boundary.
{ "mcpServers": { "erpnext-mcp": { "url": "http://localhost:8000/erpnext-mcp/mcp" } } } Run a reviewed container image as a least-privilege stdio child (no listener or published port):
docker run -i --rm \ --read-only \ --cap-drop=ALL \ --security-opt=no-new-privileges \ --pids-limit=256 \ --tmpfs /tmp:rw,noexec,nosuid,nodev,size=64m \ -e TRANSPORT=stdio \ -e AUTHENTICATIONTOOL=True \ -e INGESTTOOL=True \ -e RESOURCETOOL=True \ registry.example.invalid/erpnext-agent@sha256: erpnext-mcp For containerized network HTTP, supply an authenticated TLS ingress (or direct server TLS), exact MCP_ALLOWED_HOSTS, and an exact trusted-proxy CIDR policy through the operator-owned deployment profile. The generator does not emit an unauthenticated non-loopback listener.
Auto-generated from the code-read env surface (package vars) — do not edit.
erpnext-agent can run as a local stdio process or container, or behind a remote network boundary. The Deployment guide carries the detailed transport contract.
The complete documentation is published as the official documentation site and is the recommended reference for installation, deployment, and day-to-day operation.
AGENTS.md is the canonical contributor/agent guidance.
Please audit all code changes against the repository's contribution and review requirements, and run:
pre-commit run --all-files License This project is licensed under the MIT License. See the LICENSE file for complete details.
Provision this package with the consolidated scion-sdk-deployment workflow. It selects an installed-package, editable-source, or immutable-container path; records only runtime secret and TLS-profile references in AgentConfig; and runs doctor, registration, policy, observability, and rollback gates. Ask your agent to "deploy erpnext-agent with scion-sdk-deployment".
The repository embeds no deployment profile, credential value, certificate path, or environment-specific endpoint. Supply those at runtime through AgentConfig and the configured secret provider.
15 package + 20 inherited variable(s). Auto-generated from .env.example + the shared scion-sdk set — do not edit.
This package ships a compact canonical skill surface with specialist procedures kept as referenced workflows. The current MCP tools, skill metadata, connector_manifest.yml, ontology, mappings, shapes, fixtures, migrations, tool-schema fingerprints, and certification metadata form one versioned capability contract. Validate them together; do not rely on stale tool names or historical per-task skill wrappers.
Runtime endpoints, credentials, certificate trust, tenant identity, retention, and observability policy are deployment inputs and are never packaged values. See Configuration, trust, and privacy before enabling a network transport, connector ingestion, Arbora delegation, or trace export.
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
None of the files in this release were uploaded with provenance metadata.
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.




