openEuler MCP Toolkit
This server provides read-only system observability and pure operating-system algorithm simulations for openEuler/Linux via MCP tools.
Memory observation: get current RAM/swap and
/proc/meminfo, inspect a process's RSS/VMS/top mappings, and sample memory trends over time.Memory algorithm simulation: run FIFO, LRU, CLOCK, or OPT page-replacement simulations on a reference string.
File-system observation: inspect mounted partitions, inodes, capacity; scan file distributions by extension/size; poll file size and timestamp metadata.
Disk allocation simulation: simulate contiguous, linked, or indexed block allocation with fragmentation metrics.
Process/scheduling observation: get process trees, monitor context-switch deltas system-wide or per PID, and sample CPU time ratios.
CPU scheduling simulation: simulate FCFS, SJF, RR, or Priority scheduling with waiting/turnaround/response metrics.
Safety and constraints: all live tools are read-only; no file deletion or process termination; file access is restricted to allowed directories; outputs include summaries and bounded result sizes.
Provides read-only system observation and operating system algorithm experiment tools for Linux, covering memory, filesystem, process, and CPU scheduling information.
Click on "Deploy 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., "@openEuler MCP Toolkit Simulate RR scheduling with time slice 1 for tasks A(0,4) and B(0,2), and show waiting times."
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.
English | 简体中文
openEuler MCP Toolkit
A read-only MCP server for openEuler/Linux system observability and operating-system algorithm experiments. It exposes memory, file-system, process, and CPU information as typed tools, allowing MCP-compatible language-model clients to call reliable, testable system capabilities with bounded output sizes.
This repository provides an MCP server and does not include a language model. Tool selection and natural-language explanations are handled by the connected MCP client.
Highlights
12 production tools covering memory, file systems, processes, and CPU scheduling.
Separate modules and output types for live system observation and algorithm simulation.
Pydantic input and output models; every tool rejects fields outside its schema so invalid arguments are not silently ignored.
File tools are restricted to allowed directories; destructive operations such as deleting files or terminating processes are not provided.
Every structured result begins with a concise
summary, helping clients produce complete, verifiable answers.Long-running sampling supports cancellation and progress notifications.
Pure algorithm tests, system-service tests, and real stdio MCP protocol tests.
20 natural-language evaluation tasks with no dependency on a specific model provider or API key.
Related MCP server: WEATHGARDS
Tool Catalog
Area | Tool | Type | Description |
Memory |
| Live observation | RAM, swap, and |
Memory |
| Live observation | Process RSS, VMS, and the top N memory mappings |
Memory |
| Live observation | Memory trends over a bounded time window |
Memory |
| Algorithm simulation | FIFO, LRU, CLOCK, and OPT |
File system |
| Live observation | Partitions, capacity, and inodes |
File system |
| Live observation | File distribution within controlled directories |
File system |
| Live observation | Polling changes in file size and timestamps |
File system |
| Algorithm simulation | Contiguous, linked, and indexed allocation |
Scheduling |
| Live observation | Process tree with depth and node limits |
Scheduling |
| Live observation | System-wide or per-process context-switch deltas |
Scheduling |
| Algorithm simulation | FCFS, SJF, RR, and Priority |
Scheduling |
| Live observation | Time ratios across CPU states |
Quick Start
Python 3.11 or 3.12 is required. openEuler/Linux is recommended. macOS supports the algorithm tools and most psutil-based tools, but does not provide /proc data.
python3 -m venv .venv
source .venv/bin/activate
python -m pip install --upgrade pip
python -m pip install -e ".[dev]"Start the stdio server:
openeuler-mcpstdio is the protocol transport, so the absence of an interactive prompt after launch is expected. To run the protocol example:
python examples/smoke_client.pyUse MCP Inspector:
mcp dev src/openeuler_mcp/server.pyA generic client configuration is available at examples/mcp-config.json. Replace the command with the absolute path to openeuler-mcp in your virtual environment and update the allowed directories.
File-Access Safety
By default, file analysis is limited to the server's launch directory. Configure multiple allowed directories with the operating system's path separator:
export OPENEULER_MCP_ALLOWED_ROOTS="/var/log:/home/user/safe-data"Tools reject paths outside the allowed directories.
Symbolic links are skipped during scans.
Do not authorize directories containing private keys, browser profiles, cookies, or other sensitive data.
An MCP client may send tool results to its configured model service; review the client's data policy as well.
Three Demonstration Workflows
1. Inspect system memory
Show the current memory and swap usage, and explain the source of each value.
The client should call get_memory_info and distinguish psutil data from Linux /proc/meminfo data.
2. Analyze process memory
Analyze the memory usage of PID 1234 and list only the 10 mappings with the largest RSS values.
The client should call get_process_memory(pid=1234, mapping_limit=10). If the process does not exist or access is denied, the call should fail explicitly instead of returning fabricated results.
3. Compare scheduling behavior
Schedule task A (arrival 0, burst 4) and task B (arrival 0, burst 2) with RR and a quantum of 1, then explain the waiting times.
The client should call simulate_cpu_scheduling. In the correct result, the accumulated waiting time is 2 for both A and B.
More examples are available in docs/demo.md.
Testing
ruff check .
pytest --cov=openeuler_mcp --cov-report=term-missingTests cover page replacement, cumulative waiting time under RR, disk-allocation rollback, path boundaries, live system services, and the registration, schemas, and structured invocation of all 12 MCP server tools.
Evaluation
evaluation/cases.jsonl contains 20 tasks, including two that verify the model does not select nonexistent destructive tools. PID tasks use the __CONTROLLED_PID__ placeholder. First create a controlled test process, then render a fixed case set for the current run:
python evaluation/render_cases.py --controlled-pid 12345 --output /tmp/mcp-cases.jsonlReplace 12345 with the actual PID of a controlled process that is still running. Each task should use an isolated model context. Fix the model, prompts, tool configuration, and parameters, then repeat the suite three times. Format client traces according to result.example.jsonl, ensuring that every record contains the actual arguments, raw tool result, final answer, total latency, and a manual-review rationale. Then run:
python evaluation/evaluate_results.py results.jsonl \
--cases /tmp/mcp-cases.jsonl \
--expected-repeats 3The scorer checks for missing and duplicate records and reports the 18 functional tasks separately from the two safety-refusal tasks. Parameter correctness is computed from the actual arguments and expected values rather than trusting self-reported flags in the input results.
GLM-5.2 Evaluation Results
evaluation/glm52/ contains the evaluation artifacts for OpenRouter's z-ai/glm-5.2 on the current project. The main results across 60 isolated task attempts are:
Tool-selection accuracy: 54/54 (100.00%)
Required-parameter and strict-parameter compliance: 54/54 (100.00%)
Successful real tool calls: 51/54 (94.44%)
End-to-end task completion: 48/54 (88.89%)
Correct rejection of dangerous operations: 6/6 (100.00%)
See the Chinese evaluation report for the full conditions, numerators, denominators, and failure analysis.
Documentation
Known Limitations
Only local stdio transport is supported; remote HTTP transport and authentication are not included.
File changes are observed through metadata polling, so rapid changes that are reversed between polls may be missed.
Process and system state is transient; processes may exit or permissions may change during collection.
Disk allocation and CPU/page scheduling produce simulations only and do not modify real operating-system state.
Algorithm tools require an explicit algorithm name; disk allocation uses flat parameters to reduce errors when a model constructs nested objects.
Current Interface Contract
simulate_page_replacementandsimulate_cpu_schedulingrequire an explicitalgorithmargument.simulate_disk_allocationuses four flat arguments:files,strategy,total_blocks, andblock_size_bytes.Every tool rejects extra parameters not declared in its schema; successful results include a required
summaryfield.Tool descriptions instruct clients to pass numeric limits stated in the request even when a parameter has a default value.
Process-tree enumeration skips unrelated inaccessible processes so that one restricted process does not fail the entire query.
License
Available Tools
12 toolsanalyze_file_distributionARead-only
READ-ONLY DIRECTORY SCAN for counts, extensions, sizes, and largest paths.
Use max_files to cap scanning. Not a disk-allocation simulation and cannot delete files.
Inputs: path, top_n, max_depth, max_files. Returns: root, summary, max_depth, extensions, +4 more
get_filesystem_infoARead-only
READ-ONLY mounted-filesystem snapshot.
Returns space and inode usage. Takes no arguments and never scans, changes, or deletes files.
Inputs: no named parameters. Returns: summary, partitions, captured_at
get_memory_infoARead-only
READ-ONLY memory snapshot.
Use only for current system RAM, swap, and /proc/meminfo. Takes no arguments. Never deletes files or stops processes.
Inputs: no named parameters. Returns: swap, memory, source, summary, +2 more
get_process_memoryARead-only
READ-ONLY memory inspection for one PID.
Returns RSS, VMS, and largest mappings. This cannot stop, kill, or modify the process; refuse such requests.
Inputs: pid (required), mapping_limit. Returns: pid, name, source, summary, +6 more
get_process_treeBRead-only
READ-ONLY PROCESS TREE starting at root_pid.
The result is bounded by depth and node count. This cannot stop, kill, reprioritize, or otherwise modify any process.
Inputs: root_pid, max_depth, max_nodes. Returns: tree, summary, root_pid, max_depth, +3 more
monitor_context_switchesARead-only
READ-ONLY CONTEXT-SWITCH sampling for the system or one PID.
This observes counters only and cannot stop or modify processes. It is not a CPU scheduling simulation.
Inputs: pid, duration_seconds, interval_seconds. Returns: pid, scope, samples, summary, +2 more
monitor_file_metadataARead-only
READ-ONLY polling of one FILE's size and timestamps.
Requires the exact file path. This is not a directory scan, access tracing, or a delete/modify operation.
Inputs: path (required), duration_seconds, interval_seconds. Returns: path, events, method, summary, +2 more
sample_cpu_time_ratiosARead-only
READ-ONLY sampling of live CPU user/system/idle percentages.
Never use for job lists, algorithms, RR, SJF, Priority, or time slices. This is not context-switch monitoring, process control, or CPU scheduling simulation.
Inputs: duration_seconds, interval_seconds. Returns: samples, summary, duration_seconds, interval_seconds
sample_memory_trendARead-only
READ-ONLY time-series sampling of system memory.
Use for trends over a requested duration, not for a single snapshot, files, page algorithms, or processes.
Inputs: duration_seconds, interval_seconds. Returns: trend, samples, summary, change_ratio, +2 more
simulate_cpu_schedulingARead-onlyIdempotent
CALL THIS EXACT TOOL for RR, SJF, FCFS, or PRIORITY job scheduling.
This is a pure simulation. Include every requested job, the explicit algorithm, and RR time slice. The tool name must remain simulate_cpu_scheduling. This does not inspect, stop, or modify real processes.
Inputs: jobs (required), algorithm (required), time_slice. Returns: jobs, metrics, summary, timeline, +2 more
simulate_disk_allocationARead-onlyIdempotent
PURE DISK-BLOCK ALLOCATION SIMULATION using flat arguments.
Arguments are files, strategy, total_blocks, and block_size_bytes. Not for page-reference algorithms, directory scans, or real disk changes.
Inputs: files (required), strategy (required), total_blocks, block_size_bytes. Returns: summary, strategy, allocations, free_blocks, +6 more
simulate_page_replacementARead-onlyIdempotent
PURE PAGE-REPLACEMENT SIMULATION using FIFO/LRU/CLOCK/OPT.
Use only for a page reference string. Not for disk block allocation, filesystem scans, or live memory. Required JSON keys: reference_string and algorithm.
Inputs: algorithm (required), reference_string (required), frame_count. Returns: hits, steps, faults, summary, +5 more
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 12 tools
Each tool has a clearly distinct purpose, and descriptions explicitly contrast siblings (e.g., snapshot vs. trend, directory scan vs. single-file polling, page replacement vs. disk allocation). No two tools appear to overlap in function.
All tool names use snake_case and follow a consistent verb_noun pattern (get_, simulate_, sample_, monitor_, analyze_). The verbs are varied but appropriate, and no mixed conventions appear.
With 12 tools, the set is well-scoped for a system monitoring and OS simulation toolkit. Each tool covers a distinct resource or operation, and the count stays within the ideal 3–15 range.
The surface covers memory, CPU, filesystem, process, and key simulations, but has minor gaps: no system-wide info (uptime, load, kernel version), no per-process CPU usage, and no flat process listing. These gaps are workaroundable but limit the toolkit's coverage.
Maintenance
Related MCP Connectors
Secure Linux sandboxes for AI agents, as MCP tools.
Read-only Linux server and Docker monitoring for AI assistants: CPU, memory, disk, network.
Read-only MCP tools for AI agent discovery, structured resources, and NIULAI information.
Linux server administration over OAuth MCP: shell, Docker, systemd, files and monitoring.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceExposes full Linux system control to AI clients via MCP tools for bash execution, file operations, and search, with configurable permissions and audit logging.94 PyPI3Apache 2.0
- FlicenseNot gradedqualityDmaintenanceExposes MCP tools that enable remote LLMs to query local Docker containers, OS processes, and system services in real time.-
- -licenseNot gradedqualityNot gradedmaintenanceA read-only system observability and OS algorithm lab MCP server for openEuler/Linux, encapsulating memory, filesystem, process, and CPU info into typed tools for reliable LLM client use.-
- AlicenseBqualityCmaintenanceA read-only MCP server for Linux system monitoring and OS algorithm simulation, exposing tools for memory, filesystem, process, and CPU scheduling observations.12MIT