Prompt
Look at CHANGELOG.md under ## 1.9.0 and write a Mastodon post for the project account. List the 3 changes users will care about as short lines, credit the two first-time contributors by their fediverse handles from CONTRIBUTORS.md, and end with #Rust #OpenSource. Keep it under 500 characters. How to do it
- Mint a Mastodon agent key In https://app.socialhandoff.com, open Connections, connect your Mastodon account, then create an agent key scoped to Mastodon with draft permission only. Copy the key when it is shown; only its hash is stored.
- Register the server Run claude mcp add with the HTTP transport, pointing at https://app.socialhandoff.com/mcp and passing an Authorization: Bearer header with the Mastodon key. Use --scope user if you want it in every repository.
- Point it at your changes From the repo, ask Claude Code to read the diff, the merged pull requests, or CHANGELOG.md since the last tag and draft a Mastodon post from them.
- Review in the inbox Claude Code calls draft_post and returns the post id. Open the approval inbox, adjust wording if needed, and approve. Use schedule_post if you want a specific slot.
Example draft
fsnap 1.9.0 is out. - Snapshots now compress with zstd by default, about 40% smaller - fsnap diff understands renamed files - Fixed a crash on read-only mounts Welcome to our first-time contributors @mira@hachyderm.io and @tobi@fosstodon.org, thank you both. Release notes: codeberg.org/fsnap/fsnap/releases #Rust #OpenSource
Gotchas
- Publishing uses idempotency keys, so a retried request after a timeout does not produce a duplicate toot.
- Alt text is expected on the fediverse, and many people filter posts without it. The missing alt text guardrail flags drafts before they reach you.
- Read your instance rules on automated posting. Many ask that bot-driven accounts tick the automated account box in profile settings.
- Claude Code registers MCP servers per project by default. Add the server with --scope user if you want Mastodon drafting available in every repository.
- Character limit: 500 characters on a default Mastodon server. Each instance can raise it, so check yours.
- Links: Every URL counts as 23 characters, however long it is.
- Media per post: Up to 4 attachments on a default server.
- File sizes: Images up to 16 MB and video up to about 99 MB on a default install. Instances can set their own limits.
Frequently asked questions
Does Claude Code need the stdio server or HTTP?
Either works. HTTP at https://app.socialhandoff.com/mcp is simplest for the hosted app. The stdio server via npx -y socialhandoff-mcp suits a self-hosted instance on your machine.
Does Claude Code know my instance's character limit?
Not by itself. Tell it in the prompt or brand memory, and set the per-network length guardrail so drafts over your limit are flagged.
Is posting to Mastodon from an agent good etiquette?
It can be, if the account is labeled as automated where your instance asks for it, posts carry alt text, and a person reviews each post. The approval inbox covers the last part.