cache-mcp
Provides tools to get, set, and delete key-value entries in a Redis-compatible cache, with TTL support, per-user key namespacing, and optional global prefixes.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
cache-mcp
MCP server that exposes a key-value cache (Valkey / Redis compatible) as tools over the Model Context Protocol.
Features
Three MCP tools:
cache_get,cache_set,cache_deletePer-user key namespacing via
user_idOptional global prefix (
CACHE_PREFIX) to avoid collisions when sharing a Redis instanceTTL support on
cache_setTwo transports: SSE (
/sse+/messages) and direct HTTP (/mcp,/)Health check at
/healthStateless — bring your own Redis
Related MCP server: mcpstate
Installation
Docker (recommended)
docker pull ghcr.io/dolphin2702/cache-mcp:latest
From source (uv / uvx)
uvx --from "git+https://github.com/dolphin2702/cache-mcp.git@v0.1.0" cache-mcp
From source (pip)
pip install "git+https://github.com/dolphin2702/cache-mcp.git@v0.1.0" cache-mcp
Configuration
Variable | Default | Description |
|
| Cache backend host |
|
| Cache backend port |
|
| Redis DB index |
|
| Prefix added to every key. Useful when sharing a Redis instance with other apps (e.g. Mailu). |
|
| Bind address |
|
| HTTP port |
Deployment examples
Scenario File Connect to an existing Redis examples/docker-compose.external-redis.yml Bundled Redis (quick try-out) examples/docker-compose.bundled-redis.yml Share Redis with Mailu examples/docker-compose.mailu-redis.yml Sharing Redis with another app? Set CACHE_PREFIX=cachemcp: or use a separate CACHE_DB to avoid key collisions.
MCP Client Configuration
SSE transport
{ "mcpServers": { "cache-mcp": { "url": "http://localhost:3002/sse" } } }
stdio via uvx
{ "mcpServers": { "cache-mcp": { "command": "uvx", "args": ["--from", "git+https://github.com/dolphin2702/cache-mcp.git@v0.1.0", "cache-mcp"], "env": { "CACHE_HOST": "192.168.203.2", "CACHE_PORT": "6379", "CACHE_PREFIX": "cachemcp:" } } } }
Tools
cache_get
Get a value from cache.
Arguments:
key (string, required)
user_id (string, default "default") Returns: value or "null".
cache_set
Store a value with TTL.
Arguments:
key (string, required)
value (string, required)
ttl (integer, default 3600 seconds)
user_id (string, default "default") Returns: "ok".
cache_delete
Delete a key.
Arguments:
key (string, required)
user_id (string, default "default") Returns: "ok".
HTTP API
Variable | Default | Description |
|
| Cache backend host |
|
| Cache backend port |
|
| Redis DB index |
|
| Prefix added to every key. Useful when sharing a Redis instance with other apps (e.g. Mailu). |
|
| Bind address |
|
| HTTP port |
Key format
Final Redis key:
{CACHE_PREFIX}{user_id}:{key}
Example with CACHE_PREFIX=cachemcp:, user_id=alice, key=session:
cachemcp:alice:session
Development
git clone git@github.com:dolphin2702/cache-mcp.git cd cache-mcp python3 -m venv .venv source .venv/bin/activate pip install -e . cache-mcp
License
MIT
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Idempotency keys, locks, timers, and inboxes for agents over MCP. No payments.
AI Reasoning Cache & Consensus Layer with 11 MCP tools via Streamable HTTP.
MCP-first toolbox for agents: KV storage, auth, queue, and utility tools. Free in early access.
Streamable HTTP MCP gateway for NV oOS fleets — one API key, namespaced tools, quotas and policy.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables key-value storage operations using multiple backends (memory, filesystem, redis, MongoDB, HTTP) via MCP tools like get, set, and list.26 npm1MIT
- AlicenseNot gradedqualityCmaintenanceDurable, user-keyed state management for stateless MCP servers. Enables agents to persist and resume state across conversations, clients, and devices.MIT
- AlicenseBqualityCmaintenanceProvides owner-bound secure storage and retrieval of tool outputs via MCP tools, enabling trusted persistence for agents like Claude Code, Codex CLI, and OpenCode.2MIT
- AlicenseNot gradedqualityCmaintenanceEnables an MCP broker to store, scan, retrieve, update, and delete TTL-bound values addressed by UNS id, using shared memory or Redis stores and per-id broker access checks.Apache 2.0