Prompt
Pipeline: retrieve this week's three most-starred issues from our GitHub repo, summarize the common theme, and call draft_post to write one Bluesky post asking the community for input on the theme. Network bluesky only. How to do it
- Mint a Bluesky agent key In https://app.socialhandoff.com, open Connections, connect your Bluesky account, then create an agent key scoped to Bluesky with draft permission only. Copy the key when it is shown; only its hash is stored.
- Install the MCP adapter Add langchain-mcp-adapters and create a MultiServerMCPClient with a streamable_http connection to https://app.socialhandoff.com/mcp and a bearer header.
- Load tools into the agent Call get_tools() and pass them to your agent. Keep the key scoped to Bluesky and draft so the model only sees what it needs.
- Run the pipeline Feed the chain its source material, let it call draft_post for Bluesky, and read the returned post id. Or skip MCP and POST to /v1/posts from a plain tool.
Example draft
Three of this week's most upvoted issues ask for the same thing in different words: a way to run migrations without downtime. Before we design it, we want to hear how you handle this today. Reply or join the discussion: github.com/acme/orm/discussions/210
Gotchas
- The 300 limit counts graphemes, so an emoji or accented letter counts as one. Anything longer should become a reply-chain thread, not a clipped post.
- Bluesky refuses images over 1 MB and allows at most 4 per post. Resize screenshots before the agent attaches them, and add alt text to each.
- Links, @handles, and #tags become clickable facets when the post publishes. Have the agent write the plain URL and handle, not markdown links.
- The adapter loads every tool the key allows. Scope the key to Bluesky and draft permission so the model cannot reach analytics or scheduling tools you did not plan for.
- Character limit: 300 graphemes per post. An emoji or an accented letter counts as 1 grapheme even if it uses several bytes.
- Media per post: Up to 4 images, or 1 video. Images and video cannot be mixed in one post.
- Image size: The AT Protocol image embed accepts blobs of about 1 MB each; the official app compresses larger photos. SocialHandoff checks for 1 MB per image.
- Video: Up to 3 minutes and 100 MB, MP4. SocialHandoff does not publish video to Bluesky.
Frequently asked questions
Do I have to use MCP with LangChain?
No. You can wrap POST /v1/posts in a plain LangChain tool, or use the TypeScript SDK. MCP saves you writing tool schemas.
How does a LangChain pipeline attach images to a Bluesky post?
Upload each image to /v1/media with its alt text, then pass the returned ids as mediaIds. Keep each file under 1 MB and use at most 4.
Is there a character counter for Bluesky?
Yes. The free Bluesky character counter on this site counts graphemes the way Bluesky does, and the length guardrail applies the same rule to every draft.