DEV Community

Siri Varma Vegiraju
Siri Varma Vegiraju

Posted on

Docker AI and MCP commands

Core Docker AI Commands

docker ai

The primary command to interact with Gordon (Docker's AI agent) from the terminal. Gordon looks for a gordon-mcp.yml file in your working directory to determine which MCP servers to use.

Usage:

docker ai "your question or request"
Enter fullscreen mode Exit fullscreen mode

MCP Configuration File

gordon-mcp.yml

A Docker Compose configuration file that defines MCP servers for Gordon to use. This file should be placed in your working directory.

Example structure:

services:
  mcp-time:
    image: mcp/time
    # Additional MCP server configurations
Enter fullscreen mode Exit fullscreen mode

Docker MCP Toolkit Features

MCP Toolkit Extension

An extension available in Docker Desktop Dashboard that lets you run MCP-enabled tools as containers behind an MCP Server proxy.

Key capabilities:

  • Browse and install MCP servers from the Docker MCP Catalog
  • Configure MCP servers with necessary credentials
  • Enable/disable MCP tools for your AI workflows

Available MCP Servers

Based on the search results, here are some notable MCP servers available:

  1. Docker Hub MCP Server - Allows interaction with Docker Hub, requires Docker Hub username and personal access token for configuration

  2. PostgreSQL MCP Server (mcp/postgres) - Enables AI assistants to interact directly with PostgreSQL databases, allowing database-aware conversations, queries, and schema modifications

  3. Time MCP Server (mcp/time) - Provides time-related functionality, as shown in the example where Gordon can answer time queries for different locations

How MCP Works with Docker AI

MCP functions as a client-server protocol where the client (like Gordon) sends requests, and the server processes those requests to deliver necessary context to the AI. When Gordon uses MCP, you'll see output indicating it's calling the MCP server's tools, such as "Calling get_current_time ✔️".

Installation and Setup

  1. Ensure Docker Desktop is installed and updated
  2. Add the MCP Toolkit Extension to the Docker Desktop Dashboard
  3. Browse available MCP servers in the Catalog tab
  4. Configure servers with necessary credentials
  5. Create a gordon-mcp.yml file in your project directory
  6. Use docker ai commands to interact with Gordon

Top comments (0)