EM

eynaexp/meshcentral-mcp

Developer tools

Эта страница переведена автоматически. Технические детали смотрите в оригинале. Открыть оригинал

4 stars 5 forks Качество 68 Тренд 20

MCP server for controlling MeshCentral panels - manage devices, run commands, power actions via AI

Обзор

A Model Context Protocol (MCP) server that lets AI assistants control your MeshCentral panel. - List, search, and manage devices (nodes) - List and manage device groups (meshes) - Run remote commands on devices (CMD, PowerShell, Linux shell, Agent console) - Power actions (sleep, reset, poweroff, wake-on-LAN) - Send toast notifications to devices - Manage users (list, create, delete) - View events and audit logs - Device notes management - Move devices between groups - Intel AMT device scanning - Login token authentication (avoids storing real passwords) - Local file jail (prevents agent from reading .env or escaping designated directory) - Confirmation tokens for destructive operations - Connection health check (ping/pong) - Output sanitization (ANSI stripping, truncation, prompt injection prevention) Copy .env.example to .env and fill in your server details: Create a login token in the MeshCentral web UI under .

README

Показан фрагмент оригинального README. Открыть оригинал.

MeshCentral MCP Server

A Model Context Protocol (MCP) server that lets AI assistants control your MeshCentral panel.

Features

  • List, search, and manage devices (nodes)
  • List and manage device groups (meshes)
  • Run remote commands on devices (CMD, PowerShell, Linux shell, Agent console)
  • Power actions (sleep, reset, poweroff, wake-on-LAN)
  • Send toast notifications to devices
  • Manage users (list, create, delete)
  • View events and audit logs
  • Device notes management
  • Move devices between groups
  • Intel AMT device scanning
  • Login token authentication (avoids storing real passwords)
  • Local file jail (prevents agent from reading .env or escaping designated directory)
  • Confirmation tokens for destructive operations
  • Connection health check (ping/pong)
  • Output sanitization (ANSI stripping, truncation, prompt injection prevention)

Setup

1. Install dependencies

cd meshcentral-mcp
npm install

2. Configure MeshCentral credentials

Copy .env.example to .env and fill in your server details:

cp .env.example .env

Login tokens (preferred over a password)

Create a login token in the MeshCentral web UI under My Account → Login tokens. MeshCentral returns a pair: a token username (always prefixed ~t:) and a token password. Both are required — a token password on its own cannot authenticate.

MESH_TOKEN_USER=~t:xxxxxxxxxxxxxxxx
MESH_TOKEN_PASS=xxxxxxxxxxxxxxxxxxxx

Or supply both in one variable, comma-separated:

MESH_TOKEN=~t:xxxxxxxxxxxxxxxx,xxxxxxxxxxxxxxxxxxxx

Tokens can be given an expiry and revoked without changing the account password, so they are the right credential for a service account.

Username/password fallback

MESH_SERVER_URL=https://mesh.yourdomain.com
MESH_USERNAME=admin
MESH_PASSWORD=yourpassword

3. MCP Client Configuration

Add to your MCP client config (e.g. Claude Desktop claude_desktop_config.json):

{
  "mcpServers": {
    "meshcentral": {
      "command": "node",
      "args": ["path/to/meshcentral-mcp/src/index.js"],
      "env": {
        "MESH_SERVER_URL": "https://mesh.yourdomain.com",
        "MESH_TOKEN_USER": "~t:xxxxxxxxxxxxxxxx",
        "MESH_TOKEN_PASS": "xxxxxxxxxxxxxxxxxxxx"
      }
    }
  }
}

For opencode, add to your opencode.json:

{
  "mcpServers": {
    "meshcentral": {
      "command": "node",
      "args": ["path/to/meshcentral-mcp/src/index.js"],
      "env": {
        "MESH_SERVER_URL": "https://mesh.yourdomain.com",
        "MESH_TOKEN_USER": "~t:xxxxxxxxxxxxxxxx",
        "MESH_TOKEN_PASS": "xxxxxxxxxxxxxxxxxxxx"
      }
    }
  }
}

Available Tools (58 total)

Inventory & Monitoring

Tool Description
mesh_server_info Get server info and stats (cached from connect)
mesh_list_devices List all devices, optionally by group
mesh_get_device Get device details
mesh_list_groups List device groups
Открыть полный README на GitHub

Установка

This server does not publish a one-line install command.

Open the repository installation guide Новичок в MCP? Начните с руководства на mcpskill.org →

Конфигурация

{ "mcpServers": { "meshcentral": { "command": "node", "args": ["path/to/meshcentral-mcp/src/index.js"], "env": { "MESH_SERVER_URL": "https://mesh.yourdomain.com", "MESH_TOKEN_USER": "~t:xxxxxxxxxxxxxxxx", "MESH_TOKEN_PASS": "xxxxxxxxxxxxxxxxxxxx" } } } }