MCP Configs2026年4月7日·1 分钟阅读

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.

Agent 就绪

这个资产会安全暂存

这个资产会先安全暂存。复制的指令会要求 Agent 读取暂存文件,并在激活脚本、MCP 配置或全局配置前先确认。

Stage only · 17/100策略:需暂存
Agent 入口
任意 MCP/CLI Agent
类型
Mcp Config
安装
Stage only
信任
信任等级:Established
入口
Upstash MCP — Serverless Redis & Kafka for AI Agents
安全暂存命令
npx -y tokrepo@latest install e0ed3953-1666-435f-8a4b-f81b4d1447bb --target codex

先暂存文件;激活前需要读取暂存 README 和安装计划。

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.

常见问题

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.

引用来源 (3)
🙏

来源与感谢

Created by Upstash. Licensed under MIT.

讨论

登录后参与讨论。
还没有评论,来写第一条吧。

相关资产