Prompt
Crew: the tracker agent lists issues labeled 'good first issue' opened this month, the writer drafts a Mastodon post inviting new contributors with 3 examples and the label link, and the reviewer checks it is under 500 characters. Writer calls draft_post for mastodon. 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.
- Wrap the server Use MCPServerAdapter from crewai-tools with a streamable-http transport at https://app.socialhandoff.com/mcp and the bearer key in the headers.
- Give tools to one agent Assign the adapter's tools to the crew member that writes Mastodon copy. Researcher and editor agents do not need them.
- Kick off the crew Run the crew. The writer calls draft_post as its last task and returns the post id, which a person then approves in the inbox.
Example draft
Looking for a first open-source contribution? We tagged some friendly issues this month: - Add a --quiet flag to the export command - Improve the error when the config file is missing - Translate the welcome screen into Portuguese All labeled good-first-issue, and a maintainer will pair with you on the first PR: codeberg.org/acme/notely/issues #OpenSource #GoodFirstIssue
Gotchas
- 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.
- Use CamelCase hashtags such as #OpenSource so screen readers say them correctly, and a content warning for long logs or spoilers.
- A reviewer agent inside the crew is not a substitute for the approval inbox. Agent keys cannot approve, so a person still signs off on every Mastodon post.
- 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
Can the crew schedule a Mastodon post for a set time?
Yes, if the key has schedule permission. The writer calls schedule_post with a time and timezone, and the post still waits for approval unless the agent has been promoted.
Can a CrewAI agent post to more than one Mastodon account?
Yes. Connect each account, scope the key to Mastodon, and pass accountIds to target one or several. Each target is approved and published separately.
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.