APT MCP

APT MCP

MCP server which runs debian package manager (apt) commands for you using ai agents.

6
Stars
1
Forks
0
Releases

Overview

A TypeScript-based MCP (Model Context Protocol) server that exposes tools for installing, removing, updating, and querying apt packages on Linux by invoking the system's native apt and dpkg binaries with sudo privileges. Designed for seamless integration with AI agents (e.g., Cursor, Claude Desktop, Windsurf) and developer tooling, it provides passwordless sudo-privileged operations with input validation and robust error handling. All tools return a consistent plain-text response containing a summary, stdout, stderr, and logs. The server uses stdio transport by default, making it suitable for local agent integration, and emphasizes secure, human-readable outputs. Supported tools include installAptPackage, removeAptPackage, queryAptPackageStatus, updateAptPackages, listUpgradableAptPackages, and upgradeSpecificAptPackage. It assumes passwordless sudo for apt/dpkg operations and includes error handling for common issues such as invalid package names, missing packages, permission errors, and apt lock conditions.

Details

Owner
GdMacmillan
Language
JavaScript
License
Other
Updated
2025-12-07

Features

Install, remove, update, and query apt packages

Expose MCP tools to perform common package operations via apt/dpkg.

Passwordless sudo assumed

All operations run with sudo without prompting for a password.

Input validation and robust error handling

Validates inputs and provides consistent error reporting.

Consistent, human-readable output

Each tool returns a plain text response with summary, stdout, stderr, and logs.

StdIO transport designed

Optimized for integration with local AI agents and stdio-based tooling.

Uses system native binaries

Leverages apt and dpkg binaries for operations.

Multiple tools exposed via MCP

Tools include installAptPackage, removeAptPackageStatus, queryAptPackageStatus, updateAptPackages, listUpgradableAptPackages, upgradeSpecificAptPackage.

Error handling & troubleshooting guidance

Provides error formats and common failure causes for easier remediation.

Audience

AI agentsIntegrated into AI agent workflows to manage apt packages via MCP tools.
DevelopersDevelopers integrating MCP servers into tools to automate apt-related tasks.

Tags

aptpackage-managerdpkgsudoMCPModel Context ProtocolLinuxTypeScriptAI agentsstdioLinux apt