arch-ops-server 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,109 @@
1
+ Metadata-Version: 2.3
2
+ Name: arch-ops-server
3
+ Version: 0.1.0
4
+ Summary: MCP server bridging AI assistants with Arch Linux ecosystem (Wiki, AUR, official repos)
5
+ Keywords: arch-linux,mcp,model-context-protocol,aur,pacman,wiki,ai-assistant
6
+ Author: Nihal
7
+ Author-email: Nihal <2tv8xupqg@mozmail.com>
8
+ License: GPL-3.0
9
+ Classifier: Development Status :: 4 - Beta
10
+ Classifier: Intended Audience :: Developers
11
+ Classifier: Intended Audience :: System Administrators
12
+ Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
13
+ Classifier: Operating System :: POSIX :: Linux
14
+ Classifier: Programming Language :: Python :: 3
15
+ Classifier: Programming Language :: Python :: 3.11
16
+ Classifier: Programming Language :: Python :: 3.12
17
+ Classifier: Topic :: System :: Archiving :: Packaging
18
+ Classifier: Topic :: System :: Systems Administration
19
+ Requires-Dist: mcp>=1.0.0
20
+ Requires-Dist: httpx>=0.27.0
21
+ Requires-Dist: beautifulsoup4>=4.12.0
22
+ Requires-Dist: lxml>=5.0.0
23
+ Requires-Dist: markdownify>=0.12.0
24
+ Requires-Python: >=3.11
25
+ Description-Content-Type: text/markdown
26
+
27
+ # Arch Linux MCP Server
28
+
29
+ **Disclaimer:** Unofficial community project, not affiliated with Arch Linux.
30
+
31
+ 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.
32
+
33
+ Leverage AI to get output for digestible, structured results that are ready for follow up questions and actions.
34
+
35
+ 📖 [Complete Documentation with Comfy Guides](https://nxk.mintlify.app/arch-mcp)
36
+
37
+ ## Sneak Peak into what's available
38
+
39
+ ### Resources (URI-based Access)
40
+
41
+ Direct access to Arch ecosystem data via custom URI schemes:
42
+
43
+ | URI Scheme | Example | Returns |
44
+ |------------|---------|---------|
45
+ | `archwiki://` | `archwiki://Installation_guide` | Markdown-formatted Wiki page |
46
+ | `aur://*/pkgbuild` | `aur://yay/pkgbuild` | Raw PKGBUILD with safety analysis |
47
+ | `aur://*/info` | `aur://yay/info` | AUR package metadata (votes, maintainer, dates) |
48
+ | `archrepo://` | `archrepo://vim` | Official repository package details |
49
+ | `pacman://installed` | `pacman://installed` | System installed packages list (Arch only) |
50
+
51
+ ### Tools (Executable Functions)
52
+
53
+ | Category | Tool | Description | Key Features |
54
+ |----------|------|-------------|--------------|
55
+ | **Search** | `search_archwiki` | Query Arch Wiki documentation | Ranked results, keyword extraction |
56
+ | | `search_aur` | Search AUR packages | Smart ranking: relevance/votes/popularity/modified |
57
+ | | `get_official_package_info` | Lookup official packages | Hybrid local/remote, detailed metadata |
58
+ | **System** | `check_updates_dry_run` | Check for updates (Arch only) | Read-only, safe, requires pacman-contrib |
59
+ | **Installation** | `install_package_secure` | Secure package installation | Auto security checks, blocks malicious packages, uses paru/yay |
60
+ | **Security** | `analyze_pkgbuild_safety` | Comprehensive PKGBUILD analysis | Detects: malicious commands based on 50+ red flags |
61
+ | | `analyze_package_metadata_risk` | Package trust evaluation | Analyzes: votes, maintainer, age, updates, trust scoring |
62
+
63
+ ### Prompts (Guided Workflows)
64
+
65
+ | Prompt | Purpose | Workflow |
66
+ |--------|---------|----------|
67
+ | `troubleshoot_issue` | Diagnose system errors | Extract keywords → Search Wiki → Context-aware suggestions |
68
+ | `audit_aur_package` | Pre-installation safety audit | Fetch metadata → Analyze PKGBUILD → Security recommendations |
69
+ | `analyze_dependencies` | Installation planning | Check repos → Map dependencies → Suggest install order |
70
+
71
+ ---
72
+
73
+ ## Installation
74
+
75
+ ### Prerequisites
76
+ - Python 3.11+
77
+ - [uv](https://github.com/astral-sh/uv) (recommended) or pip
78
+
79
+ ### Quick Install with `uvx`
80
+
81
+ ```bash
82
+ uvx arch-ops-server
83
+ ```
84
+
85
+ ---
86
+
87
+ ## Configuration
88
+
89
+ Claude / Cursor / Any MCP client that supports STDIO transport
90
+
91
+ ```json
92
+ {
93
+ "mcpServers": {
94
+ "arch-ops": {
95
+ "command": "uvx",
96
+ "args": ["arch-ops-server"]
97
+ }
98
+ }
99
+ }
100
+ ```
101
+
102
+ ## License
103
+
104
+ [GPL-3.0-only](https://www.gnu.org/licenses/gpl-3.0.en.html)
105
+
106
+ ---
107
+
108
+
109
+ Built with ❤️ for the Arch Linux community
@@ -0,0 +1,83 @@
1
+ # Arch Linux MCP Server
2
+
3
+ **Disclaimer:** Unofficial community project, not affiliated with Arch Linux.
4
+
5
+ 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.
6
+
7
+ Leverage AI to get output for digestible, structured results that are ready for follow up questions and actions.
8
+
9
+ 📖 [Complete Documentation with Comfy Guides](https://nxk.mintlify.app/arch-mcp)
10
+
11
+ ## Sneak Peak into what's available
12
+
13
+ ### Resources (URI-based Access)
14
+
15
+ Direct access to Arch ecosystem data via custom URI schemes:
16
+
17
+ | URI Scheme | Example | Returns |
18
+ |------------|---------|---------|
19
+ | `archwiki://` | `archwiki://Installation_guide` | Markdown-formatted Wiki page |
20
+ | `aur://*/pkgbuild` | `aur://yay/pkgbuild` | Raw PKGBUILD with safety analysis |
21
+ | `aur://*/info` | `aur://yay/info` | AUR package metadata (votes, maintainer, dates) |
22
+ | `archrepo://` | `archrepo://vim` | Official repository package details |
23
+ | `pacman://installed` | `pacman://installed` | System installed packages list (Arch only) |
24
+
25
+ ### Tools (Executable Functions)
26
+
27
+ | Category | Tool | Description | Key Features |
28
+ |----------|------|-------------|--------------|
29
+ | **Search** | `search_archwiki` | Query Arch Wiki documentation | Ranked results, keyword extraction |
30
+ | | `search_aur` | Search AUR packages | Smart ranking: relevance/votes/popularity/modified |
31
+ | | `get_official_package_info` | Lookup official packages | Hybrid local/remote, detailed metadata |
32
+ | **System** | `check_updates_dry_run` | Check for updates (Arch only) | Read-only, safe, requires pacman-contrib |
33
+ | **Installation** | `install_package_secure` | Secure package installation | Auto security checks, blocks malicious packages, uses paru/yay |
34
+ | **Security** | `analyze_pkgbuild_safety` | Comprehensive PKGBUILD analysis | Detects: malicious commands based on 50+ red flags |
35
+ | | `analyze_package_metadata_risk` | Package trust evaluation | Analyzes: votes, maintainer, age, updates, trust scoring |
36
+
37
+ ### Prompts (Guided Workflows)
38
+
39
+ | Prompt | Purpose | Workflow |
40
+ |--------|---------|----------|
41
+ | `troubleshoot_issue` | Diagnose system errors | Extract keywords → Search Wiki → Context-aware suggestions |
42
+ | `audit_aur_package` | Pre-installation safety audit | Fetch metadata → Analyze PKGBUILD → Security recommendations |
43
+ | `analyze_dependencies` | Installation planning | Check repos → Map dependencies → Suggest install order |
44
+
45
+ ---
46
+
47
+ ## Installation
48
+
49
+ ### Prerequisites
50
+ - Python 3.11+
51
+ - [uv](https://github.com/astral-sh/uv) (recommended) or pip
52
+
53
+ ### Quick Install with `uvx`
54
+
55
+ ```bash
56
+ uvx arch-ops-server
57
+ ```
58
+
59
+ ---
60
+
61
+ ## Configuration
62
+
63
+ Claude / Cursor / Any MCP client that supports STDIO transport
64
+
65
+ ```json
66
+ {
67
+ "mcpServers": {
68
+ "arch-ops": {
69
+ "command": "uvx",
70
+ "args": ["arch-ops-server"]
71
+ }
72
+ }
73
+ }
74
+ ```
75
+
76
+ ## License
77
+
78
+ [GPL-3.0-only](https://www.gnu.org/licenses/gpl-3.0.en.html)
79
+
80
+ ---
81
+
82
+
83
+ Built with ❤️ for the Arch Linux community
@@ -0,0 +1,37 @@
1
+ [project]
2
+ name = "arch-ops-server"
3
+ version = "0.1.0"
4
+ description = "MCP server bridging AI assistants with Arch Linux ecosystem (Wiki, AUR, official repos)"
5
+ readme = {file = "README.md", content-type = "text/markdown"}
6
+ license = { text = "GPL-3.0" }
7
+ authors = [
8
+ { name = "Nihal", email = "2tv8xupqg@mozmail.com" }
9
+ ]
10
+ keywords = ["arch-linux", "mcp", "model-context-protocol", "aur", "pacman", "wiki", "ai-assistant"]
11
+ classifiers = [
12
+ "Development Status :: 4 - Beta",
13
+ "Intended Audience :: Developers",
14
+ "Intended Audience :: System Administrators",
15
+ "License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
16
+ "Operating System :: POSIX :: Linux",
17
+ "Programming Language :: Python :: 3",
18
+ "Programming Language :: Python :: 3.11",
19
+ "Programming Language :: Python :: 3.12",
20
+ "Topic :: System :: Archiving :: Packaging",
21
+ "Topic :: System :: Systems Administration",
22
+ ]
23
+ requires-python = ">=3.11"
24
+ dependencies = [
25
+ "mcp>=1.0.0",
26
+ "httpx>=0.27.0",
27
+ "beautifulsoup4>=4.12.0",
28
+ "lxml>=5.0.0",
29
+ "markdownify>=0.12.0",
30
+ ]
31
+
32
+ [project.scripts]
33
+ arch-ops-server = "arch_ops_server:main_sync"
34
+
35
+ [build-system]
36
+ requires = ["uv_build>=0.9.4,<0.10.0"]
37
+ build-backend = "uv_build"
@@ -0,0 +1,79 @@
1
+ """
2
+ Arch Linux MCP Server
3
+
4
+ A Model Context Protocol server that bridges AI assistants with the Arch Linux
5
+ ecosystem, providing access to the Arch Wiki, AUR, and official repositories.
6
+ """
7
+
8
+ __version__ = "0.1.0"
9
+
10
+ from .wiki import search_wiki, get_wiki_page, get_wiki_page_as_text
11
+ from .aur import (
12
+ search_aur,
13
+ get_aur_info,
14
+ get_pkgbuild,
15
+ get_aur_file,
16
+ analyze_pkgbuild_safety,
17
+ analyze_package_metadata_risk,
18
+ install_package_secure
19
+ )
20
+ from .pacman import get_official_package_info, check_updates_dry_run
21
+ from .utils import IS_ARCH, run_command
22
+
23
+ # Import server from the server module
24
+ from .server import server
25
+
26
+ # Main function will be defined here
27
+ async def main():
28
+ """
29
+ Main entry point for the MCP server.
30
+ Runs the server using STDIO transport.
31
+ """
32
+ import asyncio
33
+ import mcp.server.stdio
34
+ import logging
35
+
36
+ # Set up logging
37
+ logging.basicConfig(level=logging.INFO)
38
+ logger = logging.getLogger(__name__)
39
+
40
+ logger.info("Starting Arch Linux MCP Server")
41
+ logger.info(f"Running on Arch Linux: {IS_ARCH}")
42
+
43
+ # Run the server using STDIO
44
+ async with mcp.server.stdio.stdio_server() as (read_stream, write_stream):
45
+ await server.run(
46
+ read_stream,
47
+ write_stream,
48
+ server.create_initialization_options()
49
+ )
50
+
51
+
52
+ def main_sync():
53
+ """Synchronous wrapper for the main function."""
54
+ import asyncio
55
+ asyncio.run(main())
56
+
57
+ __all__ = [
58
+ # Wiki
59
+ "search_wiki",
60
+ "get_wiki_page",
61
+ "get_wiki_page_as_text",
62
+ # AUR
63
+ "search_aur",
64
+ "get_aur_info",
65
+ "get_pkgbuild",
66
+ "get_aur_file",
67
+ "analyze_pkgbuild_safety",
68
+ "analyze_package_metadata_risk",
69
+ "install_package_secure",
70
+ # Pacman
71
+ "get_official_package_info",
72
+ "check_updates_dry_run",
73
+ # Utils
74
+ "IS_ARCH",
75
+ "run_command",
76
+ # Main functions
77
+ "main",
78
+ "main_sync",
79
+ ]