Declaratively wire MCP Servers into kagent agents with AgentTemplate

bibryam · x · 2026-10-14

In kagent + Agent Substrate there are several ways to connect to MCP Servers. The default kagent Harness (alternatives: Codex, Claude, BYO) ships a custom-built image with hardcoded agent definitions that only sees its bundled MCP Servers.

Instead, use the AgentTemplate object to declare your MCP Servers: the kagent Controller compiles the template into the KAGENTCONFIGJSON env var, LoadAgentConfigs loads it via the config package, and CreateGoogleADKAgent applies the template (MCP Servers, prompts, model) to the agent — a declarative way to customize agents on Kubernetes.

Original post →

More from coding & agent

coding & agent channel →