MCP (stdio) · Mastodon

A Claude Desktop Mastodon bot that asks first

Claude Desktop works well for the slower, more considered posts the fediverse rewards. Ask it to help you explain a decision, share a lesson, or open a discussion, and SocialHandoff saves the result as a Mastodon draft through MCP. Claude can add a content warning, alt text for an attached image, and CamelCase hashtags at the end, the conventions Mastodon readers expect. Every toot waits in the approval inbox until you approve it.

Prompt

Help me write a Mastodon post explaining why our open-source project is dropping support for Node 18 in the next minor release. Be direct and kind, mention the security end-of-life date, add a CW 'maintenance news', and end with #NodeJS #OpenSource. Keep it under 500 characters.

How to do it

  1. 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.
  2. Add the stdio server Open claude_desktop_config.json and add an mcpServers entry that runs npx -y socialhandoff-mcp with your instance URL and the Mastodon key. The key-mint dialog prints this block ready to paste.
  3. Restart and check the tools Quit Claude Desktop completely and reopen it. The tools menu should list draft_post, schedule_post, and preview_posts.
  4. Draft from the conversation Ask Claude for the Mastodon post. It calls draft_post, then preview_posts so you see the approval card inline. Approve or edit it in the inbox on desktop or phone.

Example draft

CW: maintenance news

We are dropping Node 18 support in the next minor release. Node 18 reached end of life in April 2025 and no longer gets security fixes, and keeping it in CI has been blocking dependency updates for months.

If you are stuck on 18, the current release line will keep getting security patches until the end of the year. Questions welcome in the replies.

#NodeJS #OpenSource

Gotchas

  • 500 characters is only the default. Many instances allow more or less, so set the per-network length guardrail to your server's real limit.
  • 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.
  • Claude Desktop reads its config only at launch. After editing claude_desktop_config.json, quit the app fully, not just the window, or the tools will not appear.
Mastodon
  • 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.
Mastodon scheduler with approval for any instance

Frequently asked questions

Can Claude Desktop publish to Mastodon by itself?
No. With a draft-only key, Claude Desktop can create and preview Mastodon posts but not publish them. You approve in the inbox, or promote the agent on the trust ladder once it has a clean record.
Can Claude Desktop add a content warning to a Mastodon post?
Ask for one and the agent writes the warning as the opening line of the draft. Check it in the inbox preview before you approve.
Which Mastodon instances work?
Any Mastodon server. You enter your instance URL, sign in through that server's OAuth screen, and choose the account the agent drafts for.

Let your agents post. Keep the final say.

Connect your first agent in minutes. Every draft waits in your inbox until you approve it.

14 days free. No card required.

The hosted version is opening soon

Leave your email and we will send one message when hosted accounts open, with your 14-day trial ready. Want it today? Self-host it free from the repo.

Start free trial