主机信息获取工具

by netbuffer

273 downloads
Not rated
GitHub

About

一个轻量级的主机信息获取MCP工具,通过MCP(模型上下文协议)接口提供系统信息,基于Spring Boot3+Spring AI+OSHI(操作系统和硬件信息)库构建。

Details

Author
netbuffer
Downloads
273
Categories
Other

- 获取CPU详细信息(名称、核心数)
- 获取内存使用情况(总量、可用量)
- 获取所有挂载卷的磁盘信息(名称、总空间、已用空间、可用空间、使用率)
- 获取操作系统名称与版本
- 轻量级、快速响应
- 通过标准MCP接口(stdio)提供数据,易于集成

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name 主机信息获取工具
    Command (node, npx, python, etc.)

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

GitHub Releases下载machine-info-mcp-server.jar,确保系统已安装Java 17或更高版本。然后,将MCP客户端的配置文件(如~/.mcp/config.json)中添加如下JSON配置,指定commandjavaargs["-jar", "machine-info-mcp-server.jar"]。保存后,重启MCP客户端,工具列表中应出现get_system_info工具。也可从源码使用Maven构建并运行。

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "\u4e3b\u673a\u4fe1\u606f\u83b7\u53d6\u5de5\u5177": {
            "machine-info-mcp-server": {
                "args": [
                    "-jar",
                    "machine-info-mcp-server.jar"
                ],
                "command": "java",
                "description": "\u83b7\u53d6\u7cfb\u7edf\u4fe1\u606f\u7684MCP\u670d\u52a1",
                "env": {
                    "JAVA_HOME": "/path/to/your/java17"
                }
            }
        }
    }
}

McpServers

{
    "machine-info-mcp-server": {
        "args": [
            "-jar",
            "machine-info-mcp-server.jar"
        ],
        "command": "java",
        "description": "\u83b7\u53d6\u7cfb\u7edf\u4fe1\u606f\u7684MCP\u670d\u52a1",
        "env": {
            "JAVA_HOME": "/path/to/your/java17"
        }
    }
}

machine-info-mcp-server

License Java Spring Boot Spring AI oshi English Documentation 一个轻量级的主机信息获取MCP工具,通过MCP(模型上下文协议)接口提供系统信息,基于Spring Boot3+Spring AI+OSHI(操作系统和硬件信息)库构建。 https://github.com/netbuffer/machine-info-mcp-server https://gitee.com/netbuffer/machine-info-mcp-server https://github.com/netbuffer/machine-info-mcp-server/releases/download/v1.0.0/machine-info-mcp-server.jar

功能特性

- 获取详细的系统信息,包括: - CPU详情(名称、核心数) - 内存使用情况(总量、可用量) - 所有挂载卷的磁盘信息(名称、总空间、已用空间、可用空间、使用率) - 操作系统信息 - 轻量级且快速 - 易于与Spring AI应用集成 - 提供MCP接口获取系统信息

MCP客户端集成方法

配置说明

将如下JSON配置添加到MCP客户端的配置文件中(通常是~/.mcp/config.json或项目根目录下的mcp.config.json): ``json { "mcpServers": { "machine-info-mcp-server": { "command": "java", "args": [ "-jar", "machine-info-mcp-server.jar" ], "env": { "JAVA_HOME": "/path/to/your/java17" // 可选,如果系统未设置JAVA_HOME }, "description": "获取系统信息的MCP服务" } } } `

配置项说明

-
command: 启动命令(通常是java) - args: 启动参数,-jar 后跟jar包路径 - env: 环境变量配置(可选) - description: 服务描述(可选)

验证配置

保存配置文件后,应该能看到
get_system_info工具在可用工具列表中。

环境要求

- Java 17 或更高版本 - Maven 3.6.3 或更高版本

快速开始

从源码构建

``bash
No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.