Coding agents and editors

Post to social media from Claude Code

Setup checked September 22, 2026Anthropic

Claude Code talks to iHatePosting's hosted server directly, so there is nothing to install. Ship a release, then ask Claude Code to write the announcement, check it against X's and LinkedIn's limits, and schedule it for the morning.

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 Claude Code

    Run this command in your terminal. Replace YOUR_API_KEY with your key.

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

    Tell Claude Code 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 Claude Code

  • Run the command in an ordinary terminal (PowerShell, Command Prompt, bash or zsh), not inside a Claude Code session. It works the same in all of them. Then start a new Claude Code session so it loads the server.
  • --scope user makes iHatePosting available in every project. Without it Claude Code saves the server for the current project only: the whole git repository you ran the command in, or just that folder if it is not in a git repository.
  • Check it with claude mcp list or claude mcp get ihateposting; inside a session, /mcp shows whether it connected and can reconnect it. Connected only means our server answered, and it answers even when the key is wrong or still reads YOUR_API_KEY. To check the key, ask Claude Code to run the whoami tool: a wrong key comes back as iHatePosting API 401.
  • Claude Code can expand ${VAR} in a header, but a variable that is not set is sent as the literal text, so every tool fails with iHatePosting API 401, as it would with a wrong key. That is why the command writes the key itself.
  • If you use Claude Code only through the VS Code extension, the claude command is not on your PATH yet. Install the standalone Claude Code CLI once, then run the command in any terminal.

Anthropic's own documentation: Connect Claude Code to tools via MCP

Nothing goes out unless you say so

Every post Claude Code 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 do I run the claude mcp add command?

In an ordinary terminal, such as PowerShell, Command Prompt, bash or zsh, not inside a Claude Code session. Then start a new Claude Code session so it loads the server. If you use Claude Code only through the VS Code extension, install the standalone Claude Code CLI first so the claude command exists.

Will iHatePosting be available in every project?

Yes, with --scope user. Without it, Claude Code saves the server for the current project only: the git repository you ran the command in, or just that folder if it is not in a repository.

How do I check that my key works?

claude mcp list and /mcp show only that our server answered, and it answers even when the key is wrong. Ask Claude Code to run the whoami tool: a wrong key, or one that still reads YOUR_API_KEY, comes back as iHatePosting API 401.

Ready to post everywhere from Claude Code?

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