Skip to main content
Glama

System Info MCP Server

by srirama7
test-server.js1.52 kB
// Simple test script to verify the MCP server tools work import { getCPUInfo } from './dist/tools/cpu.js'; import { getMemoryInfo } from './dist/tools/memory.js'; import { getOSInfo } from './dist/tools/system.js'; async function testServer() { console.log('Testing System Info MCP Server...\n'); try { // Test CPU Info console.log('1. Testing get_cpu_info...'); const cpuResult = await getCPUInfo(); if (cpuResult.content && cpuResult.content[0]) { const cpuData = JSON.parse(cpuResult.content[0].text); console.log('✓ CPU Info:', cpuData.brand, '-', cpuData.cores, 'cores'); } // Test Memory Info console.log('\n2. Testing get_memory_info...'); const memResult = await getMemoryInfo(); if (memResult.content && memResult.content[0]) { const memData = JSON.parse(memResult.content[0].text); console.log('✓ Memory Info:', memData.totalGB, 'GB total,', memData.freeGB, 'GB free'); } // Test OS Info console.log('\n3. Testing get_os_info...'); const osResult = await getOSInfo(); if (osResult.content && osResult.content[0]) { const osData = JSON.parse(osResult.content[0].text); console.log('✓ OS Info:', osData.distro, osData.release); } console.log('\n✓ All tests passed! The MCP server is working correctly.'); console.log('\nYou can now use this server with Claude Desktop.'); } catch (error) { console.error('\n✗ Test failed:', error.message); process.exit(1); } } testServer();

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/srirama7/system-info-mcp'

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