add-context-gateway

add-context-gateway is a skill for Claude Code from redis/agent-skills. It costs 209 tokens per session (7,764 once invoked), scanned B, original, MIT.

A gateway places an agent's MCP servers behind one Context Gateway endpoint. MCP, the Model Context Protocol, is a standard way for an AI agent to use external tools; the gateway stores upstream secrets and presents those tools through one agent key.

In plain words
What is it for?
It is for connecting an existing agent to multiple MCP servers through one endpoint. It also supports optional caching for read-only tools and returning large results as handles.
Why use it?
It removes the need to configure every MCP server and its secret directly in the agent. It can also avoid tool-name collisions and reduce the number of tool schemas shown at once.

Skill for Claude Code ✓ vendor

Written for Claude Code: shipped in a Claude Code plugin. Also seen: mentions Claude Code.

Part of the redis-development plugin — 14 skills, 1 MCP server shipped together

Good fit It is for connecting an existing agent to multiple MCP servers through one endpoint. It also supports optional caching for read-only tools and returning large results as handles.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/redis/agent-skills/add-context-gateway
About the project

Redis Agent Skills is Redis's collection of packaged instructions and resources that teach AI coding agents how to work with Redis data structures, connections, search, caching, clustering, security, observability, and agent memory. It is for developers using coding agents to build or troubleshoot Redis-backed applications. The catalogue entries are the project's own agent skills, instructions, and plugin packaging.

redis/agent-skills · 178 stars · on GitHub · redis.io

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add redis/agent-skills --skill add-context-gateway
Clone the repo
git clone --depth 1 https://github.com/redis/agent-skills

Made for: Claude Code.

Or install redis-development, the plugin that ships this one along with the rest of its 14 skills, 1 MCP server.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for add-context-gateway

README.md
[![agentmods](https://agentmods.dev/badge/skills/redis/agent-skills/add-context-gateway/github.svg)](https://agentmods.dev/skills/redis/agent-skills/add-context-gateway)
Your own site
<a href="https://agentmods.dev/skills/redis/agent-skills/add-context-gateway"><img src="https://agentmods.dev/badge/skills/redis/agent-skills/add-context-gateway/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for add-context-gateway

Your own site · 80×15
<a href="https://agentmods.dev/skills/redis/agent-skills/add-context-gateway"><img src="https://agentmods.dev/badge/skills/redis/agent-skills/add-context-gateway.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 209 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 7,764 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00209 $0.07764
Opus 5.5 $0.00084 $0.03106
Sonnet 5.5 $0.00042 $0.01553
Haiku 4.5 $0.00021 $0.00776

Measured 29d ago against content hash 9781784bb3c2, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade B, and why

add-context-gateway scanned grade B with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 29d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Reads MCP configurationmediumAgent snooping

mcp.json carries server URLs and auth tokens; reading it lets a mod discover and abuse other integrations.

- Find every MCP server the agent configures: `.mcp.json`, `.cursor/mcp.json`, `McpToolset`, `MCPServerStreamableHttp`, `MultiServerMCPClient`, `stdio_client`, or a hand-written MCP client. Note each endpoint and where i
plugins/redis-development/skills/add-context-gateway/SKILL.md · 307 lines

How it starts

The opening of the file, as written. The whole thing — 307 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Add Context Gateway

One MCP endpoint and one agent key in place of every MCP server the agent configures today. The Gateway holds each Upstream's secret, namespaces tool names so they never collide, can expose a large catalog as search_tools and run_tool instead of every schema, caches read-only tools you opt in, and can hand a large result back as a handle. The agent keeps its tools; only where it reaches them changes. Ask first, provision, then repoint.

1. Discover

Read the project:

  • Find every MCP server the agent configures: .mcp.json, .cursor/mcp.json, McpToolset, MCPServerStreamableHttp, MultiServerMCPClient, stdio_client, or a hand-written MCP client. Note each endpoint and where its secret comes from.
  • Find where tools are handed to the model and where the turn runs.
  • Identify the framework from imports, and whether it has its own MCP client.
  • Note stdio-only servers: an Upstream is an HTTP MCP endpoint (streamable-http). A stdio server has to be served over HTTP first, or stays outside the Gateway.

First ask where the Gateway runs:

  • Redis Cloud (console). The developer creates the Gateway and its Upstreams in the console, and the CLI only talks to the Gateway's MCP endpoint (step 3, "In Redis Cloud"). Cloud keeps the Gateway's cache and compression off, so skip questions 3 and 4.
  • Self-managed (on-prem, or the local Compose stack). The CLI provisions everything (step 3).

Then ask the developer these five questions, nothing more. A shrug takes the default.

Ask If the answer is Configure
Which MCP servers does the agent use, and where do their secrets live? A list of HTTP endpoints One Upstream each: upstream add --name NAME --endpoint URL with --bearer-secret env:VAR or --header NAME --header-secret env:VAR
A Redis database the agent should query A Context Surface Upstream: --kind context-surface --surface-database-id ID --data-model FILE (self-managed, the ID can be left out and defaults from the deployment config. In Redis Cloud the console's Create Context Surface asks for the database). Write the data model first: see "Write the data model"
How many tools does the agent see in total? Tens (default) --tool-exposure-mode full: every tool, namespaced
Hundreds, or schemas crowd the prompt --tool-exposure-mode search: the model sees search_tools and run_tool
Which read-only tools return the same answer for the same arguments? Lookups, searches, reference data A Gateway with a database and cache enabled (see "Gateway switches and database"), then policy set UPSTREAM TOOL --cache-ttl DURATION per tool
None, or not sure No cache policies
Which tools return results too large to read whole? Exports, list endpoints, logs A Gateway with a noeviction database and compression enabled (see "Gateway switches and database"). Then the deployment's handle defaults, or --compression-ttl DURATION per tool, and --compression-capture never for a tool that must always return whole
Does the framework connect to MCP servers itself? Yes: Claude Code, Cursor, ADK, OpenAI Agents SDK, LangChain MCP adapters Point its MCP client at the Gateway URL and key
No, or the agent wants plain function tools The SDK: gateway.model_tools() or gateway.hooks()

Read the full file on GitHub · 307 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 29d ago First seen · 307 lines · 209 tokens per session scan B 9781784bb3c2

Subscribe to this mod's changes

add-context-gateway is a skill published in the GitHub repository redis/agent-skills (178 stars, last pushed 28d ago), licensed MIT. It adds 209 tokens to every session and 7,764 once invoked, about $0.0008 per session on Opus 5.5. A static security scan graded it B with 1 finding (reads mcp configuration). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-11-04.

Related

add-context-gateway compared with skills from other repositories

add-context-gateway next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
add-context-gatewayredis/agent-skillsSkill17828d agoMITB209Claude Code
implementing-api-rate-limiting-and-throttlingxalgorix/xalgorixSkill1.6kyesterdayApache-2.0A114Claude Code, Codex
redis-jsupstash/redis-jsSkill9895d agoMITA93Claude Code, Codex
redisericrisco/rsc-harnessSkill701yesterdayMITA111Claude Code, Codex
frontmcp-configagentfront/frontmcpSkill154todayApache-2.0A187Claude Code
Docker TestcontainersPramodDutta/qaskillsSkill2531mo agoMITA42Claude Code, Codex
huawei-cloud-mrs-redis-meta-checkhuaweicloud/huaweicloud-skillsSkill59todayMITA167Claude Code, Codex