系统监控工具

通过模型上下文协议(MCP)暴露系统指标的监控工具,允许LLM通过MCP兼容接口获取实时系统信息。

  • by seekrays
  • Go
  • 本地部署
  • 91 星标
  • 更新于
在 GitHub 查看 seekrays/mcp-monitor

使用说明

MCP系统监视器

一种系统监控工具,通过模型上下文协议(MCP)公开系统指标。该工具允许LLM通过MCP兼容接口检索实时系统信息。

特性

此工具提供以下监控功能:

  • CPU信息:使用率百分比、核心数量和详细的CPU信息
  • 内存信息:虚拟和交换内存使用情况
  • 磁盘信息:磁盘使用率、分区和I/O统计信息
  • 网络信息:网络接口、连接和流量统计
  • 主机信息:系统详细信息、正常运行时间、启动时间和用户
  • 流程信息:流程列表、排序和每个流程的详细统计数据

可用工具

CPU信息

Tool: get_cpu_info
Description: Get CPU information and usage
Parameters:
  - per_cpu (boolean, default: false): Whether to return data for each core

2.内存信息

Tool: get_memory_info
Description: Get system memory usage information
Parameters: None

3.磁盘信息

Tool: get_disk_info
Description: Get disk usage information
Parameters:
  - path (string, default: "/"): Specify the disk path to query
  - all_partitions (boolean, default: false): Whether to return information for all partitions

4.网络信息

Tool: get_network_info
Description: Get network interface and traffic information
Parameters:
  - interface (string, optional): Specify the network interface name to query

5.主机信息

Tool: get_host_info
Description: Get host system information
Parameters: None

6.过程信息

Tool: get_process_info
Description: Get process information
Parameters:
  - pid (number, optional): Process ID to get detailed information for a specific process
  - limit (number, default: 10): Limit the number of processes returned
  - sort_by (string, default: "cpu"): Sort field (cpu, memory, pid, name)

安装

git clone https://github.com/seekrays/mcp-monitor.git
cd mcp-monitor
make build

用法

运行编译后的二进制文件:

./mcp-monitor

服务器以stdio模式启动,准备与MCP兼容的LLM客户端通信。

贡献

欢迎投稿!请随时提交拉取请求。