Metadata-Version: 2.3
Name: arch-ops-server
Version: 0.1.1
Summary: MCP server bridging AI assistants with Arch Linux ecosystem (Wiki, AUR, official repos)
Keywords: arch-linux,mcp,model-context-protocol,aur,pacman,wiki,ai-assistant
Author: Nihal
Author-email: Nihal <2tv8xupqg@mozmail.com>
License: GPL-3.0
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: System Administrators
Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: System :: Archiving :: Packaging
Classifier: Topic :: System :: Systems Administration
Requires-Dist: mcp>=1.0.0
Requires-Dist: httpx>=0.27.0
Requires-Dist: beautifulsoup4>=4.12.0
Requires-Dist: lxml>=5.0.0
Requires-Dist: markdownify>=0.12.0
Requires-Python: >=3.11
Description-Content-Type: text/markdown

# Arch Linux MCP Server

**Disclaimer:** Unofficial community project, not affiliated with Arch Linux.

A [Model Context Protocol](https://modelcontextprotocol.io/) (MCP) server that bridges AI assistants with the Arch Linux ecosystem. Enables intelligent, safe, and efficient access to the Arch Wiki, AUR, and official repositories for AI-assisted Arch Linux usage on Arch and non-Arch systems.

Leverage AI to get  output for digestible, structured results that are ready for follow up questions and actions.

📖 [Complete Documentation with Comfy Guides](https://nxk.mintlify.app/arch-mcp)

## Sneak Peak into what's available

### Resources (URI-based Access)

Direct access to Arch ecosystem data via custom URI schemes:

| URI Scheme | Example | Returns |
|------------|---------|---------|
| `archwiki://` | `archwiki://Installation_guide` | Markdown-formatted Wiki page |
| `aur://*/pkgbuild` | `aur://yay/pkgbuild` | Raw PKGBUILD with safety analysis |
| `aur://*/info` | `aur://yay/info` | AUR package metadata (votes, maintainer, dates) |
| `archrepo://` | `archrepo://vim` | Official repository package details |
| `pacman://installed` | `pacman://installed` | System installed packages list (Arch only) |

### Tools (Executable Functions)

| Category | Tool | Description | Key Features |
|----------|------|-------------|--------------|
| **Search** | `search_archwiki` | Query Arch Wiki documentation | Ranked results, keyword extraction |
| | `search_aur` | Search AUR packages | Smart ranking: relevance/votes/popularity/modified |
| | `get_official_package_info` | Lookup official packages | Hybrid local/remote, detailed metadata |
| **System** | `check_updates_dry_run` | Check for updates (Arch only) | Read-only, safe, requires pacman-contrib |
| **Installation** | `install_package_secure` | Secure package installation | Auto security checks, blocks malicious packages, uses paru/yay |
| **Security** | `analyze_pkgbuild_safety` | Comprehensive PKGBUILD analysis | Detects: malicious commands based on 50+ red flags |
| | `analyze_package_metadata_risk` | Package trust evaluation | Analyzes: votes, maintainer, age, updates, trust scoring |

### Prompts (Guided Workflows)

| Prompt | Purpose | Workflow |
|--------|---------|----------|
| `troubleshoot_issue` | Diagnose system errors | Extract keywords → Search Wiki → Context-aware suggestions |
| `audit_aur_package` | Pre-installation safety audit | Fetch metadata → Analyze PKGBUILD → Security recommendations |
| `analyze_dependencies` | Installation planning | Check repos → Map dependencies → Suggest install order |

---

## Installation

### Prerequisites
- Python 3.11+
- [uv](https://github.com/astral-sh/uv) (recommended) or pip

### Quick Install with `uvx`

```bash
uvx arch-ops-server
```

---

## Configuration

Claude / Cursor / Any MCP client that supports STDIO transport

```json
{
  "mcpServers": {
    "arch-ops": {
      "command": "uvx",
      "args": ["arch-ops-server"]
    }
  }
}
```

## License

[GPL-3.0-only](https://www.gnu.org/licenses/gpl-3.0.en.html)

---


Built with ❤️ for the Arch Linux community
