TrackInPublic with Grok.
The same MCP server and key work from the Grok CLI in your terminal and from the xAI API, where Grok calls TrackInPublic as a remote MCP tool.
What you need
- A TrackInPublic key from your dashboard (Pro plan).
- The Grok CLI, or an xAI API key for the API route.
Grok CLI: one command
grok mcp add --transport http trackinpublic https://trackinpublic.app/api/mcp --header "Authorization: Bearer tip_live_YOUR_KEY"
Then ask Grok what is left on my TrackInPublic list today? The CLI lists its servers with /mcps.
To keep the key out of your shell history, put it in an environment variable and write the server in ~/.grok/config.toml; the CLI expands ${VAR} when it loads the file:
[mcp_servers.trackinpublic]
url = "https://trackinpublic.app/api/mcp"
headers = { Authorization = "Bearer ${TRACKINPUBLIC_KEY}" }xAI API: remote MCP tool
The xAI Responses API connects to remote MCP servers for you. Pass TrackInPublic as a tool and Grok decides which of the eight tools to call:
curl https://api.x.ai/v1/responses \
-H "Authorization: Bearer $XAI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "grok-4.7",
"input": "What is left on my TrackInPublic list today?",
"tools": [{
"type": "mcp",
"server_url": "https://trackinpublic.app/api/mcp",
"server_label": "trackinpublic",
"authorization": "tip_live_YOUR_KEY"
}]
}'server_labelnames the server; xAI uses it to prefix the tool calls.- Add
"allowed_tools": ["get_today", "check_in"]to limit what Grok may call, for example in a bot that only reads and checks in. - Both
tip_live_...andBearer tip_live_...are accepted inauthorization.
What Grok can do with it
- Read your profile, your habits with their streaks, and today's list (read access).
- Create, rename, hide or delete a habit.
- Check a habit in for today, or undo today's check-in.
- Add tasks to today, tick them, and commit to today's list in public.
What it cannot do
- Log a past day. A day closes at midnight in your timezone, for the API and the MCP endpoint as much as for the app.
- See anyone else's private data. The key is scoped to your account.
- Change your password, your email or your plan.
Tool names and arguments are on the MCP server page.
Questions
Can I add TrackInPublic in the Grok app's connectors?
Possibly, where your account can add a custom MCP server: use the URL https://trackinpublic.app/api/mcp and sign in. The server offers OAuth 2.1 with PKCE and dynamic client registration, which is what that flow uses. The OAuth flow (dynamic client registration, PKCE, consent, token, MCP call) is tested end to end with a reference client; it has not been tested yet inside every product's own connector screen. The Grok CLI and the xAI API accept a personal key.
Where does my key go with the xAI API?
In the authorization field of the mcp tool, inside your request body. xAI's servers use it to call the TrackInPublic MCP server for you. Treat the request body as secret: do not log it.
Which Grok model should I use?
Any model the xAI API accepts with remote MCP tools. The example uses grok-4.7, the model shown in xAI's documentation in November 2026.