dokdo-telemetry-mcp
v1.1.0
Published
Dokdo Solutions telemetry MCP server - collects and reports usage analytics
Readme
Dokdo Telemetry MCP Server
Collects, scrubs, and reports anonymized usage analytics from Dokdo customer OpenClaw instances.
Overview
This MCP server runs as a sidecar on each customer's OpenClaw VM. It:
- Reads OpenClaw session logs (JSONL format)
- Parses conversation events (messages, calls, errors)
- Categorizes events by topic, language, outcome
- Scrubs all PII (customer names, numbers, message content)
- Encrypts the batch
- Submits daily to Dokdo's central telemetry server
What Gets Collected
Message Events
- Timestamp
- Language detected (English, Vietnamese, Korean, Spanish)
- Topic category (appointment, hours, menu, review, etc.)
- AI confidence score
- Outcome (answered, escalated, error)
- Message length (not content)
- Whether it had attachments
Call Events
- Duration (seconds)
- Language
- Topic category
- Whether call was transferred to human
- Outcome
Integration Health
- API calls to integrations (Clover, Square, Google, etc.)
- Success/failure rate
- Average latency per provider
Toast POS Events (if configured)
- Menu snapshots (items, categories, modifiers)
- Order events (timestamp, status, totals, lineItems)
- Inventory snapshots (items, quantities, categories)
- Labor time entries (shifts, clock in/out)
- Table snapshots (availability, status)
- All PII is scrubbed: customer names, payment info, delivery addresses removed
System Metrics
- Uptime
- Memory/CPU usage
- Timestamp
What Does NOT Get Collected
❌ Customer names, phone numbers, emails (even in Toast orders)
❌ Message content or call transcripts
❌ Payment info or card data
❌ Delivery addresses or customer contact info
❌ Personal health information
❌ Anything PII-adjacent
Installation
1. Deploy to Customer VM
# Clone / download the MCP
git clone https://github.com/dokdosolutions-us/dokdo-telemetry-mcp.git
cd dokdo-telemetry-mcp
# Install dependencies
npm install
# Build
npm run build2. Configure Environment
cp .env.example .envEdit .env with customer details:
DOKDO_CLIENT_ID=pho-restaurant-001
DOKDO_API_KEY=sk_dokdo_xxxxx
OPENCLAW_SESSIONS_PATH=/home/username/.openclaw/agents/main/sessions3. Run as Service
Option A: Systemd (Linux)
sudo cp dokdo-telemetry.service /etc/systemd/system/
sudo systemctl daemon-reload
sudo systemctl enable dokdo-telemetry
sudo systemctl start dokdo-telemetry
sudo systemctl status dokdo-telemetrydokdo-telemetry.service:
[Unit]
Description=Dokdo Telemetry MCP Server
After=network.target
[Service]
Type=simple
User=openclaw
WorkingDirectory=/opt/dokdo-telemetry-mcp
ExecStart=/usr/bin/node dist/index.js
Restart=always
RestartSec=10
StandardOutput=append:/var/log/dokdo-telemetry.log
StandardError=append:/var/log/dokdo-telemetry.log
[Install]
WantedBy=multi-user.targetOption B: Docker
FROM node:20-alpine
WORKDIR /app
COPY . .
RUN npm install && npm run build
CMD ["node", "dist/index.js"]docker run -d \
--name dokdo-telemetry \
-e DOKDO_CLIENT_ID=pho-restaurant-001 \
-e DOKDO_API_KEY=sk_dokdo_xxxxx \
-v /home/user/.openclaw:/home/user/.openclaw:ro \
dokdo-telemetry:latestOption C: Cron Job (Simple, manual daily run)
# Add to crontab (daily at 11:59 PM)
59 23 * * * cd /opt/dokdo-telemetry-mcp && /usr/bin/node dist/index.js >> /var/log/dokdo-telemetry.log 2>&14. Verify
# Check logs
tail -f /var/log/dokdo-telemetry.log
# Should see:
# [Dokdo Telemetry] Initialized for client: pho-restaurant-001
# [Dokdo Telemetry] Starting collection run at ...
# [Dokdo Telemetry] Found X events
# [Dokdo Telemetry] Submitted X events for YYYY-MM-DDData Format
Daily Batch Submitted to Dokdo Server
{
"clientId": "pho-restaurant-001",
"date": "2026-06-06",
"totalEvents": 147,
"events": [
{
"type": "message",
"timestamp": "2026-06-06T14:32:00Z",
"language": "vietnamese",
"topic": "appointment_inquiry",
"confidence": 0.96,
"outcome": "booking_created",
"messageLength": 42,
"hasAttachment": false
},
{
"type": "call",
"timestamp": "2026-06-06T15:12:00Z",
"duration": 180,
"language": "english",
"topic": "hours_inquiry",
"handoff": false,
"outcome": "answered"
}
],
"integrationHealth": {
"clover_api": {
"calls": 145,
"failures": 0,
"avgLatency": 0.82
},
"google_api": {
"calls": 23,
"failures": 1,
"avgLatency": 1.24
}
},
"systemMetrics": {
"timestamp": "2026-06-06T23:59:00Z",
"uptime": 2592000,
"memoryUsage": { "heapUsed": 45000000 },
"cpuUsage": { "user": 1000000, "system": 500000 }
}
}Encryption
Batches are encrypted with AES-256-CBC before transmission. The Dokdo server decrypts using the API key.
Privacy & Compliance
- No PII stored or transmitted: Names, numbers, content all removed
- Encrypted in transit: TLS + AES-256 encryption
- Encrypted at rest: Dokdo server stores encrypted backups
- Data retention: 90 days default (configurable per customer contract)
- Opt-out: Customer can disable telemetry by setting
DOKDO_TELEMETRY_ENABLED=false
Troubleshooting
MCP not submitting data
# Check connectivity
curl -I https://telemetry.dokdosolutions.us/ingest
# Verify API key
echo $DOKDO_API_KEY
# Check logs
journalctl -u dokdo-telemetry -fNo events found
# Verify session logs path exists
ls -la /home/username/.openclaw/agents/main/sessions/
# Check file permissions
ls -la /home/username/.openclaw/agents/main/sessions/*.jsonl | head -5Permission denied
# MCP process needs read access to OpenClaw sessions
sudo usermod -a -G openclaw dokdo-telemetrySupport
- Issues: https://github.com/dokdosolutions-us/dokdo-telemetry-mcp/issues
- Email: [email protected]
- Status: https://status.dokdosolutions.us
Version: 1.0.0
Last Updated: 2026-06-06
Maintainer: Victor Kang [email protected]
