Skip to content

feat(agent): surface ADK MCP client config as A2A_MCP_* - #172

Merged
edenreich merged 1 commit into
mainfrom
feat/issue-171-20260722-1643
Jul 22, 2026
Merged

edenreich merged 1 commit into
mainfrom
feat/issue-171-20260722-1643

Conversation

@inference-gateway-maintainer

Copy link
Copy Markdown
Contributor

Summary

Adds an MCP client block to the Agent CRD and emits the A2A_MCP_* env vars the Go ADK reads (from inference-gateway/adk#251), so an operator-managed agent can declaratively connect to MCP servers and expose their tools to the LLM. Disabled by default.

This is the agent's MCP client - distinct from the existing MCP CRD, which deploys an MCP server workload.

Changes

  • api/v1alpha1/agent_types.go: new MCPClientSpec + spec.mcp field (mirrors QueueSpec), with kubebuilder defaults matching adk#251 (endpoint=/mcp, refreshInterval=5m, dialTimeout=30s, callTimeout=30s, maxRetries=0, retryInterval=2s, retryMaxInterval=30s).
  • internal/controller/agent_controller.go: agentMCPEnvVars helper wired into buildAgentEnvironmentVars, following the agentTelemetryEnvVars pattern. A2A_MCP_ENABLE is always emitted; the connection knobs only when enabled. A2A_MCP_SERVERS and the string knobs are omitted when empty so a zero value never clobbers the ADK default.
  • Regenerated zz_generated.deepcopy.go, CRD base, and shipped manifests/*.yaml.
  • Added an mcp: block to the agent sample and agentMCPEnvVars controller tests.

Env vars emitted (when enabled)

A2A_MCP_ENABLE, A2A_MCP_SERVERS, A2A_MCP_ENDPOINT, A2A_MCP_REFRESH_INTERVAL, A2A_MCP_DIAL_TIMEOUT, A2A_MCP_CALL_TIMEOUT, A2A_MCP_MAX_RETRIES, A2A_MCP_RETRY_INTERVAL, A2A_MCP_RETRY_MAX_INTERVAL.

Downstream / follow-ups

  • Config reading requires the target agent image to be built against an ADK version that includes adk#251 - no adl-cli code change needed for the agent to read A2A_MCP_*.
  • Docs-only follow-ups (adl-cli env.example.tmpl / CONFIGURATIONS.md.tmpl, and [DOCS] Document the ADK MCP client (selector tools + MCP_* config) docs#462) are tracked separately; a [DOCS] ticket is filed alongside this PR.

Testing

  • task generate manifests fmt vet lint - clean (0 lint issues)
  • task test - passes

Closes #171

Add an MCP client block to the Agent CRD and emit the A2A_MCP_* env
vars from spec.mcp, mirroring the telemetry/queue pattern. Disabled by
default; connection knobs carry kubebuilder defaults matching adk#251.

Closes #171
@inference-gateway-maintainer
inference-gateway-maintainer Bot requested a review from a team as a code owner July 22, 2026 16:53
@edenreich
edenreich merged commit fbab300 into main Jul 22, 2026
1 check passed
@edenreich
edenreich deleted the feat/issue-171-20260722-1643 branch July 22, 2026 17:07
inference-gateway-releaser Bot added a commit that referenced this pull request Jul 23, 2026
## [0.21.0](v0.20.0...v0.21.0) (2026-07-23)

### ✨ Features

* **agent:** surface ADK MCP client config as A2A_MCP_* ([#172](#172)) ([fbab300](fbab300)), closes [#171](#171)
* **gateway:** add round-robin model routing config ([#176](#176)) ([062f48a](062f48a)), closes [#175](#175)

### 🐛 Bug Fixes

* **gateway:** emit TELEMETRY_TRACING_* env vars ([#170](#170)) ([691e3a5](691e3a5))

### 📚 Documentation

* document shared provider list in AGENTS.md ([#174](#174)) ([1533f59](1533f59))

### 🔧 Miscellaneous

* add skills for both claude and regular agents ([9f3bdf4](9f3bdf4))
@inference-gateway-releaser

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 0.21.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@inference-gateway-releaser inference-gateway-releaser Bot added the released Shipped in a release label Jul 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

released Shipped in a release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE] Surface ADK MCP_* client config on the Agent CRD

1 participant