# Connect OpenClaw to your social media accounts

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

Yes, an OpenClaw agent can post to social media through Postgale. Create a Postgale API key with approval turned on, then either add https://postgale.com/mcp to OpenClaw as a remote MCP server with an Authorization header, or give it a skill that calls the Postgale REST API. The agent can then draft, schedule and publish on Instagram, Facebook, Threads, TikTok, Bluesky and Mastodon and answer comments and messages, while a person approves what goes out.

## Can OpenClaw post to social media?

Postgale is the secure layer for AI agents on social media. OpenClaw is an open-source personal agent that runs on your own machine or server and that people often talk to from a chat app. That makes it a good fit for routine social media work, and a reason to keep a person in the loop: it acts while nobody is watching.

Once connected, the agent can work on [Instagram](https://postgale.com/integrations/instagram), [Facebook Pages](https://postgale.com/integrations/facebook), [Threads](https://postgale.com/integrations/threads), [TikTok](https://postgale.com/integrations/tiktok), [Bluesky](https://postgale.com/integrations/bluesky) and [Mastodon](https://postgale.com/integrations/mastodon), and answer customers on [WhatsApp](https://postgale.com/integrations/whatsapp). X, Telegram and Discord are coming soon.

## MCP server or skill?

| Route | Use it when | What OpenClaw gets |
| --- | --- | --- |
| Remote MCP server | Your OpenClaw setup can add remote (HTTP) MCP servers with a custom header. | All Postgale tools: accounts, media, posts, comments, messages, analytics, the approval queue. |
| Skill + REST API | You prefer skills, or MCP is not available in your setup. | The endpoints you describe in the skill, called with curl or any HTTP tool. |

Both routes use a Postgale API key (`sk_…`). OpenClaw usually runs where nobody can complete a browser sign-in, so the key is the practical choice.

## Step 1: create a key with approval on

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_…"
      }
    }
  }
}
```

## Step 2b: or give it a skill that calls the REST API

A skill is a short instruction file the agent loads when the task matches. This one keeps the agent on drafts unless told otherwise. Save it as `SKILL.md` in a `postgale` folder wherever your OpenClaw setup keeps skills:

postgale/SKILL.md:
```text
---
name: postgale
description: Draft, schedule and reply on our social accounts through Postgale. Drafts by default.
---
Use the Postgale REST API at https://postgale.com/api/v1 with the header
"Authorization: Bearer $POSTGALE_API_KEY". Never print the key.

1. GET /accounts to find account ids. Only use those accounts.
2. To attach an image or video, POST /media with {"url": "<public url>"} and use
   the returned publicUrl as platformSpecificData.mediaUrl.
3. POST /posts with {"content", "platforms": [{"accountId", "platformSpecificData"}]}.
   Without scheduledFor or publishNow it is a draft. Add scheduledFor (ISO 8601 with
   a time zone) only when asked for a time. Never set publishNow unless told to.
4. Send an x-request-id header made from the task, so a retry never posts twice.
5. If a post or action comes back as pending_approval, a person must approve it in
   the Postgale dashboard. Say so and do not retry.
```

The calls it describes, as you would run them yourself:

Terminal:
```bash
# List the accounts the agent may use
curl https://postgale.com/api/v1/accounts \
  -H "Authorization: Bearer $POSTGALE_API_KEY"

# Save a draft for Threads and Bluesky (no scheduledFor, no publishNow)
curl https://postgale.com/api/v1/posts \
  -H "Authorization: Bearer $POSTGALE_API_KEY" \
  -H "Content-Type: application/json" \
  -H "x-request-id: fall-drop-001" \
  -d '{"content":"The fall drop is live.","platforms":[{"accountId":"acc_threads"},{"accountId":"acc_bluesky"}]}'
```

Every endpoint and field is in the [REST API reference](https://postgale.com/docs/api) and the [OpenAPI document](https://postgale.com/api/v1/openapi.json).

## Step 3: check the connection

> Ask your agent: “Which social accounts are connected in Postgale? Then draft a Bluesky post announcing Friday’s opening hours, as a draft only.”

The agent should list the accounts and come back with a draft id. Open the Postgale dashboard to see the draft; if approval is on, anything scheduled or published waits under Approvals.

## 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 are the limits?

- Postgale does not ship an OpenClaw plugin or skill of its own; the setup above uses the standard MCP server and REST API.
- The agent only sees accounts their owner connected in Postgale; connecting happens in a browser through the platform’s own sign-in.
- Each platform’s rules still apply and Postgale enforces them: Instagram needs an image or video (JPEG for images), Threads allows 500 characters, Bluesky 300, Mastodon 500 by default, and TikTok needs a privacy level chosen from the creator’s options; direct TikTok posts from an agent always wait for a person to confirm the settings.
- Requests from one key are limited to 60 per minute by default.

## Questions

### Does Postgale work with OpenClaw?

Yes, with an API key: add https://postgale.com/mcp as a remote MCP server with an Authorization header, or give OpenClaw a skill that calls the Postgale REST API.

### Can OpenClaw publish without me checking?

Only if you allow it. Turn on approval for the key OpenClaw uses and every post, reply and message waits for a person in the Postgale dashboard. The key cannot approve its own work.

### Can I ask OpenClaw from Telegram to post to Instagram?

Yes, if your OpenClaw is reachable from Telegram. The chat app is how you talk to the agent; Postgale is how it reaches Instagram, Facebook, Threads, TikTok and the other connected accounts. Posting to Telegram itself through Postgale is not available yet; it is coming soon.

## Related

- [Hermes Agent guide](https://postgale.com/guides/hermes)
- [AI social media manager](https://postgale.com/use-cases/ai-social-media-manager)
- [REST API reference](https://postgale.com/docs/api)
- [Postgale vs Postiz](https://postgale.com/compare/postiz)
