AI StreamableHttpMcpClient

AI StreamableHttpMcpClient

Certified

Call MCP server over HTTP streaming

Connects to an MCP server via HTTP streaming (chunked responses) and surfaces its tools to the agent. Requires url; timeout, headers, logRequests, and logResponses are optional, with request/response logging off by default.

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

Agent calling an MCP server via HTTP streaming

yaml
id: mcp_client_streamable_http
namespace: company.ai

inputs:
  - id: prompt
    type: STRING
    defaults: Find the 2 restaurants in Lille, France with the best reviews.

tasks:
  - id: agent
    type: io.kestra.plugin.ai.agent.AIAgent
    prompt: "{{ inputs.prompt }}"
    provider:
      type: io.kestra.plugin.ai.provider.GoogleGemini
      modelName: gemini-3.5-flash-lite
      apiKey: "{{ secret('GEMINI_API_KEY') }}"
    tools:
      - type: io.kestra.plugin.ai.tool.StreamableHttpMcpClient
        url: https://mcp.apify.com/?actors=compass/crawler-google-places
        timeout: PT5M
        headers:
          Authorization: Bearer {{ secret('APIFY_API_TOKEN') }}
Properties

URL of the MCP server

Streamable HTTP endpoint of the MCP server exposing the tools. No default: this property is required.

Custom headers

Extra HTTP headers sent with every request, typically to carry an authentication token via the Authorization header. Not set by default.

Defaultfalse

Log requests

If true, requests sent to the MCP server are logged at INFO level. Defaults to false.

Defaultfalse

Log responses

If true, responses received from the MCP server are logged at INFO level. Defaults to false.

Connection timeout duration

Maximum time to wait for a response from the MCP server. Not set by default, in which case the MCP transport's own default applies.