Model Context Protocol (MCP) Docker client tool
yaml
type: "io.kestra.plugin.ai.tool.DockerMcpClient"
Examples
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: "{{ kv('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 a file 'hello.txt' with the content "Hello World" in the /tmp directory.
tasks:
- id: agent
type: io.kestra.plugin.ai.agent.AIAgent
provider:
type: io.kestra.plugin.ai.provider.GoogleGemini
apiKey: "{{ kv('GEMINI_API_KEY') }}"
modelName: gemini-2.5-flash
prompt: "{{ inputs.prompt }}"
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
image *Requiredstring
Container image
apiVersion string
API version
binds array
SubType string
Volume binds
command array
SubType string
MCP client command, as a list of command parts
dockerCertPath string
Docker certificate path
dockerConfig string
Docker configuration
dockerContext string
Docker context
dockerHost string
Docker host
dockerTlsVerify booleanstring
Whether Docker should verify TLS certificates
env object
SubType string
Environment variables
logEvents booleanstring
Default
false
Whether to log events
registryEmail string
Container registry email
registryPassword string
Container registry password
registryUrl string
Container registry URL
registryUsername string
Container registry username