Skip to main content
Glama

Aptly MCP Server

Aptly MCP Server

A Model Context Protocol (MCP) server for managing Debian package repositories using the Aptly package repository management tool.

Overview

This MCP server provides AI assistants with direct access to Aptly functionality through standardized tools and resources. It enables natural language interaction with Debian package repositories, including creation, management, and publishing operations.

Features

MCP Tools

  • aptly_create_repo: Create new local repositories
  • aptly_list_repos: List all repositories with filtering options
  • aptly_add_packages: Add packages to repositories from uploaded files
  • aptly_search_packages: Search packages across repositories
  • aptly_create_snapshot: Create snapshots from repositories or other snapshots
  • aptly_publish_repo: Publish repositories/snapshots for apt consumption
  • aptly_create_mirror: Create mirrors of remote repositories
  • aptly_upload_files: Upload package files to the server
  • aptly_list_mirrors: List all configured mirrors
  • aptly_update_mirror: Update mirrors with latest packages
  • aptly_delete_repo: Delete repositories with safety checks

MCP Resources

  • repositories: Dynamic listing of all repositories with metadata
  • packages: Searchable package databases across repositories
  • mirrors: Remote mirror status and configuration
  • publications: Published repository information and endpoints
  • snapshots: Available snapshots with creation dates and descriptions

Installation

cd aptly-mcp npm install npm run build

Configuration

Environment Variables

export APTLY_API_URL=http://localhost:8080 # Default Aptly API endpoint export APTLY_AUTH_TOKEN=your_token_here # Optional authentication token

Claude Desktop Configuration

Add to your claude_desktop_config.json:

{ "mcpServers": { "aptly": { "command": "node", "args": ["/path/to/aptly-mcp/build/index.js"], "env": { "APTLY_API_URL": "http://localhost:8080" } } } }

Remote Aptly Server

For remote Aptly servers with authentication:

{ "mcpServers": { "aptly": { "command": "node", "args": ["/path/to/aptly-mcp/build/index.js"], "env": { "APTLY_API_URL": "https://aptly.example.com", "APTLY_AUTH_TOKEN": "your-auth-token" } } } }

Usage Examples

Once configured with Claude Desktop, you can use natural language commands:

Repository Management

  • "Create a new repository called 'production-packages' for production releases"
  • "List all repositories and show their package counts"
  • "Delete the 'test-repo' repository"

Package Operations

  • "Add all .deb files from the 'uploads' directory to the 'main' repository"
  • "Search for packages containing 'nginx' across all repositories"
  • "Remove the 'old-package' from the 'main' repository"

Snapshot Management

  • "Create a snapshot of the 'main' repository called 'v1.0-release'"
  • "List all snapshots and their creation dates"
  • "Create a merged snapshot from 'main' and 'contrib' repositories"

Publishing

  • "Publish the 'main' repository to the 'stable' distribution"
  • "Update the published 'testing' repository with the latest snapshot"
  • "List all published repositories and their endpoints"

Mirror Management

  • "Create a mirror of the Ubuntu main repository"
  • "Update all mirrors to get the latest packages"
  • "Show the status of the 'ubuntu-main' mirror"

Development

Building

npm run build

Testing

npm run inspector # Launch MCP inspector for testing

Watching for Changes

npm run watch

API Documentation

The server connects to Aptly's REST API. Ensure your Aptly instance is running with API enabled:

aptly api serve -listen=":8080"

Security Considerations

  • Use Unix domain sockets instead of network ports in production
  • Implement proper authentication for remote Aptly servers
  • Consider using a reverse proxy with HTTPS for production deployments
  • Validate all inputs to prevent injection attacks

License

MIT License

Install Server
A
security – no known vulnerabilities
A
license - permissive license
A
quality - confirmed to work

hybrid server

The server is able to function both locally and remotely, depending on the configuration or use case.

Enables AI assistants to manage Debian package repositories through natural language using the Aptly package management tool. Supports repository creation, package operations, snapshot management, publishing, and mirror synchronization.

  1. Overview
    1. Features
      1. MCP Tools
      2. MCP Resources
    2. Installation
      1. Configuration
        1. Environment Variables
        2. Claude Desktop Configuration
        3. Remote Aptly Server
      2. Usage Examples
        1. Repository Management
        2. Package Operations
        3. Snapshot Management
        4. Publishing
        5. Mirror Management
      3. Development
        1. Building
        2. Testing
        3. Watching for Changes
      4. API Documentation
        1. Security Considerations
          1. License

            Related MCP Servers

            • -
              security
              F
              license
              -
              quality
              A custom server implementation that allows AI assistants to interact with GitLab repositories, providing capabilities for searching, fetching files, creating/updating content, and managing issues and merge requests.
              Last updated -
              1
              JavaScript
            • -
              security
              F
              license
              -
              quality
              Provides GitLab integration for AI assistants using Model Context Protocol, enabling repository operations, file management, issue tracking, merge requests, and branch/tag administration through natural language.
              Last updated -
              2
              Python
            • -
              security
              F
              license
              -
              quality
              Connects AI assistants to GitLab, allowing users to manage merge requests, view reviews, and interact with discussions through natural language queries.
              Last updated -
              8
              Python
            • -
              security
              A
              license
              -
              quality
              Enables AI applications to automatically analyze local repositories and create GitHub repositories with proper configuration, topics, and complete setup workflow.
              Last updated -
              1
              Python
              GPL 3.0
              • Apple
              • Linux

            View all related MCP servers

            MCP directory API

            We provide all the information about MCP servers via our MCP API.

            curl -X GET 'https://glama.ai/api/mcp/v1/servers/rashidazarang/aptly-mcp'

            If you have feedback or need assistance with the MCP directory API, please join our Discord server