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
- 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.
- 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.
- Refresh the servers Refresh MCP servers in the Cascade panel so the new tools load.
- 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.
- 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
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.