
用于控制 MeshCentral 面板的 MCP 服务器 - 通过 AI 管理设备,运行命令,电源动作
概览
一个模式上下文协议(MCP)服务器,允许AI助手控制您的 MeshCentral 面板. - 列出、搜索和管理设备(节点) - 列出和管理设备组(meshes) - 运行设备上的远程命令(CMD, PowerShell, Linux shell, Agent Cope) - Power actions (sleep, reset, poweroff, wake- on-LAN) - 向设备发送吐司通知 - 管理用户(列表,创建,删除) - 查看事件和审计日志 - 设备说明管理 - 将设备在组之间移动 - 英特尔 AMT设备扫描 - Login sign 认证(避免存储真实密码) - 本地文件夹 (防止代理阅读.env或逃脱指定目录) - 确认破坏性操作的信号 - 连接健康检查(平/棉) - 输出 sanitization(ANSI striping, truncation, 即时注射预防) 复制.env.example 到.env 并填写您的服务器细节 : 在 . 下的 MeshCentral web UI 中创建登录符.
概述(AI 翻译)
一个模式上下文协议(MCP)服务器,允许AI助手控制您的 MeshCentral 面板.
□ 特性
- 清单、搜索和管理设备(节点)
- 列出和管理设备组
- 运行设备上的远程命令(CMD、PowerShell、Linux shell、代理控制台)
- 电能动作(睡眠、重置、电能关闭、局域网警报)
- 向设备发送土司通知
- 管理用户(列表、创建、删除)
- 查看事件和审计记录
- 设备说明管理
- 在组之间移动设备
- Intel AMT设备扫描
- 登录令牌认证(避免存储真实密码)
- 地方档案监狱(防止代理人阅读.env或逃离指定目录)
- 破坏行动的确认标志
- 联系健康检查(平/平)
- 输液消毒(ANSI脱衣、截取、快速注射预防)
□ 设置
-
安装依赖关系
-
配置网络中心证书
复制 [[T0] 到 [[T1] 并填写您的服务器细节 :
QQ 登录符 (首选密码)
在 MeshCentral web UI 下在 ** My Counter 上创建登录符**. MeshCentral 返回一个 **pair **:一个符号用户名(总是被前缀 ~t:)和一个符号密码.
本页由 AI 翻译,技术细节请以原文为准。
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 |
安装
This server does not publish a one-line install command.
Open the repository installation guide 新手?先看 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"
}
}
}
}