Redis Context Gateway

Connect agents to MCP servers and tools over Redis data through one endpoint.

What is Context Gateway?

Redis Context Gateway is a Model Context Protocol (MCP) gateway for AI agents that:

  • Connects MCP servers: Register third-party and in-house MCP servers that support Streamable HTTP as Upstreams.
  • Provides one endpoint per Gateway: Connect your agent to a Gateway to access tools from multiple sources.
  • Manages Upstream credentials: Configure credentials on the Gateway so your agent does not need credentials for each connected MCP server.
  • Makes Redis data available as tools: A Context Surface generates tools from a data model describing records in Redis.
  • Scales to large tool sets: In search mode, the agent searches for tools instead of loading every definition.
  • Handles large and repeated results: An optional cache serves repeated calls, and compression keeps large results out of the agent's context.
Concepts

Gateways, Upstreams, tool exposure modes, caching, and compression

Learn more →
Read more
Quickstart

List, search, and call your first tools through a Gateway

Learn more →
Read more
Agent integration

Connect a Gateway to OpenAI Agents SDK or LangGraph

Learn more →
Read more
Manage Gateways

Register MCP servers and Context Surfaces and set tool policies

Learn more →
Read more

Why use Context Gateway?

For AI applications

  • Access tools from multiple sources through one MCP connection
  • Tool definitions that fit the context window, through search mode
  • Large results read in pages instead of filling the context
  • Sign-in with your identity provider for MCP clients that support it

For platform teams

  • Upstream credentials stored once, in Vault, AWS Secrets Manager, or encrypted Redis
  • Per-Gateway access through Identity Service agent keys
  • Python package, iris command-line interface (CLI), and REST API for administration
  • Managed deployment on Redis Cloud or self-managed deployment on Kubernetes

Concepts

A Gateway is one MCP endpoint for an agent. Each Upstream behind it is an MCP server or a Context Surface, which generates tools from a data model of records in Redis. In full mode the agent lists every tool; in search mode it searches for the tools it needs. See Context Gateway concepts for tool policies, caching, and compression.

Quick example

  1. Set up a Gateway:

  2. Install the Redis Iris Python package, which includes the iris CLI:

    pip install 'redis-iris>=1.0.0'
    
  3. With IRIS_CONTEXT_GATEWAY_URL and IRIS_CONTEXT_GATEWAY_API_KEY in your environment, find a tool and call it:

    from redis_iris import ContextGateway
    
    gateway = ContextGateway.from_env()
    
    for tool in gateway.search("filter providers by specialty"):
        print(tool.name, tool.description)
    
    result = gateway.call("<tool-name>", {"<argument>": "<value>"})
    

    From the CLI, iris --json context-gateway tools list lists the same tools.

Use the tool names and input schemas returned by discovery. The redis-iris package covers MCP calls and Gateway administration in Python and the CLI. For JavaScript and TypeScript, install the @redis-iris/context-gateway SDK; see the client guide to choose a client. The quickstart shows calls in full and search mode.

Manage Gateways and Upstreams

Serve tools at runtime

Use the MCP API Reference for MCP tools and metadata, and limits and errors for constraints and recovery guidance.

RATE THIS PAGE
Back to top ↑