Upstash Redis MCP
OfficialRun any Redis command (GET, SET, SCAN, etc.) via HTTP/REST or TCP, with pipeline or atomic transaction support, and search Redis documentation.
Connect to Upstash Redis databases (single or multiple named databases) using REST tokens or TCP connection strings, with support for raw credential overrides per command.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Upstash Redis MCPget the value for key 'mykey'"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Upstash Redis MCP
Lightweight MCP server for Redis with only two tools:
๐งช
redis_run_commands: run one or more Redis commands over HTTP/REST or TCP, as a pipeline or an atomic transaction.๐
redis_search_docs: search the Redis docs using Context7 public api.
One server can hold multiple named databases. Configuration is pure environment variables and CLI flags.
๐ Quickstart
Run this in your terminal. See the Claude Code MCP docs for more.
claude mcp add upstash-redis \
-e UPSTASH_REDIS_REST_URL=https://<your-db>.upstash.io \
-e UPSTASH_REDIS_REST_TOKEN=<your-rest-token> \
-- npx -y @upstash/redis-mcpAdd to ~/.cursor/mcp.json (global) or .cursor/mcp.json (per-project), or go to Settings โ MCP โ Add new MCP server. See the Cursor MCP docs.
{
"mcpServers": {
"upstash-redis": {
"command": "npx",
"args": ["-y", "@upstash/redis-mcp"],
"env": {
"UPSTASH_REDIS_REST_URL": "https://<your-db>.upstash.io",
"UPSTASH_REDIS_REST_TOKEN": "<your-rest-token>"
}
}
}
}Add to .vscode/mcp.json (per-project) or your user mcp settings. See the VS Code MCP docs.
{
"servers": {
"upstash-redis": {
"command": "npx",
"args": ["-y", "@upstash/redis-mcp"],
"env": {
"UPSTASH_REDIS_REST_URL": "https://<your-db>.upstash.io",
"UPSTASH_REDIS_REST_TOKEN": "<your-rest-token>"
}
}
}
}Add to ~/.codex/config.toml (or a project-level .codex/config.toml). See the Codex MCP docs.
[mcp_servers.upstash-redis]
command = "npx"
args = ["-y", "@upstash/redis-mcp"]
env = { UPSTASH_REDIS_REST_URL = "https://<your-db>.upstash.io", UPSTASH_REDIS_REST_TOKEN = "<your-rest-token>" }Add to opencode.json (project) or ~/.config/opencode/opencode.json (global). See the OpenCode MCP docs.
{
"mcp": {
"upstash-redis": {
"type": "local",
"command": ["npx", "-y", "@upstash/redis-mcp"],
"environment": {
"UPSTASH_REDIS_REST_URL": "https://<your-db>.upstash.io",
"UPSTASH_REDIS_REST_TOKEN": "<your-rest-token>"
}
}
}
}Any MCP-compatible client works. If yours isn't listed, add astdio server that runs npx -y @upstash/redis-mcp with the two env vars above.
Related MCP server: mcp-database
๐งฐ Tools
๐งช redis_run_commands
Run any Redis command: GET, SET, SCAN, ZADD, EVAL, the SEARCH.* family, and everything else. Each command is an array of args (numbers are accepted and coerced to strings). By default multiple commands run as a pipeline: each returns its own result/error, aligned to the input, and one failure doesn't abort the rest. Set transaction: true for an atomic MULTI/EXEC.
{
"commands": [
["SET", "visits", 0],
["INCR", "visits"],
["GET", "visits"],
],
"transaction": false, // optional: true => atomic MULTI/EXEC
// "database": "prod" // only when more than one database is configured
// raw credential overrides (optional):
// "rest_url", "rest_token" // HTTP
// "connection_string" // TCP, rediss://
}The transport (HTTP vs TCP) is determined by how the target database is configured; the agent never picks it.
๐ redis_search_docs
Searches the Upstash Redis documentation live and returns the most relevant pages. Reach for it whenever you're unsure about a command or feature, especially Upstash-specific ones like the SEARCH.* full-text search family. It's powered by Context7's free tier, so no API key or extra setup is required.
{ "query": "SEARCH.AGGREGATE date histogram" }โ๏ธ Configuration
Everything is set through environment variables and CLI flags; there are no config files.
Single database
Transport | Environment | CLI |
HTTP |
|
|
TCP |
|
|
Multiple databases
Give each database a name. The name becomes a selectable database value in redis_run_commands.
Environment: insert a <NAME> segment:
UPSTASH_REDIS_PROD_REST_URL="https://prod-db.upstash.io"
UPSTASH_REDIS_PROD_REST_TOKEN="<prod-rest-token>"
UPSTASH_REDIS_CACHE_TCP_URL="rediss://default:<password>@cache-db.upstash.io:6379"CLI: repeat --database to start each group:
npx -y @upstash/redis-mcp \
--database prod --rest-url https://prod-db.upstash.io --rest-token <prod-rest-token> \
--database cache --url rediss://default:<password>@cache-db.upstash.io:6379Raw credentials per call. A redis_run_commands call may also pass rest_url + rest_token (HTTP) or connection_string (TCP) inline; these override the registry and work even with no configured database. They flow through the model's context, so prefer env/CLI for anything sensitive.
Flags & options
Flag | Env | Default | Purpose |
|
| Server transport | |
|
| Port for the | |
|
| off | Best-effort: reject write commands on both transports. Server-side read-only REST tokens remain the robust option. |
|
| off | Stop sending |
| off | Verbose logging to stderr + |
๐ก Telemetry
HTTP/REST requests carry Upstash-Telemetry-{Sdk,Platform,Runtime} headers. Disable with --disable-telemetry or UPSTASH_DISABLE_TELEMETRY=true.
๐ Run it locally
bun install
bun run build # emits dist/index.js
cp .env.example .env # add UPSTASH_REDIS_REST_URL + UPSTASH_REDIS_REST_TOKEN
node dist/index.js # stdio (what clients spawn)
node dist/index.js --transport http --port 3000 # HTTP: endpoint /mcp, health /pingThe server auto-loads .env. To point a client at your local build, swap npx -y @upstash/redis-mcp in any Quickstart config for node /absolute/path/to/redis-mcp/dist/index.js.
๐ ๏ธ Development
bun install
bun run build
bun test
bun run lint๐ License
MIT ยฉ Upstash
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
AlicenseBqualityBmaintenanceThe official Redis MCP Server is a natural language interface designed for agentic applications to efficiently manage and search data in Redis.Last updated51555MIT- Alicense-qualityDmaintenanceMCP server for connecting to databases (PostgreSQL, MySQL, SQL Server, Redis) enabling SQL queries, table exploration, and Redis key-value operations.Last updated1MIT
- AlicenseBqualityCmaintenanceMCP server that exposes Redis API to AI modelsLast updated44MIT
- Flicense-qualityDmaintenanceMCP server for Redis interaction with dynamic connection setup and management.Last updated
Related MCP Connectors
MCP server for URL shortening and management
An MCP server that let you interact with Cycloid.io Internal Development Portal and Platform
MCP server for accessing curated awesome list documentation
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/upstash/redis-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server