Skip to content

Caching and Logging

The server writes structured JSON log lines to stderr. It never writes logs to stdout because the stdio MCP transport owns stdout.

Each log line includes at least ts, level, logger, and msg. Retrieval events add source, identifier, URL, status, duration, and byte metadata so operators can trace upstream calls.

Set AUSECON_LOG_LEVEL to control logging for the ausecon_mcp namespace:

VariablePurposeDefault
AUSECON_LOG_LEVELLogger level: DEBUG, INFO, WARNING, or ERROR.INFO

For Smithery HTTP containers, Uvicorn access logs are disabled by default. Application logs still go to stderr and should not contain request bodies or session configuration.

The Smithery container exposes MCP Streamable HTTP at /mcp. It is suitable for public deployment only because all tools are read-only and retrieve public ABS/RBA data from fixed upstream hosts.

Key safety constraints:

  • Local users should prefer stdio. If testing HTTP locally, bind to 127.0.0.1, not a public interface.
  • The Smithery entrypoint binds 0.0.0.0 only inside the container so the platform can route to it.
  • CORS is wildcard but non-credentialed; mcp-session-id is transport state, not authentication.
  • Source-native identifiers reject URL and path characters before provider URL construction.
  • Large unauthenticated requests remain the main residual risk, so callers should prefer last_n or explicit date bounds for broad datasets.

Upstream responses are cached in memory and on disk. Repeated calls can reuse payloads across client restarts, which is useful because many MCP clients spawn fresh stdio processes.

Set AUSECON_CACHE_DISABLED to disable all caching:

VariablePurposeDefault
AUSECON_CACHE_DISABLEDSet to 1, true, or yes to disable memory and disk caching.unset

The disk cache location is fixed to the platform application-cache directory:

  • Linux: ~/.cache/ausecon-mcp/
  • macOS: ~/Library/Caches/ausecon-mcp/

AUSECON_CACHE_DIR is not supported.

If the disk cache directory is unavailable, the server falls back to in-process memory caching for the lifetime of the process. Cross-process cache persistence and disk-backed stale reuse are not available in that degraded mode.

If an upstream ABS or RBA request fails and a stale cached payload exists, the server can return the cached payload and mark metadata.stale = true alongside cached_at and expires_at.

Parse errors are not masked this way. They still raise so upstream shape drift remains visible.

The main operational change for users upgrading from releases earlier than v0.8.0 is cache-root behaviour:

  • AUSECON_CACHE_DIR is no longer supported.
  • Disk writes stay under the platform application-cache directory.
  • The MCP tool, resource, and prompt surface is unchanged by that hardening change.