// {{ display_name }} MCP server — generated by mcpify. Do not hand-edit.
//
// Standalone entry point for Docker's HEALTHCHECK instruction. Checks that
// mcp_store.db is present and readable rather than depending on the running
// server's transport — stdio mode has no HTTP endpoint to probe.

import { accessSync, constants } from 'node:fs';
import { join } from 'node:path';

const storePath = join(process.cwd(), 'mcp_store.db');

try {
  accessSync(storePath, constants.R_OK);
  process.exit(0);
} catch {
  console.error(`healthcheck failed: '${storePath}' is missing or unreadable`);
  process.exit(1);
}
