Authenticate RedisVL MCP#
This guide explains how the RedisVL MCP server authenticates clients on its HTTP transports and how it gates read vs write access. It also draws the boundary between what RedisVL enforces and what belongs in a gateway or policy layer.
Note
Authentication applies only to the HTTP transports (streamable-http, sse).
The stdio transport is a local subprocess with no network surface and is never
authenticated.
What RedisVL Enforces#
RedisVL validates a bearer JWT that an existing identity provider (IdP) issued. It does not run an OAuth authorization server and does not issue tokens.
On each request it checks:
Signature, against a JWKS endpoint or a static public key.
Issuer (
iss), so only tokens from your IdP are accepted.Audience (
aud), so a token minted for a different service cannot be replayed against this server (RFC 8707).Expiration: a present
expin the past is rejected, and tokens are required to carryexpandiat(configurable viarequired_claims), so a token with no expiration, which would never expire, is rejected.Required scopes to connect, and (optionally) a read scope to call
search-recordsand a write scope to callupsert-records.
Important
This is coarse authorization: it decides whether a caller may connect and whether it may read or write. It does not map token claims to a Redis ACL user, a per-tenant index, or query filters. See The Authorization Boundary.
OAuth: Which Part RedisVL Handles#
In OAuth terms, RedisVL MCP is a resource server: it validates access tokens that your identity provider issued. It does not run an OAuth login flow and does not issue tokens.
Steps 1 and 2 (obtaining the token) are handled by your client and IdP. RedisVL only performs the validation in step 3. As a result:
It works with any OAuth 2.0 / OIDC provider (for example Auth0, Okta, Azure AD / Entra, Cognito, Keycloak): point
jwks_uriat the provider and validate its tokens.RedisVL does not broker interactive “log in with…” flows and does not mint tokens.
You would only need more than token validation when you want the server itself
to drive an interactive browser login (an OAuth proxy), or to act as its own
authorization server that issues tokens. Both are out of scope today. If
interactive login is ever needed, a single generic oauth-proxy option can be
added behind the auth.type switch. For enterprise and agent deployments where
the caller already holds a token, JWT validation is sufficient.
Request Flow#
Configure JWT Authentication#
Add a server.auth block to your MCP config. Secrets can be injected with
${ENV} substitution.
server:
redis_url: ${REDIS_URL:-redis://localhost:6379}
auth:
type: jwt
jwks_uri: ${MCP_JWKS_URI} # or set public_key for a static key
issuer: ${MCP_ISSUER}
audience: api://redisvl-mcp
required_scopes: [kb.read] # required to connect
required_claims: [exp, iat] # claims every token must carry (default)
read_scope: kb.search.read # required for search-records
write_scope: kb.search.write # required for upsert-records
indexes:
knowledge:
redis_name: docs_index
search:
type: fulltext
runtime:
text_field_name: content
Every field is also settable through REDISVL_MCP_AUTH_* environment variables,
which take precedence over the YAML block.
See Also#
Run RedisVL MCP: run and configure the RedisVL MCP server.