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
| Property | Value |
|---|---|
| Endpoint | https://mcp.unipost.dev/mcp |
| Transport | Streamable HTTP |
| Auth | Bearer YOUR_API_KEY |
| Legacy fallback | https://mcp.unipost.dev/sse |
Available tools
| Tool | What it does |
|---|---|
| unipost_list_accounts | List connected social media accounts |
| unipost_upload_media | Upload media into UniPost's media library and return a media_id |
| unipost_get_media | Check whether a media upload is hydrated and ready to publish |
| unipost_create_post | Create and publish a post to one or more accounts |
| unipost_create_youtube_video_post | Wrap upload + publish into one YouTube-oriented video workflow |
| unipost_get_post | Get the status and details of a post |
| unipost_get_analytics | Read engagement metrics for a post |
| unipost_list_posts | List 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.
Recommended flow
The best MCP workflow is not “generate text, then publish immediately.” The safer pattern is generate, validate, preview if needed, then publish.
| Step | Why it exists |
|---|---|
| List accounts | Ground the agent in real destination accounts |
| Draft candidate copy | Let the model propose platform-aware captions |
| Validate | Catch caption, media, and support issues before publish |
| Preview | Send a human-readable link when review is required |
| Publish | Commit 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.
| Step | What to do | Why |
|---|---|---|
| 1 | Create a media upload in UniPost | Reserve a media row and get a presigned upload URL |
| 2 | Upload the local video directly to storage | Keep large file transfer out of the MCP request path |
| 3 | Confirm the media row is uploaded | Make sure UniPost can resolve the object before publish |
| 4 | Call `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.
| Client | Put the config here | Notes |
|---|---|---|
| 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 setup | Project config is easiest when you want the same MCPs checked into a repo |
| Windsurf | ~/.codeium/windsurf/mcp_config.json | You can also open MCP settings in Windsurf and edit the raw config there |
| Claude Code | No 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 case | Best interface | Why |
|---|---|---|
| LLM-driven operator or agent workflow | MCP | Native tool interface for accounts, posts, and analytics |
| Large local video upload before publish | Media API + MCP | Upload to UniPost storage first, then publish with `media_ids` |
| Typed application integration | SDK | Better ergonomics and stronger language-native patterns |
| Low-level debugging or custom client | API Reference | Direct control over raw requests and responses |