Skip to main content
Glama

MCP Docker Hub Server

MCP Docker Hub Server

A Model Context Protocol (MCP) server that provides access to Docker Hub functionality through Claude with secure database storage for credentials.

Setup

  1. Install dependencies:
    npm install
  2. Database Setup:
    • Create a MySQL/MariaDB database
    • Run the SQL commands in DATABASE_SETUP.md
    • See config.example for environment variables
  3. Create environment variables: Create a .env file in the root directory with:
    # Database Configuration DB_HOST=localhost DB_USER=root DB_PASSWORD=your_password_here DB_NAME=docker_hub_db DB_PORT=3306 # Encryption Key (32 characters recommended) ENCRYPTION_KEY=your-secret-encryption-key-32-chars-long
    To get your Docker Hub access token:
    • Go to https://hub.docker.com/settings/security
    • Create a new access token
    • Use the docker_save_credentials tool to store securely
  4. Run the server:
    node src/index.js

Features

Docker Hub Operations

  • docker_search_images: Search for Docker images on Docker Hub
    • Parameters:
      • username (required): Docker Hub username
      • query (required): Search term
      • limit (optional): Number of results (default: 5)
      • page (optional): Page number (default: 1)
  • docker_get_image_details: Get details of a particular image
  • docker_list_tags: List tags for a specific image
  • docker_get_manifest: Get image manifest
  • docker_analyze_layers: Analyze image layers

Credential Management

  • docker_save_credentials: Save or update Docker Hub credentials securely
  • docker_get_credentials: Get credential metadata (username, dates)
  • docker_list_credentials: List all active credentials
  • docker_delete_credentials: Delete credentials for a user
  • docker_test_db_connection: Test database connectivity

Troubleshooting

EPIPE Error

If you encounter Error: write EPIPE, this usually means:

  1. The MCP client (Claude) closed the connection unexpectedly
  2. There's a communication issue between the client and server

Solutions:

  1. Restart Claude
  2. Check that your environment variables are set correctly
  3. Ensure the server is running before opening Claude
  4. Check the console output for any error messages

Common Issues

  1. Database connection failed: Check database server and credentials in .env
  2. Missing encryption key: Ensure ENCRYPTION_KEY is set in .env
  3. Invalid credentials: Use docker_save_credentials to store valid credentials
  4. Network issues: Check your internet connection and Docker Hub API status
  5. Table not found: Run the SQL commands in DATABASE_SETUP.md

Development

The server is built using:

  • Node.js
  • MCP SDK (@modelcontextprotocol/sdk)
  • Axios for HTTP requests
  • MySQL2 for database connectivity
  • CryptoJS for encryption
  • Dotenv for environment variable management

Security

  • All Docker Hub Personal Access Tokens (PATs) are encrypted using AES-256 encryption
  • Credentials are stored securely in the database
  • No sensitive data is exposed through the MCP tools
  • Soft delete ensures data recovery capability

Logs

The server provides detailed logging for debugging:

  • MCP Server errors
  • Transport errors
  • Docker Hub API errors
  • Process signals and shutdown events
-
security - not tested
F
license - not found
-
quality - not tested

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

Enables interaction with Docker Hub through Claude to search images, get image details, list tags, analyze layers, and manage manifests. Provides secure credential storage with encrypted Docker Hub Personal Access Tokens in a MySQL database.

  1. Setup
    1. Features
      1. Docker Hub Operations
      2. Credential Management
    2. Troubleshooting
      1. EPIPE Error
      2. Common Issues
    3. Development
      1. Security
        1. Logs

          Related MCP Servers

          • A
            security
            A
            license
            A
            quality
            This server provides tools for uploading images and videos directly to Cloudinary using Claude/Cline, facilitating resource management with customizable options like resource type and public ID.
            Last updated -
            1
            23
            8
            JavaScript
            MIT License
            • Apple
          • A
            security
            F
            license
            A
            quality
            Allows Claude and other AI assistants to interact with Docker through the MCP protocol, enabling container and image management including listing, running, stopping, and pulling Docker resources.
            Last updated -
            6
            4
            JavaScript
            • Apple
          • A
            security
            A
            license
            A
            quality
            Allows executing shell commands within a secure Docker container through Claude's MCP interface, providing Kubernetes tools and isolated environment without host Docker daemon access.
            Last updated -
            2
            621
            5
            TypeScript
            MIT License
            • Apple
          • -
            security
            A
            license
            -
            quality
            Enables Claude to interact with Qlik Cloud applications and extract data from visualizations through the Qlik Cloud API.
            Last updated -
            5
            TypeScript
            MIT License

          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/sirsambhav221/MCPDCOKER'

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