AI DockerMcpClient

AI DockerMcpClient

Certified

Run MCP tools in Docker

Launches an MCP server inside a Docker container and exposes its tools to the agent. Requires an image; optional command, env, and binds control the container. Docker host defaults to the detected runtime; logEvents defaults to false. Provide registry credentials and TLS settings when pulling from private registries.

yaml
type: io.kestra.plugin.ai.tool.DockerMcpClient

Agent calling an MCP server in a Docker container

yaml
id: docker_mcp_client
namespace: company.ai

inputs:
  - id: prompt
    type: STRING
    defaults: What is the current UTC time?

tasks:
  - id: agent
    type: io.kestra.plugin.ai.agent.AIAgent
    provider:
      type: io.kestra.plugin.ai.provider.GoogleGemini
      apiKey: "{{ secret('GEMINI_API_KEY') }}"
      modelName: gemini-2.5-flash
    prompt: "{{ inputs.prompt }}"
    tools:
      - type: io.kestra.plugin.ai.tool.DockerMcpClient
        image: mcp/time

Agent calling an MCP server in a Docker container and generating output files

yaml
id: docker_mcp_client
namespace: company.ai

inputs:
  - id: prompt
    type: STRING
    defaults: Create the file '/tmp/hello.txt' with the content "Hello World".

tasks:
  - id: agent
    type: io.kestra.plugin.ai.agent.AIAgent
    provider:
      type: io.kestra.plugin.ai.provider.GoogleGemini
      apiKey: "{{ secret('GEMINI_API_KEY') }}"
      modelName: gemini-2.5-flash
    prompt: "{{ inputs.prompt }}"
    systemMessage: |
      You are a filesystem assistant. Always use the write_file tool with the exact absolute path provided in the user's request.
    tools:
      - type: io.kestra.plugin.ai.tool.DockerMcpClient
        image: mcp/filesystem
        command: ["/tmp"]
        # Mount the container path to the task working directory to access the generated file
        binds: ["{{ workingDir }}:/tmp"]
    outputFiles:
      - hello.txt
Properties

Container image

API version

SubTypestring

Volume binds

SubTypestring

MCP client command, as a list of command parts

Docker certificate path

Docker configuration

Docker context

Docker host

Whether Docker should verify TLS certificates

Environment variables

Defaultfalse

Whether to log events

Container registry email

Container registry password

Container registry URL

Container registry username