Traditional Approach | MCP Intelligent Ops |
Memorize numerous commands and parameters. | Ask in natural language, and AI automatically invokes tools. |
Manually log in to servers one by one. | One MCP Server manages multiple hosts. |
Command output is difficult to interpret quickly. | Structured JSON output with automatic AI analysis. |
Requires installation of various monitoring agents. | Remote execution over SSH with zero intrusion. |
Troubleshooting processes rely on personal experience. | Built-in AI Ops practice guide |

Category | Tool Name | Capability Description |
System Information | get_system_info | Used to query information such as the OS version, kernel version, host name, architecture, and uptime. |
| get_hardware_info | Used to query information such as CPU, memory, and disk. |
Service management | get_service_info | Used to query information such as running services. |
Process Analysis | list_processes | Used to query information such as the Top N process list sorted by CPU utilization. |
Log viewing | get_journal_logs | Used to query systemd journal log information, with filtering by time/priority/service/keyword supported. |
| get_system_messages | Used to query system message log information, with keyword filtering supported. |
Network Diagnostics | get_listening_ports | Used to query system listening port information. |
Firewall | get_iptables_rules | Used to query iptables firewall rule information (filter/nat/mangle/raw tables, including rule numbers and traffic statistics). |
Performance Analysis | get_perf_overview | Used to query comprehensive performance information across four dimensions: CPU/memory/I/O/network. |
Software Packages | get_package_info | Used to query information such as the version, architecture, and description of a specified software package. |
Security audit | get_selinux_status | Used to query SELinux status and recent AVC denial records. |
| get_login_history | Used to query login success/failure history and security alarm information. |
| get_updateinfo_security | Used to query available security update advisory information (for yum/dnf-based distributions). |
Kernel management | get_sysctl_params | Used to query kernel parameter information, with prefix filtering supported, such as `net.ipv4`. |
| list_kernel_modules | Used to query loaded kernel module information, with name filtering supported. |
eBPF Tracing | get_ebpf_status | Used to query installation status information of eBPF tracing tools (nettrace/perf-prof). |
| ebpf_trace | Used to trace system event information (tcp/bio/exec, based on native kernel interfaces, with no additional tools required). |
Network tracing | nettrace | Used to trace network packet path information (based on eBPF, with nettrace installation required). |
Performance Analysis | perf_prof | Used to analyze system performance bottleneck information (based on eBPF, with perf-prof installation required). |
Category | Tool Name | Capability Description |
Host management | list_managed_hosts | Used to query the list information of all managed hosts. |
| get_managed_host | Used to query detailed information of a single host. |
| test_managed_host | Used to test SSH connectivity information of hosts (supports single or batch testing). |
Mode | Description | Applicable Scenarios |
basic | Concise mode (default), 1 to 2 lines per packet | Quickly locate network issues |
life | Full lifecycle tracing, 14 to 22 lines per packet | Deeply analyze packet forwarding paths |
drop | Packet drop tracing (requires v1.2.9+) | Locate packet loss locations and causes |
diag | Diagnostic mode (requires v1.2.9+) | Comprehensive network fault diagnosis |
max_packets parameter (default: 50, maximum: 100) to keep the output volume manageable.Analysis Type | Description | Typical Use |
cpu | CPU utilization analysis (default) | Locate CPU hotspot functions |
syscall | System call tracing | Analyze system call latency |
io | Disk I/O latency analysis | Locate IO bottlenecks |
mem | Memory allocation analysis | Troubleshoot memory leaks |
sched | Scheduling latency analysis | Analyze process scheduling issues |
Comparison Item | stdio Mode | Streamable HTTP Mode |
Scenario | Local development, with the client and server on the same machine. | Remote deployment with multi-client sharing. |
Startup Method | The client automatically starts the process, requiring no manual startup. | Manually start the HTTP service on the server first. |
Token Authentication | Not required. | Required. |
Network Requirements | No network required. | Requires listening on a port (default: 8001). |
SSH Remote Management | Supported (connect to a remote host through local SSH). | Supported |
Multiple Clients | Not supported (one-to-one). | Supported (one-to-many) |

tencentos-mcp-server token generate
systemctl start tencentos-mcp-server
# Verify Service Health Status (HTTP Mode)curl http://127.0.0.1:8001/health
{"status": "healthy","version": "1.0.0","transport": "streamable-http","auth": "enabled","tools_count": 22}
{"mcpServers": {"tencentos": {"url": "http://<your server-ip>:8001/mcp","headers": {"Authorization": "Bearer <your-token>"}}}}
# Generate a Key (If you do not have one, ed25519 is recommended)ssh-keygen -t ed25519
# Distribute the Public Key to the Target Host (Using 198.51.100.10 as an Example)ssh-copy-id root@198.51.100.10
# Add a Host (Automatically Test SSH Connectivity, Using 198.51.100.10 as an Example)tencentos-mcp-server host add 198.51.100.10# View Added Hoststencentos-mcp-server host list
Check the CPU and memory usage of this machine.Which services are abnormal?Check if there have been any OOM events recently.Check the SELinux status and recent login records.Use nettrace to trace TCP packet loss.Analyze the disk I/O performance on 198.51.100.10.
Perform a comprehensive health check on this machine.
get_system_info: Obtains basic system information.get_hardware_info: Obtains CPU, memory, and disk status.get_perf_overview: Obtains a performance overview.get_service_info: Checks for abnormal services.My Web server 198.51.100.10 is connecting very slowly. Please help me troubleshoot it.
list_managed_hosts: Confirms that the host is managed.get_listening_ports(host="198.51.100.10"): Checks the port listening status.get_perf_overview(host="198.51.100.10"): Checks resource usage.nettrace(dport=80, host="198.51.100.10"): Traces network packets.Check for any suspicious login activity recently.
get_login_history(count=50, include_failed=True): Obtains the login history.get_selinux_status: Checks the SELinux status.get_updateinfo_security: Views security advisories.Analyze which process is using the most CPU.
list_processes: Obtains the Top N processes.get_perf_overview: Obtains a performance overview.perf_prof(profile_type="cpu", duration=5): Performs CPU hotspot analysis.Check the error logs from the last hour.
get_journal_logs(priority="err", since="1 hour ago"): Obtains error-level logs.get_system_messages(grep="error"): Searches for errors in system messages.Check the connectivity of all managed hosts.
list_managed_hosts: Obtains the host list.test_managed_host: Tests connectivity in batches.# Start in HTTP mode on the specified port.tencentos-mcp-server serve --transport streamable-http --host 0.0.0.0 --port 8001# systemd management (use --enable-service when installing the deployment package)systemctl start tencentos-mcp-serversystemctl stop tencentos-mcp-serversystemctl restart tencentos-mcp-serversystemctl status tencentos-mcp-server# View installation informationtencentos-mcp-server info
# Generate an API Tokentencentos-mcp-server token generate# Force regeneration (overwrite the existing Token)tencentos-mcp-server token generate --force# Revoke a Tokentencentos-mcp-server token revoke
# Add a Host (Automatically Test SSH Connectivity)tencentos-mcp-server host add 198.51.100.10# List all managed hoststencentos-mcp-server host list# JSON Outputtencentos-mcp-server host list --format json# Test connectivity to a single host.tencentos-mcp-server host test 198.51.100.10# Test all hosts in batches.tencentos-mcp-server host test-all# Remove a Hosttencentos-mcp-server host remove 198.51.100.10
/health endpoint is provided (no Token required):curl http://127.0.0.1:8001/health
Security Aspect | Action | Description |
Operational security. | Read-only by default | All 22 tools are read-only operations, with no write or modification capabilities. |
Input security | Input sanitization | Filter 30+ types of dangerous characters (quotes, tabs, glob, redirection, Unicode control characters, and more). |
| Parameter escaping | Use shlex.quote to perform POSIX shell-safe escaping for all parameter values. |
| Allowlist validation | Enumeration parameters are validated against an allowlist; IP address/port/CPU ranges are validated using regular expressions. |
| Path traversal protection | Prohibit .. and special characters to prevent directory traversal attacks. |
Execution security | Command length limit | Local command length limit: 4096 characters |
| Environment variable cleanup | Clean up dangerous environment variables such as LD_PRELOAD, IFS, and BASH_ENV |
| Timeout process cleanup | Commands are executed in independent process groups, and the entire process group is reclaimed after a timeout. |
| Token Authentication | Bearer Token authentication in HTTP mode, with AES-encrypted Token storage. |
| TLS/HTTPS | Supports SSL certificate configuration and encrypted transmission in production environments. |
Transmission security | Rate limiting | Dual-level rate limiting at both Token and global levels |
Connection security | SSH Host Key verification | Default TOFU policy: trust and record on first connection, then verify subsequent connections to prevent man-in-the-middle attacks. |
| SSH key authentication | Use a certificate-based scheme uniformly; password login is not supported. |
Data security | Audit log | All tool calls are recorded to a JSONL file, including the actual executed commands. |
| Configuration file protection | Tokens are stored encrypted, and key file and configuration file permissions are automatically set to 600. |
Client | Configuration File Path |
Cursor | .cursor/mcp.json (in the project directory) |
Claude Desktop (macOS) | ~/Library/Application Support/Claude/claude_desktop_config.json |
Claude Desktop (Windows) | %APPDATA%\\Claude\\claude_desktop_config.json |
CodeBuddy | ~/.codebuddy/mcp.json |
{"mcpServers": {"tencentos": {"url": "http://<server-ip>:8001/mcp","headers": {"Authorization": "Bearer <your-token>"}}}}
<server-ip> with the actual server IP address and <your-token> with the Token generated by tencentos-mcp-server token generate.ssh-copy-id root@<IP>ssh root@<IP>ls -la ~/.ssh/id_* (permissions must be less than or equal to 600).tencentos-mcp-server host test <IP>tencentos-mcp-server host add 198.51.100.10 -p 36000
# Run on the target hostyum install nettrace
ebpf_trace as a lightweight alternative.systemctl restart tencentos-mcp-server
Apakah halaman ini membantu?
Anda juga dapat Menghubungi Penjualan atau Mengirimkan Tiket untuk meminta bantuan.
masukan