AI StdioMcpClient

AI StdioMcpClient

Certified

Run MCP tools over stdio

Starts an MCP server via a local command and exposes its advertised tools to the agent over stdio. command is required; logEvents defaults to false. Use env to pass credentials or config needed by the server process.

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

Agent calling an MCP server via Stdio

yaml
id: mcp_client_stdio
namespace: company.ai

inputs:
  - id: prompt
    type: STRING
    defaults: What is the current time in New York?

tasks:
  - id: agent
    type: io.kestra.plugin.ai.agent.AIAgent
    prompt: "{{ inputs.prompt }}"
    provider:
      type: io.kestra.plugin.ai.provider.GoogleGemini
      apiKey: "{{ secret('GEMINI_API_KEY') }}"
      modelName: gemini-2.5-flash
    tools:
      - type: io.kestra.plugin.ai.tool.StdioMcpClient
        command: ["docker", "run", "--rm", "-i", "mcp/time"]
Properties
SubTypestring

MCP client command, as a list of command parts

Environment variables

Defaultfalse

Log events