Get the FREE Ultimate OpenClaw Setup Guide →

apt

The Apt MCP Server is a TypeScript-based server built with the FastMCP framework

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio gdmacmillan-apt-mcp-server node dist/index.js

How to use

This Apt MCP Server exposes a set of MCP tools to manage the system's apt package manager via standard input/output transport. It provides tools to install, remove, update, and query apt packages, including: installAptPackage for installing one or more packages, removeAptPackage for removing packages, queryAptPackageStatus to check installation status, updateAptPackages to refresh the package lists and upgrade, listUpgradableAptPackages to show packages that can be upgraded, and upgradeSpecificAptPackage to upgrade a single package. Use the MCP client to call these tools with JSON payloads; each call returns a plain text result containing a summary along with stdout, stderr, and logs when applicable. The server is designed for stdio transport by default, making it easy to integrate with AI agents or development tooling.

How to install

Prerequisites:

  • Linux environment with apt and dpkg installed
  • Node.js and npm >= 14

Installation steps:

  1. Clone the repository git clone <your-repo-url> cd gdmacmillan-apt-mcp-server

  2. Install dependencies npm install

  3. Build the project npm run build

  4. Run the server (stdio transport by default) npm run dev

    or

    npm start

Notes:

  • The server assumes passwordless sudo is configured for apt/dpkg operations.
  • Ensure the executing user has the necessary sudo privileges to install/remove packages without a password prompt.

Additional notes

Tips and caveats:

  • All apt/dpkg operations are performed with sudo; ensure passwordless sudo is set up for smooth automation.
  • If you encounter apt lock or transient errors, the server may retry; if issues persist, wait and try again.
  • Outputs are provided in a consistent format with Result, Summary, stdout, and stderr to aid parsing by clients.
  • To extend tools, follow the existing pattern in src/index.ts to add new MCP tool handlers.
  • Environment variables are currently not required; you can add env keys in the mcp_config if needed for customization.

Related MCP Servers

Sponsor this space

Reach thousands of developers