mcp-cache
Provides a Redis-backed cache store (RedisCacheStore) for the cache slot, allowing cached values addressed by UNS id with TTLs to be shared across processes. Supports Redis connection URLs, TLS via rediss://, optional password and ACL username, and key prefixes.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mcp-cachecache 21.5 at uns://site1/tank1/level with a 60s TTL, then read it back"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
mcp-cache
Cache slots for an mcp-broker: one contract, cache.v1, for values kept by UNS id with a time to live, and pluggable stores.
MCP client ──> mcp-broker ──> slot "cache" (CacheBehavior)
│ one broker decision per UNS id, audited
└──> ICacheStore: memory, RedisEntries are addressed by UNS id, like SCADA values and their history: one broker policy governs the live value, its history and its cached copy. UNS ids and broker-decided access come from mcp-uns.
Design and decisions: docs/brief_cache_slot.md (French).
Packages
package | what |
| the contract, |
|
|
Related MCP server: DistributedAI
Use
import { DirectTransport } from "@cyanmycelium/mcp-broker-provider";
import { McpServerBuilder } from "@cyanmycelium/mcp-core";
import { CacheBehavior, buildCacheDeclaration } from "@cyanmycelium/mcp-cache";
import { RedisCacheStore } from "@cyanmycelium/mcp-cache-redis";
import { BrokerAccessGuard } from "@cyanmycelium/mcp-uns";
const store = await RedisCacheStore.connectAsync("redis://127.0.0.1:6379", { prefix: "site1:" });
const transport = new DirectTransport("ws://localhost:3000/provider/cache", { secret });
const server = new McpServerBuilder().withName("cache").withTransport(transport).register(new CacheBehavior(store, new BrokerAccessGuard(transport.broker))).build();
await server.start();
await transport.broker.declare(buildCacheDeclaration({ version: "1", namespace: "uns://site1" }));Tools
tool | broker capability, checked per id |
| none |
|
|
|
|
|
|
Develop
npm install
npm run typecheck
npm test
npm run buildThe Redis store runs the conformance suite on a fake Redis that misbehaves the way SCAN may. Against a real server, give the standard Redis settings in the environment or in a .env file at the root, which git ignores:
REDIS_URL=rediss://my-cache.example.com:6380
REDIS_PASSWORD=<password>REDIS_URL carries its scheme: rediss:// for TLS (Azure Cache for Redis on 6380, for one), redis:// otherwise. REDIS_PASSWORD and REDIS_USERNAME (for an ACL user) are optional. Each test writes under its own key prefix and deletes its keys afterwards.
tests/broker.test.ts starts a real broker with @cyanmycelium/mcp-broker/testing.
License
Apache-2.0.
This server cannot be deployed
Maintenance
Related MCP Connectors
Hosted MCP memory and agent control plane for durable conversations, jobs, and operations.
Cross-vendor AI memory over MCP. One semantic store, readable and writeable from every MCP client.
MCP server for OnceAsk, the AI-native current-address layer for people and agents.
MCP server for mandates, delegation, policy-gated execution, credential grants, and audit.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceEnables key-value storage operations using multiple backends (memory, filesystem, redis, MongoDB, HTTP) via MCP tools like get, set, and list.22 npm1MIT
- AlicenseNot gradedqualityBmaintenanceEnables multiple MCP clients to collaborate through a shared store with identity, project-scoped access, versioned memory proposals, review queues, and leased jobs with fencing tokens.2AGPL 3.0
- AlicenseNot gradedqualityCmaintenanceExposes get, set, and delete operations over a Redis/Valkey-compatible key-value store as MCP tools, with per-user key namespacing and TTL support on writes. Enables clients to cache and retrieve arbitrary string values statelessly over SSE or direct HTTP, using their own backend.MIT
- AlicenseNot gradedqualityBmaintenanceEnables concurrent MCP clients to share a persistent SQLite-backed key-value memory store with semantic search, write attribution, and audit history.MIT