semvec/pypi-packages huggingface dataset:
system-diag-mcp 0.1.0
MCP server for Ubuntu system diagnostics and monitoring
License: MIT
Requires Python: >=3.8

# System Diagnostics MCP Server

A Model Context Protocol (MCP) server that provides comprehensive system diagnostics and monitoring capabilities for Ubuntu systems.

## Features

### 🧠 Core Diagnostics
- **check_port** – Test if a TCP port is open
- **ping_host** – ICMP ping to a remote host  
- **dns_lookup** – Resolve DNS records for a domain
- **http_check** – HTTP status check for a URL
- **traceroute_host** – Trace network path to host
- **get_uptime** – Return system uptime
- **get_sys_info** – Basic system info (CPU, memory, disk)
- **get_hostname** – Retrieve machine hostname

### ⚙️ Service & Process Monitoring
- **list_processes** – List running processes (like ps)
- **list_services** – List systemd or init services
- **service_status** – Status of a specific service
- **read_journal** – Fetch latest logs for a unit or tag
- **cron_list** – Show cron jobs for current user

### 📦 Disk & Memory
- **check_disk_usage** – Disk usage summary (like df)
- **check_memory** – RAM/Swap usage (like free)
- **check_inode_usage** – Filesystem inode stats
- **list_mounts** – Mounted volumes

### 🔌 Network & Ports
- **list_open_ports** – Show open TCP/UDP ports
- **check_firewall_status** – UFW/iptables summary
- **list_network_interfaces** – IP, MAC, link state
- **check_bandwidth_usage** – Network traffic stats
- **resolve_host** – Reverse DNS for IP address
- **curl_url** – GET request with curl, full headers

### 🔒 Security & Access
- **list_users** – Local users
- **last_logins** – Last login attempts
- **check_sudoers** – Who can sudo
- **who_is_logged_in** – Current sessions

## Installation

### Using uv (recommended)

```bash
# Install uv if you haven't already
curl -LsSf https://astral.sh/uv/install.sh | sh

# Install the package
uv pip install system-diag-mcp
```

### Using pip

```bash
pip install system-diag-mcp
```

## Usage

### As a standalone server

```bash
system-diag-mcp
```

### With Claude Desktop

Add this to your Claude Desktop configuration:

```json
{
  "mcpServers": {
    "system-diag": {
      "command": "system-diag-mcp"
    }
  }
}
```

### With other MCP clients

The server runs on stdio and implements the full MCP protocol.

## Development

```bash
# Clone the repository
git clone <repository-url>
cd system-diag-mcp

# Install development dependencies
uv pip install -e ".[dev]"

# Run tests
pytest

# Format code
black .
ruff check .
```

## Requirements

- Python 3.8+
- Ubuntu/Debian-based system
- Required system tools: `ping`, `dig`, `traceroute`, `systemctl`, `ps`, `df`, `free`, `curl`

## License

MIT License
live-studio-open-service 0.1.0
A simple socket-based RPC client
License: MIT
Requires Python: >=3.7

## 📦 `live_studio_open_service`

一个轻量级 Python 客户端，用于通过 TCP 协议与LIVE Studio进行交互。

---

### ✅ 安装方式

你可以使用 pip 安装（发布到 PyPI 后）：

```bash
pip install live_studio_open_service
```

---

### 🚀 快速上手

#### 示例一：使用默认地址

```python
from live_studio_open_service import call

result = call("say_hello", ["world"])
print("结果:", result)
```

默认连接到 `127.0.0.1:60080`。

#### 示例二：指定服务器地址和端口

```python
from live_studio_open_service import call

result = call("say_hello", ["world"], host="10.71.157.126", port=60080)
print("结果:", result)
```

---

### ⚙️ 接口说明

```python
call(
    name: str,
    args: list[str],
    host: str = "127.0.0.1",
    port: int = 60080,
    timeout: float = 5.0
) -> Any
```

| 参数        | 类型          | 说明            |
| --------- | ----------- | ------------- |
| `name`    | `str`       | 远程调用的方法名      |
| `args`    | `list[str]` | 传入参数列表（字符串数组） |
| `host`    | `str`       | 目标服务器地址（可选）   |
| `port`    | `int`       | 目标服务器端口（可选）   |
| `timeout` | `float`     | 超时时间（单位秒）     |

---

### 💡 返回值说明

函数返回远程调用返回的内容。如果网络错误或服务器未响应，将抛出 `RuntimeError`。

---

### 📄 协议约定

* 通信协议基于 TCP。
* 消息采用 JSON 格式，末尾使用 `\f` 分隔。
* 请求结构：

```json
{
  "type": "call",
  "id": "timestamp_method",
  "data": {
    "type": "serviceMethod",
    "name": "method_name",
    "args": ["arg1", "arg2"]
  }
}
```

---

### 🛠 开发测试

```bash
# 构建包
python -m build

# 上传到测试 PyPI
twine upload --repository testpypi dist/*
```

---