Documentation menu

MCP server

TimeToPost ships an official server for the Model Context Protocol (MCP) — the open standard that lets AI assistants call external tools. Add it to Claude Code, Claude Desktop, Cursor, or any MCP-compatible client and your agent can draft, schedule, publish and cancel posts, and read your engagement analytics, all under your account’s permissions.

Quickest setup: hosted server (no API keys)

The hosted server at https://api.timetopost.co/mcp uses OAuth — your browser opens, you sign in with your email and a 6-digit code, click Approve access, done. Nothing to install, no tokens to copy.

claude mcp add --transport http timetopost https://api.timetopost.co/mcp

In Claude Desktop / Claude.ai: Settings → Connectors → Add custom connector → paste the URL. In Cursor and other clients, use { "url": "https://api.timetopost.co/mcp" } in mcp.json. Revoke access anytime from Settings → API.

Alternative: local server (npx + API token)

Prefer a local stdio process, or your client doesn’t support remote MCP? Use the npm package. Prerequisites:

  • Node.js 18+ (the server runs locally via npx).
  • A TimeToPost API token: create one in the dashboard under Settings → API. It starts with ttp_ and is shown only once — see the API reference for details.

All clients use the same JSON block; only the config file location differs.

Claude Code

One CLI command:

claude mcp add timetopost \
  -e TIMETOPOST_API_URL=https://api.timetopost.co \
  -e TIMETOPOST_API_TOKEN=ttp_your_token_here \
  -- npx -y timetopost-mcp

Or add the JSON below to your project’s .mcp.json.

Claude Desktop

Add to claude_desktop_config.json (Settings → Developer → Edit Config), then restart Claude Desktop:

claude_desktop_config.json / .mcp.json / .cursor/mcp.json
{
  "mcpServers": {
    "timetopost": {
      "command": "npx",
      "args": ["-y", "timetopost-mcp"],
      "env": {
        "TIMETOPOST_API_URL": "https://api.timetopost.co",
        "TIMETOPOST_API_TOKEN": "ttp_your_token_here"
      }
    }
  }
}

Cursor

Add the same block to .cursor/mcp.json in your project (or the global ~/.cursor/mcp.json) and enable the server when Cursor prompts you.

To verify the connection, ask your agent to run the whoami tool — it should return your user and active organization.

Tool reference

ToolWhat it does
whoamiReturn the authenticated user and their active organization.
list_integrationsList connected social accounts (Instagram, TikTok, X) and their status.
list_postsList posts for the active org, optionally filtered by status (draft, scheduled, published…).
get_postFetch a single post by id.
schedule_postCreate + schedule a post. X threads: content = tweet 1, thread = [tweets 2..N] (max 24, each ≤280 chars), published as chained replies. Other platforms ignore thread.
publish_postTrigger immediate publishing of an existing post.
cancel_postCancel/delete a scheduled post before it fires.
get_engagement_summaryAggregated likes, comments, shares, views across your published posts.
get_optimal_timesBest posting times computed from your own historical engagement, not industry averages.
scheduler_statusHealth of the background scheduler (last tick, recent failures).

Example prompts

  • “Schedule these 5 captions across Instagram and X at my optimal times this week.”
  • “What was my engagement last month? Which platform performed best?”
  • “Cancel everything scheduled for Friday and move it to Monday morning.”

Security model

The MCP server is a thin adapter over the same REST API the web app uses. Every tool call carries your token, so authentication, organization scoping, plan limits and validation are enforced by the backend exactly as if you clicked the button yourself — an agent can never do more than your own account can. And because API tokens cannot manage other tokens, a token exposed to an agent cannot mint replacements. Revoke it any time from Settings → API.

For the product story and FAQ, see the MCP overview page.