Skip to main content
Glama
allenbijo

MCP System Info Server

get_sysinfo

Retrieve real-time system information including CPU, memory, disk, and processor details for monitoring and diagnostic purposes.

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

  • sysinfo.py:9-18 (handler)
    The tool handler function for 'get_sysinfo', decorated with @mcp.tool() for registration, fetches system info asynchronously and returns it as a formatted string.
    @mcp.tool() 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
  • Supporting utility function that gathers comprehensive system information (CPU, memory, disk) using platform and psutil libraries, formats it into a multi-line string, and returns it. Called by the tool handler.
    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

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