ECMR MCP

MCP server for electronic consignment notes (eCMR). Create, sign, manage, and track electronic transport documents with QR codes, PDF generation, and digital signatures through the Cargoffer ECMR API. Designed for AI agents like Claude Desktop, Cursor, and Cline

Operational MCP layer for European road logistics documents

License: MIT MCP Node.js GitHub Release GitHub Stars

An eCMR MCP server that turns the Cargoffer ECMR API into callable tools for AI agents (Claude Desktop, Cursor, Cline, Continue, etc.). It lets LLMs create, sign, manage, and track electronic consignment notes (eCMR / digital waybills) — the legally binding document for international road freight — entirely through natural language.

What problem does it solve? European road transport still relies on paper CMR waybills that get lost, delayed, or rejected at borders. This MCP server digitizes the full consignment lifecycle so AI agents can orchestrate document workflows without a human touching a PDF form.

What makes it different? Unlike generic document-generation APIs, this exposes the complete eCMR lifecycle as structured MCP tools — authentication, address books, driver/vehicle registries, digital signature collection (sender, pickup, delivery), QR code validation, and PDF generation — all aligned with the UN/CMR convention legal framework.

What integration does it enable? Any MCP-compatible AI client can invoke 30+ logistics document tools as if they were native functions. An LLM can register a carrier, create a waybill, collect three-party signatures, lock it legally, generate a QR, and produce the final PDF — all in one conversation.

What does "easy integration" mean concretely? Copy-paste one JSON config block into your Claude Desktop config, set one environment variable (ECMR_API_KEY), and your AI assistant can immediately start managing real European consignment notes. No SDKs, no OAuth flows, no middleware servers.


Why this MCP exists

Every day, hundreds of thousands of trucks cross European borders with paper CMR waybills. The paper gets wet, lost, or stuck under a seat. When an inspection happens, drivers scramble. When a dispute arises, nobody has the signed original. The eCMR (electronic CMR) convention solved the legal framework, but the tooling has stayed locked inside proprietary logistics suites — invisible to the AI agents that shippers and forwarders are starting to use for operations.

This MCP server exposes the Cargoffer ECMR API as first-class LLM tools so that an AI agent — not a human dispatcher — can handle the entire consignment workflow from creation through legally binding signature collection. It makes logistics document automation possible inside the agent's native reasoning loop.

AI Agent Capabilities

CapabilityWhat the AI can do
Document digitizationCreate, edit, lock (finalize) eCMR documents from natural language
Logistics operationsManage addresses, fleet vehicles, and driver records
Digital signingSign documents as sender, pickup, or delivery — legally binding
VerificationGenerate and validate QR codes for traceability
PDF outputGenerate signed PDF waybills automatically
File attachmentsAttach photos, delivery proof, and supporting docs

MCP Capabilities

  • 30+ MCP tools covering the full eCMR lifecycle — no tool is hidden behind a submenu
  • Digital signature orchestration — collect sender, pickup, and delivery signatures in sequence
  • QR code generation and validation — every signed waybill gets a scannable proof-of-authenticity
  • PDF generation — produce court-admissible PDFs from signed eCMRs
  • Address, driver, and vehicle management — reusable registries so agents don't repeat data entry
  • File attachment support — agents can upload delivery photos, inspection docs, or proof-of-damage
  • JWT-based authentication — the server handles token lifecycle transparently
  • JSON-RPC 2.0 over HTTP — standard MCP transport, no custom protocol
  • Zero runtime dependencies beyond Node.js 18+ — no Docker, no database

Tools

CategoryToolDescription
🔐 Authecmr_auth_loginAuthenticate and receive JWT token
ecmr_auth_registerRegister a new account
📍 Addressesecmr_addresses_listList all addresses
ecmr_addresses_createCreate a new address
ecmr_addresses_getGet address by ID
ecmr_addresses_updateUpdate an existing address
ecmr_addresses_deleteDelete an address
👤 Driversecmr_drivers_listList all drivers
ecmr_drivers_createRegister a new driver
ecmr_drivers_getGet driver details
ecmr_drivers_deleteRemove a driver
🚛 Vehiclesecmr_vehicles_listList all vehicles
ecmr_vehicles_createAdd a vehicle
ecmr_vehicles_getGet vehicle details
ecmr_vehicles_deleteRemove a vehicle
📄 eCMR Coreecmr_listList all consignment notes
ecmr_createCreate a new eCMR waybill
ecmr_getGet eCMR by ID
ecmr_updateUpdate an eCMR
ecmr_deleteDelete an eCMR
ecmr_lockLock (legally close) an eCMR
✍️ Signaturesecmr_sign_senderSign as sender / carrier
ecmr_sign_pickupSign for goods pickup
ecmr_sign_deliverySign for goods delivery
ecmr_pending_signaturesList signatures awaiting action
📱 QR / PDFecmr_qrcodeGenerate QR code for an eCMR
ecmr_validate_qrValidate a QR code payload
ecmr_get_pdfDownload PDF of a signed eCMR
📎 Filesecmr_upload_fileAttach a file to an eCMR
ecmr_download_fileDownload an attached file
📬 Sendecmr_sendSend eCMR to receiver

Directory structure

ecmr-mcp/
├── package.json          # Node.js 18+, ES module, @cargoffer/ecmr-mcp
├── .env.example          # Environment variable template
├── src/
│   ├── server.js         # MCP server entry point (JSON-RPC 2.0 / HTTP)
│   └── tools.js          # 30+ tool definitions mapped to ECMR API
└── README.md

Quick Start

git clone https://github.com/cargoffer/ecmr-mcp.git
cd ecmr-mcp
export ECMR_API_KEY="your-api-key"
node src/server.js

Server starts on http://localhost:3000 with a JSON-RPC 2.0 endpoint.


Installation

Claude Desktop

Add to your claude_desktop_config.json:

{
  "mcpServers": {
    "ecmr": {
      "command": "node",
      "args": ["/absolute/path/to/ecmr-mcp/src/server.js"],
      "env": {
        "ECMR_API_KEY": "your-api-key"
      }
    }
  }
}

Cursor

In Cursor Settings → Features → MCP Servers → Add New:

Name:   ecmr
Type:   command
Command: node /absolute/path/to/ecmr-mcp/src/server.js
Env:    ECMR_API_KEY=your-api-key

Direct HTTP (for custom integrations)

curl -X POST http://localhost:3000 \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "ecmr_auth_login",
    "params": {"email": "[email protected]", "password": "..."}
  }'

MCP protocol in action

Create a new electronic consignment note:

curl -X POST http://localhost:3000 \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer <token>" \
  -d '{
    "jsonrpc": "2.0",
    "id": 2,
    "method": "ecmr_create",
    "params": {
      "senderAddressId": "addr_123",
      "deliveryAddressId": "addr_456",
      "driverId": "driver_789",
      "vehicleId": "veh_012",
      "goods": {
        "description": "Electronic components",
        "weight": 1200,
        "packages": 24
      }
    }
  }'

Collect a signature:

curl -X POST http://localhost:3000 \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer <token>" \
  -d '{
    "jsonrpc": "2.0",
    "id": 3,
    "method": "ecmr_sign_sender",
    "params": {
      "ecmrId": "ecmr_abc123",
      "signatureData": "base64-encoded-signature-image"
    }
  }'

Example Prompts for AI Agents

"Create a new eCMR waybill for a shipment of electronics from Madrid to Paris. Register the sender address, driver, and vehicle first."

"Sign the eCMR with ID abc-123 as the sender, then generate a QR code for the delivery driver."

"List all eCMRs that are still pending signatures and remind the consignee to sign."

"Download the PDF of eCMR xyz-789 and attach the delivery photo."

"Lock eCMR abc-123 now that all three signatures (sender, pickup, delivery) have been collected."

"What's the status of the waybill for order #44567? Show me the addresses, driver, and signature progress."


Environment Variables

VariableDescriptionDefault
ECMR_API_KEYCargoffer API key (required)
ECMR_API_URLAPI base URLhttps://ecmr.api.release.cargoffer.com
PORTServer port3000

For local development:

ECMR_API_URL=http://localhost:8090 ECMR_API_KEY=your-key node src/server.js

API Endpoints

EndpointMethodDescription
/healthGETHealth check
/toolsGETList all available MCP tools
/POSTJSON-RPC 2.0 endpoint

Semantic tags

eCMR electronic consignment note MCP server Model Context Protocol European road transport logistics document automation CMR waybill digital waybill AI agents LLM tools trucking freight Cargoffer JSON-RPC supply chain transportation digital signature QR code waybill PDF road freight easy MCP integration


Getting Credentials

Contact Cargoffer to get your API key:


License

MIT — see LICENSE file for details.


Links

Related Servers