Aptly MCP Server
The Aptly MCP Server enables AI assistants to manage Debian package repositories using Aptly through natural language commands, providing comprehensive control over package distribution.
Repository Management: Create, list, retrieve detailed information about, and delete local repositories with optional metadata like comments, components, and distributions.
Package Management: Add packages from uploaded files, list packages within repositories, and search for packages across all repositories.
File Upload Management: List uploaded files and delete uploaded files or directories from the server.
Snapshot Management: Create snapshots from repositories with optional descriptions and list existing snapshots.
Publishing: Publish repositories or snapshots to make them available for apt consumption.
Mirror Management: Create mirrors of remote repositories, update mirrors to fetch latest packages, list configured mirrors, and get detailed mirror information.
Health Check: Verify the operational status and accessibility of the underlying Aptly server.
Provides tools for managing Debian package repositories using Aptly, including creating repositories, adding packages, creating snapshots, publishing repositories, and managing mirrors of remote Debian repositories.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Aptly MCP Server create a new repository called 'production-packages' for our latest release"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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.
Related MCP server: GitLab MCP Server
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
Installing via Smithery
To install aptly-mcp for Claude Desktop automatically via Smithery:
npx -y @smithery/cli install @rashidazarang/aptly-mcp --client claudeManual Installation
cd aptly-mcp
npm install
npm run buildConfiguration
Environment Variables
export APTLY_API_URL=http://localhost:8080 # Default Aptly API endpoint
export APTLY_AUTH_TOKEN=your_token_here # Optional authentication tokenClaude 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 buildTesting
npm run inspector # Launch MCP inspector for testingWatching for Changes
npm run watchAPI 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
Available Tools
19 toolsaptly_add_packagesC
Add packages to a repository from uploaded files
Inputs: directory (required), repoName (required), files.
aptly_create_mirrorC
Create a mirror of a remote repository
Inputs: archiveURL (required), distribution (required), name (required), architectures, +1 more.
aptly_create_repoC
Create a new local repository in Aptly
Inputs: name (required), comment, defaultComponent, defaultDistribution.
aptly_create_snapshotC
Create a snapshot from a repository
Inputs: name (required), repoName (required), description.
aptly_delete_repoC
Delete a local repository
Inputs: name (required), force.
aptly_delete_uploaded_filesC
Delete uploaded files or directories
Inputs: directory (required), filename.
aptly_get_mirrorB
Get detailed information about a specific mirror
Inputs: name (required).
aptly_get_repoC
Get detailed information about a specific repository
Inputs: name (required).
aptly_health_checkB
Check if Aptly server is running and accessible
Inputs: no named parameters.
aptly_list_mirrorsB
List all configured mirrors
Inputs: no named parameters.
aptly_list_packagesC
List packages in a repository
Inputs: repoName (required), query.
aptly_list_publishedB
List all published repositories
Inputs: no named parameters.
aptly_list_reposB
List all local repositories
Inputs: no named parameters.
aptly_list_snapshotsC
List all snapshots
Inputs: no named parameters.
aptly_list_uploaded_filesC
List uploaded files available for adding to repositories
Inputs: directory.
aptly_publish_repoC
Publish a repository to make it available for apt
Inputs: distribution (required), repoName (required), prefix.
aptly_publish_snapshotC
Publish a snapshot to make it available for apt
Inputs: distribution (required), snapshotName (required), prefix.
aptly_search_packagesB
Search for packages across repositories or in a specific repository
Inputs: query (required), format, repoName.
aptly_update_mirrorC
Update a mirror to fetch the latest packages from the remote repository
Inputs: name (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 19 tools
Every tool has a clearly distinct purpose targeting specific resources and actions in the Aptly ecosystem. For example, aptly_create_mirror, aptly_update_mirror, and aptly_get_mirror handle different lifecycle stages of mirrors, while aptly_list_repos, aptly_get_repo, and aptly_delete_repo manage repositories without overlap. The descriptions reinforce these distinctions, making misselection unlikely.
All tool names follow a consistent verb_noun pattern with the 'aptly_' prefix, such as aptly_create_repo, aptly_list_mirrors, and aptly_update_mirror. This uniformity in naming makes the tool set predictable and easy to navigate, with no deviations in style or convention across the 19 tools.
With 19 tools, the count is slightly high but reasonable for a comprehensive package management server covering mirrors, repositories, snapshots, packages, and publishing. Each tool appears to earn its place by addressing specific operations in the Aptly domain, though it borders on the upper limit of a well-scoped set.
The tool surface provides complete CRUD/lifecycle coverage for Aptly's domain, including creation, listing, retrieval, updating, and deletion for mirrors, repositories, snapshots, and packages. It also handles publishing, health checks, and file management, leaving no obvious gaps that would cause agent failures in typical workflows.
Related MCP Connectors
Connect AI assistants to GitHub - manage repos, issues, PRs, and workflows through natural language.
Provides capabilities that let LLM agents perform a range of infrastructure management tasks.
Manage Superlist tasks and lists in plain language from any MCP-compatible AI agent.
Manage SRG+ hubs, channels, content, assets, users, and workspaces from any MCP-aware AI agent.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceA 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.2ISC
- FlicenseNot gradedqualityDmaintenanceProvides 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.2-
- AlicenseAqualityDmaintenanceConnects AI assistants to GitLab, allowing users to manage merge requests, view reviews, and interact with discussions through natural language queries.1225MIT
- AlicenseBqualityDmaintenanceEnables AI assistants to manage development workflows by running build commands, executing tests, analyzing package.json files, installing dependencies, and performing code linting. Supports multiple package managers (npm, yarn, pnpm) and provides detailed error reporting for development operations.5MIT