Configuration
Bot token + chat id, with sensible precedence.
The server reads configuration with this precedence:
- Environment variables
TELEGRAM_BOT_TOKENandTELEGRAM_CHAT_ID(both required together). - A config file at
$PING_A_HUMAN_CONFIG, or~/.config/ping-a-human/config.jsonby 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
| Variable | Description |
|---|---|
TELEGRAM_BOT_TOKEN | Bot token from BotFather. Used with TELEGRAM_CHAT_ID. |
TELEGRAM_CHAT_ID | Target chat id. Used with TELEGRAM_BOT_TOKEN. |
PING_A_HUMAN_CONFIG | Explicit 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.