Setting both GOOGLE_CLIENT_ID and GOOGLE_CLIENT_SECRET turns
authentication on. Leave them unset for an unauthenticated server.
Variable
Default
Description
GRAMPS_MCP_AUTH
auto
auto: Google sign-in when both Google variables are set, none otherwise. off: no authentication, even if the Google variables are set (for example in a development shell that carries production credentials). Refused unless MCP_BASE_URL is localhost, 127.0.0.1 or ::1. It does not change the interface the server listens on: bind MCP_HOST=127.0.0.1 too.
GOOGLE_CLIENT_ID
unset
OAuth client ID from the Google Cloud Console.
GOOGLE_CLIENT_SECRET
unset
OAuth client secret.
MCP_GOOGLE_REDIRECT_PATH
/auth/callback
Path appended to MCP_BASE_URL to form the redirect URI registered with Google.
MCP_CLIENT_STORAGE_URL
redis://localhost:6379/0
Redis holding registered MCP clients and their tokens, so they survive restarts.
GRAMPS_MCP_ADMIN_EMAILS
unset
Comma-separated Google emails that bypass the per-tree membership check, on every mounted tree.
GRAMPS_MCP_GOOGLE_TOKEN_CACHE_TTL
300
Seconds a verified Google token is cached in memory. 0 disables the cache.
required: a write needs the user's confirmation, and a client that cannot ask writes nothing. when-supported: the user is asked if the client can ask; a client that cannot ask has the changes applied directly.
when-supported is less safe: for a client that does not declare
elicitation support, nothing but that client's own tool approval stands between
the model and the tree. It does not help a client that declares the support but
answers without showing anything to the user: that answer is a refusal in both
modes. See Tools and resources.
core: the eight read tools (shared by all trees) described in Tools. all: every read route of the backend as its own tool.
GRAMPS_MCP_UI
prefab
prefab: for clients that render MCP Apps, apply_changes shows an interactive card (untick changes, fix a name, apply); other clients are asked for a confirmation (elicitation). prefab-always: the card for every client; one that cannot render it writes nothing. off: never the card, always the confirmation.