Configuration

Bot token + chat id, with sensible precedence.

The server reads configuration with this precedence:

  1. Environment variables TELEGRAM_BOT_TOKEN and TELEGRAM_CHAT_ID (both required together).
  2. A config file at $PING_A_HUMAN_CONFIG, or ~/.config/ping-a-human/config.json by default.

Config file shape

{
  "telegram": {
    "botToken": "123456:ABC-...",
    "chatId": "4242"
  }
}

The setup wizard writes this exact file for you. chatId is stored as a string so large/negative group ids keep full precision.

Environment variables

VariableDescription
TELEGRAM_BOT_TOKENBot token from BotFather. Used with TELEGRAM_CHAT_ID.
TELEGRAM_CHAT_IDTarget chat id. Used with TELEGRAM_BOT_TOKEN.
PING_A_HUMAN_CONFIGExplicit path to a config file, overriding the default location.
The bot token is a secret — it is never logged or echoed. All diagnostics go to stderr; stdout is the MCP JSON-RPC channel. A missing or malformed config fails loudly with a secret-free error message.