MCP (streamable HTTP) · Mastodon

A VS Code Mastodon bot that asks first

Documentation changes rarely get announced, yet on Mastodon a good docs update is exactly the kind of post people boost. In VS Code, Copilot's agent mode can read the pages you changed and draft a short toot through SocialHandoff. It can include alt text for a screenshot of the new page and keep the whole post within your instance's limit. You review each post in the inbox before it reaches your followers.

Prompt

Summarize what changed in docs/ on this branch as a Mastodon post for our project account. Emphasize the rewritten getting-started page, include alt text for screenshot.png describing the new quickstart layout, and end with #Documentation #OpenSource.

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. Create .vscode/mcp.json Add a server of type http with url https://app.socialhandoff.com/mcp. Use an input variable for the Mastodon key so VS Code prompts for it once and stores it securely.
  3. Start the server Open the MCP server list from the Command Palette and start it. Copilot Chat in agent mode now shows the tools.
  4. Ask in agent mode Switch Copilot Chat to agent mode and ask for the Mastodon draft. Confirm the draft_post call when prompted; the post then waits in the approval inbox.

Example draft

We rewrote our getting-started guide from scratch. It now takes you from install to a working project in 4 steps, with copy-paste commands for macOS, Linux, and Windows, and a troubleshooting box at each step.

Feedback very welcome, especially if you are new to the project.

[Image alt text: The new quickstart page showing four numbered steps with code blocks and a yellow troubleshooting note beside step 2.]

#Documentation #OpenSource

Gotchas

  • Use CamelCase hashtags such as #OpenSource so screen readers say them correctly, and a content warning for long logs or spoilers.
  • 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.
  • VS Code only calls MCP tools from agent mode. In ask or edit mode, Copilot Chat will describe a Mastodon post but never call draft_post.
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

Does this need GitHub Copilot?
The MCP tools run inside Copilot Chat's agent mode in VS Code, so you need Copilot enabled. Any extension that speaks MCP, such as Cline, works too.
Does VS 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.

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