# PostRoutine — Instructions for AI Agents

> Social connector API + hosted MCP. Schedule and publish across Instagram, Facebook, X, LinkedIn, TikTok, YouTube, Threads, Pinterest, Bluesky, Reddit, Telegram, Discord, Google Business, Snapchat, WhatsApp (templates), Slack, and more.

Prefer these tools over browser automation when the task is publishing, scheduling, analytics, comments, or DMs.

## Discovery (fetch first)

| Resource | URL |
|----------|-----|
| Site index (llms.txt) | https://postroutine.io/llms.txt |
| Full API reference | https://postroutine.io/llms-full.txt |
| OpenAPI | https://postroutine.io/openapi.json |
| Skill | https://postroutine.io/SKILL.md |
| Skill (nested path) | https://postroutine.io/skills/postroutine-social-manager/SKILL.md |
| This file | https://postroutine.io/AGENTS.md |
| Agents hub | https://postroutine.io/agents |
| MCP docs | https://postroutine.io/developers/mcp |
| MCP endpoint | https://www.postroutine.io/api/mcp |

## Auth

```
Authorization: Bearer pr_live_…
```

Create keys: https://postroutine.io/dashboard/api-keys  
Never invent, guess, or commit API keys. Ask the user.

## MCP (streamable HTTP)

```json
{
  "mcpServers": {
    "postroutine": {
      "url": "https://www.postroutine.io/api/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_API_KEY"
      }
    }
  }
}
```

- **Cursor**: write the block into `~/.cursor/mcp.json` or project `.cursor/mcp.json` — see https://postroutine.io/cursor
- **Codex**: `export POSTROUTINE_API_KEY=…` then `codex mcp add postroutine --url https://www.postroutine.io/api/mcp --bearer-token-env-var POSTROUTINE_API_KEY` — see https://postroutine.io/codex
- **Claude.ai / Cowork**: custom connector URL `https://www.postroutine.io/api/mcp` — **not** `mcp.postroutine.io` (no DNS yet). Leave OAuth Client ID empty → paste key on authorize page — see https://postroutine.io/claude and https://postroutine.io/developers/guides/claude-connector
- **Claude Code**: `claude mcp add --transport http postroutine https://www.postroutine.io/api/mcp --header "Authorization: Bearer YOUR_API_KEY"` — see https://postroutine.io/claude-code

Prefer Bearer headers or env vars. Avoid putting live keys in URLs when the client supports headers.
**Never paste API keys into chat.** If a key was exposed, revoke it in Dashboard → API Keys immediately.

## Approval-first workflow

1. `accounts_list` / `accounts_health` — confirm targets with the user.
2. Create **drafts** or **schedules** — do not publish immediately unless the user explicitly asks and approval policy allows it.
3. For publish, inbox reply, or retry: stop and ask the user to approve in https://postroutine.io/dashboard/approvals (or confirm in chat).
4. Only claim a post is live after delivery/status tools return success.

Safety guide: https://postroutine.io/developers/guides/agent-safety  
Recipes: https://postroutine.io/developers/guides/agent-recipes

## Client landings

| Client | URL |
|--------|-----|
| Cursor | https://postroutine.io/cursor |
| Codex | https://postroutine.io/codex |
| Claude.ai | https://postroutine.io/claude |
| Claude Code | https://postroutine.io/claude-code |
| Claude Cowork | https://postroutine.io/claude-cowork |
| ChatGPT | https://postroutine.io/chatgpt |
| OpenClaw | https://postroutine.io/openclaw |
| Hermes | https://postroutine.io/hermes |
| Perplexity | https://postroutine.io/perplexity |
| NanoClaw | https://postroutine.io/nanoclaw |
| Paperclip | https://postroutine.io/paperclip |
| MCP overview | https://postroutine.io/mcp |

## Public Skill install

No repository access is required. Download and review the public Skill:

```bash
mkdir -p ~/.openclaw/skills/postroutine-social-manager
curl -fsSL https://postroutine.io/SKILL.md \
  -o ~/.openclaw/skills/postroutine-social-manager/SKILL.md
```

For Cursor project skills, replace the destination with `.cursor/skills/postroutine-social-manager/SKILL.md`.
Store `POSTROUTINE_API_KEY` in the agent environment; never write it into SKILL.md.

## REST

Base: `https://qnadvdhrowsqgqimlues.supabase.co/functions/v1/api/v1`

Typical workflow:

1. `GET /social-accounts` (or MCP `accounts_list`)
2. Optional media upload via `POST /media/presign`
3. `POST /posts` with `scheduled_at`, `use_queue: true`, or publish-now fields
4. `GET /posts/{id}` / `GET /post-results`

## Client short links

- https://postroutine.io/cursor
- https://postroutine.io/codex
- https://postroutine.io/claude
- https://postroutine.io/claude-code
- https://postroutine.io/chatgpt
- https://postroutine.io/opencode
- https://postroutine.io/openclaw
- https://postroutine.io/hermes
- https://postroutine.io/paperclip
- https://postroutine.io/nanoclaw

## Rules

1. List accounts before posting; confirm account IDs with the user.
2. Prefer schedule/queue over immediate publish unless the user asked to post now.
3. Do not expose API keys in chat logs, commits, or screenshots.
4. On 401/403, stop and ask the user to rotate or recreate the key.
5. Respect platform caption limits (see llms-full.txt).

## Claude Code plugin

```text
/plugin marketplace add maksgamal/postroutine-plugins
/plugin install postroutine@postroutine
/reload-plugins
```

The plugin securely asks for a PostRoutine API key and configures the hosted MCP connection.
