Bring Redis
to Pydantic AI
Create your Vinkius account to connect Upstash to Pydantic AI and start using all 23 AI tools in minutes. Fully managed, enterprise secure, and ready to use without writing a single line of code. No hosting, no server setup — just connect and start using.
Compatible with every major AI agent and IDE
What is the Upstash MCP Server?
Connect your Upstash Redis database to any AI agent and interact with your serverless data store through natural conversation — no Redis CLI needed.
What you can do
- Health Checks — Ping your database to verify connectivity and inspect server health
- String Operations — Get, set and delete key-value pairs with optional TTL management
- Hash Management — Store and retrieve structured data as field-value pairs within hash keys
- List Operations — Push, pop and range elements from Redis lists for queue and stack patterns
- Set Operations — Add, remove and query set membership for unique collections
- Key Discovery — List keys by pattern, check existence, inspect data types and view TTL values
- Numeric Operations — Increment and decrement counters atomically
- Pub/Sub Messaging — Publish messages to channels for event-driven architectures
- Pipeline Execution — Execute multiple commands in a single HTTP request for batch operations
How it works
- Subscribe to this server
- Enter your Upstash REST URL and Token
- Start managing your Redis data from Claude, Cursor, or any MCP-compatible client
No more switching to another terminal to run Redis commands. Your AI acts as an in-memory data engineer.
Who is this for?
- Backend Developers — manage caching layers, feature flags, session storage and rate limit counters directly from chat
- DevOps Engineers — monitor database health, audit key patterns and manage TTL-based data lifecycle
- Full-Stack Teams — manipulate data structures (hashes, lists, sets) for application state without opening Redis CLI
Built-in capabilities (23)
If the key does not exist, it is initialized to 0 before the operation. Returns the new value after decrementing. Decrement a numeric value in Upstash Redis
Returns 1 if the key was deleted, 0 if it did not exist. WARNING: this operation is irreversible. Delete a key from Upstash Redis
This is a lightweight way to check key presence without retrieving the value. Check if a key exists in Upstash Redis
The key will be automatically deleted when the TTL reaches zero. Returns 1 if the timeout was set, 0 if the key does not exist. Set a TTL on a key in Upstash Redis
Returns null if the key does not exist. This is the primary read operation for string data. Get a value from Upstash Redis
Returns null if the key or field does not exist. Get a field value from a Redis hash
Returns an object with all fields and their values. Returns an empty object if the key does not exist. Get all fields and values from a Redis hash
If the key does not exist, a new hash is created. If the field already exists, its value is overwritten. Returns the number of fields added (1 for new, 0 for updated). Set a field in a Redis hash
If the key does not exist, it is initialized to 0 before the operation. Returns the new value after incrementing. Increment a numeric value in Upstash Redis
Get the data type of a key in Upstash Redis
Use "*" for all keys, "prefix:*" for keys with a prefix, or "*:suffix" for suffix matching. WARNING: KEYS can be slow on large databases — use sparingly. List keys in Upstash Redis
Returns 0 if the key does not exist. Get the length of a Redis list
If the key does not exist, a new list is created. Returns the length of the list after the push. Push values to the left of a Redis list
Use 0 as start and -1 as stop to get all elements. Positive indices count from the head (0 = first), negative indices count from the tail (-1 = last). Get a range of elements from a Redis list
Commands are sent as a JSON array of arrays, e.g. [["SET","k1","v1"],["GET","k1"],["INCR","counter"]]. Returns an array of results in the same order. Note: the pipeline is NOT atomic (other commands may interleave) — use /multi-exec for atomicity. WARNING: this is a powerful tool — review commands carefully before execution. Execute multiple commands atomically via Upstash pipeline
Returns the number of subscribers that received the message. This is a fire-and-forget operation — subscribers must be actively listening. Publish a message to a Redis channel
If the key does not exist, a new list is created. Returns the length of the list after the push. Push values to the right of a Redis list
Duplicate members are ignored. If the key does not exist, a new set is created. Returns the number of members that were added. Add members to a Redis set
Optionally set an expiry time in seconds using the ex parameter. Overwrites any existing value at the key. Returns "OK" on success. This is the primary write operation for string data. Set a value in Upstash Redis
This is a fast O(1) membership check. Check if a member is in a Redis set
Returns an array of all unique members. Returns an empty array if the key does not exist. Get all members of a Redis set
Non-existent members are ignored. Returns the number of members that were removed. Remove members from a Redis set
Returns -1 if the key has no expiry, -2 if the key does not exist. Get the TTL of a key in Upstash Redis
Why Pydantic AI?
Pydantic AI validates every Upstash tool response against typed schemas, catching data inconsistencies at build time. Connect 23 tools through Vinkius and switch between OpenAI, Anthropic, or Gemini without changing your integration code. full type safety, structured output guarantees, and dependency injection for testable agents.
- —
Full type safety: every MCP tool response is validated against Pydantic models, catching data inconsistencies before they reach your application
- —
Model-agnostic architecture. switch between OpenAI, Anthropic, or Gemini without changing your Upstash integration code
- —
Structured output guarantee: Pydantic AI ensures tool results conform to defined schemas, eliminating runtime type errors
- —
Dependency injection system cleanly separates your Upstash connection logic from agent behavior for testable, maintainable code
Upstash in Pydantic AI
Why run Upstash with Vinkius?
The Upstash connection runs on our fully managed, secure cloud infrastructure. We handle the hosting, maintenance, and security so you don't have to deal with servers or code. All 23 tools are ready to work instantly without any complex setup.
You stay in complete control of your data. Your AI only accesses the information you approve, keeping your sensitive passwords and private details completely safe. Plus, with automatic optimizations, your AI works faster and more efficiently.

* Every connection is hosted and maintained by Vinkius. We handle the security, updates, and infrastructure so you don't have to write code or manage servers. See our infrastructure
Over 4,000 integrations ready for AI agents
Explore a vast library of pre-built integrations, optimized and ready to deploy.
Connect securely in under 30 seconds
Generate tokens to authenticate and link external services in a single step.
Complete visibility into every agent action
Audit live requests, latency, success rates, and active security compliance policies.
Optimize spending and track token ROI
Analyze real-time token consumption and cost metrics detailed by connection.




Explore our live AI Agents Analytics dashboard to see it all working
This dashboard is included when you connect Upstash using Vinkius. You will never be left in the dark about what your AI agents are doing with your tools.
Upstash and 4,000+ other AI tools. No hosting, no code, ready to use.
Professionals who connect Upstash to Pydantic AI through Vinkius don't need to write code, manage servers, or worry about security. Everything is pre-configured, secure, and runs automatically in the background.
Raw MCP | Vinkius | |
|---|---|---|
| Ready-to-use MCPs | Find and configure each manually | 4,000+ MCPs ready to use |
| Connection Setup | Manual coding & server setup | 1-click instant connection |
| Server Hosting | You host it yourself (needs 24/7 uptime) | 100% hosted & managed by Vinkius |
| Security & Privacy | Stored in plaintext config files | Bank-grade encrypted vault |
| Activity Visibility | Blind execution (no logs or tracking) | Live dashboard with real-time logs |
| Cost Control | Runaway AI token spend risk | Automatic budget limits |
| Revoking Access | Must delete files or code to stop | 1-click disconnect button |
How Vinkius secures
Upstash for Pydantic AI
Every request between Pydantic AI and Upstash is protected by our secure gateway. We automatically keep your sensitive data private, prevent unauthorized access, and let you disconnect instantly at any time.
Frequently asked questions
Where do I find my Upstash REST URL and Token?
Log in to the Upstash Console, select your Redis database, and look for the REST API section. You'll find the HTTPS Endpoint (your REST URL, e.g. https://xxx-yyy-12345.upstash.io) and the Token value. Copy both and paste them here. There are two token types: Standard (full access) and Read-Only (read-only commands). Use Standard for full functionality.
What Redis commands are supported via the REST API?
The Upstash REST API supports most Redis commands including: Strings (GET, SET, DEL, EXISTS, EXPIRE, TTL, INCR, DECR), Hashes (HSET, HGET, HGETALL), Lists (LPUSH, RPUSH, LRANGE, LLEN), Sets (SADD, SMEMBERS, SISMEMBER, SREM), Keys (KEYS, TYPE, PING), and Pub/Sub (PUBLISH). The pipeline endpoint allows executing multiple commands in a single request. Blocking commands (BLPOP, BRPOP) and WATCH/UNWATCH are not supported.
Can I execute multiple commands atomically?
The pipeline tool sends multiple commands in a single HTTP request for efficiency, but it is NOT atomic — other commands may interleave between them. For atomic multi-command execution, Upstash supports the /multi-exec endpoint (same syntax as pipeline but guarantees atomicity). However, this MCP server currently exposes the standard pipeline tool for batch operations.
Is the Upstash REST API rate-limited?
Upstash does not enforce a fixed RPS limit. Instead, your plan defines a daily command limit. Each REST call counts as one command (or multiple commands if using pipeline). If you exceed your daily limit, commands will fail with a 400 error. Check your Upstash console for current usage. For high-throughput scenarios, consider using the pipeline endpoint to batch multiple commands into single HTTP requests.
How does Pydantic AI discover MCP tools?
Create an MCPServerHTTP instance with the server URL. Pydantic AI connects, discovers all tools, and generates typed Python interfaces automatically.
Does Pydantic AI validate MCP tool responses?
Yes. When you define result types as Pydantic models, every tool response is validated against the schema. Invalid data raises a clear error instead of silently corrupting your pipeline.
Can I switch LLM providers without changing MCP code?
Absolutely. Pydantic AI abstracts the model layer. your Upstash MCP integration works identically with OpenAI, Anthropic, Google, or any supported provider.
MCPServerHTTP not found
Update: pip install --upgrade pydantic-ai
Explore More MCP Servers
View all →
Wolai
10 toolsAll-in-one information organization and collaboration platform — manage pages, databases, and blocks via AI.

Coze
11 toolsOrchestrate Coze bots — manage conversations, handle RAG datasets, and trigger bot actions directly from any AI agent.

kvCORE
10 toolsManage real estate leads — search contacts, track listings, and audit agent tasks.

Freightview
12 toolsAutomate LTL freight quoting, track shipments, and manage carriers via AI agents with Freightview.
