Skip to main content
Glama

propublica-mcp

cache.py•707 B
import datetime from typing import Any UTC = datetime.timezone.utc class TimedCache: NOT_FOUND = object() def __init__(self, expiration: datetime.timedelta): self.expiration = expiration self.cache: dict[Any, tuple[Any, datetime.datetime]] = {} def set(self, key: Any, value: Any) -> None: expires = datetime.datetime.now(UTC) + self.expiration self.cache[key] = (value, expires) def get(self, key: Any) -> Any: value = self.cache.get(key) if value is not None and value[1] > datetime.datetime.now(UTC): return value[0] else: return self.NOT_FOUND def clear(self) -> None: self.cache.clear()

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/asachs01/propublica-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server