mcp-cache

v0.3.0
mcp-cache Checked 6 hours ago Published 17 days ago

Reusable SQLite-backed cache for MCP servers — TTL and incremental time series strategies

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

cache_get

Return the cached JSON value for key, or null if missing or expired.

ParameterTypeDescription
key *string

cache_set

Store value (a JSON string) under key for ttl seconds.

ParameterTypeDescription
key *string
value *string
ttlinteger

cache_invalidate

Remove a specific TTL cache entry.

ParameterTypeDescription
key *string

cache_clear_expired

Delete all expired TTL entries and return the count removed.

cache_list_keys

List TTL cache keys, optionally filtered by prefix.

ParameterTypeDescription
include_expiredboolean
prefixstring

timeseries_store

Store time series observations. observations — JSON array of objects each containing date_key and value_key. range_start / range_end — YYYY-MM-DD boundaries that were fetched (used for gap tracking).

ParameterTypeDescription
observations *string
range_end *string
range_start *string
series_id *string
date_keystring
value_keystring

timeseries_get

Return cached observations for series_id between start_date and end_date (YYYY-MM-DD). Only returns already-cached data — does not call any external fetch. Results are sorted newest-first.

ParameterTypeDescription
end_date *string
series_id *string
start_date *string
date_keystring
value_keystring

timeseries_invalidate

Remove all cached observations and range records for series_id.

ParameterTypeDescription
series_id *string

timeseries_list_series

List time series IDs, optionally filtered by prefix.

ParameterTypeDescription
prefixstring

cache_stats

Return cache statistics (entry counts, series counts, db path) as JSON.