# Connect Hermes Agent to TikTok

Source: https://postgale.com/guides/hermes/tiktok

Yes, Hermes Agent can post to TikTok through Postgale. Create a Postgale API key with approval on and add https://postgale.com/mcp to Hermes Agent as an MCP server with an Authorization header, connect your TikTok account in Postgale once, and Hermes Agent can video and photo posts with creator settings, plus video analytics. A person can be required to approve every post, reply and message before it goes out.

## Can Hermes Agent post to TikTok?

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. Hermes Agent does not reach TikTok on its own; with Postgale connected it gets tools for the TikTok accounts you connected and nothing else.

| Task | What Postgale does |
| --- | --- |
| Publish video | Direct Post from a URL with title (up to 2,200 characters), privacy level, comment / duet / stitch toggles and the branded-content disclosures TikTok requires. |
| Publish photos | 1 to 35 photos with a title (90 characters), description (4,000) and cover photo. |
| Creator settings | Reads the creator’s allowed privacy levels and interaction defaults before every publish, so the agent only offers valid options. |
| Status | Polls TikTok until the post is live or failed and reports the TikTok video id and share URL. |
| Analytics | The account’s public videos with views, likes, comments and shares; profile information. |

## What do you need?

- A TikTok account; the creator signs in once with TikTok and grants video publishing.
- A Postgale workspace, and a sign-in or an API key for the agent.
- A video (MP4) or 1 to 35 photos on a public HTTPS URL that TikTok accepts (TikTok verifies the media domain).
- Hermes Agent, set up as below (Nous Research’s agent, with the MCP server or a skill and an API key).

## Step 1: connect your TikTok account

1. Create a Postgale workspace and open Dashboard → Accounts.
2. Choose Connect TikTok and sign in with the account you own, on the platform’s own page. Postgale stores the tokens encrypted and refreshes them.

## Step 2: connect Hermes Agent 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. Make the key available to Hermes Agent as a secret, for example an environment variable `POSTGALE_API_KEY` on the machine it runs on.

## Step 2: add Postgale as an MCP server

Declare a remote (HTTP) MCP server in Hermes Agent’s configuration with these values. The file and key names depend on your Hermes Agent version; its documentation shows where MCP servers go.

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

Restart the agent so it loads the server, then ask it which tools it has from Postgale. It should list tools such as `list_accounts`, `create_post`, `list_comments` and `send_message`.

## What can I ask Hermes Agent to do on TikTok?

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

> Ask your agent: “Upload this video to TikTok with the caption “Behind the scenes of the fall shoot”. I’ll choose the privacy setting.”

> Ask your agent: “Write three caption options for this TikTok clip and save the best one as a draft.”

> Ask your agent: “How did our last five TikTok videos do? Show views and likes.”

POST /api/v1/posts (TikTok):
```json
{
  "content": "Three fabrics, one cut.",
  "platforms": [
    {
      "accountId": "acc_tiktok",
      "platformSpecificData": {
        "mediaUrl": "https://media.example.com/fall-drop.mp4",
        "privacyLevel": "PUBLIC_TO_EVERYONE",
        "disableComment": false,
        "disableDuet": true,
        "disableStitch": true
      }
    }
  ],
  "publishNow": true
}
```

## Which TikTok rules does Postgale enforce?

- Privacy level is mandatory and must be one of the levels TikTok returns for that creator. There is no default.
- Comment, duet and stitch are off unless the person turns them on, as TikTok’s guidelines require. Stitch stays off when the creator’s settings disable it.
- Branded content cannot be posted as private. Postgale rejects that combination before calling TikTok.
- Media must come from a URL prefix TikTok has verified for the app; unverified URLs are refused early with the reason.
- Until TikTok has audited the app, TikTok only allows private posts, to private accounts, for a limited number of creators per day. Postgale applies that rule and explains it instead of letting the post fail silently.
- Access tokens last 24 hours and refresh tokens rotate; Postgale refreshes before expiry and stores the rotated token.

## 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 TikTok through Postgale?

- Read or reply to TikTok comments, or send TikTok messages. Postgale’s TikTok integration covers publishing and video analytics.
- Publish publicly from an app TikTok has not audited yet. That restriction is TikTok’s and applies to every tool.
- Post from a URL on a domain TikTok has not verified for the app.

## Questions

### Can Hermes Agent post to TikTok?

Yes, Hermes Agent can post to TikTok through Postgale. Create a Postgale API key with approval on and add https://postgale.com/mcp to Hermes Agent as an MCP server with an Authorization header, connect your TikTok account in Postgale once, and Hermes Agent can video and photo posts with creator settings, plus video analytics. A person can be required to approve every post, reply and message before it goes out.

### Does Hermes Agent see my TikTok password or tokens?

No. The account owner signs in on the platform’s own page once, and Postgale stores the resulting tokens encrypted. Hermes Agent only holds a Postgale API key or sign-in, which you can revoke at any time.

### Can I approve what Hermes Agent sends to TikTok 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; Hermes Agent’s own access cannot approve.

### Can Hermes Agent schedule TikTok 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

- [Hermes Agent guide](https://postgale.com/guides/hermes)
- [TikTok for AI agents](https://postgale.com/integrations/tiktok)
- [Hermes Agent and Instagram](https://postgale.com/guides/hermes/instagram)
- [Hermes Agent and Facebook](https://postgale.com/guides/hermes/facebook)
