arch-ops-server 3.3.3__py3-none-any.whl → 3.3.4__py3-none-any.whl

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.
@@ -6,17 +6,17 @@ A Model Context Protocol server that bridges AI assistants with the Arch Linux
6
6
  ecosystem, providing access to the Arch Wiki, AUR, and official repositories.
7
7
  """
8
8
 
9
- __version__ = "3.3.3"
9
+ __version__ = "3.3.4"
10
10
 
11
11
  from .wiki import search_wiki, get_wiki_page, get_wiki_page_as_text
12
12
  from .aur import (
13
- search_aur,
14
- get_aur_info,
15
- get_pkgbuild,
16
- get_aur_file,
17
- analyze_pkgbuild_safety,
13
+ search_aur,
14
+ get_aur_info,
15
+ get_pkgbuild,
16
+ get_aur_file,
17
+ analyze_pkgbuild_safety,
18
18
  analyze_package_metadata_risk,
19
- install_package_secure
19
+ install_package_secure,
20
20
  )
21
21
  from .pacman import (
22
22
  get_official_package_info,
@@ -38,44 +38,41 @@ from .pacman import (
38
38
  mark_as_explicit,
39
39
  mark_as_dependency,
40
40
  manage_install_reason,
41
- check_database_freshness
41
+ check_database_freshness,
42
42
  )
43
43
  from .system import (
44
44
  get_system_info,
45
45
  check_disk_space,
46
46
  get_pacman_cache_stats,
47
47
  check_failed_services,
48
- get_boot_logs
48
+ get_boot_logs,
49
49
  )
50
50
  from .system_health_check import run_system_health_check
51
- from .news import (
52
- get_latest_news,
53
- check_critical_news,
54
- get_news_since_last_update
55
- )
51
+ from .news import get_latest_news, check_critical_news, get_news_since_last_update
56
52
  from .logs import (
57
53
  get_transaction_history,
58
54
  find_when_installed,
59
55
  find_failed_transactions,
60
- get_database_sync_history
56
+ get_database_sync_history,
61
57
  )
62
58
  from .mirrors import (
63
59
  list_active_mirrors,
64
60
  test_mirror_speed,
65
61
  suggest_fastest_mirrors,
66
- check_mirrorlist_health
62
+ check_mirrorlist_health,
67
63
  )
68
64
  from .config import (
69
65
  analyze_pacman_conf,
70
66
  analyze_makepkg_conf,
71
67
  check_ignored_packages,
72
- get_parallel_downloads_setting
68
+ get_parallel_downloads_setting,
73
69
  )
74
70
  from .utils import IS_ARCH, run_command
75
71
 
76
72
  # Import server from the server module
77
73
  from .server import server
78
74
 
75
+
79
76
  # Main function will be defined here
80
77
  async def main():
81
78
  """
@@ -96,15 +93,14 @@ async def main():
96
93
  # Run the server using STDIO
97
94
  async with mcp.server.stdio.stdio_server() as (read_stream, write_stream):
98
95
  await server.run(
99
- read_stream,
100
- write_stream,
101
- server.create_initialization_options()
96
+ read_stream, write_stream, server.create_initialization_options()
102
97
  )
103
98
 
104
99
 
105
100
  def main_sync():
106
101
  """Synchronous wrapper for the main function (STDIO transport)."""
107
102
  import asyncio
103
+
108
104
  asyncio.run(main())
109
105
 
110
106
 
@@ -114,8 +110,10 @@ def main_http_sync():
114
110
  Runs the server using SSE (Server-Sent Events) HTTP transport.
115
111
  """
116
112
  from .http_server import main_http
113
+
117
114
  main_http()
118
115
 
116
+
119
117
  __all__ = [
120
118
  # Wiki
121
119
  "search_wiki",
arch_ops_server/logs.py CHANGED
@@ -40,23 +40,37 @@ def parse_log_line(line: str) -> Optional[Dict[str, Any]]:
40
40
  if not match:
41
41
  return None
42
42
 
43
- date_str, time_str, action, details = match.groups()
43
+ date_str, time_str, log_type, details = match.groups()
44
44
  timestamp = f"{date_str}T{time_str}:00"
45
45
 
46
- # Parse package details
47
- # Format: "package_name (version)" or "package_name (old -> new)"
48
- pkg_match = re.match(r'(\S+)\s+\((.+)\)', details)
49
-
50
- if pkg_match:
51
- package = pkg_match.group(1)
52
- version_info = pkg_match.group(2)
53
- else:
54
- # Some log lines don't have version info
55
- package = details
56
- version_info = ""
46
+ action = log_type
47
+ package = details
48
+ version_info = ""
49
+
50
+ # Parse ALPM actions
51
+ if log_type == "ALPM":
52
+ # Format: action package (version)
53
+ # e.g. installed vim (9.0.1000-1)
54
+ # e.g. upgraded linux (6.6.1-1 -> 6.6.2-1)
55
+ pkg_match = re.match(r'(\w+)\s+(\S+)\s+\((.+)\)', details)
56
+
57
+ if pkg_match:
58
+ action = pkg_match.group(1) # installed, upgraded, etc.
59
+ package = pkg_match.group(2)
60
+ version_info = pkg_match.group(3)
61
+
62
+ # Fallback for old parsing or non-ALPM lines that might match the old regex
63
+ if action == log_type and log_type != "ALPM":
64
+ # Parse package details for generic logs if needed
65
+ # Format: "package_name (version)" or "package_name (old -> new)"
66
+ pkg_match = re.match(r'(\S+)\s+\((.+)\)', details)
67
+ if pkg_match:
68
+ package = pkg_match.group(1)
69
+ version_info = pkg_match.group(2)
57
70
 
58
71
  return {
59
72
  "timestamp": timestamp,
73
+ "source": log_type,
60
74
  "action": action,
61
75
  "package": package,
62
76
  "version_info": version_info,
arch_ops_server/pacman.py CHANGED
@@ -6,7 +6,8 @@ Provides package info and update checks with hybrid local/remote approach.
6
6
 
7
7
  import logging
8
8
  import re
9
- from typing import Dict, Any, List, Optional
9
+ from pathlib import Path
10
+ from typing import Dict, Any, List, Optional, Union
10
11
  import httpx
11
12
 
12
13
  from .utils import (
@@ -1483,7 +1484,6 @@ async def check_database_freshness() -> Dict[str, Any]:
1483
1484
  logger.info("Checking database freshness")
1484
1485
 
1485
1486
  try:
1486
- from pathlib import Path
1487
1487
  from datetime import datetime, timedelta
1488
1488
 
1489
1489
  sync_dir = Path("/var/lib/pacman/sync")
@@ -0,0 +1,272 @@
1
+ Metadata-Version: 2.3
2
+ Name: arch-ops-server
3
+ Version: 3.3.4
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-only OR MIT
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: License :: OSI Approved :: MIT License
14
+ Classifier: Operating System :: POSIX :: Linux
15
+ Classifier: Programming Language :: Python :: 3
16
+ Classifier: Programming Language :: Python :: 3.11
17
+ Classifier: Programming Language :: Python :: 3.12
18
+ Classifier: Topic :: System :: Archiving :: Packaging
19
+ Classifier: Topic :: System :: Systems Administration
20
+ Requires-Dist: mcp>=1.0.0
21
+ Requires-Dist: httpx>=0.27.0
22
+ Requires-Dist: beautifulsoup4>=4.12.0
23
+ Requires-Dist: lxml>=5.0.0
24
+ Requires-Dist: markdownify>=0.12.0
25
+ Requires-Dist: pytest>=8.0.0 ; extra == 'dev'
26
+ Requires-Dist: pytest-asyncio>=0.23.0 ; extra == 'dev'
27
+ Requires-Dist: pytest-cov>=4.1.0 ; extra == 'dev'
28
+ Requires-Dist: pytest-mock>=3.12.0 ; extra == 'dev'
29
+ Requires-Dist: httpx>=0.27.0 ; extra == 'dev'
30
+ Requires-Dist: starlette>=0.27.0 ; extra == 'http'
31
+ Requires-Dist: uvicorn[standard]>=0.23.0 ; extra == 'http'
32
+ Requires-Python: >=3.11
33
+ Provides-Extra: dev
34
+ Provides-Extra: http
35
+ Description-Content-Type: text/markdown
36
+
37
+ # Arch Linux MCP Server
38
+
39
+ [![PyPI Downloads](https://static.pepy.tech/personalized-badge/arch-ops-server?period=total&units=INTERNATIONAL_SYSTEM&left_color=BLUE&right_color=BLACK&left_text=PyPi+Downloads)](https://pepy.tech/projects/arch-ops-server)
40
+
41
+ <a href="https://glama.ai/mcp/servers/@nihalxkumar/arch-mcp">
42
+ <img width="380" height="200" src="https://glama.ai/mcp/servers/@nihalxkumar/arch-mcp/badge" />
43
+ </a>
44
+
45
+ **Disclaimer:** Unofficial community project, not affiliated with Arch Linux.
46
+
47
+ 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.
48
+
49
+ Leverage AI to get digestible, structured results that are ready for follow up questions and actions.
50
+
51
+ 📖 [Complete Documentation with Comfy Guides](https://nxk.mintlify.app/arch-mcp)
52
+
53
+ ## Sneak Peak into what's available
54
+
55
+ <details>
56
+
57
+ <summary>Using VS Code Sonnet 3.5 for Safe Installation from AUR</summary>
58
+
59
+ ![VS Code Demo](assets/vscode_notesnook.gif)
60
+
61
+ </details>
62
+
63
+ <details>
64
+ <summary> Asking Claude Code Sonnet 4.5 for fedora equivalent command </summary>
65
+
66
+ ![Equivalent Command Demo](assets/equivalent-commands.gif)
67
+
68
+ </details>
69
+
70
+ ### Resources (URI-based Access)
71
+
72
+ Direct access to Arch ecosystem data via custom URI schemes:
73
+
74
+ #### Documentation & Search
75
+
76
+ | URI Scheme | Example | Returns |
77
+ | ------------- | ------------------------------- | ---------------------------- |
78
+ | `archwiki://` | `archwiki://Installation_guide` | Markdown-formatted Wiki page |
79
+
80
+ #### Package Information
81
+
82
+ | URI Scheme | Example | Returns |
83
+ | ------------------ | -------------------- | ----------------------------------------------- |
84
+ | `archrepo://` | `archrepo://vim` | Official repository package details |
85
+ | `aur://*/info` | `aur://yay/info` | AUR package metadata (votes, maintainer, dates) |
86
+ | `aur://*/pkgbuild` | `aur://yay/pkgbuild` | Raw PKGBUILD with safety analysis |
87
+
88
+ #### System Packages (Arch only)
89
+
90
+ | URI Scheme | Example | Returns |
91
+ | ----------------------------- | ----------------------------- | ------------------------------ |
92
+ | `pacman://installed` | `pacman://installed` | System installed packages list |
93
+ | `pacman://orphans` | `pacman://orphans` | Orphaned packages |
94
+ | `pacman://explicit` | `pacman://explicit` | Explicitly installed packages |
95
+ | `pacman://groups` | `pacman://groups` | All package groups |
96
+ | `pacman://group/*` | `pacman://group/base-devel` | Packages in specific group |
97
+ | `pacman://database/freshness` | `pacman://database/freshness` | Package database sync status |
98
+
99
+ #### System Monitoring & Logs
100
+
101
+ | URI Scheme | Example | Returns |
102
+ | -------------------------- | -------------------------- | ------------------------------------------- |
103
+ | `system://info` | `system://info` | System information (kernel, memory, uptime) |
104
+ | `system://disk` | `system://disk` | Disk space usage statistics |
105
+ | `system://services/failed` | `system://services/failed` | Failed systemd services |
106
+ | `system://logs/boot` | `system://logs/boot` | Recent boot logs |
107
+ | `pacman://log/recent` | `pacman://log/recent` | Recent package transactions |
108
+ | `pacman://log/failed` | `pacman://log/failed` | Failed package transactions |
109
+
110
+ #### News & Updates
111
+
112
+ | URI Scheme | Example | Returns |
113
+ | ------------------------- | ------------------------- | ------------------------------------------- |
114
+ | `archnews://latest` | `archnews://latest` | Latest Arch Linux news |
115
+ | `archnews://critical` | `archnews://critical` | Critical news requiring manual intervention |
116
+ | `archnews://since-update` | `archnews://since-update` | News since last system update |
117
+
118
+ #### Configuration
119
+
120
+ | URI Scheme | Example | Returns |
121
+ | ------------------ | ------------------ | ---------------------------------- |
122
+ | `config://pacman` | `config://pacman` | Parsed pacman.conf configuration |
123
+ | `config://makepkg` | `config://makepkg` | Parsed makepkg.conf configuration |
124
+ | `mirrors://active` | `mirrors://active` | Currently configured mirrors |
125
+ | `mirrors://health` | `mirrors://health` | Mirror configuration health status |
126
+
127
+ ### Tools (Executable Functions)
128
+
129
+ #### Package Search & Information
130
+
131
+ | Tool | Description | Platform |
132
+ | --------------------------- | -------------------------------------------------- | -------- |
133
+ | `search_archwiki` | Query Arch Wiki with ranked results | Any |
134
+ | `search_aur` | Search AUR (relevance/votes/popularity/modified) | Any |
135
+ | `get_official_package_info` | Get official package details (hybrid local/remote) | Any |
136
+
137
+ #### Package Lifecycle Management
138
+
139
+ | Tool | Description | Platform |
140
+ | ------------------------ | -------------------------------------------------------- | --------- |
141
+ | `check_updates_dry_run` | Check for available updates | Arch only |
142
+ | `install_package_secure` | Install with security checks (blocks malicious packages) | Arch only |
143
+ | `remove_package` | Remove single package (with deps, forced) | Arch only |
144
+ | `remove_packages_batch` | Remove multiple packages efficiently | Arch only |
145
+
146
+ #### Package Analysis & Maintenance
147
+
148
+ | Tool | Description | Platform |
149
+ | -------------------------- | --------------------------------------------------------------------------------------- | --------- |
150
+ | `list_orphan_packages` | Find orphaned packages | Arch only |
151
+ | `remove_orphans` | Clean orphans (dry-run, exclusions) | Arch only |
152
+ | `verify_package_integrity` | Check file integrity (modified/missing files) | Arch only |
153
+ | `manage_install_reason` | Manage install reasons (3 actions: list explicit packages, mark as explicit/dependency) | Arch only |
154
+
155
+ #### Package Organization
156
+
157
+ | Tool | Description | Platform |
158
+ | ---------------------- | ---------------------------------------------------------------------------------------------- | --------- |
159
+ | `query_file_ownership` | Unified file-package ownership queries (3 modes: file→package, package→files, filename search) | Arch only |
160
+ | `list_package_groups` | List all groups (base, base-devel, etc.) | Arch only |
161
+ | `list_group_packages` | Show packages in specific group | Arch only |
162
+
163
+ #### System Monitoring & Diagnostics
164
+
165
+ | Tool | Description | Platform |
166
+ | -------------------------- | ------------------------------------ | --------- |
167
+ | `get_system_info` | System info (kernel, memory, uptime) | Any |
168
+ | `check_disk_space` | Disk usage with warnings | Any |
169
+ | `get_pacman_cache_stats` | Package cache size and age | Arch only |
170
+ | `check_failed_services` | Find failed systemd services | systemd |
171
+ | `get_boot_logs` | Retrieve journalctl boot logs | systemd |
172
+ | `check_database_freshness` | Check package database sync status | Arch only |
173
+
174
+ #### Transaction History & Logs
175
+
176
+ | Tool | Description | Platform |
177
+ | --------------------------- | ---------------------------------------------------- | --------- |
178
+ | `get_transaction_history` | Recent package transactions (install/upgrade/remove) | Arch only |
179
+ | `find_when_installed` | Package installation history | Arch only |
180
+ | `find_failed_transactions` | Failed package operations | Arch only |
181
+ | `get_database_sync_history` | Database sync events | Arch only |
182
+
183
+ #### News & Safety Checks
184
+
185
+ | Tool | Description | Platform |
186
+ | ---------------------------- | ------------------------------------------------- | --------- |
187
+ | `get_latest_news` | Fetch Arch Linux news from RSS | Any |
188
+ | `check_critical_news` | Find critical news (manual intervention required) | Any |
189
+ | `get_news_since_last_update` | News posted since last system update | Arch only |
190
+
191
+ #### Mirror Management
192
+
193
+ | Tool | Description | Platform |
194
+ | ------------------------- | ------------------------------------- | --------- |
195
+ | `list_active_mirrors` | Show configured mirrors | Arch only |
196
+ | `test_mirror_speed` | Test mirror latency | Arch only |
197
+ | `suggest_fastest_mirrors` | Recommend optimal mirrors by location | Any |
198
+ | `check_mirrorlist_health` | Verify mirror configuration | Arch only |
199
+
200
+ #### Configuration Management
201
+
202
+ | Tool | Description | Platform |
203
+ | -------------------------------- | ----------------------------------------- | --------- |
204
+ | `analyze_pacman_conf` | Parse pacman.conf settings | Arch only |
205
+ | `analyze_makepkg_conf` | Parse makepkg.conf settings | Arch only |
206
+ | `check_ignored_packages` | List ignored packages (warns on critical) | Arch only |
207
+ | `get_parallel_downloads_setting` | Get parallel download config | Arch only |
208
+
209
+ #### Security Analysis
210
+
211
+ | Tool | Description | Platform |
212
+ | ------------------------------- | ----------------------------------------------- | -------- |
213
+ | `analyze_pkgbuild_safety` | Comprehensive PKGBUILD analysis (50+ red flags) | Any |
214
+ | `analyze_package_metadata_risk` | Package trust scoring (votes, maintainer, age) | Any |
215
+
216
+ ### Prompts (Guided Workflows)
217
+
218
+ | Prompt | Purpose | Workflow |
219
+ | ---------------------- | ----------------------------- | ----------------------------------------------------------------------------------------- |
220
+ | `troubleshoot_issue` | Diagnose system errors | Extract keywords → Search Wiki → Context-aware suggestions |
221
+ | `audit_aur_package` | Pre-installation safety audit | Fetch metadata → Analyze PKGBUILD → Security recommendations |
222
+ | `analyze_dependencies` | Installation planning | Check repos → Map dependencies → Suggest install order |
223
+ | `safe_system_update` | Safe update workflow | Check critical news → Verify disk space → List updates → Check services → Recommendations |
224
+
225
+ ---
226
+
227
+ ## Installation
228
+
229
+ ### Prerequisites
230
+
231
+ - Python 3.11+
232
+ - [uv](https://github.com/astral-sh/uv) (recommended) or pip
233
+
234
+ ### Quick Install with `uvx`
235
+
236
+ ```bash
237
+ uvx arch-ops-server
238
+ ```
239
+
240
+ ---
241
+
242
+ ## Configuration
243
+
244
+ Claude / Cursor / Any MCP client that supports STDIO transport
245
+
246
+ ```json
247
+ {
248
+ "mcpServers": {
249
+ "arch-ops": {
250
+ "command": "uvx",
251
+ "args": ["arch-ops-server"]
252
+ }
253
+ }
254
+ }
255
+ ```
256
+
257
+ ## Contributing
258
+
259
+ Contributions are greatly appreciated. Please feel free to submit a pull request or open an issue and help make things better for everyone.
260
+
261
+ [Contributing Guide](https://nxk.mintlify.app/arch-mcp/contributing)
262
+
263
+ ## License
264
+
265
+ This project is dual-licensed under your choice of:
266
+
267
+ - **[GPL-3.0-only](https://www.gnu.org/licenses/gpl-3.0.en.html)** - For those who prefer strong copyleft protections. See [LICENSE-GPL](LICENSE-GPL)
268
+ - **[MIT License](https://opensource.org/licenses/MIT)** - For broader compatibility and adoption, including use in proprietary software and compatibility with platforms like Docker MCP Catalog. See [LICENSE-MIT](LICENSE-MIT)
269
+
270
+ You may use this software under the terms of either license. When redistributing or modifying this software, you may choose which license to apply.
271
+
272
+ By contributing to this project, you agree that your contributions will be licensed under both licenses.
@@ -1,11 +1,11 @@
1
- arch_ops_server/__init__.py,sha256=06tUZL6sxOH9VkVNDlxTE7Mey7od9ortYwxsYqMVGAI,4539
1
+ arch_ops_server/__init__.py,sha256=b4JD13-NhdTTglxqE6GcEzpNBXmd_RS952HMbb2NeBQ,4504
2
2
  arch_ops_server/aur.py,sha256=poYbh2DW7I1tZfCeNp_7e10fh9ZZx8HTnYZnKKZtflQ,49808
3
3
  arch_ops_server/config.py,sha256=4mtpS28vXSMeEVGrTWTMwZEzgIyfl0oCAYEzF7SKxE8,11076
4
4
  arch_ops_server/http_server.py,sha256=wZ3hY6o6EftbN1OZiTUau7861LB9ihKWap6gevev_No,31810
5
- arch_ops_server/logs.py,sha256=qWExDvluHmQvbZHu87veQxMnuMK8BNLBYBppZJlemEc,10558
5
+ arch_ops_server/logs.py,sha256=30qSJEdbet2iNw4k22kuDZhDGOOwTHX4OzfbC-jgGlI,11177
6
6
  arch_ops_server/mirrors.py,sha256=Evt-g20cMOTZQl9FbbkbklFd0gKWz-I7vVNrmyQO19U,13403
7
7
  arch_ops_server/news.py,sha256=E97eASR24tq_EaVDYuamIoBl4a7QtBkpscOaUPuU0W4,9359
8
- arch_ops_server/pacman.py,sha256=y0-0wrGx2bWjLyBRyLYOz1ogtQnH2RYjISC-MCJOB-k,46860
8
+ arch_ops_server/pacman.py,sha256=MyaQL6K0JITSMa-mWgxMXo3Kxep0ramQqXmuEXSmnRo,46859
9
9
  arch_ops_server/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
10
10
  arch_ops_server/server.py,sha256=sBkE0oaDE_bVFSMJXLQiC2owejgGMXW-soy0ME7dKGQ,89906
11
11
  arch_ops_server/system.py,sha256=JfBUB3KD0veulQ-IIK8IOC8Jn6lqtLMCtlnryiL1n7w,9221
@@ -13,7 +13,7 @@ arch_ops_server/system_health_check.py,sha256=j8EEyX1E1PA7SGiIZQBS7RLVuyiI6D-egj
13
13
  arch_ops_server/tool_metadata.py,sha256=Z0ZhtS1bxo9T_erJlGx9Xf0fKk4oZ0L6UQ8gJu7WEcA,20468
14
14
  arch_ops_server/utils.py,sha256=po7MVqCx-hsdx-lOgs7uGicjoUVMf6HvuNNYl2qyFH0,10112
15
15
  arch_ops_server/wiki.py,sha256=XB_emMGXYF3Vn5likRICkGOa72YDZvOhtZBgp_d1gg8,7350
16
- arch_ops_server-3.3.3.dist-info/WHEEL,sha256=5DEXXimM34_d4Gx1AuF9ysMr1_maoEtGKjaILM3s4w4,80
17
- arch_ops_server-3.3.3.dist-info/entry_points.txt,sha256=ZS2crFEqE9TteC4j2HmYS1wKvoBOCCXT2FJXJW5C4-E,117
18
- arch_ops_server-3.3.3.dist-info/METADATA,sha256=k2lO7sp9o4QpZPKpCKeJV559wRtQ5ng8ZRwjgio5EFQ,11356
19
- arch_ops_server-3.3.3.dist-info/RECORD,,
16
+ arch_ops_server-3.3.4.dist-info/WHEEL,sha256=5DEXXimM34_d4Gx1AuF9ysMr1_maoEtGKjaILM3s4w4,80
17
+ arch_ops_server-3.3.4.dist-info/entry_points.txt,sha256=ZS2crFEqE9TteC4j2HmYS1wKvoBOCCXT2FJXJW5C4-E,117
18
+ arch_ops_server-3.3.4.dist-info/METADATA,sha256=i9gvMial9Zbl2fYCFh7r3b6FnYuBb8rt5FLO863d8ww,14836
19
+ arch_ops_server-3.3.4.dist-info/RECORD,,
@@ -1,277 +0,0 @@
1
- Metadata-Version: 2.3
2
- Name: arch-ops-server
3
- Version: 3.3.3
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-only OR MIT
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: License :: OSI Approved :: MIT License
14
- Classifier: Operating System :: POSIX :: Linux
15
- Classifier: Programming Language :: Python :: 3
16
- Classifier: Programming Language :: Python :: 3.11
17
- Classifier: Programming Language :: Python :: 3.12
18
- Classifier: Topic :: System :: Archiving :: Packaging
19
- Classifier: Topic :: System :: Systems Administration
20
- Requires-Dist: mcp>=1.0.0
21
- Requires-Dist: httpx>=0.27.0
22
- Requires-Dist: beautifulsoup4>=4.12.0
23
- Requires-Dist: lxml>=5.0.0
24
- Requires-Dist: markdownify>=0.12.0
25
- Requires-Dist: pytest>=8.0.0 ; extra == 'dev'
26
- Requires-Dist: pytest-asyncio>=0.23.0 ; extra == 'dev'
27
- Requires-Dist: pytest-cov>=4.1.0 ; extra == 'dev'
28
- Requires-Dist: pytest-mock>=3.12.0 ; extra == 'dev'
29
- Requires-Dist: httpx>=0.27.0 ; extra == 'dev'
30
- Requires-Dist: starlette>=0.27.0 ; extra == 'http'
31
- Requires-Dist: uvicorn[standard]>=0.23.0 ; extra == 'http'
32
- Requires-Python: >=3.11
33
- Provides-Extra: dev
34
- Provides-Extra: http
35
- Description-Content-Type: text/markdown
36
-
37
- # Arch Linux MCP Server
38
-
39
- [![PyPI Downloads](https://static.pepy.tech/personalized-badge/arch-ops-server?period=total&units=INTERNATIONAL_SYSTEM&left_color=BLUE&right_color=BLACK&left_text=PyPi+Downloads)](https://pepy.tech/projects/arch-ops-server)
40
-
41
- <a href="https://glama.ai/mcp/servers/@nihalxkumar/arch-mcp">
42
- <img width="380" height="200" src="https://glama.ai/mcp/servers/@nihalxkumar/arch-mcp/badge" />
43
- </a>
44
-
45
- **Disclaimer:** Unofficial community project, not affiliated with Arch Linux.
46
-
47
- 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.
48
-
49
- Leverage AI to get output for digestible, structured results that are ready for follow up questions and actions.
50
-
51
- 📖 [Complete Documentation with Comfy Guides](https://nxk.mintlify.app/arch-mcp)
52
-
53
- ## Sneak Peak into what's available
54
-
55
- <details>
56
-
57
- <summary>Using VS Code Sonnet 3.5 for Safe Installation from AUR</summary>
58
-
59
- ![VS Code Demo](assets/vscode_notesnook.gif)
60
-
61
- </details>
62
-
63
- <details>
64
- <summary> Asking Claude Code Sonnet 4.5 for fedora equivalent command </summary>
65
-
66
- ![Equivalent Command Demo](assets/equivalent-commands.gif)
67
-
68
- </details>
69
-
70
- ### Resources (URI-based Access)
71
-
72
- Direct access to Arch ecosystem data via custom URI schemes:
73
-
74
- #### Documentation & Search
75
-
76
- | URI Scheme | Example | Returns |
77
- |------------|---------|---------|
78
- | `archwiki://` | `archwiki://Installation_guide` | Markdown-formatted Wiki page |
79
-
80
- #### Package Information
81
-
82
- | URI Scheme | Example | Returns |
83
- |------------|---------|---------|
84
- | `archrepo://` | `archrepo://vim` | Official repository package details |
85
- | `aur://*/info` | `aur://yay/info` | AUR package metadata (votes, maintainer, dates) |
86
- | `aur://*/pkgbuild` | `aur://yay/pkgbuild` | Raw PKGBUILD with safety analysis |
87
-
88
- #### System Packages (Arch only)
89
-
90
- | URI Scheme | Example | Returns |
91
- |------------|---------|---------|
92
- | `pacman://installed` | `pacman://installed` | System installed packages list |
93
- | `pacman://orphans` | `pacman://orphans` | Orphaned packages |
94
- | `pacman://explicit` | `pacman://explicit` | Explicitly installed packages |
95
- | `pacman://groups` | `pacman://groups` | All package groups |
96
- | `pacman://group/*` | `pacman://group/base-devel` | Packages in specific group |
97
- | `pacman://database/freshness` | `pacman://database/freshness` | Package database sync status |
98
-
99
- #### System Monitoring & Logs
100
-
101
- | URI Scheme | Example | Returns |
102
- |------------|---------|---------|
103
- | `system://info` | `system://info` | System information (kernel, memory, uptime) |
104
- | `system://disk` | `system://disk` | Disk space usage statistics |
105
- | `system://services/failed` | `system://services/failed` | Failed systemd services |
106
- | `system://logs/boot` | `system://logs/boot` | Recent boot logs |
107
- | `pacman://log/recent` | `pacman://log/recent` | Recent package transactions |
108
- | `pacman://log/failed` | `pacman://log/failed` | Failed package transactions |
109
-
110
- #### News & Updates
111
-
112
- | URI Scheme | Example | Returns |
113
- |------------|---------|---------|
114
- | `archnews://latest` | `archnews://latest` | Latest Arch Linux news |
115
- | `archnews://critical` | `archnews://critical` | Critical news requiring manual intervention |
116
- | `archnews://since-update` | `archnews://since-update` | News since last system update |
117
-
118
- #### Configuration
119
-
120
- | URI Scheme | Example | Returns |
121
- |------------|---------|---------|
122
- | `config://pacman` | `config://pacman` | Parsed pacman.conf configuration |
123
- | `config://makepkg` | `config://makepkg` | Parsed makepkg.conf configuration |
124
- | `mirrors://active` | `mirrors://active` | Currently configured mirrors |
125
- | `mirrors://health` | `mirrors://health` | Mirror configuration health status |
126
-
127
- ### Tools (Executable Functions)
128
-
129
- #### Package Search & Information
130
-
131
- | Tool | Description | Platform |
132
- |------|-------------|----------|
133
- | `search_archwiki` | Query Arch Wiki with ranked results | Any |
134
- | `search_aur` | Search AUR (relevance/votes/popularity/modified) | Any |
135
- | `get_official_package_info` | Get official package details (hybrid local/remote) | Any |
136
-
137
- #### Package Lifecycle Management
138
-
139
- | Tool | Description | Platform |
140
- |------|-------------|----------|
141
- | `check_updates_dry_run` | Check for available updates | Arch only |
142
- | `install_package_secure` | Install with security checks (blocks malicious packages) | Arch only |
143
- | `remove_package` | Remove single package (with deps, forced) | Arch only |
144
- | `remove_packages_batch` | Remove multiple packages efficiently | Arch only |
145
-
146
- #### Package Analysis & Maintenance
147
-
148
- | Tool | Description | Platform |
149
- |------|-------------|----------|
150
- | `list_orphan_packages` | Find orphaned packages | Arch only |
151
- | `remove_orphans` | Clean orphans (dry-run, exclusions) | Arch only |
152
- | `verify_package_integrity` | Check file integrity (modified/missing files) | Arch only |
153
- | `list_explicit_packages` | List user-installed packages | Arch only |
154
- | `mark_as_explicit` | Prevent package from being orphaned | Arch only |
155
- | `mark_as_dependency` | Allow package to be orphaned | Arch only |
156
-
157
- #### Package Organization
158
-
159
- | Tool | Description | Platform |
160
- |------|-------------|----------|
161
- | `find_package_owner` | Find which package owns a file | Arch only |
162
- | `list_package_files` | List files in package (regex filtering) | Arch only |
163
- | `search_package_files` | Search files across packages | Arch only |
164
- | `list_package_groups` | List all groups (base, base-devel, etc.) | Arch only |
165
- | `list_group_packages` | Show packages in specific group | Arch only |
166
-
167
- #### System Monitoring & Diagnostics
168
-
169
- | Tool | Description | Platform |
170
- |------|-------------|----------|
171
- | `get_system_info` | System info (kernel, memory, uptime) | Any |
172
- | `check_disk_space` | Disk usage with warnings | Any |
173
- | `get_pacman_cache_stats` | Package cache size and age | Arch only |
174
- | `check_failed_services` | Find failed systemd services | systemd |
175
- | `get_boot_logs` | Retrieve journalctl boot logs | systemd |
176
- | `check_database_freshness` | Check package database sync status | Arch only |
177
-
178
- #### Transaction History & Logs
179
-
180
- | Tool | Description | Platform |
181
- |------|-------------|----------|
182
- | `get_transaction_history` | Recent package transactions (install/upgrade/remove) | Arch only |
183
- | `find_when_installed` | Package installation history | Arch only |
184
- | `find_failed_transactions` | Failed package operations | Arch only |
185
- | `get_database_sync_history` | Database sync events | Arch only |
186
-
187
- #### News & Safety Checks
188
-
189
- | Tool | Description | Platform |
190
- |------|-------------|----------|
191
- | `get_latest_news` | Fetch Arch Linux news from RSS | Any |
192
- | `check_critical_news` | Find critical news (manual intervention required) | Any |
193
- | `get_news_since_last_update` | News posted since last system update | Arch only |
194
-
195
- #### Mirror Management
196
-
197
- | Tool | Description | Platform |
198
- |------|-------------|----------|
199
- | `list_active_mirrors` | Show configured mirrors | Arch only |
200
- | `test_mirror_speed` | Test mirror latency | Arch only |
201
- | `suggest_fastest_mirrors` | Recommend optimal mirrors by location | Any |
202
- | `check_mirrorlist_health` | Verify mirror configuration | Arch only |
203
-
204
- #### Configuration Management
205
-
206
- | Tool | Description | Platform |
207
- |------|-------------|----------|
208
- | `analyze_pacman_conf` | Parse pacman.conf settings | Arch only |
209
- | `analyze_makepkg_conf` | Parse makepkg.conf settings | Arch only |
210
- | `check_ignored_packages` | List ignored packages (warns on critical) | Arch only |
211
- | `get_parallel_downloads_setting` | Get parallel download config | Arch only |
212
-
213
- #### Security Analysis
214
-
215
- | Tool | Description | Platform |
216
- |------|-------------|----------|
217
- | `analyze_pkgbuild_safety` | Comprehensive PKGBUILD analysis (50+ red flags) | Any |
218
- | `analyze_package_metadata_risk` | Package trust scoring (votes, maintainer, age) | Any |
219
-
220
- ### Prompts (Guided Workflows)
221
-
222
- | Prompt | Purpose | Workflow |
223
- |--------|---------|----------|
224
- | `troubleshoot_issue` | Diagnose system errors | Extract keywords → Search Wiki → Context-aware suggestions |
225
- | `audit_aur_package` | Pre-installation safety audit | Fetch metadata → Analyze PKGBUILD → Security recommendations |
226
- | `analyze_dependencies` | Installation planning | Check repos → Map dependencies → Suggest install order |
227
- | `safe_system_update` | Safe update workflow | Check critical news → Verify disk space → List updates → Check services → Recommendations |
228
-
229
- ---
230
-
231
- ## Installation
232
-
233
- ### Prerequisites
234
-
235
- - Python 3.11+
236
- - [uv](https://github.com/astral-sh/uv) (recommended) or pip
237
-
238
- ### Quick Install with `uvx`
239
-
240
- ```bash
241
- uvx arch-ops-server
242
- ```
243
-
244
- ---
245
-
246
- ## Configuration
247
-
248
- Claude / Cursor / Any MCP client that supports STDIO transport
249
-
250
- ```json
251
- {
252
- "mcpServers": {
253
- "arch-ops": {
254
- "command": "uvx",
255
- "args": ["arch-ops-server"]
256
- }
257
- }
258
- }
259
- ```
260
-
261
- ## Contributing
262
-
263
- Contributions are greatly appreciated. Please feel free to submit a pull request or open an issue and help make things better for everyone.
264
-
265
- [Contributing Guide](https://nxk.mintlify.app/arch-mcp/contributing)
266
-
267
- ## License
268
-
269
- This project is dual-licensed under your choice of:
270
-
271
- - **[GPL-3.0-only](https://www.gnu.org/licenses/gpl-3.0.en.html)** - For those who prefer strong copyleft protections. See [LICENSE-GPL](LICENSE-GPL)
272
- - **[MIT License](https://opensource.org/licenses/MIT)** - For broader compatibility and adoption, including use in proprietary software and compatibility with platforms like Docker MCP Catalog. See [LICENSE-MIT](LICENSE-MIT)
273
-
274
- You may use this software under the terms of either license. When redistributing or modifying this software, you may choose which license to apply.
275
-
276
- By contributing to this project, you agree that your contributions will be licensed under both licenses.
277
-