Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Docker Registry MCP Server

MCP (Model Context Protocol) server for Docker Registry v2 API. Enables AI assistants to manage images in private Docker registries.

Features

Core

  • list_repositories - List all repositories in the registry
  • list_tags - List all tags for a repository
  • get_manifest - Get image manifest (layers, config)
  • get_image_info - Detailed image info (size, env, ports, entrypoint, etc.)
  • delete_tag - Delete a tag from repository
  • search_repositories - Search by pattern (glob: *, ?)

Analytics

  • get_repository_stats - Repository statistics (tag count, size, oldest/newest/largest)
  • get_registry_stats - Overall registry statistics with top repositories by size
  • find_dangling_tags - Find tags older than N days (cleanup candidates)
  • find_latest_push - Find most recently pushed images across all repos
  • get_layer_sharing - Analyze layer sharing across repositories

Management

  • compare_tags - Compare two tags (common/unique layers, size delta)
  • bulk_delete_tags - Delete tags by pattern, age, or explicit list
  • copy_tag - Copy/retag an image within the same repository

Installation

Claude Code

claude mcp add docker-registry \
  -e REGISTRY_URL=https://your-registry.com \
  -e REGISTRY_USERNAME=user \
  -e REGISTRY_PASSWORD=secret \
  -- npx -y docker-registry-mcp

Claude Desktop / Cursor

Add to your MCP config:

{
  "mcpServers": {
    "docker-registry": {
      "command": "npx",
      "args": ["-y", "docker-registry-mcp"],
      "env": {
        "REGISTRY_URL": "https://your-registry.com",
        "REGISTRY_USERNAME": "user",
        "REGISTRY_PASSWORD": "secret"
      }
    }
  }
}

Configuration

Variable Required Description
REGISTRY_URL Yes Registry URL (e.g., https://docker.example.com)
REGISTRY_USERNAME No Username for authentication
REGISTRY_PASSWORD No Password for authentication

Usage Examples

Once configured, you can ask your AI assistant:

  • "List all repositories in the registry"
  • "Show tags for myapp/backend"
  • "Get info about nginx:latest"
  • "Find all repositories matching *-backend"
  • "What's the total size of my registry?"
  • "Find tags older than 30 days in myapp/backend"
  • "Compare tags v1.0 and v2.0 in myapp"
  • "Delete all tags matching pr-* in myapp, but keep the latest 5"
  • "What are the most recently pushed images?"
  • "Which layers are shared across repositories?"

Requirements

  • Node.js 20+
  • Docker Registry v2 compatible registry
  • For delete operations: REGISTRY_STORAGE_DELETE_ENABLED=true on the registry

License

MIT

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages