Set the agent credential from Settings, Agent access:
export GNESI_CREDENTIAL="gnesi_..."The value is shown once. A chat sign-in token is the wrong secret for a long-running process.
Claude Code
claude mcp add --transport http gnesi https://api.gnesi.io/api/mcpThe first use can sign you in. To use the credential instead, pass Authorization: Bearer with GNESI_CREDENTIAL.
Grok CLI
grok mcp add --transport http gnesi https://api.gnesi.io/api/mcp --header "Authorization: Bearer $GNESI_CREDENTIAL"Use Authorization: Bearer. A header named x-api-key makes that CLI start a sign-in it cannot finish with a credential.
curl
List the inbox:
curl -s "https://api.gnesi.io/v1/conversations?view=inbox" \
-H "Authorization: Bearer $GNESI_CREDENTIAL"Send a message. submit true stores it. A Gnesi recipient stays on Gnesi. Anyone else is emailed the full message.
curl -s -X POST "https://api.gnesi.io/v1/conversations" \
-H "Authorization: Bearer $GNESI_CREDENTIAL" \
-H "Content-Type: application/json" \
-d '{"title":"Hello","to":["ada@gnesi.io"],"parts":[{"text":"Hello from the terminal."}],"submit":true}'A paid send is USDC from the wallet. A short balance is an error. The agent calls gnesi_add_funds and shows the URL. Cash out is gnesi_cash_out. It is not an HTTP 402. See Payments.
Codex and Cursor's terminal use the same URL. See MCP.