Cette page est affichée en anglais. Une traduction française est en cours.
MCP ConfigsApr 7, 2026·2 min de lecture

Upstash MCP — Serverless Redis & Kafka for AI Agents

MCP server for Upstash serverless Redis and Kafka. Give AI agents access to caching, rate limiting, pub/sub, and message queues with zero infrastructure. Pay-per-request pricing. 2,000+ stars.

MCP Hub
MCP Hub · Community
Prêt pour agents

Staging sûr pour cet actif

Cet actif est d'abord staged. Le prompt copié demande à l'agent d'inspecter les fichiers staged avant d'activer scripts, config MCP ou config globale.

Stage only · 17/100Policy : staging
Surface agent
Tout agent MCP/CLI
Type
Mcp Config
Installation
Stage only
Confiance
Confiance : Established
Point d'entrée
Upstash MCP — Serverless Redis & Kafka for AI Agents
Commande de staging sûr
npx -y tokrepo@latest install e0ed3953-1666-435f-8a4b-f81b4d1447bb --target codex

Stage les fichiers d'abord; l'activation exige la revue du README et du plan staged.

TL;DR
Upstash MCP lets AI agents like Claude Code access serverless Redis and Kafka for caching, rate limiting, and message queues.
§01

What it is

Upstash MCP is a Model Context Protocol server that gives AI agents access to Upstash's serverless Redis and Kafka services. With this MCP server configured, Claude Code or Cursor can create caches, set rate limits, publish messages, and manage queues through natural language tool calls.

It targets developers who use AI coding agents and need database operations without provisioning or managing infrastructure. Upstash's pay-per-request pricing means you only pay for what your agent uses.

§02

How it saves time or tokens

Without this MCP server, interacting with Redis or Kafka from an AI agent requires pasting connection strings, writing client code, and managing credentials manually in each conversation. The MCP server handles all of this: credentials are configured once, and the agent calls high-level tools like 'set key' or 'publish message' directly.

The estimated token cost for this workflow is approximately 2,400 tokens.

§03

How to use

  1. Add to your MCP configuration:
{
  "mcpServers": {
    "upstash": {
      "command": "npx",
      "args": ["-y", "@upstash/mcp-server"],
      "env": {
        "UPSTASH_REDIS_REST_URL": "https://your-db.upstash.io",
        "UPSTASH_REDIS_REST_TOKEN": "your-token"
      }
    }
  }
}
  1. Restart your AI agent (Claude Code or Cursor).
  1. Ask the agent to interact with Redis:
You: Cache the user profile for user_123 with a 1-hour TTL
Agent: I will use the Upstash Redis MCP to set the key...
§04

Example

# Example MCP tool calls the agent makes:

# Set a cache key with TTL
redis.set('user:123:profile', '{"name": "Alice"}', { ex: 3600 })

# Rate limiting check
redis.incr('ratelimit:api:user:123')
redis.expire('ratelimit:api:user:123', 60)

# Pub/Sub publish
redis.publish('notifications', '{"type": "alert", "msg": "deploy done"}')

# Kafka produce (if Kafka is configured)
kafka.produce('events', { key: 'user_123', value: '{"action": "login"}' })
§05

Related on TokRepo

§06

Common pitfalls

  • Upstash requires an account and API credentials. The MCP server does not work without valid UPSTASH_REDIS_REST_URL and UPSTASH_REDIS_REST_TOKEN environment variables.
  • Pay-per-request pricing can accumulate if the AI agent runs many operations in a loop. Monitor your Upstash dashboard for unexpected usage spikes.
  • Kafka features require a separate Upstash Kafka instance with its own credentials. Redis and Kafka are configured independently.

Questions fréquentes

What is the difference between Upstash Redis and regular Redis?+

Upstash Redis is a serverless, HTTP-based Redis service. You do not manage servers or connections. It uses a REST API instead of the Redis protocol, which makes it work well with serverless functions and MCP servers. Data is persisted and replicated automatically.

Does the MCP server support all Redis commands?+

The MCP server exposes a curated set of Redis operations optimized for AI agent use cases: key-value operations, lists, sets, sorted sets, and pub/sub. Advanced commands like Lua scripting or cluster management are not exposed.

Can I use this with Claude Desktop?+

Yes. Add the MCP server configuration to your Claude Desktop's MCP config file. The same configuration works for Claude Code, Claude Desktop, and Cursor.

What is the pricing model?+

Upstash charges per request with a generous free tier. There is no fixed monthly cost for small usage. Check upstash.com for current pricing details and free tier limits.

Is my data encrypted?+

Upstash encrypts data in transit via HTTPS and at rest. The REST API uses token-based authentication. Do not store unencrypted secrets or PII in Redis keys without your own encryption layer.

Sources citées (3)
🙏

Source et remerciements

Created by Upstash. Licensed under MIT.

upstash — stars 2,000+

Fil de discussion

Connectez-vous pour rejoindre la discussion.
Aucun commentaire pour l'instant. Soyez le premier à partager votre avis.

Actifs similaires