Coding agents and editors

Post to social media from Grok Build

Setup checked September 22, 2026SpaceXAI

Grok Build is SpaceXAI's coding agent for the terminal — the company formerly known as xAI. A single command connects it to iHatePosting's hosted server, and from then on you can ask it to announce a release or schedule a thread without leaving your shell.

Set it up

  1. 1. Create an iHatePosting API key

    Sign in, open Settings → Developers and create a key. It starts with pk_live_ and is shown in full only once, so copy it before you leave the page.

  2. 2. Add iHatePosting to Grok Build

    Run this command in your terminal. It saves iHatePosting for every project, in ~/.grok/config.toml (on Windows, %USERPROFILE%\.grok\config.toml). To check it later, run grok mcp doctor ihateposting: it confirms that Grok reaches the server, but it passes even with a wrong key, so ask Grok to run ihateposting__whoami to check the key. Replace YOUR_API_KEY with your key.

    grok mcp add --transport http ihateposting https://ihateposting.com/mcp --header "Authorization: Bearer YOUR_API_KEY"
  3. 3. Ask it to post

    Tell Grok Build what you want to say and where. It saves a draft in iHatePosting unless you ask for the post to go out now or at a set time.

What is different about Grok Build

  • grok mcp add saves the server for your user, in ~/.grok/config.toml, so it is there in every project. Add --scope project to write it to .grok/config.toml in the folder you run the command from instead — Grok only loads it once that folder is trusted, and the file should not be committed with a key in it.
  • The command stores the header exactly as typed, so the file holds your key in plain text. To keep the key out of the file, add the server to ~/.grok/config.toml yourself with url = "https://ihateposting.com/mcp" and bearer_token_env_var = "IHATEPOSTING_API_KEY" instead of a headers line; Grok then sends the key from that variable, and if it is not set every tool says no key was sent. A ${VAR} inside a header also works, but an unset variable stays in the text literally and our server reads it as a wrong key.
  • Check it with grok mcp doctor ihateposting, or open /mcps inside a session. The tools appear as ihateposting__ followed by the tool's name. Both only show that Grok reached the server, which answers even when the key is wrong, so ask Grok to run ihateposting__whoami to check the key.
  • Headless runs load project-scoped servers only in a folder you have already trusted. The --trust flag trusts the folder, and Grok remembers that for every later run.

Limits. xAI, now SpaceXAI, launched Grok Build in May 2026 as an early beta for SuperGrok and X Premium Plus subscribers; its page now says it is free to try, without stating the limits. It runs on macOS, Linux and Windows, and on first launch opens your browser to sign in with your grok.com account; an xAI API key works instead where there is no browser. Grok Build on the web and in the Grok phone apps is a different tool that builds apps inside a chat; these steps are for Grok Build in the terminal. An organisation can block MCP servers with an allow or deny list.

SpaceXAI's own documentation: MCP servers in Grok Build

Nothing goes out unless you say so

Every post Grok Build writes is saved as a draft in iHatePosting unless you ask for it to be published now or at a set time. Publishing, rescheduling, retrying and deleting are marked as actions that change things, so clients that honour those markings ask you before they run them. Deleting a post in iHatePosting never removes one that is already live on a network.

Frequently asked questions

Where does grok mcp add save the server?

For your user, in ~/.grok/config.toml, so it is there in every project. Add --scope project to write it to .grok/config.toml in the current folder instead; Grok loads that only once the folder is trusted.

How do I keep my key out of the config file?

Add the server to ~/.grok/config.toml yourself with url set to https://ihateposting.com/mcp and bearer_token_env_var set to IHATEPOSTING_API_KEY, instead of a headers line. Grok then sends the key from that variable, and if it is not set every tool says no key was sent.

How do I check that it works?

grok mcp doctor ihateposting and /mcps show only that Grok reached the server, which answers even when the key is wrong. Ask Grok to run ihateposting__whoami to check the key.

Ready to post everywhere from Grok Build?

Start your 90-day free trial — no credit card, about a minute to your first post.

Sign Up

Other AI agents

See every AI agent