Use PostSail from Claude Code
Add the PostSail MCP server to Claude Code with one command, then ask your assistant to post. It checks every post with a dry run first and posts your text to X and Bluesky.
Before you start
- Claude Code and Node.js 18.17 or newer. The server runs on your computer with
npx. - A PostSail workspace with your X and Bluesky accounts connected. You do not need your own X developer app.
- An API key limited to the accounts the assistant will use. In the dashboard open API keys > New key. Under Which accounts it can post to pick Accounts I choose and tick only those accounts. Start with the
sandboxaccount: posts to it go nowhere, but they run through the real queue and checks.
1. Add PostSail to Claude Code
Run this in a terminal, with your key in place of your-key:
claude mcp add postsail --env POSTSAIL_API_KEY=your-key -- npx -y github:turgutsonmez/postsail-examples#v0.1.2The #v0.1.2 tag pins the code you install. The server is one short file; you can read it on GitHub before you use it.
With this command the server only does dry runs: it checks posts and publishes nothing.
2. Let it publish
Publishing is off until you turn it on with POSTSAIL_MCP_ALLOW_PUBLISH=1. Add the server with this command instead (if you already added it, run claude mcp remove postsail first):
claude mcp add postsail --env POSTSAIL_API_KEY=your-key --env POSTSAIL_MCP_ALLOW_PUBLISH=1 -- npx -y github:turgutsonmez/postsail-examples#v0.1.2POSTSAIL_MCP_MAX_PUBLISH_PER_HOUR can lower how many posts the server publishes an hour (default and maximum 10).
3. Dry run first, then publish
- You ask the assistant to post. It calls
create_post, which is a dry run: every check runs (platform rules, length, blocked words) and nothing is published. The result shows the final text for each account and, if every check passed, a confirmation code. - The assistant shows you the result.
- If you ask it to publish, it calls
create_postagain with exactly the same content and that code. The code works once and for 30 minutes; changed content needs a new dry run.
The code is also sent as the request's idempotency key, so a repeated call cannot post twice. Temporary errors on a platform are retried automatically.
Things to ask
- “Which PostSail accounts can you post to?”
- “Dry run a post to brand-x and brand-bluesky: ‘Our new clip is out.’ Put https://example.com/clip in a first comment on X and in the text on Bluesky.”
- “Looks good, publish it.”
- “Schedule the same post for tomorrow at 9:00 my time.”
- “Show my last five posts and any errors.”
- “Cancel the scheduled post.”
Tools
| Tool | What it does | Changes anything? |
|---|---|---|
list_accounts | Accounts this key can post to | No |
list_posts | Recent posts and the result on each account | No |
get_post | One post: status, link and error on each account | No |
create_post | Dry run (default), or publish with a confirmation code | Only when publishing is on |
cancel_post | Cancel a scheduled or queued post | Only when publishing is on |
What works today
- From an assistant: text posts to X and Bluesky.
- Video from an assistant is not available yet: the server cannot upload a file. Post videos, YouTube Shorts included, through the API or the dashboard.
- PostSail as a whole posts to X, Bluesky and YouTube Shorts today. The other platforms and where their reviews stand: platform status.
Limits
- Each API key can create 30 new posts an hour, and this server publishes at most 10 an hour. A post can go to at most 10 accounts.
- Dry runs and the
sandboxaccount do not count against your plan. - Plans: Starter $19/month (10 accounts), Pro $49/month (50 accounts); 7-day free trial.
Keep the key safe
- The server reads the key only from its environment. The key is never in a tool's input or output, and it is sent only to
https://postsail.app/api. - The server can only list accounts, read posts, create posts and cancel them. It cannot create keys, change members or connect accounts.
- Give the assistant its own key, limited to its accounts. Then you can revoke it without touching your other apps.
- With publishing on, do not set Claude Code to run
create_postwithout asking you: that question is your last check before anything goes out. - If the key leaks: in the dashboard open API keys, press Revoke next to the key, then Yes, revoke. The app using the key stops posting right away; this cannot be undone. Create a new key and add the server again.
Claude Desktop and other MCP clients
In Claude Desktop, add this to claude_desktop_config.json. Other MCP clients that use the same fields take the same block. To let it publish, add "POSTSAIL_MCP_ALLOW_PUBLISH": "1" to env.
{
"mcpServers": {
"postsail": {
"command": "npx",
"args": ["-y", "github:turgutsonmez/postsail-examples#v0.1.2"],
"env": {
"POSTSAIL_API_KEY": "your-key"
}
}
}
}