Connect your AI agent via MCP
CrossPostingPal exposes a Model Context Protocol (MCP) server so MCP-compatible agents can discover your connected social accounts, create drafts and schedule posts — through the same publishing engine as the dashboard. Nothing is published outside your normal queue.
Endpoint
POST https://api.crosspostingpal.com/api/mcp
Authorization: Bearer cpp_pat_…
Transport: Streamable HTTP (JSON-RPC 2.0)
The server implements initialize, tools/list and tools/call, including batch requests and notifications. All tools are request/response — there is no SSE channel.
1. Create an API token
- Log in to CrossPostingPal and go to Settings → Developer / AI Agents.
- Click Create token, give it a name (e.g. “Cursor on my laptop”).
- Optionally restrict scopes or set an expiry.
- Copy the token immediately — it is shown only once and only a hash is stored. Tokens look like
cpp_pat_…
2. Configure your MCP client
Cursor
Add to ~/.cursor/mcp.json (global) or .cursor/mcp.json (project). Cursor auto-detects Streamable HTTP from the url field.
{
"mcpServers": {
"crosspostingpal": {
"url": "https://api.crosspostingpal.com/api/mcp",
"headers": {
"Authorization": "Bearer cpp_pat_YOUR_TOKEN"
}
}
}
}Claude Code
claude mcp add --transport http crosspostingpal https://api.crosspostingpal.com/api/mcp \ --header "Authorization: Bearer cpp_pat_YOUR_TOKEN"
Claude (claude.ai / Desktop)
Settings → Connectors → Add custom connector → enter the endpoint URL above → under Request headers add Authorization: Bearer cpp_pat_…. If request headers are unavailable on your plan, Claude Desktop can bridge through mcp-remote in claude_desktop_config.json:
{
"mcpServers": {
"crosspostingpal": {
"command": "npx",
"args": [
"-y",
"mcp-remote",
"https://api.crosspostingpal.com/api/mcp",
"--header",
"Authorization:${AUTH_HEADER}"
],
"env": {
"AUTH_HEADER": "Bearer cpp_pat_YOUR_TOKEN"
}
}
}
}Codex
Codex stores the environment-variable name, not the token — export CPP_MCP_TOKEN in the environment where you run Codex.
# ~/.codex/config.toml [mcp_servers.crosspostingpal] url = "https://api.crosspostingpal.com/api/mcp" bearer_token_env_var = "CPP_MCP_TOKEN"
Or via the CLI:
codex mcp add crosspostingpal --url https://api.crosspostingpal.com/api/mcp \ --bearer-token-env-var CPP_MCP_TOKEN
ChatGPT (developer mode)
On paid plans: Settings → Connectors → Advanced → enable Developer Mode → Add custom connector → URL https://api.crosspostingpal.com/api/mcp → Authentication: Token → paste cpp_pat_…. Workspace admins may need to enable developer mode first.
3. Verify the connection
A raw list_social_accounts call looks like this:
POST https://api.crosspostingpal.com/api/mcp
Authorization: Bearer cpp_pat_YOUR_TOKEN
Content-Type: application/json
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "list_social_accounts",
"arguments": {}
}
}Then ask your agent: “Schedule ‘We just launched X’ tomorrow at 10:00 on LinkedIn and Instagram.” The agent resolves your account IDs and calls create_and_schedule_post:
{
"jsonrpc": "2.0",
"id": 2,
"method": "tools/call",
"params": {
"name": "create_and_schedule_post",
"arguments": {
"text": "We just launched X",
"socialAccountIds": [123, 124],
"scheduledAt": "2026-09-22T10:00:00+02:00"
}
}
}Tools
| Tool | Scope | What it does | Parameters |
|---|---|---|---|
| list_social_accounts | accounts:read | Lists your connected social accounts: id, platform, username, authorization status and capabilities (canPublish, supportsScheduling, requiresMedia). Call this first to discover socialAccountIds. | — |
| create_post_draft | posts:write | Creates a draft visible in the normal CrossPostingPal UI. Nothing is published until scheduled. | text, socialAccountIds[], mediaUrls[]?, postType?, platformParameters? |
| create_and_schedule_post | posts:write | Creates and schedules a post in one call. The post appears in your scheduled queue and is published by the normal scheduler. | text, socialAccountIds[], scheduledAt, timezone?, mediaUrls[]?, postType?, platformParameters? |
| schedule_post | posts:write | Schedules an existing draft post. | postId, scheduledAt, timezone? |
| publish_now | posts:publish | Publishes immediately — same as "Post now" in the UI. Use only when the user explicitly asks; otherwise prefer draft/scheduled so the post stays reviewable. | text, socialAccountIds[], mediaUrls[]?, postType?, platformParameters? |
| upload_media | posts:write | Uploads one base64 media file to CrossPostingPal storage and returns a public mediaUrl for mediaUrls. For large files, host externally and pass the URL instead. | contentType, dataBase64 |
| list_scheduled_posts | posts:read | Lists upcoming scheduled posts (default window: now to +90 days, max 100). | fromUtc?, toUtc? |
| get_post | posts:read | Returns status, schedule time, content and per-channel results of one of your posts. | postId |
Notes & limits
- Time zones: prefer an explicit ISO 8601 offset in
scheduledAt(e.g.+02:00orZ). Without an offset, thetimezoneparameter (IANA name) is applied; otherwise UTC. - Media: Instagram, TikTok and Dribbble require public
mediaUrlsthat stay reachable until publish time (max 10). Either pass external URLs or upload first withupload_media— it returns a hosted mediaUrl. - Rate limits: the endpoint is rate-limited per user and per token, with an extra cap on schedule operations. Exceeding them returns HTTP 429.
- Scope errors: calling a tool without the required scope returns a JSON-RPC error (-32001) naming the missing scope.
- Revocation: revoking a token in Settings takes effect immediately; the client will receive HTTP 401 on the next request.
- What agents can’t do (yet): edit or delete posts, publish immediately, upload media, manage account connections or read analytics.
Ready to connect?
Generate a token and point your agent at CrossPostingPal.