I found a practical workaround. Grok Bot runs a private HTTP gateway on its computer, normally on port 1340. Its bearer token and connection details are stored at:
`/home/box/sand-data/gateway.json`
The safe way to access it externally is through an SSH tunnel rather than exposing port 1340 publicly:
ssh -L 1340:127.0.0.1:1340 box@YOUR_GROKBOT_HOST
I installed tailscale on the computer and it works great!
Retrieve the token securely:
TOKEN=$(ssh box@YOUR_GROKBOT_HOST \\
'jq -r .token /home/box/sand-data/gateway.json')
List the available agents:
curl -sS -X POST http://127.0.0.1:1340/api/listAgents \\
-H "Authorization: Bearer $TOKEN" \\
-H "Content-Type: application/json" \\
-d '{}'
Then send a message to an agent by UUID:
curl -sS -X POST http://127.0.0.1:1340/api/sendPrompt \\
-H "Authorization: Bearer $TOKEN" \\
-H "Content-Type: application/json" \\
-d '{
"agentId": "YOUR_AGENT_UUID",
"prompt": "I just discovered grokbot, how awesome is it!!."
}'
I’ve tested both listAgents and sendPrompt against a live Grok Bot installation.
Important caveat: this is an undocumented internal API, not an officially supported Cursor integration, so its routes or storage paths may change after an update. Treat the gateway token like a password and never expose port `1340` directly to the public internet. For production, put a narrow authenticated webhook relay in front of it.