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-3.5-flash-lite
    tools:
      - type: io.kestra.plugin.ai.tool.StdioMcpClient
        command: ["docker", "run", "--rm", "-i", "mcp/time"]
Properties
SubTypestring

MCP server command

Command that starts the MCP server process, split into its parts, which the client talks to over standard input/output. No default: this property is required.

Environment variables

Environment variables passed to the MCP server process, typically to supply credentials. Not set by default.

Defaultfalse

Log events

If true, MCP protocol events exchanged with the server process are logged. Defaults to false.