Command Palette

Search for a command to run...

UnylyUnyly
Browse all

Chatgpt Redis

FreeNot checked

Connect ChatGPT to a free Redis cloud instance via MCP — fast key-value memory for GPT workflows

GitHubEmbed

About

Connect ChatGPT to a free Redis cloud instance via MCP — fast key-value memory for GPT workflows

README

Redis 7.2.3 RESP2 MCP spec free tier

Attaching a free Redis 7 instance to ChatGPT over MCP, so a GPT-driven workflow has somewhere to put counters, flags, short-lived state and small structured records between turns.

This README opens with the questions people send after reading the first paragraph, because they are better than any introduction. The walkthrough follows.


Questions, first

Why Redis rather than a SQL database? Different job. If you want ChatGPT to keep a normalised record you will query six ways, use Postgres. Redis is for state: how many times has this run, is this flag set, what was the last thing I did, and expire that in an hour. Those are one command each, and Redis has data structures for all of them.

What can it actually store? Strings, hashes, lists, sets, sorted sets, bitmaps, HyperLogLog, geospatial indexes and streams. The reading-list example below uses five of those, which is a fair sample of what a workflow needs.

Does the data survive? Yes. Keys persist across connection drops and across conversations — that is the entire point of pointing ChatGPT at it rather than relying on chat memory. Keys with a TTL expire on schedule, which is a feature you asked for, not data loss.

What are TTLs good for here? Anything the assistant should forget on purpose. A "currently reading" pointer that clears itself after a week. A daily streak counter that rolls over at midnight. A rate-limit bucket. Redis handles the expiry; there is no cleanup job and nothing to schedule.

Do I have to write Redis commands myself? No, and that is the shift. You say "add Piranesi to my want-to-read shelf" and the model issues the SADD. You say "how many pages have I logged this week" and it issues the INCRBY reads. Writing the commands is still available and often clearer — see the redis-cli section.

Can I use my normal Redis client too? Yes. Redis is one of three engines here that expose a native TCP wire protocol, so redis-cli, ioredis, redis-py and Lettuce connect to the same keyspace unmodified. The assistant and your code are not looking at separate stores.

Which ChatGPT plans support this? Read the access section — the answer is genuinely unsettled and OpenAI's own documentation contradicts itself. Short version: check two places in Settings, and full write access is still rolling out.

Is it fast? It is Redis, over HTTP, from a language model that takes seconds to think. The network hop and the model dominate; no numbers are claimed here because the only honest one would be about the model, not the database.

What breaks first? Key naming. A model that invents book:piranesi on Monday and books:Piranesi on Tuesday has two records and no way to reconcile them. Fixing that is what memory_annotate_table is for.

Can it delete everything? The write tool can write, and writing includes overwriting. Keep approvals on for anything you would miss, and do not point it at a keyspace that matters without a second copy.


Setup, condensed

  1. Sign up at freebase.cloud — free, no card — start a session, pick Redis.

  2. Settings → MCP → New Token, select the Redis connection, copy the URL: https://freebase.cloud/api/mcp/YOUR_TOKEN. The token is the path; no header is set anywhere. (The Claude-side walkthrough shows the same token screen if you want pictures.)

  3. Name the connection. Everything below assumes memory, so the tools are memory_query, memory_store, memory_list_tables, memory_annotate_table.

  4. Add it to ChatGPT (see the access section for the menu path), auth None, Scan Tools.

  5. Enable it in a conversation from the + menu and try:

    Add "Piranesi" by Susanna Clarke, 272 pages, to my want-to-read shelf.

    [memory_store] HSET book:piranesi title "Piranesi" author "Susanna Clarke" pages 272
    [memory_store] SADD shelf:want piranesi
    
    Added. shelf:want now has 4 books.
    

The four tools

Tool Redis-side meaning
memory_query Read commands — GET, HGETALL, SMEMBERS, ZREVRANGE, TTL, LRANGE
memory_store Write commands — SET, HSET, INCR, SADD, ZADD, EXPIRE, LPUSH
memory_list_tables Enumerates the keyspace so the model can see what exists
memory_annotate_table Records your key-naming conventions in a place the model reads

memory_annotate_table deserves more attention than it gets in a key-value store. There is no schema to inspect — a bare keyspace tells the model nothing about which key is authoritative or what a value means. The annotation is the schema. Those four are the entire surface the MCP token you generated exposes; there is nothing else to switch on.


A keyspace worth copying

The reading list in examples/ uses this layout. It is small on purpose; the structures are the interesting part, and every pattern below works unchanged on a free Redis 7 keyspace.

Key pattern Type Holds Why this type
book:<slug> hash title, author, pages, added Fields update independently
shelf:want / shelf:reading / shelf:done set book slugs Membership, no duplicates, cheap moves
progress:<slug> string (int) pages read INCRBY is atomic; no read-modify-write race
rank:priority sorted set slug → score ZREVRANGE gives "what next" in one call
streak:<YYYY-MM-DD> string (int) pages logged that day Expires after 60 days via EXPIRE
session:current string slug being read now SET ... EX 604800 — forgets itself in a week
recent:finished list last N slugs LPUSH + LTRIM 0 9 keeps it bounded

Annotate it once and every future conversation inherits the conventions:

Annotate this Redis connection. Book slugs are lowercase, no spaces, hyphens between words — the slug is the identity, and it appears in book:<slug>, progress:<slug> and in the shelf sets. A book is on exactly one shelf at a time; moving it means SREM from the old shelf and SADD to the new one in the same step. progress:<slug> is pages read, not percent. streak:<date> keys use ISO dates and carry a TTL — do not treat a missing streak key as zero pages read long ago, treat it as expired.

That last sentence prevents a specific, real failure: a model looking at a 90-day window, finding no key for day 61, and reporting a reading drought that never happened.


Worked prompts

These assume the memory connection and the keyspace above; the connection walkthrough covers the token side if you skipped it.

Moving a book between shelves.

I finished Piranesi last night.

[memory_store] SREM shelf:reading piranesi
[memory_store] SADD shelf:done piranesi
[memory_store] LPUSH recent:finished piranesi
[memory_store] LTRIM recent:finished 0 9
[memory_store] DEL session:current

Moved to done and added to your recent list. shelf:reading is now empty —
want me to pull the top of rank:priority?

Counters, which the model should never do in its head.

I read 42 pages today.

[memory_store] INCRBY progress:the-dispossessed 42
[memory_store] INCRBY streak:2026-08-18 42
[memory_store] EXPIRE streak:2026-08-18 5184000

284 of 341 pages. At 42 a day you finish Thursday.

INCRBY is atomic, so two overlapping requests both land. A model recomputing 284 = 242 + 42 and issuing a SET would lose one of them. Ask for increments explicitly and this class of bug disappears.

TTL'd working state.

I'm starting The Dispossessed now.

[memory_store] SET session:current the-dispossessed EX 604800
[memory_store] SMOVE shelf:want shelf:reading the-dispossessed

Started. If you don't touch it for a week the pointer clears itself, so a
book you abandoned won't sit there claiming to be in progress.

Ranking without sorting anything in the model.

What should I read next? I want short books first.

[memory_query] SMEMBERS shelf:want
[memory_query] ZREVRANGE rank:priority 0 4 WITHSCORES
[memory_query] HGETALL book:<each>

  the-fifth-season   score 9   512pp
  small-things-like  score 7   116pp   ← shortest by a distance
  piranesi           score 6   272pp

Access and plans, the honest version

OpenAI documents custom MCP servers in two places, and the two describe different menu paths. Do not assume one of them is wrong for you — look in both:

  • Settings → Apps → Advanced settings (developer mode lives here in one set of docs)
  • Settings → Connectors (the other set)

Once you find it: Create → paste the MCP URL → Auth: NoneScan ToolsCreate.

On entitlements, stated exactly as documented and no further: developer mode is documented for Pro, Plus, Business, Enterprise and Edu plans, and full write access is currently rolling out to Business, Enterprise and Edu workspaces. A read-only experience today — memory_query fine, memory_store declined — is the rollout, not a mistake you made.

That is awkward for Redis specifically, because a key-value store you cannot write to is a fairly quiet companion. Two workarounds that do not involve waiting:

  • The Responses API below is unaffected. Same URL, both directions.
  • redis-cli writes to the same keyspace over the native protocol, and ChatGPT reads what you wrote.

ChatGPT requires streamable HTTP, which is what this endpoint serves. The old HTTP+SSE transport is deprecated and irrelevant here.


From the Responses API

{
  "model": "gpt-5.6",
  "tools": [{
    "type": "mcp",
    "server_label": "memory",
    "server_description": "Reading-list state in Redis 7: book:<slug> hashes, shelf:* sets, progress:<slug> counters, rank:priority sorted set, streak:<date> with TTL.",
    "server_url": "https://freebase.cloud/api/mcp/YOUR_TOKEN",
    "require_approval": "never"
  }],
  "input": "How many pages have I logged in the last 7 days? Ignore days with no key."
}

Replace YOUR_TOKEN with the value from your MCP settings.

examples/reading_list.mjs runs the shelf operations from Node; examples/streak_report.py does the counter arithmetic from Python with only the standard library; examples/ttl_demo.sh is curl and date, proving expiry works end to end.


Same keyspace, from redis-cli

redis-cli -h HOST -p 6379
> SMEMBERS shelf:reading
1) "the-dispossessed"
> HGETALL book:the-dispossessed
1) "title"   2) "The Dispossessed"
3) "author"  4) "Ursula K. Le Guin"
5) "pages"   6) "341"
> TTL session:current
(integer) 601233

Host and port come from the instance you created in step 1. ioredis, redis-py, Lettuce and anything else speaking RESP2 connect the same way. MULTI/EXEC, pipelining, EVAL for atomic Lua, pub/sub via PUBLISH/SUBSCRIBE, and Redis Streams (XADD, XREAD, XGROUP) are all available — useful when the assistant is one participant in a system rather than the whole of it.


Limits worth stating

  • The free tier suits development, prototyping and small production workloads. No SLA, uptime figure or memory quota is published, and none is invented here.
  • The MCP URL is a bearer credential. Rotate it in Settings → MCP if it ends up somewhere public.
  • Redis has no schema to protect you. A model with write access and a vague instruction can overwrite a key with a plausible-looking wrong value and nothing will complain. Annotate, and keep approvals on.
  • KEYS-style full scans over a large keyspace are as unwise here as anywhere else. Give the model key patterns in the annotation so it does not go looking.

Files

examples/
  reading_list.mjs    Node 18+ — shelf moves and lookups via the Responses API
  streak_report.py    Python stdlib — pages-per-day over a date window
  ttl_demo.sh         bash + curl — set a key with EX, watch TTL count down
  README.md           run order and expected output

Elsewhere

MIT. Issues welcome, especially better annotation text — key-naming discipline is most of the battle.

freebase.cloud is an independent service and is not affiliated with OpenAI or Redis Ltd.

from github.com/freebase-cloud/chatgpt-redis-mcp

Installing Chatgpt Redis

This server has no published package — it is built from source. Open the repository and follow its README.

▸ github.com/freebase-cloud/chatgpt-redis-mcp

FAQ

Is Chatgpt Redis MCP free?

Yes, Chatgpt Redis MCP is free — one-click install via Unyly at no cost.

Does Chatgpt Redis need an API key?

No, Chatgpt Redis runs without API keys or environment variables.

Is Chatgpt Redis hosted or self-hosted?

Self-hosted: the server runs locally on your machine via the install command above.

How do I install Chatgpt Redis in Claude Desktop, Claude Code or Cursor?

Open Chatgpt Redis on unyly.org, pick your client tab (Claude Desktop, Claude Code, Cursor) and press Install — the config is generated automatically, no JSON editing.

Related MCPs

Compare Chatgpt Redis with

Not sure what to pick?

Find your stack in 60 seconds

Author?

Embed badge for your README

Browse similar

All data MCPs