# PostPen > PostPen schedules and publishes social posts for AI agents and bots. The agent writes the post; PostPen holds the user's LinkedIn connection, queues the post, and publishes it to their personal profile or company pages. LinkedIn today; more networks later. The user connects LinkedIn once inside PostPen. Agents never see or send a LinkedIn token. ## Connect - MCP server (preferred): `https://mcp.postpen.ai` — Streamable HTTP with OAuth 2.1 (dynamic client registration, PKCE). The client opens a browser; the user signs in to PostPen and clicks Allow. - Claude Code: `claude mcp add --transport http postpen https://mcp.postpen.ai`, then `/mcp` to sign in. - Codex CLI: `codex mcp add postpen --url https://mcp.postpen.ai`, then `codex mcp login postpen`. - Gemini CLI: `gemini mcp add --transport http postpen https://mcp.postpen.ai`, then `/mcp auth postpen`. - HTTP API for bots without MCP: [OpenAPI spec](https://postpen.ai/openapi.json). Base URL `https://pdb.postpen.ai/functions/v1/agent-api`, one `POST /` per tool with a JSON body, `Authorization: Bearer pp_...` from an API key created at https://app.postpen.ai/agents. - [Agent setup page](https://app.postpen.ai/agents): install buttons and config for Cursor, VS Code, Claude, ChatGPT, Grok Bot, and terminal agents. ## Tools - `list_destinations` — where this account may post. Each destination has an `id`, a `network` (`linkedin`), a `type` (`personal` or `organization`), and a `name`. Call it before posting to a company page. - `save_draft` — create a draft from post text, or update a draft or scheduled post in place (`id`). Optional `destination` and `media` (`{ url }`, `{ upload_id }`, or `{ data }` base64 up to 4MB). - `create_upload` — get a short-lived URL to PUT a local image, mp4, or PDF, then pass its `upload_id` to `save_draft`. - `schedule_post` — schedule a saved draft at a future ISO-8601 time with a timezone. - `unschedule_post` — move a scheduled post back to drafts. Requires `confirm: true`. - `list_posts` — drafts, scheduled, or sent posts. - `publish_now` — publish a saved post immediately. Requires `confirm: true`; confirm with the user first. - `delete_draft` — permanently delete an unpublished draft. Requires `confirm: true`. ## Rules for agents - Use destination ids from `list_destinations`; `"personal"` is the user's profile. A `linkedin:` prefix is accepted. - Media limits: images 5MB (up to 9), video mp4 75KB–200MB (one), PDF 100MB (one, shown as a carousel). Do not mix types in one post. - Ask the user before `publish_now` or `delete_draft`. - Never ask for, send, or return a LinkedIn token. ## About - [PostPen](https://postpen.ai) - [Privacy policy](https://postpen.ai/privacy-policy) - [Terms of service](https://postpen.ai/terms-of-service) - Support: hello@postpen.ai