Create a Tool Server
This guide walks you through creating and deploying tool servers using the Agent Runtime Operator. Tool servers extend your agents' capabilities by providing external tools and functionality through the Model Context Protocol (MCP).
| Before following this guide, make sure you have the Agent Runtime Operator installed. See Install the Agent Runtime Operator for installation instructions. |
Quick Start: Your First Tool Server
Get your first tool server running in under 5 minutes.
Deploy your first tool server
# Create a tool server using the Context7 MCP server (provides up-to-date code docs)
cat <<EOF | kubectl apply -f -
apiVersion: runtime.agentic-layer.ai/v1alpha1
kind: ToolServer
metadata:
name: context7-toolserver
spec:
protocol: mcp
transportType: http
image: mcp/context7:latest
port: 8080
replicas: 2
env:
- name: LOGLEVEL
value: INFO
EOF
Using Tool Servers with Agents
To connect a tool server to your agent, reference it using toolServerRef:
Replace your-gemini-api-key-here with your actual Gemini API key before deploying.
|
apiVersion: runtime.agentic-layer.ai/v1alpha1
kind: Agent
metadata:
name: coding-assistant
spec:
framework: google-adk
description: "A coding assistant with access to up-to-date documentation"
instruction: "You are a helpful coding assistant. Use the context7 tool to fetch up-to-date documentation for libraries and frameworks to help answer coding questions accurately."
model: "gemini/gemini-2.5-flash"
tools:
- name: context7_tools
toolServerRef:
name: context7-toolserver
protocols:
- type: A2A
replicas: 1
env:
- name: GEMINI_API_KEY
value: "your-gemini-api-key-here"
The operator automatically wires the agent to the tool server using the ToolServer’s name.
For more details on creating and configuring agents, see Create an AI Agent.
Happy tool server building! 🔧