MCP (streamable HTTP) · Mastodon

A Windsurf Mastodon bot that asks first

Fediverse developer communities value honest progress notes over polished announcements. Windsurf's Cascade can write them from your actual work: it reads the branch, notices what changed, and drafts a Mastodon post through SocialHandoff. It can put a longer technical explanation behind a content warning, the courtesy many instances expect for long posts. Every toot waits in the approval inbox until you approve it.

Prompt

Cascade, I spent today migrating our search from Elasticsearch to Postgres full-text search. Draft a Mastodon post about what worked and what I miss. Put the technical details behind a CW 'long dev notes'. Add #Postgres #WebDev at the end.

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. Edit mcp_config.json Open Windsurf's MCP settings and add a server with serverUrl https://app.socialhandoff.com/mcp and an Authorization header holding the Mastodon key. Or use the stdio form with npx -y socialhandoff-mcp.
  3. Refresh the servers Refresh MCP servers in the Cascade panel so the new tools load.
  4. Let Cascade draft Ask Cascade to summarize the branch you are on as a Mastodon post. It calls draft_post; you approve or send it back with edits from the inbox.

Example draft

CW: long dev notes

Moved our search from Elasticsearch to Postgres full-text search today. One less service to run.

What worked: tsvector columns with a GIN index, websearch_to_tsquery for user input, and ranking good enough for our 200k rows.

What I miss: typo tolerance. pg_trgm helps but it is not the same.

Would do it again for a project this size.

#Postgres #WebDev

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.
  • Windsurf loads MCP servers when Cascade starts. After changing mcp_config.json, refresh the servers or the Mastodon tools will not be offered.
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

Stdio or HTTP for Windsurf?
Both are supported. HTTP needs no local Node process. Stdio with npx -y socialhandoff-mcp is handy when your instance runs on the same machine.
Does Windsurf 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.
Can I post to several fediverse accounts at once?
Yes. Connect each Mastodon account, and a single draft can target several. Each target is published and retried on its own.

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