From 0dd236e3f6870ad3da978e10dd402fbb95739f52 Mon Sep 17 00:00:00 2001 From: GitHub Action Date: Sun, 25 Oct 2026 10:26:41 +0000 Subject: [PATCH] [Automated] Draft docs (kagent): feat: add token passthrough for remote MCP servers Signed-off-by: GitHub Action --- .../kagent/1.x/agents/agent-harness.md | 1 + .../1.x/get-started/your-first-mcp-tool.md | 29 +++++++++++++++++++ 2 files changed, 30 insertions(+) diff --git a/docs-site/content/kagent/1.x/agents/agent-harness.md b/docs-site/content/kagent/1.x/agents/agent-harness.md index 73b02ff9..7faa0db9 100644 --- a/docs-site/content/kagent/1.x/agents/agent-harness.md +++ b/docs-site/content/kagent/1.x/agents/agent-harness.md @@ -303,6 +303,7 @@ The `kagent` harness accepts every AgentTemplate feature. Codex and Claude run a | A subagent binding cannot itself carry tools, skills, plugins, or nested agents, and must use the same provider and credentials as the agent that binds it. | `codex`, `claude` | | The agent sees every tool that an {{< gloss "MCP" >}}MCP{{< /gloss >}} server offers, because Claude does not support partial tool selection. A binding that names a subset of tools binds the whole server instead. The Agent still reconciles, and reports the decision in `status.warnings` as `Claude RemoteMCPServer "" does not support partial tool selection`. | `claude` | | A RemoteMCPServer must use the `STREAMABLE_HTTP` protocol. `SSE` is rejected. | `codex` | +| A RemoteMCPServer that sets `tokenPassthrough` is rejected. | `codex`, `claude` | | Structured output is rejected, with `Harness runtime "" does not support structured output`. | `codex`, `claude`, `byo` | For more information about what an AgentTemplate can bind, see [About tools]({{< link path="skills-and-mcp/about-tools" >}}). 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 90f6c864..577f0d64 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 @@ -176,6 +176,34 @@ A `RemoteMCPServer` points at any MCP server that the cluster can reach, whether 3. Create another Session to run the revision that includes the new binding. +### Use the caller token for MCP server authentication {#use-the-caller-token-for-mcp-server-authentication} + +If your MCP server authorizes each user with the caller's bearer token, create a separate RemoteMCPServer with `tokenPassthrough: true`. With token passthrough, the server receives the token as its `Authorization` header. The MCP request fails when the agent invocation has no caller token. + +```yaml +kubectl apply -f - <`. A RemoteMCPServer that sets `tokenPassthrough` cannot also set an `Authorization` header in `headersFrom`. | + +The `codex` and `claude` harnesses reject a RemoteMCPServer that sets `tokenPassthrough`. + ## Clean up > [!IMPORTANT] @@ -185,6 +213,7 @@ If you created a RemoteMCPServer of your own in [Bind your own MCP server](#bind ```bash kubectl delete remotemcpserver my-mcp-server -n kagent +kubectl delete remotemcpserver user-mcp-server -n kagent ``` ## Next steps