Memory Cache MCP Server

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
MAX_MEMORYNoMaximum memory usage in bytes (default: 100MB). Prevents excessive memory consumption. When exceeded, least recently used items are removed.104857600
CONFIG_PATHNoPath to a custom config.json file.
DEFAULT_TTLNoDefault time-to-live in seconds (default: 1 hour). Items are automatically removed after this time. Prevents stale data from consuming memory.3600
MAX_ENTRIESNoMaximum number of items that can be stored in cache. Prevents cache from growing indefinitely. When exceeded, oldest unused items are removed first.1000
CHECK_INTERVALNoCleanup interval in milliseconds (default: 1 minute). How often the server checks for expired items. Lower values keep memory usage more accurate, higher values reduce CPU usage.60000
STATS_INTERVALNoStats update interval in milliseconds (default: 30 seconds). How often cache statistics are updated. Affects accuracy of hit/miss rates. Helps monitor cache effectiveness.30000

Schema

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription
Cache StatisticsReal-time cache performance metrics

Tools

Functions exposed to the LLM to take actions

NameDescription
store_data

Store data in the cache with optional TTL

retrieve_data

Retrieve data from the cache

clear_cache

Clear specific or all cache entries

get_cache_stats

Get cache statistics