Skip to main content
Glama
README.md
# 🤖 Percival Ubuntu - percival.OS MCP

**Version 0.0.2**

[![Python](https://img.shields.io/badge/python-3.11+-yellow.svg)]()
[![MCP](https://img.shields.io/badge/mcp-server-blue.svg)]()
[![percival.OS](https://img.shields.io/badge/percival.OS-ecosystem-orange.svg)](https://github.com/bill-kopp-ai-dev/percival.OS)

## 📋 Description
**Percival Ubuntu** is a security-focused MCP server for safe Ubuntu operations, optimized specifically for the Nanobot agent. It allows file management and command execution under strict security policies.

This server is part of the **percival.OS** ecosystem, a Personal Agentic Operating System designed for autonomy, security, and absolute privacy.

---

## 🛡️ percival.OS Principles
Like all components of `percival.OS`, this MCP server strictly follows our core principles:

- **Privacy & Control**: You define exactly which paths and commands the agent can access through policies (`secure`, `dev`).
- **Data Sovereignty**: The agent operates locally on your Ubuntu host, without the need for external intermediaries for system management.
- **Hardened Security**: Path traversal protection, command sanitization (shell injection blocking), and resource limits to prevent system exhaustion.
- **Transparency**: Open-source and auditable, with detailed audit logs for every operation performed by the agent.

---

## 🚀 Features & Tools

### File Operations
- `ubuntu_list_directory(path)`: List directory contents with metadata.
- `ubuntu_read_file(file_path)`: Read files with size validation.
- `ubuntu_write_file(file_path, content, ...)`: Atomic file writing.

### System Operations
- `ubuntu_execute_command(command)`: Safe execution of allowed shell commands.
- `ubuntu_get_system_info()`: Get OS, memory, and disk usage information.
- `ubuntu_get_server_status()`: Returns uptime, active policy, and tool metrics.

### Package Management
- `ubuntu_search_packages(query)`: Search APT repositories.
- `ubuntu_install_package(package_name)`: Check availability for installation.

---

## ⚙️ Configuration in percival.OS (Nanobot)
Add the following configuration to your `~/.nanobot/config.json`:

```json
{
  "tools": {
    "mcpServers": {
      "percival-ubuntu": {
        "command": "uv",
        "args": [
          "run",
          "--directory",
          "/path/to/percival-ubuntu-mcp",
          "percival-ubuntu-mcp",
          "--policy",
          "secure"
        ],
        "env": {
          "UBUNTU_MCP_RESPONSE_MODE": "compact",
          "UBUNTU_MCP_AUDIT_JSON": "true"
        }
      }
    }
  }
}
```

---

## 🛠️ Development & Testing
This project uses `uv` for dependency management.

```bash
# Sync environment
uv sync --dev

# Verify installation with internal tests
uv run python -m percival_ubuntu_mcp --test

# Test security measures
uv run python -m percival_ubuntu_mcp --security-test
```

---

## 📚 About the Project
This server is an integral module of the **percival.OS** project. It is an evolution of the original `Secure Ubuntu MCP Server`, optimized for system orchestration via Nanobot.

- **Main Repository**: [https://github.com/bill-kopp-ai-dev/percival.OS](https://github.com/bill-kopp-ai-dev/percival.OS)
- **License**: MIT

---
*Developed with ❤️ by the percival.OS Team*

TDQS

A4.3/5.0

Scored across 8 tools

Disambiguation4/5

Most tools target distinct operations: file listing/reading/writing, package search, system telemetry, and server health. However, install_package is misleadingly named for a read-only check and could be confused with search_packages, while get_system_info and get_server_status have some overlap in purpose.

Naming Consistency5/5

Every tool follows the same ubuntu_<verb>_<noun> snake_case pattern: execute_command, list_directory, read_file, search_packages, write_file, get_system_info, install_package, get_server_status. The convention is uniform and predictable.

Tool Count5/5

Eight tools is a well-scoped size for an Ubuntu server management surface. Each tool addresses a distinct aspect of the domain without feeling redundant or overly narrow.

Completeness3/5

The file and package workflows are partially incomplete: there is no delete_file tool, and install_package does not actually install packages, leaving no dedicated install/remove operation. Core read/write/search operations are covered, but lifecycle coverage has notable gaps that may push agents toward execute_command.

Maintenance

ActivityInactive
ResponsivenessNo issues