Deploy a ToolServer
This guide shows you how to deploy a ToolServer resource on your Kubernetes cluster and verify it is running.
| Before following this guide, make sure you have the Agent Runtime Operator installed. See Install the Agent Runtime Operator for installation instructions. |
Prerequisites
-
Agent Runtime Operator installed — see Install the Agent Runtime Operator.
-
A container image that implements the MCP protocol.
Create the ToolServer
Apply a ToolServer resource. The example below deploys the Context7 MCP server, which provides up-to-date code documentation:
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
For the full list of fields and their types, see ToolServer Reference.
Verify
# Check the ToolServer resource status
kubectl get toolserver context7-toolserver
# Check the underlying Deployment
kubectl get deployment context7-toolserver
# Check the Service
kubectl get service context7-toolserver
# View tool server logs
kubectl logs -l app=context7-toolserver
The tool server is ready when the Deployment reports all replicas available. The status.url field on the ToolServer resource is populated with the cluster-local URL once the server is ready.