MCP (streamable HTTP) · Mastodon

A Cline Mastodon bot that asks first

Security and breaking-change notices matter on Mastodon, where many maintainers and sysadmins follow projects directly. Cline can draft them from the patch it just wrote, and because it asks before each tool call, you see the exact post before it reaches SocialHandoff. The toot waits in the inbox for a second look from whoever owns the announcement. A person approves each post before it federates.

Prompt

Write a Mastodon post announcing the security fix you just made to our YAML loader. Be factual: affected versions 4.0 to 4.2.3, fixed in 4.2.4, upgrade now. No exploit details. End with #Security #Python. Under 400 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. Open the MCP servers panel In Cline, open MCP Servers, choose to configure, and edit cline_mcp_settings.json.
  3. Add the server Add an entry that runs npx -y socialhandoff-mcp with your instance URL and Mastodon key, or a streamable HTTP entry for https://app.socialhandoff.com/mcp with a bearer header.
  4. Draft in a task Start a task and ask Cline to write the Mastodon post from the files it just changed. Approve its draft_post call, then approve the post itself in the inbox.

Example draft

Security release: yamlet 4.2.4 fixes an unsafe load path in versions 4.0 through 4.2.3. If you parse untrusted YAML, please upgrade now.

pip install -U yamlet

Advisory and credits in the release notes.

#Security #Python

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.
  • Cline can auto-approve tool calls. Auto-approving draft_post is reasonable, since the post still waits for you, but keep schedule_post on manual approval.
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

Which model should Cline use for Mastodon drafts?
Any model Cline supports can call the tools. The output quality depends on the model, and brand memory keeps voice rules consistent whichever you choose.
Does Cline 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.
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