Skip to main content
Glama
allenbijo

MCP System Info Server

get_sysinfo

Retrieve real-time system details, including CPU, memory, disk, and GPU stats, for monitoring and diagnostics through the MCP System Info Server.

Instructions

Get the current system information. Gives system information such as System, Node name, Release, Version, Machine, Processor CPU Information such as Processor, Physical Cores, Logical Cores Memory Information such as Total Memory, Available Memory, Used Memory, Memory Utilization Disk Information such as Total Disk Space, Used Disk Space, Free Disk Space, Disk Space Utilization

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function for the get_sysinfo tool that invokes the helper function and returns the system information as a string.
    async def get_sysinfo() -> str: """Get the current system information. Gives system information such as System, Node name, Release, Version, Machine, Processor CPU Information such as Processor, Physical Cores, Logical Cores Memory Information such as Total Memory, Available Memory, Used Memory, Memory Utilization Disk Information such as Total Disk Space, Used Disk Space, Free Disk Space, Disk Space Utilization """ data = await get_system_info() return data
  • sysinfo.py:9-9 (registration)
    Registration of the get_sysinfo tool using the FastMCP @mcp.tool() decorator.
    @mcp.tool()
  • Supporting function that gathers detailed system information (system, CPU, memory, disk) using platform and psutil, formats it into a string, and returns it. GPU section is commented out.
    async def get_system_info(): output = [] system_info = platform.uname() output.append("System Information:") output.append(f"System: {system_info.system}") output.append(f"Node Name: {system_info.node}") output.append(f"Release: {system_info.release}") output.append(f"Version: {system_info.version}") output.append(f"Machine: {system_info.machine}") output.append(f"Processor: {system_info.processor}") cpu_info = platform.processor() cpu_count = psutil.cpu_count(logical=False) logical_cpu_count = psutil.cpu_count(logical=True) output.append("\nCPU Information:") output.append(f"Processor: {cpu_info}") output.append(f"Physical Cores: {cpu_count}") output.append(f"Logical Cores: {logical_cpu_count}") memory_info = psutil.virtual_memory() output.append("\nMemory Information:") output.append(f"Total Memory: {memory_info.total} bytes") output.append(f"Available Memory: {memory_info.available} bytes") output.append(f"Used Memory: {memory_info.used} bytes") output.append(f"Memory Utilization: {memory_info.percent}%") disk_info = psutil.disk_usage('/') output.append("\nDisk Information:") output.append(f"Total Disk Space: {disk_info.total} bytes") output.append(f"Used Disk Space: {disk_info.used} bytes") output.append(f"Free Disk Space: {disk_info.free} bytes") output.append(f"Disk Space Utilization: {disk_info.percent}%") # gpus = GPUtil.getGPUs() # if not gpus: # output.append("No GPU detected.") # else: # for i, gpu in enumerate(gpus): # output.append(f"\nGPU {i + 1} Information:") # output.append(f"ID: {gpu.id}") # output.append(f"Name: {gpu.name}") # output.append(f"Driver: {gpu.driver}") # output.append(f"GPU Memory Total: {gpu.memoryTotal} MB") # output.append(f"GPU Memory Free: {gpu.memoryFree} MB") # output.append(f"GPU Memory Used: {gpu.memoryUsed} MB") # output.append(f"GPU Load: {gpu.load * 100}%") # output.append(f"GPU Temperature: {gpu.temperature}°C") return "\n".join(output)

Other Tools

Related Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/allenbijo/mcp-sysinfo'

If you have feedback or need assistance with the MCP directory API, please join our Discord server