System Monitor MCP
Provides real-time system monitoring for Linux machines, including RAM and swap usage, with planned support for CPU, disk, processes, network, and other system metrics.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@System Monitor MCPWhat's my current RAM and swap usage?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
System Monitor MCP
A Model Context Protocol (MCP) server built with TypeScript and Node.js that allows AI clients such as Codex to access real-time system information from a Linux machine.
The project is designed to start as a beginner-friendly MCP and gradually evolve into an intermediate/advanced system monitoring agent.
π Features
Currently Implemented (through Phase 7)
β MCP server using the official MCP SDK
β Streamable HTTP transport
β stdio transport for local Codex
β RAM and Swap monitoring
β CPU, load average, and per-core monitoring
β Disk/filesystem monitoring
β Process listing and process details
β System information and uptime
β Health scoring and system diagnosis
β Network interfaces, traffic, and active connections
β Automated TypeScript/MCP tests
β Local Codex integration
β TypeScript support
β
systeminformationintegration
Planned Features (Phase 8+)
β³ Temperature/sensor monitoring
β³ Historical metrics
β³ Alerts and thresholds
β³ Background monitoring
β³ Service monitoring
β³ Safe process management
β³ Authentication and authorization
β³ Automated tests
β³ Docker deployment
π§ What is MCP?
Model Context Protocol (MCP) is a protocol that allows AI applications to interact with external tools and data sources.
Instead of an AI model only answering from its existing knowledge, an MCP server can give it access to real information.
For this project:
User
β
AI Client / Codex
β
MCP
β
System Monitor MCP
β
Linux System
β
CPU / RAM / Disk / ProcessesFor example, you can ask:
What is my current RAM usage?
The AI can call the MCP tool and receive the actual RAM information from your machine.
π οΈ Tech Stack
Technology | Purpose |
TypeScript | Main programming language |
Node.js | Runtime |
MCP SDK | Build MCP server |
systeminformation | Collect system information |
Express | HTTP server |
Streamable HTTP | HTTP MCP transport |
stdio | Local MCP transport |
Codex CLI | MCP client |
npm | Package management |
π Project Structure
system-monitor-mcp/
β
βββ src/
β βββ index.ts
β βββ stdio.ts
β
βββ dist/
β
βββ node_modules/
β
βββ package.json
βββ package-lock.json
βββ tsconfig.json
βββ project-plan.md
βββ README.md
βββ .gitignoresrc/index.ts
HTTP-based MCP server.
It exposes:
http://localhost:3000/mcpsrc/stdio.ts
stdio-based MCP server used by local Codex.
The stdio architecture is:
Codex
β
stdio
β
stdio.ts
β
MCP Serverproject-plan.md
Contains the roadmap for turning this project into an intermediate/advanced monitoring system.
π¦ Installation
Clone the repository:
git clone <your-repository-url>Enter the project:
cd system-monitor-mcpInstall dependencies:
npm installβΆοΈ Running the HTTP MCP Server
Start the development server:
npm run devThe server should start at:
http://localhost:3000You can test the root endpoint:
curl http://localhost:3000Expected response:
System Monitor MCP Server is runningπ MCP HTTP Endpoint
The MCP endpoint is:
POST http://localhost:3000/mcpThe server uses:
StreamableHTTPServerTransport;for HTTP MCP communication.
π₯οΈ Local Codex Integration
For local Codex, the project uses the stdio transport.
Configure Codex with:
codex mcp add system-monitor -- npx tsx "/home/rakesh/Next js/system-monitor-mcp/src/stdio.ts"Check the configuration:
codex mcp get system-monitorExpected:
system-monitor
enabled: true
transport: stdio
command: npx
args: tsx /home/rakesh/Next js/system-monitor-mcp/src/stdio.tsList MCP servers:
codex mcp listπ§ͺ Testing the MCP
Start Codex:
codexThen ask:
Call my_custom_mcp_test from my system-monitor MCP.The MCP should return:
SUCCESS! This response came from Rakesh's custom System Monitor MCP.This confirms that the custom MCP server is being accessed.
π§ Current MCP Tools
Related MCP server: mcp-remote-agent
get_memory_usage
Returns current RAM and Swap information.
Example response:
{
"ram": {
"total": 6100000000,
"used": 4300000000,
"free": 1800000000,
"available": 2000000000
},
"swap": {
"total": 4500000000,
"used": 2600000000,
"free": 1900000000
}
}my_custom_mcp_test
A simple test tool used to verify that the AI client is actually calling the custom MCP server.
Response:
SUCCESS! This response came from Rakesh's custom System Monitor MCP.This tool is mainly for development/testing and can be removed later.
πΊοΈ Development Roadmap
Phase 1 β Basic Monitoring
Implement:
get_cpu_usage
get_memory_usage
get_disk_usage
get_system_infoPhase 2 β Process Monitoring
Implement:
list_processes
get_processExample:
Top 10 processes by CPU usageor:
Top 10 processes by memory usagePhase 3 β System Health
Create:
get_system_healthIt should analyze:
CPU
RAM
Swap
Disk
Load Average
Processesand return:
Healthy
Warning
CriticalExample:
{
"score": 78,
"status": "warning",
"issues": [
{
"type": "memory",
"severity": "medium",
"message": "Memory usage is high."
}
]
}π€ Advanced Diagnosis
Create:
diagnose_systemThe tool will collect multiple metrics and help the AI understand why the system might be slow.
Example:
CPU: 22%
RAM: 89%
Swap: 63%
Disk: 81%
Diagnosis:
The system is experiencing memory pressure.
Several applications are consuming significant memory.π Network Monitoring
Planned tools:
get_network_stats
get_network_connectionsPossible information:
Network interfaces
IP addresses
Upload traffic
Download traffic
Received bytes
Transmitted bytes
Active connectionsπ‘οΈ Hardware Monitoring
Planned:
get_temperature
get_sensorsPossible information:
CPU temperature
GPU temperature
Fan speed
Other available sensorsHardware support will depend on the operating system and machine.
π Historical Monitoring
Instead of only returning the current state, the MCP can store metrics.
Example:
CPU
RAM
Swap
Disk
Load AveragePotential storage:
SQLiteThen implement:
get_metric_historyExample:
Show me RAM usage during the last hour.π¨ Alerts
Add configurable thresholds.
Example:
{
"cpu": {
"warning": 70,
"critical": 90
},
"memory": {
"warning": 75,
"critical": 90
},
"disk": {
"warning": 75,
"critical": 90
}
}Tool:
check_alertsExample:
β οΈ Disk usage is 91%.
Critical threshold: 90%βοΈ Background Monitoring
Eventually the MCP can continuously collect metrics.
Background Worker
β
Collect metrics
β
Store metrics
β
Check thresholds
β
Generate alertsThe monitoring interval should be configurable.
π Security
Advanced system-management features should be implemented carefully.
Avoid creating a generic tool such as:
execute_shell_commandInstead use specific, validated operations:
kill_process
restart_servicePotential security controls:
Input validation
Authorization
User confirmation
Audit logging
Rate limiting
Least-privilege permissions
Authentication for remote clients
HTTPS for remote deployment
π§ͺ Testing Strategy
The project should eventually include:
Unit Tests
Test:
CPU calculations
Memory calculations
Disk thresholds
Health scoring
Alert generation
Input validationMCP Integration Tests
Test:
initialize
tools/list
tools/callBoth transports should be tested:
stdio
Streamable HTTPπ³ Docker
A future version can support Docker for the HTTP server.
Possible architecture:
Client
β
HTTPS
β
Reverse Proxy
β
MCP ContainerHowever, monitoring the host machine from inside a container requires additional Linux permissions and host integration.
The native Ubuntu version should be completed first.
π Final Architecture
The long-term architecture is:
AI CLIENT
β
ββββββββββββ΄βββββββββββ
β β
Codex CLI HTTP Client
β β
stdio HTTPS/HTTP
β β
ββββββββββββ¬βββββββββββ
β
MCP Server
β
βββββββββ΄ββββββββ
β β
Tool Layer Transport
β stdio / HTTP
β
βββββββββββββΌββββββββββββββββ
β β β
CPU RAM Disk
β β β
βββββββββββββΌββββββββββββββββ
β
Service Layer
β
βββββββββββββΌβββββββββββββ
β β β
Process Network Health
Service Service Service
β
Diagnosis
β
Alerts
β
History
β
SQLiteπ― Learning Objectives
By completing this project, you will gain practical experience with:
MCP
MCP architecture
MCP tools
Tool schemas
stdio transport
Streamable HTTP
MCP client integration
TypeScript
Async/await
Types and interfaces
Modules
Error handling
Schema validation
Node.js
Streams
Processes
Signals
File system
Background workers
Linux
CPU monitoring
Memory and Swap
Processes
Disk/filesystems
Network interfaces
systemd
Permissions
Backend Engineering
HTTP APIs
Authentication
Authorization
Logging
Testing
Docker
Production deployment
π‘ Example Use Cases
Once completed, you should be able to ask an AI client:
What is my current CPU usage?How much RAM am I using?Which process is using the most memory?How much disk space is left?Is my system healthy?Why is my laptop slow?Show me the system's network statistics.Show me the most CPU-intensive processes.What system problems occurred during the last hour?π Portfolio Description
System Monitor MCP is a TypeScript/Node.js based Model Context Protocol server that gives AI clients access to real-time Linux system information. The project provides monitoring capabilities for CPU, memory, disk, processes, network, system health, alerts, and historical metrics, with support for local Codex integration through stdio and remote clients through Streamable HTTP.
π Project Status
Current status: π§ In Development
Completed
MCP server setup
TypeScript configuration
Streamable HTTP server
stdio server
MCP initialization
Tool discovery
Memory monitoring
Custom MCP verification
Codex MCP configuration
Next
CPU monitoring
Disk monitoring
System information
Process monitoring
System health
Diagnosis
Network monitoring
Historical metrics
Alerts
Background monitoring
Safe management tools
Security
Testing
Docker
Production deployment
π¨βπ» Author
Rakesh Molla
Built as a practical project for learning:
MCP + TypeScript + Node.js + Linux + AI Agentsπ License
Add a license before publishing the project publicly.
For example:
MIT LicenseThis server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceThis MCP server provides read-only Linux system diagnostics tools for inspecting system information, processes, and log snapshots. It enables AI models to analyze Linux system health, troubleshoot issues, and review security through workflow prompts and HTTP transport with API key authentication.MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to remotely read/write files and execute commands on Linux servers via MCP protocol.4MIT
- AlicenseNot gradedqualityAmaintenanceExposes full Linux system control to AI clients via MCP tools for bash execution, file operations, and search, with configurable permissions and audit logging.2Apache 2.0
- AlicenseNot gradedqualityDmaintenanceEnables interaction with Linux system operations via MCP, including CPU, memory, processes, storage, filesystem, hardware, network, monitoring, and logs.9MIT
Related MCP Connectors
A paid remote MCP for agent memory MCP, built to return verdicts, receipts, usage logs, and audit-re
Your memory, everywhere AI goes. Build knowledge once, access it via MCP anywhere.
MCP server for AI access to Swagger by SmartBear.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/Rylan2022/system-monitor-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server