Skip to main content
Glama
sadikhossainnub

paperware_mcp

Paperware MCP Server (paperware_mcp)

A native Model Context Protocol (MCP) Server for the ERPNext/Frappe bench of Paperware Factory (erp.paperwarefactory.com).

This app enables the Prime AI Agent (NousResearch Hermes Agent framework, "Prime" persona, hosted on Docker/Coolify) to communicate with ERPNext directly using the Frappe ORM.


🌟 Key Features

  1. Direct Frappe ORM Integration: No external HTTP REST API calls or API Key/Secret required. Directly uses frappe.get_doc, frappe.get_list, doc.insert(), doc.submit(), doc.cancel(), etc.

  2. Per-Request Permission Impersonation: On each tool call, frappe.set_user() is performed according to the requesting_user parameter, and the actual Frappe permission engine takes effect.

  3. Whitelisted Execution Security: The call_method tool can only execute functions decorated with @frappe.whitelist(). Unauthorized Python code execution is completely secured and blocked.

  4. FastMCP Integration: Tool setup based on FastMCP from the Python mcp>=1.9.0,<2.0.0 package. Both stdio and sse transport options are available.

  5. Native Bench Command: Integrated with the Frappe CLI — the service can be started via the command bench --site erp.paperwarefactory.com paperware-mcp.


Related MCP server: MCP Task

🛠️ Installation Guide (Step-by-Step Installation)

Step 1: Place the App Source

Go to your Frappe Bench directory (/home/prime/frappe-bench/) and ensure the app is present in the apps/paperware_mcp folder.

cd /home/prime/frappe-bench

Step 2: Install Python Dependencies

Install the required packages (mcp>=1.9.0,<2.0.0) in the Bench Virtual Environment:

./env/bin/pip install -r apps/paperware_mcp/requirements.txt

Step 3: Install the App on the ERPNext Site

Install the paperware_mcp app on your desired site:

bench --site erp.paperwarefactory.com install-app paperware_mcp

🚀 Service Run and Command Usage (Usage & Command Options)

The following options can be used to run the paperware-mcp CLI command:

Option

Type

Default

Description

--transport

stdio | sse

stdio

MCP custom transport option.

--port

int

8931

Port number for SSE transport (only applicable when --transport sse is used).

--default-user

string

None

Fallback Frappe user email if requesting_user is not provided.

[!WARNING] --default-user Administrator should not be used in production. In production, you must pass the email of a specific bot user.

Command Examples:

1. Running in Standard Input/Output (stdio) mode:

bench --site erp.paperwarefactory.com paperware-mcp --transport stdio --default-user hermes.bot@paperwarefactory.com

2. Running in Server-Sent Events (SSE) mode on a specific port:

bench --site erp.paperwarefactory.com paperware-mcp --transport sse --port 8931 --default-user hermes.bot@paperwarefactory.com

🛡️ Creating a Dedicated Hermes Bot User (Security Best Practices)

It is recommended to create a dedicated Bot User in ERPNext for working in a production environment:

  1. Go to User List in ERPNext Desk and create a New User.

  2. Email: hermes.bot@paperwarefactory.com

  3. First Name: Hermes Bot

  4. Role Profile: Provide only the necessary roles (e.g., Stock User, Sales User, Accounts User) so that the Hermes Agent does not get unnecessary administrative power.

  5. Use the --default-user hermes.bot@paperwarefactory.com flag when starting the server.


🏭 Production Deployment

Use Supervisor or a Systemd service to automatically start and keep the service running in the background.

Method 1: Supervisor Configuration

Create the file /etc/supervisor/conf.d/paperware_mcp.conf and write the following code:

[program:paperware-mcp]
command=/home/prime/frappe-bench/env/bin/bench --site erp.paperwarefactory.com paperware-mcp --transport sse --port 8931 --default-user hermes.bot@paperwarefactory.com
directory=/home/prime/frappe-bench
user=prime
autostart=true
autorestart=true
stopasgroup=true
killasgroup=true
stdout_logfile=/home/prime/frappe-bench/logs/paperware_mcp.out.log
stderr_logfile=/home/prime/frappe-bench/logs/paperware_mcp.err.log
environment=PATH="/home/prime/frappe-bench/env/bin:%(ENV_PATH)s"

Reload and start the configuration:

sudo supervisorctl reread
sudo supervisorctl update
sudo supervisorctl status paperware-mcp

Method 2: Systemd Unit Configuration

Create the file /etc/systemd/system/paperware-mcp.service and provide the following configuration:

[Unit]
Description=Paperware MCP Server for Hermes AI Agent
After=network.target redis-server.service mariadb.service

[Service]
Type=simple
User=prime
WorkingDirectory=/home/prime/frappe-bench
ExecStart=/home/prime/frappe-bench/env/bin/bench --site erp.paperwarefactory.com paperware-mcp --transport sse --port 8931 --default-user hermes.bot@paperwarefactory.com
Restart=always
RestartSec=5
StandardOutput=append:/home/prime/frappe-bench/logs/paperware_mcp.out.log
StandardError=append:/home/prime/frappe-bench/logs/paperware_mcp.err.log

[Install]
WantedBy=multi-user.target

Enable and start the service:

sudo systemctl daemon-reload
sudo systemctl enable paperware-mcp
sudo systemctl start paperware-mcp
sudo systemctl status paperware-mcp

🤖 Hermes Agent MCP Client Config

How to add paperware_mcp to the mcp_config.json file of Hermes Agent (or any MCP Client):

{
  "mcpServers": {
    "paperware_mcp": {
      "url": "http://erp.paperwarefactory.com:8931/sse"
    }
  }
}

2. For Stdio Transport (for same container/local execution):

{
  "mcpServers": {
    "paperware_mcp": {
      "command": "/home/prime/frappe-bench/env/bin/bench",
      "args": [
        "--site",
        "erp.paperwarefactory.com",
        "paperware-mcp",
        "--transport",
        "stdio",
        "--default-user",
        "hermes.bot@paperwarefactory.com"
      ]
    }
  }
}

📦 Total Tools (Exposed MCP Tools - 15 Tools)

Tool Name

Description

get_document

Read detailed information of a specific Document.

list_documents

Retrieve a list of Documents with filters and pagination.

create_document

Create a new Document (with optional Auto Submit).

update_document

Update an existing Document.

delete_document

Delete a Document [Irreversible].

get_count

Get the number of Documents based on filters.

submit_document

Submit a Draft Document.

cancel_document

Cancel a Submitted Document [Irreversible].

set_value

Change the value of a specific field in a Document.

get_doctype_fields

Get the schema and field list of a DocType.

search_link

Search for link fields.

run_report

Run any standard/custom report in ERPNext.

call_method

Execute only whitelisted Python methods.

get_document_pdf

Convert a Document's print format to PDF Base64.

upload_file

Upload a local file to the ERPNext file manager.


📄 License

MIT License — © 2026 Prime Technology of Bangladesh

A
license - permissive license
Not graded
quality - not tested
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables LLMs to interact with any ERPNext instance through comprehensive CRUD operations, advanced permissions, and a web chat interface.
    1
    MIT
  • A
    license
    B
    quality
    D
    maintenance
    Integrates with ERPNext/Frappe API to enable AI assistants to create, read, update, and list documents, run reports, and authenticate via the Model Context Protocol.
    6
    MIT
  • A
    license
    Not graded
    quality
    C
    maintenance
    Enables AI models to securely interact with Frappe Framework/ERPNext instances, supporting document CRUD, RPC methods, file management, workflows, reporting, and more via the Model Context Protocol.
    64
    ISC

View all related MCP servers

Related MCP Connectors

  • Odoo ERP for AI agents: hosted OAuth endpoint, gated writes, one endpoint for every instance.

  • Give AI agents access to form submissions — read, search, update, and process file attachments.

  • Your company's brain for AI agents. Cited, permission-aware knowledge across every system.

View all MCP Connectors

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/sadikhossainnub/paperware_mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server