How an AI Agent Schedules Social Media Posts

Short answer: an AI agent schedules social media posts by calling a scheduler that holds your connected accounts, through one of four paths: an MCP server (the agent calls tools such as schedule_post directly), a command-line tool, a REST API with a token, or a workflow node in n8n. With TimeToPost all four reach the same 15 networks, and drafts land in one human approval queue before anything goes live.

By the TimeToPost team. Last reviewed 2026-11-01.

This guide is for people who already use an AI agent or an automation tool and want it to handle posting without handing it raw social network credentials. It covers the connection steps for each path and what stays under human control.

Which path should an agent use?

Use MCP when an AI agent works interactively, and use the CLI, REST API or n8n when software or a workflow does the posting. All four act under your own account and active workspace, so plan limits and permissions are identical across them.

PathBest forHow it authenticatesDrafts for approvalDirect scheduling
MCP serverAI agents in any MCP clientBrowser OAuth, no API keyscreate_draftsschedule_post
CLI (npx timetopost)Agents with a shell, scripts, CIBrowser OAuth login or a tokentimetopost draftWith a token allowed to publish
REST APIYour own softwareBearer ttp_ tokenPOST /api/drafts/batchPOST /api/posts
n8n nodeWorkflows on self-hosted n8nttp_ token as an n8n credentialDraft, CreatePost, Schedule

Path 1: the MCP server

The MCP server is the shortest path for an AI agent, because the agent discovers the tools itself and you sign in once in a browser. The hosted endpoint is https://api.timetopost.co/mcp (MCP Streamable HTTP). Most clients accept it as:

{ "mcpServers": { "timetopost": { "url": "https://api.timetopost.co/mcp" } } }

On first use a browser opens: you enter your TimeToPost email, type the 6-digit code sent to you and click Approve access. The connection is revocable in Dashboard, Settings, API. Client-by-client setup is on the MCP page. A local stdio alternative runs with npx -y timetopost-mcp and a TIMETOPOST_API_TOKEN.

The server exposes 73 tools. The ones an agent uses to schedule a week of posts are:

  1. get_capabilities to read the map of platforms, lifecycles and approval rules before acting.
  2. list_integrations to see connected accounts and their connection health.
  3. get_optimal_times to read best posting times computed from the account's own engagement history.
  4. create_drafts for drafts that wait for human approval, or schedule_post to schedule directly.
  5. scheduler_status and list_posts to confirm everything published.

A request like "queue this week's launch posts at my best times" becomes one get_optimal_times call followed by one schedule_post call per post.

Path 2: the CLI

The CLI gives any agent with a terminal the same draft, schedule and approve actions as plain commands. It needs Node 18 or newer and has no runtime dependencies.

npx timetopost login                 # opens your browser, OAuth with PKCE
npx timetopost accounts              # connected accounts with ids
npx timetopost draft --text "Shipping the CLI today" --account Acme
npx timetopost schedule --text "Launch" --account int_abc --at 2026-11-02T09:30:00+01:00
npx timetopost list approvals --json # the unified approvals rail
npx timetopost approve <id>          # human gate: approve and schedule

draft never sends a schedule time. schedule queues a real post and needs a token with the publish capability; a draft-only token gets a 403. For CI, set TTP_TOKEN or TIMETOPOST_API_TOKEN. --at takes an ISO 8601 time, and times in the past are rejected before any request is made. Add --json for output an agent can parse.

Path 3: the REST API

The REST API is the path for your own code: one authenticated request creates and schedules a post across several networks. Create a personal token (prefix ttp_) in Settings, API, then:

curl -X POST https://api.timetopost.co/api/posts \
  -H "Authorization: Bearer ttp_your_token_here" \
  -H "Content-Type: application/json" \
  -d '{"content":"Hello from the API!","platforms":["twitter"],"scheduledAt":"2026-11-03T15:00:00.000Z"}'

The body also accepts accountIds instead of platforms, mediaUrls, and thread (an X reply chain of up to 24 parts of up to 280 characters each). GET /api/integrations lists accounts and GET /api/analytics/optimal-times returns best hours and days. The interactive reference is at api.timetopost.co/docs and the API docs cover authentication. One detail worth building in: check GET /api/posts before retrying a create that timed out, so a retry does not add a duplicate.

Path 4: the n8n node

The n8n community node lets a workflow hand text to TimeToPost as a draft or a scheduled post. On a self-hosted n8n, open Settings, Community Nodes, Install, and enter n8n-nodes-timetopost. Then create a TimeToPost API credential with a ttp_ token; n8n tests it against GET /api/auth/me.

ResourceOperationEndpoint
DraftCreatePOST /api/drafts/batch (always pending approval)
PostSchedulePOST /api/posts (future date, token allowed to publish)
PostGet ManyGET /api/posts
AccountGet ManyGET /api/integrations

The usual shape is a trigger that watches a feed, sheet or release and drops a ready-to-review draft into TimeToPost each morning. Each draft carries an external reference, so a rerun can be matched to the draft it already made. For an X thread, separate the tweets with a line that contains only three dashes. The n8n page has a sample workflow.

What stays human-gated

The approval queue is the trust layer: automation prepares the work, and a person decides what goes live. Drafts from every source (agents, n8n, GitHub activity, AutoSEO) land in one queue labeled by origin, where you approve with a time, approve into an optimal slot, edit, or reject.

  • create_drafts, timetopost draft, POST /api/drafts/batch and the n8n Draft operation always wait for approval.
  • Direct scheduling needs credentials that are allowed to publish. A token limited to drafts gets a 403 on scheduling.
  • Every call carries your token, so the backend applies authentication, workspace scoping and plan limits exactly as in the web app. An agent can never do more than the account it represents.
  • OAuth access granted to an agent is listed in Settings, API and revocable there.

A good agent prompt pattern is "draft, validate and place posts into recommended slots, then show me the approval list". For the use case in depth, see social media scheduling for AI agents, and for posting one idea to many networks, see how to schedule posts to multiple networks.

How we know

Every command, endpoint, tool name and limit on this page comes from TimeToPost's public documentation and package READMEs as of 1 November 2026: the MCP page and MCP docs, the n8n page, the getting started and API docs, and the timetopost CLI README on npm. The tool count is rendered from the same catalog the server uses.

Frequently asked questions

Can an AI agent post to social media on its own?

Yes, through a scheduler that exposes tools or an API. With TimeToPost, an agent connected to the MCP server can schedule posts to 15 networks under your account; drafts it creates with create_drafts wait for your approval first.

Do I have to give the agent my social media passwords?

No. You connect each social account to TimeToPost once, and the agent authenticates to TimeToPost with a browser OAuth sign-in (MCP, CLI) or a revocable ttp_ token (REST API, n8n).

Which networks can an agent schedule to?

Instagram, X, Bluesky, Mastodon, Pixelfed, Telegram channels, Tumblr blogs, WordPress sites, Ghost publications, DEV articles, Whop forums, Buttondown newsletters, TikTok, LinkedIn, and Threads. TikTok public posting: Coming soon.

Can the agent pick the best time to post?

Yes. get_optimal_times returns the account's own top time slots from its engagement history, and the recommended workflow places each post into one of those slots before calling schedule_post.

What does it cost?

The MCP server, CLI, REST API and n8n node come with every plan. Plans start at $12 per month (Starter, up to 30 posts per month) with a 14-day free trial.

Give your AI agent a social media scheduler with one human approval queue: connect it to TimeToPost with a browser sign-in and no API keys.

Start free