# Connect OpenClaw to Bluesky

Source: https://postgale.com/guides/openclaw/bluesky

Yes, OpenClaw can post to Bluesky through Postgale. Create a Postgale API key with approval on and add https://postgale.com/mcp to OpenClaw as a remote MCP server with an Authorization header (or use a skill that calls the REST API), connect your Bluesky account in Postgale once, and OpenClaw can posts, threads, replies, images, video and link cards. A person can be required to approve every post, reply and message before it goes out.

## Can OpenClaw post to Bluesky?

Postgale is the secure layer for AI agents on social media. MCP (Model Context Protocol) is the open standard that lets AI assistants such as Claude and Cursor use outside tools. An MCP server is what they connect to. OpenClaw does not reach Bluesky on its own; with Postgale connected it gets tools for the Bluesky accounts you connected and nothing else.

| Task | What Postgale does |
| --- | --- |
| Publish | Posts up to 300 characters with clickable links, mentions and hashtags; up to 4 images or one video with alt text; a link card for the first link; scheduling. |
| Threads and replies | A thread of up to 25 posts in one request, or a reply to any Bluesky post. |
| Delete | Remove a post it published. |

## What do you need?

- A Bluesky account and an app password (Settings → Privacy and security → App passwords). Never your account password.
- A Postgale workspace, and a sign-in or an API key for the agent.
- Optional images or a video on a public HTTPS URL (upload them with `upload_media`).
- OpenClaw, set up as below (A remote MCP server or a skill that calls the REST API, with an API key).

## Step 1: connect your Bluesky account

1. In Bluesky, open Settings → Privacy and security → App passwords and add one named Postgale.
2. Create a Postgale workspace, open Dashboard → Accounts → Bluesky and enter your handle and the app password.
3. Connect your AI tool: add `https://postgale.com/mcp` in [ChatGPT](https://postgale.com/guides/chatgpt), [Claude](https://postgale.com/guides/claude) or [Cursor](https://postgale.com/guides/cursor) and sign in to Postgale, or create a key under Dashboard → API keys for [n8n](https://postgale.com/guides/n8n) or your own code.
4. Ask the agent for a draft first. Turn on approval in the dashboard if a person should sign off before anything goes live.

From your own code, `POST /api/v1/connect/bluesky` with the handle and app password connects the account directly. Postgale stores the app password encrypted and renews the session by itself.

## Step 2: connect OpenClaw to Postgale

1. In Postgale, open Dashboard → API keys, create a key and copy it (it starts with `sk_` and is shown once). Connect the social accounts the agent may use under Dashboard → Accounts.
2. An agent that runs on its own, on a schedule or from a chat app, should use a key with approval required: create the key, then turn on approval for it under Dashboard → API keys. Everything it wants to publish, reply or send then waits for a person.
3. Store the key where OpenClaw reads secrets, for example an environment variable `POSTGALE_API_KEY` on the machine it runs on. Do not paste it into a chat.

## Step 2a: add Postgale as an MCP server

Add a remote MCP server in OpenClaw’s configuration with these values. Field names and file locations depend on your OpenClaw version and setup; check its documentation for where MCP servers are declared.

Postgale MCP server:
```text
URL:        https://postgale.com/mcp
Transport:  Streamable HTTP
Header:     Authorization: Bearer sk_…
```

Clients that take the common `mcpServers` JSON shape accept it like this:

mcpServers entry:
```json
{
  "mcpServers": {
    "postgale": {
      "url": "https://postgale.com/mcp",
      "headers": {
        "Authorization": "Bearer sk_…"
      }
    }
  }
}
```

## What can I ask OpenClaw to do on Bluesky?

Check the connection first: “Which Bluesky accounts are connected in Postgale?” Then, in plain language:

> Ask your agent: “Post this announcement to Bluesky with the link to the launch post as a card.”

> Ask your agent: “Split this paragraph into a Bluesky thread, 300 characters per post at most. Drafts only.”

> Ask your agent: “Show me today’s Bluesky mentions and draft replies.”

POST /api/v1/posts (Bluesky):
```json
{
  "content": "ignored",
  "platforms": [
    {
      "accountId": "acc_bsky",
      "platformSpecificData": {
        "threadItems": [
          {
            "content": "Release 2.4 is out 🎉",
            "mediaUrl": "https://media.example.com/screenshot.png",
            "altText": "The new dashboard"
          },
          {
            "content": "Faster sync and dark mode."
          },
          {
            "content": "Full changelog: https://example.com/changelog"
          }
        ]
      }
    }
  ],
  "publishNow": true
}
```

## Which Bluesky rules does Postgale enforce?

- Text is limited to 300 characters as Bluesky counts them (an emoji counts once); a longer post is refused before it reaches Bluesky.
- Images: JPEG, PNG, WebP or GIF, up to 1 MB each and 4 per post. Video: one MP4 up to 100 MB and 3 minutes. Images and video are not mixed.
- Mentions of handles that do not exist stay plain text instead of breaking the post.
- Only app passwords are accepted. If you delete it in Bluesky, the account is marked as needing reconnection and your webhook hears about it.
- When Bluesky asks to slow down, Postgale waits until the limit resets before retrying.

## How do I keep a person in the loop?

- Approval: tick “Hold posts from this app for approval” when you sign in, or in the Postgale dashboard require approval for the API key the agent uses (or for the whole workspace, or one account). Posts then wait as pending approval; comment replies and moderation, direct messages, WhatsApp sends and edits to live posts wait in the same queue. A person approves, edits or rejects each one in Dashboard → Approvals; the agent’s own key or sign-in cannot approve.
- Tool annotations: every Postgale tool declares whether it only reads, writes, or publishes live, deletes or spends. Clients that honour annotations ask before destructive tools run.
- Audit log: every write the agent makes is recorded with the key or the connected app, the action and the time.
- Revoking: each sign-in appears under Dashboard → Connected apps and each key under Dashboard → API keys; either can be revoked at any time.

## What can’t an agent do on Bluesky through Postgale?

- Edit a post. Bluesky posts cannot be edited; delete and post again instead.
- Read likes, reposts or views yet.
- Send direct messages.

## Questions

### Can OpenClaw post to Bluesky?

Yes, OpenClaw can post to Bluesky through Postgale. Create a Postgale API key with approval on and add https://postgale.com/mcp to OpenClaw as a remote MCP server with an Authorization header (or use a skill that calls the REST API), connect your Bluesky account in Postgale once, and OpenClaw can posts, threads, replies, images, video and link cards. A person can be required to approve every post, reply and message before it goes out.

### Does OpenClaw see my Bluesky password or tokens?

No. The account owner signs in on Postgale with a Bluesky app password once, and Postgale stores the resulting tokens encrypted. OpenClaw only holds a Postgale API key or sign-in, which you can revoke at any time.

### Can I approve what OpenClaw sends to Bluesky before it goes live?

Yes. Turn on approval for the API key it uses, the account or the whole workspace. Posts, replies and messages then wait in the Postgale dashboard until a person approves, edits or rejects them; OpenClaw’s own access cannot approve.

### Can OpenClaw schedule Bluesky posts?

Yes. Ask for a date and time; Postgale stores the post as scheduled and publishes it then, and reports the result (post.published or post.failed) on your webhook and in get_post.

## Related

- [OpenClaw guide](https://postgale.com/guides/openclaw)
- [Bluesky for AI agents](https://postgale.com/integrations/bluesky)
- [OpenClaw and Instagram](https://postgale.com/guides/openclaw/instagram)
- [OpenClaw and Facebook](https://postgale.com/guides/openclaw/facebook)
