Token导航 LogoToken导航TokenDH.com
DRM MCP logo
运维云端stdio官方级别未说明来源级核验

DRM MCP

MCP Server

tsc

Digi Remote Manager MCP Server 是一个用于集成 Digi Remote Manager API 的模型上下文协议服务器,提供62种工具用于管理物联网设备、数据流、警报、自动化等。

工具数

29

提示词数

0

GitHub Stars

0

资源数

0
JavaScriptClaude云端部署Claude DesktopClaude

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

作者 / 组织

flinntech

提供方

flinntech

最后核验

2026/5/17 20:23

运行时

Node.js

快速接入

先看主来源和安装命令,再打开仓库或文档;下面只保留这个条目的关键接入事实。

命令预览

npx tsc --noEmit

详细介绍

Digi Remote Manager MCP Server

Model Context Protocol (MCP) server for Digi Remote Manager API integration. Provides 62 tools for managing IoT devices, data streams, alerts, automations, and more.

Features

  • Multi-Tenant Support: Single or multi-user mode with per-user credentials and isolated state
  • Dynamic Tool Loading: Reduces initial context by ~70% - only loads tools you need
  • 62 API Tools: Full coverage of Digi Remote Manager REST API (13 core + 49 on-demand)
  • SCI/RCI Support: Direct device communication via Server Command Interface
  • Device Management: Query devices, groups, firmware, configurations
  • Data Streams: Access time-series telemetry data with rollups
  • Monitoring: Alerts, monitors, automations, and reports
  • Multiple Transports: Supports stdio and HTTP transports

Dynamic Tool System

The server uses a category-based dynamic tool loading system to reduce LLM context usage:

Core Tools (Always Available - 13 tools)

  • Tool Management: list_tool_categories, load_tool_category
  • Device Basics: list_devices, get_device
  • Stream Basics: list_streams, get_stream, get_stream_history
  • Organization: list_groups, get_group
  • Monitoring: list_alerts, get_alert
  • Account: get_account_info, get_api_info

On-Demand Categories (49 tools organized into 11 categories)

Load additional tools by category using load_tool_category:

  • bulk_operations (5 tools) - CSV export for devices, streams, jobs, events
  • advanced_data (3 tools) - Stream rollups, aggregations, device logs
  • automations (6 tools) - Workflow automation management
  • firmware (4 tools) - Firmware management and updates
  • sci (9 tools) - Direct device communication via SCI/RCI
  • monitors (3 tools) - Webhook and monitor management
  • jobs (2 tools) - Async job tracking
  • user_management (3 tools) - User accounts, security settings
  • configuration (4 tools) - Device templates, health monitoring configs
  • files (2 tools) - File listing and retrieval
  • events (2 tools) - Audit trail and event history

Usage Pattern

  1. Connect to server - only 13 core tools visible
  2. Call list_tool_categories to see available categories
  3. Call load_tool_category with category name (e.g., "configuration")
  4. All tools in that category become available
  5. Repeat as needed for other categories

Prerequisites

  • Node.js 18.0.0 or higher
  • Digi Remote Manager account
  • API Key ID and Secret (get from https://remotemanager.digi.com → Profile → API Keys)

Quick Start

1. Clone and Install

git clone 
cd DRM_MCP
npm install

2. Build the TypeScript Code

The server is written in TypeScript. Build it before running:

npm run build

This compiles the TypeScript code in src/ to JavaScript in dist/.

3. Configure Environment

Copy the example environment file and configure your API credentials:

cp .env.example .env

Edit .env and add your API credentials:

DRM_API_KEY_ID=your_api_key_id_here
DRM_API_KEY_SECRET=your_api_key_secret_here

4. Run the Server

Stdio mode (default) - for MCP clients like Claude Desktop:

npm start

HTTP mode - for web integrations like n8n:

MCP_TRANSPORT=http MCP_PORT=3000 npm start

Development

The project is written in TypeScript with full type safety.

Project Structure

drm-mcp/
├── src/
│   ├── types/
│   │   ├── auth.types.ts      # Authentication & multi-tenant types
│   │   ├── tool.types.ts      # Tool system types
│   │   ├── api.types.ts       # DRM API response types
│   │   └── server.types.ts    # Server configuration types
│   └── server.ts              # Main server implementation
├── dist/                      # Compiled JavaScript (generated)
├── tsconfig.json              # TypeScript configuration
└── package.json

Development Workflow

Watch mode - automatically recompile on changes:

npm run dev

Build for production:

npm run build

Type check without building:

npx tsc --noEmit

TypeScript Benefits

  • Type safety for all 60+ tool arguments and responses
  • Compile-time validation of API calls and data structures
  • Better IDE support with autocomplete and inline documentation
  • Refactoring safety across the 2,700+ line codebase
  • Multi-tenant credential type checking

Multi-Tenant Configuration

The server supports two modes:

Single-Tenant Mode (Default)

Use environment variables for a single set of credentials:

DRM_API_KEY_ID=your_api_key_id_here
DRM_API_KEY_SECRET=your_api_key_secret_here

All requests will use these credentials.

Multi-Tenant Mode

For multiple users with different DRM credentials:

  1. Create credentials.json in the project root:
{
  "user1": {
    "api_key_id": "user1_key_id",
    "api_key_secret": "user1_key_secret"
  },
  "user2": {
    "api_key_id": "user2_key_id",
    "api_key_secret": "user2_key_secret"
  },
  "alice": {
    "api_key_id": "alice_key_id",
    "api_key_secret": "alice_key_secret"
  }
}
  1. When making HTTP requests to the MCP server, include the X-User-ID header:
curl -X POST http://localhost:3000/mcp \
  -H "Content-Type: application/json" \
  -H "X-User-ID: alice" \
  -d '{"jsonrpc":"2.0","method":"tools/list","id":1}'
  1. Each user's credentials will be used for their requests
  2. Tool categories are tracked separately per user

Security Notes:

  • credentials.json is gitignored by default
  • Store credentials securely
  • Each user gets isolated access with their own DRM API credentials
  • Per-user tool category state is maintained in memory

Docker Deployment

Using Docker Compose

  1. Configure environment variables in .env:
cp .env.example .env
# Edit .env with your credentials
  1. Start the server:
docker-compose up -d
  1. Check logs:
docker-compose logs -f
  1. Health check:
curl http://localhost:3000/health

Manual Docker Build

docker build -t drm-mcp-server .
docker run -d \
  -e DRM_API_KEY_ID=your_key_id \
  -e DRM_API_KEY_SECRET=your_key_secret \
  -e MCP_TRANSPORT=http \
  -e MCP_PORT=3000 \
  -p 3000:3000 \
  drm-mcp-server

Environment Variables

VariableRequiredDefaultDescription
DRM_API_KEY_IDYes-Digi Remote Manager API Key ID
DRM_API_KEY_SECRETYes-Digi Remote Manager API Key Secret
MCP_TRANSPORTNostdioTransport type: stdio or http
MCP_PORTNo3000HTTP server port (when using http transport)
NODE_ENVNoproductionNode environment

Usage Examples

List Available Tool Categories

{
  "tool": "list_tool_categories",
  "arguments": {}
}

Load a Tool Category

{
  "tool": "load_tool_category",
  "arguments": {
    "category": "configuration"
  }
}

List Connected Devices

{
  "tool": "list_devices",
  "arguments": {
    "query": "connection_status=\"connected\"",
    "size": 100
  }
}

Get Stream Historical Data

{
  "tool": "get_stream_history",
  "arguments": {
    "stream_id": "00000000-00000000-00409DFF-FF122B8E/temperature",
    "start_time": "-24h",
    "size": 1000
  }
}

Query Device State via SCI

{
  "tool": "sci_query_device_state",
  "arguments": {
    "device_id": "00000000-00000000-00409DFF-FF122B8E",
    "state_group": "mobile_stats",
    "use_cache": false
  }
}

Available Tools

Device Management

  • list_devices, get_device
  • list_groups, get_group
  • list_firmware, get_firmware

Data & Telemetry

  • list_streams, get_stream, get_stream_history
  • get_stream_rollups (aggregated data)
  • get_device_logs

Monitoring & Automation

  • list_alerts, get_alert
  • list_monitors, get_monitor
  • list_automations, get_automation

SCI/RCI (Direct Device Communication)

  • sci_query_device_state
  • sci_query_device_settings
  • sci_list_device_files, sci_get_device_file
  • sci_query_multiple_devices

Reports & Analytics

  • get_connection_report
  • get_device_report
  • get_cellular_utilization_report

See tool descriptions for complete parameter documentation.

Development

# Install dependencies
npm install

# Run in development mode
npm run dev

# Run with custom environment
DRM_API_KEY_ID=xxx DRM_API_KEY_SECRET=yyy npm start

Troubleshooting

Error: API credentials not configured

Make sure you've set both environment variables:

  • DRM_API_KEY_ID
  • DRM_API_KEY_SECRET

Check that your .env file exists and contains valid credentials.

401 Authentication Error

Verify your API credentials are correct in Digi Remote Manager.

403 Permission Denied

Some features require Remote Manager Premier Edition.

License

MIT

目录标签

目录标签

JavaScriptClaude云端部署物联网管理本地部署设备监控数据流处理自动化工具远程管理

支持客户端

Claude DesktopClaude

接入字段

传输方式(transport,传输协议)

stdio

鉴权方式(authType,认证方式)

api-key

运行时(runtime,运行环境)

Node.js

来源包(packageName,安装包名)

tsc

工具数量(toolCount,工具数)

29

资源数量(resourceCount,资源数)

0

提示词数量(promptCount,提示词数)

0

权限和风险

stdioapi-key部署方式未说明

接入前请确认传输方式、认证方式和部署位置,并根据实际工具能力限制访问范围。

安装前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

来源信息

继续浏览同类 MCP