Upstash Redis MCP server for AI agents

Live

BEARER TOKEN

REDIS DATA

Developer Tools

Upstash Redis gives your agent access to the data in your Redis database: read strings, hashes, lists, sets, sorted sets, and streams, scan keys and check TTLs, and write values, counters, and stream entries.

  • Per-user credentials: each call uses the actual user's access token, never a shared bot.
  • Encrypted per-tenant vault: AES-256, resolved at request time, never in LLM context.
  • Scoped before every call: pre-call scope check, 90-day SIEM-exportable audit chain.
Upstash Redis
agent · Acme Q3
Run
Show everything stored in the hash for user 4821.
S
upstashredis_hash_get_all
94ms
Redis data agent
The hash has 6 fields, including plan, region, and last_login.
Sources: Upstash Redis hash, 6 fields
upstashredis
6 fields
18:29
Message Claude...

Tools your redis data agent reaches for on Upstash Redis, scoped per user.

CALL ANY TOOL
28 tools for Redis data in Upstash Redis: read strings, hashes, lists, sets, sorted sets, and streams, scan keys and check TTLs, and write values, counters, and stream entries.
upstashredis_counter_increment
Counter increment
Increment the integer value of a key by a given amount, creating it at 0 first if missing (Redis INCRBY). Returns {"result": <new value>} as an integer. Use this for counters and rate tracking. Use a negative increment to decrement. Use upstashredis_string_set to set an exact value. Needs the standard (read-write) REST token; a read-only token gets a 403 NOPERM error, and the connection stays active.
Parameters
Name
Type
Required
Description
key
string
Required
The Redis key name. Any characters are allowed, including slashes and colons. Example: user:42.
increment
integer
Optional
The amount to add. Defaults to 1. Use a negative number to decrement. Example: 5.
upstashredis_database_size_get
Get database size
upstashredis_hash_field_get
Get hash field
upstashredis_hash_fields_delete
Delete hash fields
upstashredis_hash_fields_set
Set hash fields
upstashredis_hash_get_all
Hash get all
upstashredis_key_delete
Delete key
upstashredis_key_exists
Key exists
upstashredis_key_expire
Key expire
upstashredis_key_scan
Scan key
upstashredis_key_ttl_get
Get key ttl
upstashredis_key_type_get
Get key type
upstashredis_list_pop_left
List pop left
upstashredis_list_push_left
List push left
upstashredis_list_push_right
List push right
upstashredis_list_range_get
Get list range
upstashredis_set_members_add
Add set members
upstashredis_set_members_list
List set members
upstashredis_set_members_remove
Remove set members
upstashredis_sorted_set_members_add
Add sorted set members
upstashredis_sorted_set_members_remove
Remove sorted set members
upstashredis_sorted_set_range_get
Get sorted set range
upstashredis_stream_entry_add
Add stream entry
upstashredis_stream_range_get
Get stream range
upstashredis_string_get
Get string
upstashredis_string_get_many
String get many
upstashredis_string_set
Set string
upstashredis_string_set_many
String set many
Build your Agent
Same auth pattern across LangChain, OpenAI, Anthropic, and Google ADK.
Python · LlamaIndex
import { ScalekitClient } from "@scalekit-sdk/node";
import { createReactAgent } from "@langchain/langgraph/prebuilt";

const sk = new ScalekitClient(env.SCALEKIT_ENV_URL, env.SCALEKIT_CLIENT_ID, env.SCALEKIT_CLIENT_SECRET);

// Upstash Redis tools scoped to this user
const { tools } = await sk.tools.listScopedTools("user_123", {
  filter: { connectionNames: ["upstashredis"], toolNames: [
    "upstashredis_string_get",
    "upstashredis_key_scan",
    "upstashredis_key_ttl_get"] },
  pageSize: 100,
});

const agent = createReactAgent({ llm, tools });
await agent.invoke({ messages: [{ role: "user", content: "Scan for session keys, read the feature-flags value, and show how long session:abc123 has left" }] });
import OpenAI from "openai";
import { ScalekitClient } from "@scalekit-sdk/node";

const sk = new ScalekitClient(env.SCALEKIT_ENV_URL, env.SCALEKIT_CLIENT_ID, env.SCALEKIT_CLIENT_SECRET);
const openai = new OpenAI();

const { tools } = await sk.tools.listScopedTools("user_123", {
  filter: { connectionNames: ["upstashredis"] }, pageSize: 100,
});

const res = await openai.chat.completions.create({
  model: "gpt-5",
  messages: [{ role: "user", content: "Scan for session keys, read the feature-flags value, and show how long session:abc123 has left" }],
  tools,
});

// Execute the tool call with the user's vaulted Upstash Redis access token
await sk.tools.executeTool(res.choices[0].message.tool_calls[0], "user_123");
import Anthropic from "@anthropic-ai/sdk";
import { ScalekitClient } from "@scalekit-sdk/node";

const sk = new ScalekitClient(env.SCALEKIT_ENV_URL, env.SCALEKIT_CLIENT_ID, env.SCALEKIT_CLIENT_SECRET);
const anthropic = new Anthropic();

const { tools } = await sk.tools.listScopedTools("user_123", {
  filter: { connectionNames: ["upstashredis"] }, pageSize: 100,
});

const msg = await anthropic.messages.create({
  model: "claude-sonnet-5",
  max_tokens: 1024,
  messages: [{ role: "user", content: "Scan for session keys, read the feature-flags value, and show how long session:abc123 has left" }],
  tools,
});

// Tool call runs with the user's vaulted Upstash Redis access token
await sk.tools.executeTool(msg.content, "user_123");
import { Agent } from "@google/adk/agents";
import { ScalekitClient } from "@scalekit-sdk/node";

const sk = new ScalekitClient(env.SCALEKIT_ENV_URL, env.SCALEKIT_CLIENT_ID, env.SCALEKIT_CLIENT_SECRET);

const { tools } = await sk.tools.listScopedTools("user_123", {
  filter: { connectionNames: ["upstashredis"] }, pageSize: 100,
});

const agent = new Agent({
  name: "redis_data_agent",
  model: "gemini-2.5-pro",
  instruction: "Upstash Redis tools scoped to this user",
  tools,
});

await agent.run("Scan for session keys, read the feature-flags value, and show how long session:abc123 has left");
Try these prompts
Copy any prompt into your agent. Each maps directly to a Upstash Redis tool. Click to copy, paste into your agent, done.
Read values
Copy the prompt
Copied
Get the value of the key feature-flags.
Copy the prompt
Copied
Scan for keys that match session:*.
Copy the prompt
Copied
Show the remaining TTL on the key session:abc123.
Collections
Copy the prompt
Copied
List the members of the set beta-users.
Copy the prompt
Copied
Get the top 10 members of the leaderboard sorted set.
Copy the prompt
Copied
Read the latest 20 entries from the events stream.
Write and expire
Copy the prompt
Copied
Increment the page-views counter by 1.
Copy the prompt
Copied
Set the key maintenance-mode to true.
Copy the prompt
Copied
Delete the key cache:homepage.
SEE HOW AUTH WORKS
Each user connects their own Upstash Redis access token once, and Scalekit sends it with every call. Tokens stay vaulted, every call is scope checked, and every action is logged.
1
Authorize
Your user connects
Upstash Redis
once. We tie it to their identity and the access they approved, with no shared bot account and no org-wide access
Who:
user ‘A’
when:
Once per user
access:
Limited to user
2
Store
Their
Upstash Redis
credential lives in a vault scoped to them. User A's data is never reachable by an agent acting for user B, even on the same connection
vault:
encrypted
scope:
per-user
tenants:
isolated
3
Resolve
When your agent calls a
Upstash Redis
tool, we fetch the right credential server-side. It never touches your agent, never appears in the LLM context, never shows up in your logs
speed:
~40ms
check:
before every call
seen by:
nobody
4
Audit
Every
Upstash Redis
tool call is logged: who triggered it, which tool ran, what came back. 90 days of history, tied to the user who authorized it
history:
90 days
export:
SIEM-ready
logged:
every call
Test other agents
See the same per-user auth pattern across other database and developer connectors.
Engineering Teams
DevOps assistant agent
Polls GitHub for failing checks and stale PRs, opens Linear issues for the ones that need work, and posts a daily digest to Slack. It acts as the engineer, not a shared service account.
Test other agents
See the same per-user auth pattern across other database and developer connectors.
ENGINEERING
DevOps assistant agent
Poll GitHub for failing checks and stale pull requests, open Linear issues for the ones that need work, and digest to Slack.
Why Scalekit
Secure your agent's access. Connectors ship in minutes
01.
Shared tokens break per-user analytics
A shared Upstash Redis access token looks fine in a demo. In production every key write and delete looks like one service account, and you cannot tell which user triggered it. Scalekit resolves the credential of the actual user who triggered the agent, never a shared bot.
// shared token
audit → bot_service_account

// scalekit
audit → user_abc ✓
02.
Authentication is not authorization
03.
Multi-tenancy is architectural
04.
Upstash Redis today. Ten connectors tomorrow.
“Our agents act across Salesforce, Gong, Google Drive, and more, on behalf of every customer. Scalekit behind the scenes meant we can keep adding tools without ever rebuilding how credentials or tool calling work.”
Venu Madhav Kattagoni
Head of Engineering / Von
FAQs
Frequently Asked Questions
Does the agent access Upstash Redis as the user or through a shared token?
As the user. Each user connects their own Upstash Redis access token once, and Scalekit sends it with every call. Every key write and delete in your audit trail is attributed to that user, not a shared service account.
Where is the Upstash Redis access token stored?
In Scalekit's managed AES-256 token vault, namespaced per tenant. To rotate it, the user reconnects with a new access token. Revocation is a single dashboard action. Credentials never appear in prompts, logs, or LLM context.
Can I limit what the agent does in Upstash Redis?
Yes. Filter by tool name in listScopedTools to expose only what you want, for example the read tools such as upstashredis_string_get and upstashredis_key_scan without upstashredis_key_delete, which permanently deletes keys of any type. Scalekit also enforces scope checks before every API call.
What happens when a user revokes Upstash Redis access?
The connection is invalidated on the next tool call. Subsequent requests for that user fail closed with a clear error. Other users in the tenant remain unaffected. The event is logged for audit.
Does the agent run Redis commands directly?
Each tool runs one Redis command and names it, for example GET in upstashredis_string_get, HGETALL in upstashredis_hash_get_all, and SET in upstashredis_string_set. Expose only the read tools if the agent should never change data.
Start in your coding agent
Up and running in one command
Install the Scalekit skill in your editor of choice. Connector, auth, tools, prompt, all wired up
Claude Code REPL
/plugin marketplace add scalekit-inc/claude-code-authstack
/plugin install agentkit@scalekit-auth-stack
Cursor Code REPL
# ~/.cursor/mcp.json
{
""mcpServers"": {
""upstashredis"": {
""url"": ""https://mcp.scalekit.com/upstashredis"",
""headers"": { ""Authorization"": ""Bearer $SCALEKIT_TOKEN"" }
}
}
}
Codex Code REPL
# ~/.codex/config.toml
[mcp_servers.upstashredis]
url = ""https://mcp.scalekit.com/upstashredis""
auth_env = ""SCALEKIT_TOKEN""
Copilot Code REPL
# .vscode/mcp.json
{
""servers"": {
""upstashredis"": {
""url"": ""https://mcp.scalekit.com/upstashredis"",
""type"": ""http""
}
}
}