---
name: plansend
description: Draft, upload media, request human approval, schedule, and manage comments/metrics across 9 social networks (Instagram, Facebook, Threads, LinkedIn, Bluesky, Mastodon, TikTok, YouTube, Pinterest) via PlanSend MCP, zero-dependency CLI, or REST API with revision-safe human-in-the-loop approval links.
---

# PlanSend — AI Agent Social Publishing Skill

Use PlanSend to manage social media posts across connected brand channels while enforcing human sign-off before anything publishes.

## 1. Authentication & Environment

Create a workspace-scoped API key in PlanSend under **Developers -> API keys** (`read`, `write`, or `admin` scope).

```bash
export PLANSEND_API_KEY="ps_your_workspace_key"
# Optional override (defaults to https://plansend.io):
# export PLANSEND_URL="https://plansend.io"
```

Each API key is strictly bound to one brand workspace. Every action is logged in that workspace's audit trail.

## 2. Connect via MCP (Recommended)

PlanSend exposes a stateless Streamable HTTP MCP server with 24 tools at `https://plansend.io/mcp`.

### Claude Code
```bash
claude mcp add --transport http plansend https://plansend.io/mcp --header "Authorization: Bearer $PLANSEND_API_KEY"
```

### Cursor / Windsurf / OpenClaw
Add to `.cursor/mcp.json` (or your MCP client config; Windsurf uses `serverUrl`):
```json
{
  "mcpServers": {
    "plansend": {
      "url": "https://plansend.io/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_PLANSEND_API_KEY"
      }
    }
  }
}
```

### ChatGPT & OAuth 2.1 Clients
Add `https://plansend.io/mcp` as an MCP app connector. PlanSend handles OAuth 2.1 with PKCE and Dynamic Client Registration (`https://plansend.io/.well-known/oauth-protected-resource`) — no API key required.

### Claude Desktop / Codex (`mcp-remote` bridge)
```json
{
  "mcpServers": {
    "plansend": {
      "command": "npx",
      "args": ["-y", "mcp-remote", "https://plansend.io/mcp", "--header", "Authorization: Bearer YOUR_PLANSEND_API_KEY"]
    }
  }
}
```

## 3. Zero-Dependency CLI (Node 20+)

Download and run directly with zero npm dependencies:
```bash
curl -fsSL https://plansend.io/cli.mjs -o plansend.mjs && chmod +x plansend.mjs
# Or via npx:
npx plansend channels --json
```

Always pass `--json` when calling the CLI from an agent for structured output and clean exit codes.

```bash
# Inspect workspace & channels
./plansend.mjs whoami --json
./plansend.mjs channels --json

# Upload media by public HTTPS URL
./plansend.mjs media upload --url "https://example.com/photo.jpg" --alt "Product photo" --json

# Create a draft (revision 1 — never publishes)
./plansend.mjs draft create \
  --title "Launch post" \
  --body "Shipping today!" \
  --channels 12,15 \
  --media 99 \
  --json

# Send a no-login human review link
./plansend.mjs request-approval 481 --email reviewer@example.com --json

# Check approval status & current revision
./plansend.mjs posts get 481 --json

# Schedule once approved (uses workspace timezone if --timezone is omitted)
./plansend.mjs schedule 481 --revision 1 --at 2026-12-10T09:30 --json

# Cancel, inspect publishing jobs, or read metrics
./plansend.mjs cancel 481 --json
./plansend.mjs jobs --post-id 481 --json
./plansend.mjs metrics --limit 20 --json
```

## 4. REST API Fallback

Base URL: `https://plansend.io/api/v1` with `Authorization: Bearer $PLANSEND_API_KEY`.

```bash
curl -s https://plansend.io/api/v1/channels -H "Authorization: Bearer $PLANSEND_API_KEY"

curl -s -X POST https://plansend.io/api/v1/posts \
  -H "Authorization: Bearer $PLANSEND_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"title":"Launch post","body":"Shipping today!","channel_ids":[12,15]}'

curl -s -X POST https://plansend.io/api/v1/posts/481/request-approval \
  -H "Authorization: Bearer $PLANSEND_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"reviewer_email":"reviewer@example.com"}'
```

## 5. Human-in-the-Loop Approval Safety Workflow (Mandatory Rules)

Follow this exact sequence so an AI agent never publishes an unreviewed mistake:

1. **Discover context first**: Call `list_workspaces` (`whoami`) and `list_channels` (`channels`) to verify the brand, timezone, `require_approval`, and channel IDs.
2. **Draft, never publish directly**: Use `create_draft` (`draft create`) with optional `upload_media` (`media upload`). Drafts start at `revision: 1` and cannot go live.
3. **Request human sign-off**: Call `request_approval` (`request-approval <id>`) to generate a 7-day private `review_url`. Present the `review_url` directly to the human so they can tap **Approve** or **Request changes** in any browser without logging in. Only set `reviewer_email` when the user gave that address.
4. **Respect revision locking**: Always read `get_post` (`posts get <id>`) before editing, approving, or scheduling. Any edit via `update_draft` increments `revision` and revokes earlier approvals and review links. If you receive `409 stale_revision`, re-read the post before retrying.
5. **Gate external actions**: Only call `approve_post`, `schedule_post`, `publish-now`, `reply_to_comment`, `comment_on_post`, `private_reply`, or `send_message` when the human explicitly confirmed that action, wording, and schedule time. If a workspace enforces `require_approval`, scheduling an unapproved revision fails with `409 approval_required`.
6. **Handle ambiguous publish outcomes safely**: Never blindly retry a job in status `reconciliation_required` — tell the human to verify on the social network first.

## 6. MCP Tools Reference (24 Tools)

| Tool | Scope | Purpose |
| --- | --- | --- |
| `list_workspaces` | read | Return the connected brand workspace, IANA timezone, and whether approval is required before scheduling. |
| `list_channels` | read | List connected social channels (id, network, display name, status, is_demo). |
| `list_posts` | read | List posts filtered by status, channel_id, network, or UTC date range (from/to). |
| `get_post` | read | Fetch full post bundle: status, current revision, approved_revision, variants, media, approvals, comments, and jobs. |
| `list_jobs` | read | List publishing jobs newest first with status, attempts, run_at, external_url, and last_error. |
| `list_media` | read | List ready images and videos in the workspace media library. |
| `get_publish_health` | read | Queue counts by status plus the 25 most recent failed or reconciliation_required jobs. |
| `get_post_metrics` | read | Latest views, reach, likes, comments, shares, saves, plays, growth, and snapshot history for one post. |
| `list_metrics` | read | Latest per-post metrics across the workspace, filterable by since, network, and channel_id. |
| `ai_credits` | read | Monthly AI Assist credit allowance, usage, and remaining credits. |
| `list_comments` | read | Read live comments on a published Facebook, Instagram, or YouTube post (not stored). |
| `list_conversations` | read | Read live direct-message conversations on a connected Facebook Page or Instagram account. |
| `upload_media` | write | Upload an image (JPEG/PNG/GIF/WebP up to 8 MB) or video (MP4/MOV up to 200 MB) from a public HTTPS URL or chat file. |
| `create_draft` | write | Create a draft post (revision 1) across chosen channels with optional media_ids; never publishes. |
| `update_draft` | write | Edit title, body, channels, or media using the current revision; bumps revision and clears prior approvals/links. |
| `request_approval` | write | Move a draft to in_review and return a 7-day no-login review_url (optional passcode & reviewer_email). |
| `approve_post` | write | Approve an exact revision when acting on behalf of the approver. |
| `schedule_post` | write | Schedule an approved revision at local_datetime (YYYY-MM-DDTHH:mm) + IANA timezone. |
| `cancel_scheduled_post` | write | Cancel a scheduled post before the worker claims it. |
| `ai_assist` | write | Generate caption, headline, hashtags, rewrite, or shorten suggestions (uses 1 AI credit). |
| `reply_to_comment` | write | Post a public reply under a Facebook, Instagram, or YouTube comment. |
| `comment_on_post` | write | Add a top-level public comment to a published Facebook, Instagram, or YouTube post. |
| `private_reply` | write | Send one private message to a Facebook or Instagram commenter (within Meta's 7-day window). |
| `send_message` | write | Reply to a Facebook Page or Instagram DM within Meta's 24-hour messaging window. |

## 7. Links

- Full docs: https://plansend.io/developers
- Machine summary: https://plansend.io/llms.txt
- Live no-login review demo: https://plansend.io/demo/review
- Pricing: https://plansend.io/pricing
