主机信息获取工具
@netbuffer
About 主机信息获取工具
一个轻量级的主机信息获取MCP工具,通过MCP(模型上下文协议)接口提供系统信息,基于Spring Boot3+Spring AI+OSHI(操作系统和硬件信息)库构建。
Basic information
Config
Add this server to your MCP-compatible client using the configuration below.
{
"mcpServers": {
"machine-info-mcp-server": {
"args": [
"-jar",
"machine-info-mcp-server.jar"
],
"command": "java",
"description": "获取系统信息的MCP服务",
"env": {
"JAVA_HOME": "/path/to/your/java17"
}
}
}
}Tools
No tools detected
We auto-extract tools from the README. The maintainer can list them under a ## Tools heading to populate this section.
Overview
What is 主机信息获取工具?
主机信息获取工具是一个轻量级的MCP(模型上下文协议)工具,通过MCP接口提供详细的系统信息。它基于Spring Boot 3、Spring AI和OSHI(操作系统和硬件信息)库构建,适用于需要获取主机CPU、内存、磁盘、操作系统等信息的Java应用或AI集成场景。
How to use 主机信息获取工具?
从GitHub Releases下载machine-info-mcp-server.jar,确保系统已安装Java 17或更高版本。然后,将MCP客户端的配置文件(如~/.mcp/config.json)中添加如下JSON配置,指定command为java,args为["-jar", "machine-info-mcp-server.jar"]。保存后,重启MCP客户端,工具列表中应出现get_system_info工具。也可从源码使用Maven构建并运行。
Key features of 主机信息获取工具
- 获取CPU详细信息(名称、核心数)
- 获取内存使用情况(总量、可用量)
- 获取所有挂载卷的磁盘信息(名称、总空间、已用空间、可用空间、使用率)
- 获取操作系统名称与版本
- 轻量级、快速响应
- 通过标准MCP接口(stdio)提供数据,易于集成
Use cases of 主机信息获取工具
- 在AI应用中通过MCP协议实时获取本地主机系统信息
- 监控服务器或开发机的CPU、内存、磁盘使用率
- 作为自动化运维工具的一部分,收集节点基础信息
- 在桌面应用或调试环境中快速查看系统硬件与OS详情
FAQ from 主机信息获取工具
主机信息获取工具需要什么运行环境?
需要Java 17或更高版本。若从源码构建,还需要Maven 3.6.3或更高版本。
如何让MCP客户端识别这个工具?
将下载的jar包本地放置,并在MCP客户端配置(如mcp.config.json)中添加对应的java -jar启动指令,配置后工具列表应出现get_system_info。
工具提供了哪些数据接口?
提供get_system_info一个工具,返回包含CPU、内存、磁盘、操作系统的结构化JSON。
主机信息获取工具的数据是实时的吗?
是的,每次调用get_system_info都会通过OSHI库实时采集当前系统数据。
工具支持哪些操作系统?
理论上OSHI支持Windows、Linux、macOS等主流操作系统,具体支持由底层OSHI库决定。
More Other MCP servers
MCP Registry
modelcontextprotocolA community driven registry service for Model Context Protocol (MCP) servers.
🚀 Model Context Protocol (MCP) Curriculum for Beginners
microsoftThis open-source curriculum introduces the fundamentals of Model Context Protocol (MCP) through real-world, cross-language examples in .NET, Java, TypeScript, JavaScript, Rust and Python. Designed for developers, it focuses on practical techniques for building modular, scalable,
🪟 Windows-MCP
CursorTouchMCP Server for Computer Use in Windows
MCP Toolbox for Databases
googleapisMCP Toolbox for Databases is an open source MCP server for databases.
Maestro
mobile-dev-incPainless E2E Automation for Mobile and Web
Comments