From 5e8bd7363813d26493411bccd8d2e502fe36a7fa Mon Sep 17 00:00:00 2001 From: Steven Jin Date: Tue, 20 Oct 2026 16:51:14 -0400 Subject: [PATCH] Add Egress policy docs to your first MCP tools Signed-off-by: Steven Jin --- .../1.x/get-started/your-first-mcp-tool.md | 59 +++++++++++++++++-- 1 file changed, 54 insertions(+), 5 deletions(-) diff --git a/docs-site/content/kagent/1.x/get-started/your-first-mcp-tool.md b/docs-site/content/kagent/1.x/get-started/your-first-mcp-tool.md index 431331f3..7888fc16 100644 --- a/docs-site/content/kagent/1.x/get-started/your-first-mcp-tool.md +++ b/docs-site/content/kagent/1.x/get-started/your-first-mcp-tool.md @@ -39,7 +39,9 @@ kagent records what it discovered on the server's status, so the tool names come > [!NOTE] > The built-in server is installed only when the `kagent-tools.enabled` Helm value is `true`, which is the default. If the command does not return any resources, either re-install with that value enabled, or use your own server as described in [Bind your own MCP server](#bind-your-own-mcp-server). -2. Re-apply the `my-first-template` AgentTemplate with a `spec.tools` list and a system prompt that tells the model what the tools are for. +2. Apply the complete tool configuration. This updates the AgentTemplate with + the MCP tool binding, grants the Agent runtime access to the tool server, and + attaches that grant to the Agent. ```yaml kubectl apply -f - <}}Session{{< /gloss >}} runs the revision that it was cre ## Bind your own MCP server -A `RemoteMCPServer` points at any MCP server that the cluster can reach, whether it runs in the cluster or outside it. Create one, then bind it in the same way that you bound the built-in server. +A `RemoteMCPServer` points at any MCP server that the cluster can reach, whether it runs in the cluster or outside it. +An `EgressPolicy` allows an agent to reach a hostname. +Create one, then bind it in the same way that you bound the built-in server. -1. Apply a `RemoteMCPServer` for your own server. +1. Apply a `RemoteMCPServer` and an `EgressPolicy` for your own server. ```yaml kubectl apply -f - < [!IMPORTANT] > Leave the Harness, AgentTemplate, Agent, and Sessions in place. Other guides build on them, and [Your first agent]({{< link path="get-started/your-first-agent#optional-clean-up" >}}) covers removing them when you are finished with the kagent guides. Leave `kagent-tool-server` in place as well, because the kagent installation owns it. -If you created a RemoteMCPServer of your own in [Bind your own MCP server](#bind-your-own-mcp-server), delete it. +If you created an `EgressPolicy` and `RemoteMCPServer` of your own in [Bind your own MCP server](#bind-your-own-mcp-server), delete them. ```bash +kubectl delete egresspolicy my-mcp-server -n kagent kubectl delete remotemcpserver my-mcp-server -n kagent ```