All articles
On this page
Daily Use
Connecting Grok Bot to HQ
Anyone who uses Grok Bot (xAI's agent) and wants it to know their company, use their connected apps, and work with their other AI tools and team.
Once Grok Bot is connected to HQ, it works from the same brain as Claude Code, Codex, and your team. It can read your company's knowledge, use the apps you've already connected in HQ, and save work back into HQ so your other tools can pick it up. You set up your apps once in HQ, so there's no need to connect each one to Grok Bot again.
What you need#
- A Grok account with access to Grok Bot.
- An HQ account.
Step 1: Paste the HQ link into Grok Bot#
Grok Bot connects to HQ through the HQ MCP connector. Open a new Grok Bot chat and send:
Add a custom MCP server called "hq" at https://hq-mcp.hq.computer/mcp, then let me sign in.Keep the word "custom." Without it, Grok Bot may try to install something from its own catalog instead of HQ's connector.
Step 2: Sign in to HQ#
- Grok Bot adds HQ and shows a card that says Let Grok Bot use hq, with Waiting for hq authorization.
- A sign-in window opens. If it doesn't, or you closed it, click Reopen on the card.
- On the HQ page, pick how Grok Bot connects: as you, or as its own bot. See Signing in below.
- Sign in with your HQ account.
Step 3: Paste the instructions#
Once it's connected, copy everything in the box below, paste it into the same Grok Bot chat, and send. It teaches Grok Bot how to work in HQ.
Save the following as the custom instructions for the hq server:
- HQ holds my companies' files, knowledge, secrets and connected apps. Before any HQ work, call hq_companies_list and work in the company I name. If I belong to more than one company and did not name one, ask me which.
- Pass that company on every HQ call. Never copy one company's files or data into another company.
- Use search, hq_files_list and hq_files_read to find and read files. Use hq_files_write to save work back to HQ.
- Never ask me to paste a secret. Use hq_secrets_list to see which secrets exist and hq_secrets_sandbox to run a command that needs one.
- Use hq_integrations_list and hq_integrations_call for the company's connected apps.
- If you connected as your own bot: when HQ wakes you for a direct message, read it with hq_messages_inbox (markRead on) and answer with hq_messages_send. Every DM gets a reply.
Then tell me which companies I can work in.Signing in#
HQ gives you two choices. Connecting as you is picked to start with, so switch it if you want the other one.
- Connect it as you. Grok Bot acts as you and gets the same access you have.
- Connect it as its own bot. Grok Bot gets its own HQ identity and only sees what's shared with it. Choose this if you want Claude Code, Codex, or teammates to message it. See Messaging Grok Bot from Claude Code and Codex.
If you pick its own bot, give it a name and pick the companies it can work in.
One sign-in covers every company you choose. Grok Bot then tells you which companies you can work in.
Sharing your screen? The instructions ask Grok Bot to list your companies. If you'd rather not show them all, add a line like "don't list all my companies" before you send.
Try it#
Ask Grok Bot about your company. For example:
- "Tell me about Acme. What's in the brain?"
- "What secrets and integrations do we have available?"
- "Check Linear and tell me what's assigned to me."
Grok Bot uses the apps you've already connected in HQ, so the last one works without connecting Linear to Grok separately. See Connecting Your Apps to HQ to add more.
It works in the company you name, asks if you didn't name one, and is told never to copy anything from one company into another.
Hand work to your other AI tools#
Grok Bot and Claude Code (or Codex) now share the same HQ, so you can start something in one and finish it in the other. Grok Bot is especially good at searching X. You could have it run a search, save what it finds in HQ, and then pick it up in Claude Code:
- In Grok Bot: "Save a handoff note about this in HQ and send me a DM with it."
- In Claude Code or Codex: "Check out the handoff from Grok Bot."
Claude Code may ask which company to work in, then opens the note and carries on. More on handoffs in Sessions, Checkpoints, and Handoffs.
To have Grok Bot send and receive messages as its own bot, and wake up when Claude Code or Codex messages it, see Messaging Grok Bot from Claude Code and Codex.
What Grok Bot can and can't do#
- It can read and save files in your company's HQ, search company knowledge, use your connected apps, and send and read HQ messages.
- It can't see secret values. It sees secret names, and when it needs a secret it uses it without the value ever showing up in the chat. See the Secrets Guide.
- It works from the cloud. Grok Bot runs on xAI's servers, so it sees what's synced to your company's HQ, not files that are only on your computer. See HQ Cloud: What It Is and Whether You Need It.
- It only sees what it's allowed to see. If it signs in as you, it gets the same access you have. If you set it up as its own bot, it only gets what's shared with that bot. See Permissions in HQ: Who Can See What.
Connecting other AI apps#
In the HQ desktop app, Settings → AI tools → Connect AI apps to HQ has a row for each app: Grok Bot, Muse, Claude, ChatGPT, Claude Code, Codex, and the Grok CLI. Each one uses the same HQ MCP connector. For any other app that accepts an MCP connection, use https://hq-mcp.hq.computer/mcp. For Claude.ai and ChatGPT setup, see Using HQ from ChatGPT and Claude.ai.
Common questions#
Do I need to connect my apps to Grok Bot separately?
No. Grok Bot uses the apps you've connected in HQ.
Can Grok Bot see my other companies?
Yes, if you belong to them. It asks which company you mean and keeps each company's work separate.
I already connected HQ to Grok Bot a while ago. Should I do it again?
It's worth it. Jacob recommends reconnecting, since the connection has improved since it first came out.
If you get stuck#
See The "I'm Stuck" Guide, or report it with /hq-bug. It packages the details for the team automatically.