Cacheport

io.github.CloudCorpRecordsPublished by GitHub account CloudCorpRecordsv0.1.0Updated Nov 7, 2026

Key-value cache over Redis: set, get, delete and list keys.

VerifiedSTDIODesktop onlyDatabasesFiles & Storage

Overview

AI-generated overview

A small stdio MCP server that lets an assistant set, get, delete and list keys in a Redis cache over a plain TCP connection.

What you can do
  • Set a key-value pair, optionally with an expiry in seconds
  • Read a value back by key, returning null when the key is gone
  • Delete one key or several at once and report how many were removed
  • List key names matching a Redis glob pattern, defaulting to all keys
When to use it
Useful when an assistant needs to read or write short-lived cache entries in an existing Redis instance, for example to stash session data, feature flags or scratch values between steps. It is a thin key-value front end, not a general Redis administration tool.
Requirements
Runs locally over stdio via npx or the Docker image. Needs a reachable Redis server; the target is given as a redis:// or rediss:// URL, through REDIS_URL, CACHEPORT_REDIS_URL, or the split REDIS_HOST, REDIS_PORT and REDIS_PASSWORD variables, defaulting to localhost:6379. No authentication is declared by the MCP server itself.
Before you install
The tools write, overwrite and delete data in the connected Redis database, and delete accepts multiple keys at once, so point it at a cache you can afford to lose. A password may be supplied in the URL or in REDIS_PASSWORD; keep it out of shared configuration. Listing uses the KEYS command, which can be slow on large databases.

Installation

In SourceWeft

  1. Open Cacheport in the dashboard and add it to a workspace.
  2. Enable the server for the chats that should use its tools.

Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.

Other MCP clients

Follow the launch instructions in the repository.

README

cacheport

cacheport is a small, honest front end for a Redis cache. It stores a value under a key (optionally with an expiry), reads it back, deletes one key or several at once, and lists the keys that match a glob pattern. That is the whole job, and it does it by speaking Redis's own wire protocol, RESP, over a plain TCP socket — there is no client library bundled and nothing between you and the server's actual replies.

When Redis is not there, cacheport says so. The MCP server starts and lists its tools with no server behind it at all; only an actual operation touches the socket, and a refused connection or a server error comes back as an error, never as a made-up value.

Install

bash
npx @reneturcios/cacheport get mykey

Or run the container image:

bash
docker run -i ghcr.io/cloudcorprecords/cacheport

The container defaults to the MCP server (see below). Pass CLI arguments to use it as a CLI instead.

CLI

bash
# Store a value, with and without an expirycacheport set greeting "hello world"cacheport set session abc123 --expire-seconds 3600
# Read it back (prints (nil) when the key is gone)cacheport get greeting
# Delete one key, or several in one call; prints how many were removedcacheport delete greetingcacheport delete session old-session temp-key
# List keys; the pattern is a Redis glob and defaults to *cacheport listcacheport list "user:*"
# Start the MCP server (Redis URL optional, see below)cacheport mcp redis://localhost:6379
cacheport --version

Exit codes: 0 on success, 1 when the cache or the connection fails (the error says which), 2 for usage errors.

The target is a normal Redis URL: redis:// or rediss://, with a host, an optional port (default 6379), an optional password in the userinfo, and an optional database index as the path (/2 selects db 2). Commands and mcp alike can take the target from the environment instead: REDIS_URL first, then CACHEPORT_REDIS_URL, then the split variables REDIS_HOST / REDIS_PORT / REDIS_PASSWORD (or their CACHEPORT_ spellings). With none of those set, cacheport talks to localhost:6379.

How it talks to Redis

Each operation opens a connection, writes the command as a RESP array of bulk strings, and decodes the reply — a simple string for SET, a bulk string (or nil) for GET, an integer for DEL, an array for KEYS. When the target carries a password or a non-zero database index, AUTH and SELECT run first on the same connection. Server error replies surface with the server's own message attached.

An expiry passed to set is sent as EX <seconds>; fractional seconds are floored, and a non-positive expiry is refused before anything is sent.

MCP server

One bin serves both faces. The mcp subcommand starts a stdio MCP server:

bash
npx -y @reneturcios/cacheport mcp redis://localhost:6379

MCP client configuration:

json
{  "mcpServers": {    "cacheport": {      "command": "npx",      "args": ["-y", "@reneturcios/cacheport", "mcp"],      "env": { "REDIS_URL": "redis://localhost:6379" }    }  }}

Tools

ToolInputWhat it returns
setkey (string, required), value (string, required), expireSeconds (number, optional)The server status reply, normally OK.
getkey (string, required)The stored string, or null when the key does not exist.
deletekey (string or array of strings, required)How many keys were actually removed.
listpattern (string, optional, default *)The key names matching the glob pattern.

Connection failures and server errors come back as tool errors with the underlying message — never as invented values.

Development

bash
npm installnpm run build   # tsc -> dist/npm test        # node test runner over test/*.test.ts, no network, no live Redisnpm run dev     # run the CLI from source via tsx

The core logic sits behind an injectable executor interface, which is what the test suite drives: the RESP encoder and decoder, URL parsing, and all four operations are covered against a fake in-memory executor.

License

MIT — see LICENSE.

Source: README.md at commit 100c4b5

Tools

4

set

Set a Redis key-value pair with optional expiration

ParameterskeyrequiredvaluerequiredexpireSeconds

get

Get a value by key from Redis

Parameterskeyrequired

delete

Delete one or more keys from Redis

Parameterskeyrequired

list

List Redis keys matching a pattern

Parameterspattern

Version history

1
  1. v0.1.0LatestOct 31, 2026

Score

90% of the applicable checks met

How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.

  • Reached in the last 30 days25 pts
  • Auth declared10 pts

    Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.

  • Tools listedRequired15 pts
  • DescriptionRequired15 pts
  • Logo10 pts
  • Documentation15 pts
  • License10 pts