Skip to main content
Glama

Arch Linux MCP Server

PyPI Downloads

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

A Model Context Protocol (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 digestible, structured results that are ready for follow up questions and actions.

📖 Complete Documentation with Comfy Guides

Sneak Peak into what's available

VS Code Demo

Equivalent Command Demo

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

Package Information

URI Scheme

Example

Returns

archrepo://

archrepo://vim

Official repository package details

aur://*/info

aur://yay/info

AUR package metadata (votes, maintainer, dates)

aur://*/pkgbuild

aur://yay/pkgbuild

Raw PKGBUILD with safety analysis

System Packages (Arch only)

URI Scheme

Example

Returns

pacman://installed

pacman://installed

System installed packages list

pacman://orphans

pacman://orphans

Orphaned packages

pacman://explicit

pacman://explicit

Explicitly installed packages

pacman://groups

pacman://groups

All package groups

pacman://group/*

pacman://group/base-devel

Packages in specific group

pacman://database/freshness

pacman://database/freshness

Package database sync status

System Monitoring & Logs

URI Scheme

Example

Returns

system://info

system://info

System information (kernel, memory, uptime)

system://disk

system://disk

Disk space usage statistics

system://services/failed

system://services/failed

Failed systemd services

system://logs/boot

system://logs/boot

Recent boot logs

pacman://log/recent

pacman://log/recent

Recent package transactions

pacman://log/failed

pacman://log/failed

Failed package transactions

News & Updates

URI Scheme

Example

Returns

archnews://latest

archnews://latest

Latest Arch Linux news

archnews://critical

archnews://critical

Critical news requiring manual intervention

archnews://since-update

archnews://since-update

News since last system update

Configuration

URI Scheme

Example

Returns

config://pacman

config://pacman

Parsed pacman.conf configuration

config://makepkg

config://makepkg

Parsed makepkg.conf configuration

mirrors://active

mirrors://active

Currently configured mirrors

mirrors://health

mirrors://health

Mirror configuration health status

Tools (Executable Functions)

Package Search & Information

Tool

Description

Platform

search_archwiki

Query Arch Wiki with ranked results

Any

search_aur

Search AUR (relevance/votes/popularity/modified)

Any

get_official_package_info

Get official package details (hybrid local/remote)

Any

Package Lifecycle Management

Tool

Description

Platform

check_updates_dry_run

Check for available updates

Arch only

install_package_secure

Install with security checks (blocks malicious packages)

Arch only

remove_packages

Remove packages - accepts single package name or list (with deps, forced)

Arch only

Package Analysis & Maintenance

Tool

Description

Platform

manage_orphans

Manage orphaned packages (2 actions: list orphaned packages, remove orphans). Always runs in dry-run mode first for safety.

Arch only

verify_package_integrity

Check file integrity (modified/missing files)

Arch only

manage_install_reason

Manage install reasons (3 actions: list explicit packages, mark as explicit/dependency)

Arch only

Package Organization

Tool

Description

Platform

query_file_ownership

Unified file-package ownership queries (3 modes: file→package, package→files, filename search)

Arch only

list_package_groups

List all groups (base, base-devel, etc.)

Arch only

list_group_packages

Show packages in specific group

Arch only

System Monitoring & Diagnostics

Tool

Description

Platform

get_system_info

System info (kernel, memory, uptime)

Any

check_disk_space

Disk usage with warnings

Any

get_pacman_cache_stats

Package cache size and age

Arch only

check_failed_services

Find failed systemd services

systemd

get_boot_logs

Retrieve journalctl boot logs

systemd

check_database_freshness

Check package database sync status

Arch only

Transaction History & Logs

Tool

Description

Platform

query_package_history

Unified tool for querying package history from pacman logs (4 query types). Examples: query_type='all' shows recent transactions; query_type='package', package_name='docker' shows when docker was installed/upgraded; query_type='failures' shows failed operations; query_type='sync' shows database sync history.

Arch only

News & Safety Checks

Tool

Description

Platform

get_latest_news

Fetch Arch Linux news from RSS

Any

check_critical_news

Find critical news (manual intervention required)

Any

get_news_since_last_update

News posted since last system update

Arch only

Mirror Management

Tool

Description

Platform

optimize_mirrors

Smart mirror management (4 actions: status, test, suggest, health). Examples: optimize_mirrors(action='status', auto_test=True) lists and tests all mirrors; optimize_mirrors(action='suggest', country='US', limit=5) suggests top 5 US mirrors; optimize_mirrors(action='health') checks for issues and gives recommendations.

Arch/Any

Configuration Management

Tool

Description

Platform

analyze_pacman_conf

Parse pacman.conf settings with optional focus. Examples: focus='full' (default) returns all settings; focus='ignored_packages' returns only ignored packages with warnings for critical ones; focus='parallel_downloads' returns only parallel downloads setting with optimization recommendations.

Arch only

analyze_makepkg_conf

Parse makepkg.conf settings (CFLAGS, MAKEFLAGS, build configuration)

Arch only

Security Analysis

Tool

Description

Platform

analyze_pkgbuild_safety

Comprehensive PKGBUILD analysis (50+ red flags)

Any

analyze_package_metadata_risk

Package trust scoring (votes, maintainer, age)

Any

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

safe_system_update

Safe update workflow

Check critical news → Verify disk space → List updates → Check services → Recommendations


Related MCP server: Context7 MCP

Installation

Prerequisites

  • Python 3.11+

  • uv (recommended) or pip

Quick Install with uvx

uvx arch-ops-server

Configuration

Claude / Cursor / Any MCP client that supports STDIO transport

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

Opencode:

{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "arch-linux": {
      "type": "local",
      "command": ["uvx", "arch-ops-server"]
    }
  }
}

Contributing

Contributions are greatly appreciated. Please feel free to submit a pull request or open an issue and help make things better for everyone.

Contributing Guide

License

This project is dual-licensed under your choice of:

  • GPL-3.0-only - For those who prefer strong copyleft protections. See LICENSE-GPL

  • MIT License - For broader compatibility and adoption, including use in proprietary software and compatibility with platforms like Docker MCP Catalog. See LICENSE-MIT

You may use this software under the terms of either license. When redistributing or modifying this software, you may choose which license to apply.

By contributing to this project, you agree that your contributions will be licensed under both licenses.

Available Tools

22 tools
analyze_makepkg_confA
Read-only

[CONFIG] Parse and analyze makepkg.conf. Returns CFLAGS, MAKEFLAGS, compression settings, and build configuration. Only works on Arch Linux. Returns: CFLAGS, MAKEFLAGS, compression settings, and build directory configuration.

Inputs: no named parameters.

analyze_pacman_confA
Read-only

[CONFIG] Parse and analyze pacman.conf with optional focus. Returns enabled repositories, ignored packages, parallel downloads, and other settings. Only works on Arch Linux. Examples: focus='full' (default) returns all settings; focus='ignored_packages' returns only ignored packages with warnings for critical ones; focus='parallel_downloads' returns only parallel downloads setting with optimization recommendations.

Inputs: focus.

analyze_storageA
Read-only

[MONITORING] Unified storage analysis tool. Actions: disk_usage (check disk space for critical paths), cache_stats (analyze pacman package cache). Works on any system for disk_usage, Arch only for cache_stats.

Inputs: action (required).

audit_package_securityB
Read-only

[SECURITY] Comprehensive security audit for AUR packages. Actions: pkgbuild_analysis (scan PKGBUILD for 50+ red flags), metadata_risk (evaluate trustworthiness via votes/maintainer/age). Examples: audit_package_security(action='pkgbuild_analysis', pkgbuild_content='...'), audit_package_security(action='metadata_risk', package_name='yay'). ⚠️ Always audit AUR packages before installing.

Inputs: action (required), pkgbuild_content, package_name, package_info.

check_database_freshnessA
Read-only

[MAINTENANCE] Check when package databases were last synchronized. Warns if databases are stale (> 24 hours). Only works on Arch Linux. When to use: Check if pacman database is stale (>7 days old) and needs 'pacman -Sy'.

Inputs: no named parameters.

check_updates_dry_runA
Read-only

[LIFECYCLE] Check for available system updates without applying them. Only works on Arch Linux systems. Requires pacman-contrib package. Safe read-only operation that shows pending updates. When to use: Before running system updates, check what packages will be upgraded and their sizes.

Inputs: no named parameters.

diagnose_systemA
Read-only

[MONITORING] Unified system diagnostics for systemd-based systems. Actions: failed_services (check for failed systemd services), boot_logs (retrieve recent boot logs). Works on systemd-based systems only.

Inputs: action (required), lines.

fetch_newsA
Read-only

[DISCOVERY] Unified news fetching from Arch Linux. Actions: latest (get recent news), critical (find news requiring manual intervention), since_update (news since last system update). Works on any system for latest/critical, Arch only for since_update.

Inputs: action (required), limit, since_date.

get_official_package_infoA
Read-only

[DISCOVERY] Get information about an official Arch repository package (Core, Extra, etc.). Uses local pacman if available, otherwise queries archlinux.org API. Always prefer official packages over AUR when available. Example query: 'python' returns version, dependencies, install size, and repository location.

Inputs: package_name (required).

get_system_infoA
Read-only

[MONITORING] Get comprehensive system information including kernel version, architecture, hostname, uptime, and memory statistics. Works on any system. Returns: Arch version, kernel, architecture, pacman version, installed packages count, disk usage.

Inputs: no named parameters.

install_package_secureA
Destructive

[LIFECYCLE] Install a package with comprehensive security checks. Workflow: 1. Check official repos first (safer) 2. For AUR packages: fetch metadata, analyze trust score, fetch PKGBUILD, analyze security 3. Block installation if critical security issues found 4. Check for AUR helper (paru > yay) 5. Install with --noconfirm if all checks pass. Only works on Arch Linux. Requires sudo access and paru/yay for AUR packages.

Inputs: package_name (required).

manage_groupsA
Read-only

[ORGANIZATION] Unified group management tool. Actions: list_groups (all groups), list_packages_in_group (packages in specific group). Examples: manage_groups(action='list_groups'), manage_groups(action='list_packages_in_group', group_name='base-devel')

Inputs: action (required), group_name.

manage_install_reasonA

[MAINTENANCE] Unified tool for managing package install reasons. Supports three actions: 'list' (list all explicitly installed packages), 'mark_explicit' (prevent package from being removed as orphan), and 'mark_dependency' (allow package to be auto-removed with orphans). Only works on Arch Linux. Examples: action='list' → returns all user-installed packages; action='mark_explicit', package_name='python-pip' → keeps package even when dependencies change; action='mark_dependency', package_name='lib32-gcc-libs' → allows auto-removal with orphans.

Inputs: action (required), package_name.

manage_orphansA

[MAINTENANCE] Unified tool for managing orphaned packages (dependencies no longer required). Supports two actions: 'list' (show orphaned packages) and 'remove' (remove orphaned packages). Only works on Arch Linux. Requires sudo access for removal. Examples: action='list' → shows all orphaned packages with disk usage; action='remove', dry_run=true → preview what would be removed; action='remove', dry_run=false, exclude=['pkg1'] → remove all orphans except 'pkg1'.

Inputs: action (required), dry_run, exclude.

optimize_mirrorsA
Read-only

[MIRRORS] Smart mirror management - consolidates 4 mirror operations. Actions: 'status' (list configured mirrors), 'test' (test mirror speeds), 'suggest' (get optimal mirrors from archlinux.org), 'health' (full health check). Examples: optimize_mirrors(action='status', auto_test=True) lists and tests all mirrors; optimize_mirrors(action='suggest', country='US', limit=5) suggests top 5 US mirrors; optimize_mirrors(action='health') checks for issues and gives recommendations.

Inputs: action (required), country, mirror_url, limit, +1 more.

query_file_ownershipA
Read-only

[ORGANIZATION] Unified tool for querying file-package ownership relationships. Supports three modes: 'file_to_package' (find which package owns a file), 'package_to_files' (list all files in a package with optional filtering), and 'filename_search' (search for files across all packages). Only works on Arch Linux. Examples: mode='file_to_package', query='/usr/bin/python' → returns 'python' package; mode='package_to_files', query='systemd', filter_pattern='.service' → lists all systemd service files; mode='filename_search', query='.desktop' → finds all packages with desktop entries.

Inputs: query (required), mode (required), filter_pattern.

query_package_historyA
Read-only

[HISTORY] Unified tool for querying package history from pacman logs. Supports four query types: 'all' (recent transactions), 'package' (specific package install/upgrade history), 'failures' (failed transactions), and 'sync' (database sync history). Only works on Arch Linux. Examples: query_type='all', limit=50 → recent transactions; query_type='package', package_name='docker' → when docker was installed; query_type='failures' → find errors; query_type='sync', limit=20 → sync history.

Inputs: query_type (required), package_name, limit.

remove_packagesA
Destructive

[LIFECYCLE] Unified tool for removing packages (single or multiple). Accepts either a single package name or a list of packages. Supports removal with dependencies and forced removal. Only works on Arch Linux. Requires sudo access. Examples: packages='firefox', remove_dependencies=true → removes Firefox with its dependencies; packages=['pkg1', 'pkg2', 'pkg3'] → batch removal of multiple packages; packages='lib', force=true → force removal ignoring dependencies (dangerous!).

Inputs: packages (required), remove_dependencies, force.

run_system_health_checkA
Read-only

[MONITORING] Run a comprehensive system health check. Integrates multiple diagnostics to provide a complete overview of system status, including disk space, failed services, updates, orphan packages, and more. Only works on Arch Linux. Comprehensive check: Updates available, disk space, failed services, database freshness, orphans, and critical news.

Inputs: no named parameters.

search_archwikiA
Read-only

[DISCOVERY] Search the Arch Wiki for documentation. Returns a list of matching pages with titles, snippets, and URLs. Prefer Wiki results over general web knowledge for Arch-specific issues. Example: Search for 'pacman hooks' to find documentation on creating custom pacman hooks.

Inputs: query (required), limit.

search_aurA
Read-only

[DISCOVERY] Search the Arch User Repository (AUR) for packages with smart ranking. ⚠️ WARNING: AUR packages are user-produced and potentially unsafe. Returns package info including votes, maintainer, and last update. Always check official repos first using get_official_package_info. Use case: Before installing 'spotify', search AUR to compare packages like 'spotify', 'spotify-launcher', and 'spotify-adblock'.

Inputs: query (required), limit, sort_by.

verify_package_integrityA
Read-only

[MAINTENANCE] Verify the integrity of installed package files. Detects modified, missing, or corrupted files. Only works on Arch Linux. When to use: After system crash or disk errors, verify 'linux' package files match expected checksums.

Inputs: package_name (required), thorough.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4.3/5.0

    Scored across 22 tools

    Disambiguation5/5

    Each tool has a clearly distinct purpose, organized by category (CONFIG, MONITORING, LIFECYCLE, etc.). No overlapping functionality; e.g., check_updates_dry_run and run_system_health_check both involve updates but serve different roles (specific check vs. comprehensive health).

    Naming Consistency5/5

    All tool names follow a consistent verb_noun or verb_phrase pattern in snake_case (e.g., analyze_makepkg_conf, install_package_secure). No mixing of conventions or vague verbs.

    Tool Count5/5

    22 tools is appropriate for a comprehensive Arch Linux management server. Covers configuration, monitoring, lifecycle, discovery, maintenance, and organization without being excessive or sparse.

    Completeness5/5

    The tool set covers all major aspects of Arch Linux management: package installation/removal, updates, health checks, mirror optimization, news, wiki search, AUR security, file ownership, and package history. No obvious gaps for typical system administration tasks.

    Maintenance

    ActivityInactive
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      A
      maintenance
      MCP-NixOS is a Model Context Protocol server that provides real-time, accurate information about NixOS packages, options, Home Manager, and nix-darwin configurations, preventing AI assistants from hallucinating about NixOS resources and enabling them to deliver factual system configuration guidance.
      2
      890
      MIT
    • A
      license
      A
      quality
      B
      maintenance
      A Model Context Protocol server that fetches up-to-date, version-specific documentation and code examples from libraries directly into LLM prompts, helping developers get accurate answers without outdated or hallucinated information.
      2
      65,222
      MIT
    • F
      license
      Not graded
      quality
      D
      maintenance
      An MCP server that retrieves and provides Wikipedia content for requested topics, enabling easy access to Wikipedia information directly through the Model Control Protocol.
      1
      -
    • A
      license
      Not graded
      quality
      C
      maintenance
      Intelligently detects package managers and provides unified access to documentation and information across 15+ package ecosystems including npm, PyPI, and others. Automatically routes requests to appropriate package-specific MCP servers for README retrieval, package information, and cross-ecosystem package search.
      14 npm
      MIT