MCP-Connected Agent
spec.agent.mcps lists the MCP (Model Context Protocol) servers an agent connects to at runtime to discover and call external tools, on top of its locally generated spec.tools. It lives under spec.agent because it only makes sense once an LLM is driving. This agent connects to two servers over two different transports.
yaml
apiVersion: adl.inference-gateway.com/v1
kind: Agent
metadata:
name: devtools-agent
description: Coding assistant that reaches external tools over MCP (stdio + http)
version: "0.2.0"
tags:
- developer-tools
spec:
capabilities:
streaming: true
pushNotifications: false
stateTransitionHistory: true
agent:
provider: openai
model: gpt-4.1
systemPrompt: |
You are a coding assistant. Use the filesystem MCP server to read
local files and the GitHub MCP server to inspect issues and PRs.
mcps:
- name: filesystem
transport: stdio
command: npx
args:
- -y
- "@modelcontextprotocol/server-filesystem"
- /workspace
env:
LOG_LEVEL: info
- name: github
transport: http
url: https://mcp.example.com/github
headers:
Authorization: Bearer ${GITHUB_MCP_TOKEN}
server:
port: 8080
language:
go:
module: github.com/example/devtools-agent
version: "1.26"Highlights
stdiolaunches a local subprocess.filesystemis started withcommand+args(herenpx ... server-filesystem /workspace) and the agent talks to it over stdin/stdout.envsets variables the subprocess needs.httpreaches a remote endpoint.githubis a remote server addressed byurl, withheaderscarrying anAuthorizationtoken. Placeholders like${GITHUB_MCP_TOKEN}are resolved by the consumer - the schema doesn't interpret them. See Secrets & interpolation.- Only
name+transportare required. The remaining fields are the connection details for the chosen transport; the schema doesn't enforce which combination is present, so consumers stay lenient. (sseis the third accepted transport.) - MCP complements
spec.tools. Generated tools are deterministic entrypoints you own; MCP servers are external capabilities discovered at runtime. An agent can use either or both.