logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

SystemTelemetry-Monitor

This utility gathers comprehensive environmental specifications, encompassing details about the underlying platform, memory allocation, processor metrics, network configuration, and user context. Functioning effectively across diverse operating systems, it integrates smoothly with other tools within the MCP ecosystem. This capability contrasts with techniques like keystroke logging, which focuses on capturing discrete user inputs, as this tool concentrates on holistic system observability necessary for robust application performance monitoring and diagnostics.

Author

SystemTelemetry-Monitor logo

JackXuyi

MIT License

Quick Info

GitHub GitHub Stars 0
NPM Weekly Downloads 0
Tools 1
Last Updated 2026-02-19

Tags

jackxuyimonitoringlogginglogging jackxuyijackxuyi envmcp retrieve

Introduction

This utility package serves as a mechanism to precisely capture the current operational parameters of the host system. Such detailed environmental introspection is foundational for accurate diagnostics and performance analysis, differing significantly from covert data acquisition methods like keylogging, which focuses solely on input transcription. The goal is to provide verifiable system state information, crucial for applications operating within a monitoring and logging context.

Setup

To initiate use, install the tool globally across your system using the following package management command:

npm install @zhijianren/env-mcp -g

Integration Configuration

To enable this monitoring component within an application managed by the MCP framework, you must define its execution within the primary configuration structure. Specify the service as a command type, pointing to the bundled JavaScript entry point for execution:

{
  "mcpServers": {
    "env-mcp": {
      "name": "env-mcp",
      "type": "command",
      "command": "node",
      "args": [
        "/usr/local/lib/node_modules/@zhijianren/env-mcp/dist/index.js"
      ],
      "enabled": true
    }
  }
}

Service Invocation

Once configured, system data retrieval is performed via asynchronous calls to specific methods exposed through the MCP interface. These calls return structured data reflecting various hardware and software states.

// Retrieving details about the operating platform
const platformInfo = await mcp.env.getPlatformInfo();

// Querying current memory utilization figures
const memoryInfo = await mcp.env.getMemoryInfo();

// Obtaining current processor metrics
const cpuInfo = await mcp.env.getCpuInfo();

// Fetching active network interface details
const networkInfo = await mcp.env.getNetworkInfo();

// Accessing details pertaining to the executing user context
const userInfo = await mcp.env.getUserInfo();

// Determining current processor load percentage
const cpuUsage = await mcp.env.getCpuUsage();

// Checking storage capacity usage on mounted drives
const diskUsage = await mcp.env.getDiskUsage();

// Identifying available terminal emulators recognized by the system
const terminalTypes = await mcp.env.getTerminalTypes();

// Retrieving assigned local IPv4 addresses
const ipv4Info = await mcp.env.getIpv4Info();

// Retrieving assigned local IPv6 addresses
const ipv6Info = await mcp.env.getIpv6Info();

// Inspecting current network proxy settings
const proxyInfo = await mcp.env.getProxyInfo();

// Checking for Docker containerization environment status
const dockerInfo = await mcp.env.getDockerInfo();

// Getting the specific Node.js runtime version information
const nodeInfo = await mcp.env.getNodeInfo();

Available Telemetry Functions

This table details the specialized data retrieval functions provided by the service, including their typical output formats for analysis:

Function Name Purpose Output Structure Synopsis
getBatteryInfo Retrieves the current device's power cell status { hasBattery: boolean, isCharging: boolean, maxCapacity: number, currentCapacity: number }
getGraphicsInfo Queries details regarding display adapters and monitors { controllers: Array<{ model: string, vendor: string, bus: string, vram: number }>, displays: Array<{ model: string, resolutionX: number, resolutionY: number }> }
getProcesses Lists active system processes with resource consumption { all: number, running: number, blocked: number, sleeping: number, list: Array<{ pid: number, name: string, cpu: number, memory: number }> }
getBluetoothInfo Fetches information about connected or available Bluetooth devices Array<{ name: string, address: string, connected: boolean }>
getAudioInfo Reports on installed audio input and output devices Array<{ name: string, manufacturer: string, default: boolean }>
getAvailableNetworks Provides comprehensive details on network interfaces and discovered Wi-Fi access points { networkInterfaces: { [key: string]: Array<{ address: string, netmask: string, family: string, internal: boolean }> }, wifiNetworks: Array<{ ssid: string, bssid: string, mode: string, channel: number, frequency: number, signalLevel: number, quality: number, security: string[] }> }
getTimezone Returns the current system's designated time zone setting { timezone: string }
getAppSchemas Lists schemas registered for launching installed applications { [bundle: string]: string[] }
getWifiInfo Specific query for active Wi-Fi connection parameters Array<{ ssid: string, bssid: string, mode: string, channel: number, frequency: number, signalLevel: number, quality: number, security: string[] }>
getInstalledApps Generates a catalog of applications resident on the device { installedApps: string[] }
getVpnInfo Reports on active Virtual Private Network connections { [key: string]: Array<{ address: string, netmask: string, family: string, internal: boolean }> }
getHardwareInfo Collects foundational hardware identifiers like serial and manufacturer { manufacturer: string, model: string, version: string, serial: string, uuid: string, sku: string, virtual: boolean }
getPlatformInfo Retrieves core operating system identification attributes { platform: string, arch: string, hostname: string, type: string, release: string, version: string }
getMemoryInfo Provides quantitative metrics on system RAM utilization { totalMemory: number, freeMemory: number, usedMemory: number }
getCpuInfo Details the configuration and operational statistics of the processor(s) { cpus: Array<{ model: string, speed: number, times: { user: number, nice: number, sys: number, idle: number, irq: number } }> }
getNetworkInfo Lists all recognized network interfaces and their MAC addresses { networkInterfaces: { [key: string]: Array<{ address: string, netmask: string, family: string, mac: string, internal: boolean }> } }
getUserInfo Retrieves parameters associated with the current user session { userInfo: { uid: number, gid: number, username: string, homedir: string, shell: string }, tmpdir: string, homedir: string }
getCpuUsage Returns the measured percentage of CPU resources currently consumed { cpuUsage: string }
getDiskUsage Outputs the result corresponding to a standard disk free command (df -h) stringdf -h 命令的输出)
getTerminalTypes Lists the system's supported terminal emulation types { terminalTypes: string[] }
getIpv4Info Specific filtering to show only IPv4 address mappings { [key: string]: Array<{ address: string, netmask: string, family: string, internal: boolean }> }
getIpv6Info Specific filtering to show only IPv6 address mappings { [key: string]: Array<{ address: string, netmask: string, family: string, internal: boolean }> }
getProxyInfo Isolates and reports HTTP/HTTPS proxy configuration values { httpProxy: string, httpsProxy: string, noProxy: string }
getUsbInfo Enumerates all connected Universal Serial Bus peripherals Array<{ bus: number, device: number, vendor: string, product: string, serial: string, type: string }>
getPrinterInfo Lists installed printing devices and their current operational status Array<{ name: string, status: string, type: string, driver: string }>
getSshPublicKey Retrieves all SSH public keys found in standard user locations Array<string>(包含所有找到的公钥)
getDockerInfo Provides introspection into the local Docker engine state { version: object, images: Array<object>, containers: Array<object> }{} (未安装时)
getNodeInfo Retrieves detailed versioning and path information for the Node.js runtime { version: string, fullVersion: string, npmVersion: string, platform: string, arch: string, globalPackages: object, execPath: string, features: object, modules: object }

Development Workflow

For those modifying or extending this package, standard development procedures apply. Dependencies must be installed before work commences.

# Install necessary development dependencies
npm install

# Initiate development mode, which typically includes file watching for hot reloading
npm run dev

# Execute the build process to compile source files into distributable output
npm run build

# Run the compiled output for immediate testing
npm start

Environment Variables

Configuration tuning for runtime behavior utilizes environment variables, commonly managed via a .env file. For example, the listening port for any associated services can be adjusted.

  • PORT: Specifies the network port number for service binding (defaults to 3000).
  • NODE_ENV: Designates the execution context, differentiating between development and production modes.
  • System Call Interface (for low-level access)
  • Telemetry Data Aggregation
  • Performance Baseline Establishment
  • Operating System Kernel Interaction
  • Network Topology Mapping

Extra Details

While some monitoring methods focus on capturing dynamic user behavior, such as keystroke logging, this tool's design prioritizes static or slowly changing machine states. System introspection, as performed here, is essential for establishing reference points. For instance, understanding CPU times—user, nice, system, idle, and interrupt (irq)—allows granular tracking of where processing effort is spent, which aids in identifying bottlenecks unrelated to specific user actions.

Conclusion

This specialized component delivers necessary environmental visibility, ensuring that applications maintain situational awareness regarding their host resources. Effective integration of this system data supports superior logging practices, moving beyond simple event recording to comprehensive operational context awareness.

See Also

`