Get Started

MCP

UniPost exposes a hosted Model Context Protocol server so agents can list accounts, validate content, publish posts, and inspect analytics through one tool layer instead of seven separate platform APIs.

What MCP is for

Use MCP when your product or workflow already runs AI agents. Instead of teaching a model the exact request shapes, limits, and quirks of every social network, you give it one consistent interface for accounts, posts, validation, and analytics.

Transport and endpoint

PropertyValue
Endpointhttps://mcp.unipost.dev/mcp
TransportStreamable HTTP
AuthBearer YOUR_API_KEY
Legacy fallbackhttps://mcp.unipost.dev/sse

Available tools

ToolWhat it does
unipost_list_accountsList connected social media accounts
unipost_upload_mediaUpload media into UniPost's media library and return a media_id
unipost_get_mediaCheck whether a media upload is hydrated and ready to publish
unipost_create_postCreate and publish a post to one or more accounts
unipost_create_youtube_video_postWrap upload + publish into one YouTube-oriented video workflow
unipost_get_postGet the status and details of a post
unipost_get_analyticsRead engagement metrics for a post
unipost_list_postsList recent posts filtered by status

Important: the current MCP surface is strongest for account lookup, text publishing, analytics, and media that is already reachable by URL or already uploaded into UniPost. Large local video files are not the ideal path today.

The best MCP workflow is not “generate text, then publish immediately.” The safer pattern is generate, validate, preview if needed, then publish.

StepWhy it exists
List accountsGround the agent in real destination accounts
Draft candidate copyLet the model propose platform-aware captions
ValidateCatch caption, media, and support issues before publish
PreviewSend a human-readable link when review is required
PublishCommit once the draft is approved

YouTube video workflow

For YouTube specifically, the most reliable flow today is: upload the video into UniPost’s media library first, then create the post with a media_id. That matches the dashboard flow and avoids trying to push a large local file through an MCP client or base64 payload.

StepWhat to doWhy
1Create a media upload in UniPostReserve a media row and get a presigned upload URL
2Upload the local video directly to storageKeep large file transfer out of the MCP request path
3Confirm the media row is uploadedMake sure UniPost can resolve the object before publish
4Call `unipost_create_post` with `media_ids`Publish to YouTube using the same workflow as the dashboard

If you are posting from an agent, UniPost should ideally hide these steps behind one higher-level video publish flow. UniPost now exposes unipost_create_youtube_video_post for that wrapper, but for very large local files the most reliable path is still a hosted video_url or a reusable media_id.

Client configuration

Here is the part that was missing: each client expects this config in a different place. Copy the matching snippet into the file below, then restart the client.

ClientPut the config hereNotes
Claude Desktop~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows)Replace the whole `mcpServers` block or merge the `unipost` entry into your existing file
Cursor.cursor/mcp.json in your project or ~/.cursor/mcp.json for a global setupProject config is easiest when you want the same MCPs checked into a repo
Windsurf~/.codeium/windsurf/mcp_config.jsonYou can also open MCP settings in Windsurf and edit the raw config there
Claude CodeNo file needed for the command below. Run it in your terminal instead.If you want a checked-in config, use `.mcp.json` at the project root with `claude mcp add --scope project`

Important: ~/Library/Application Support/Claude/claude_desktop_config.json is the Claude Desktop config file. Claude Code uses the claude mcp add command or Claude Code settings files such as ~/.claude/settings.json and .claude/settings.json.

{
  "mcpServers": {
    "unipost": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-remote",
        "https://mcp.unipost.dev/mcp",
        "--header",
        "Authorization:Bearer YOUR_API_KEY",
        "--transport",
        "http-only"
      ]
    }
  }
}

Test the server directly

If you want to confirm auth and transport outside an MCP client, initialize the server directly with cURL.

curl -X POST https://mcp.unipost.dev/mcp \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -d '{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "initialize",
    "params": {
      "protocolVersion": "2025-03-26",
      "capabilities": {},
      "clientInfo": { "name": "test", "version": "0.1.0" }
    }
  }'

When to use MCP vs SDK vs raw API

Use caseBest interfaceWhy
LLM-driven operator or agent workflowMCPNative tool interface for accounts, posts, and analytics
Large local video upload before publishMedia API + MCPUpload to UniPost storage first, then publish with `media_ids`
Typed application integrationSDKBetter ergonomics and stronger language-native patterns
Low-level debugging or custom clientAPI ReferenceDirect control over raw requests and responses