API Reference

MCP (AI Agents)

Connect AI tools via Model Context Protocol

CodivUpload is available as an MCP server via the codivupload-mcp npm package. Connect Claude, Cursor, or any MCP client to publish, schedule, and manage social media using natural language.

What is MCP?

MCP (Model Context Protocol) allows AI assistants to interact with APIs directly. Instead of writing curl commands, you can tell your AI: "Post this video to YouTube and TikTok via CodivUpload" — and it will make the API calls for you.

Think of MCP as a translator between your AI assistant and the CodivUpload API. When you say "upload this video to YouTube", the AI uses MCP to figure out the right API endpoint, build the correct request body, authenticate with your key, and make the actual call — all without you writing a single line of code.

Without MCP, you'd need to look up the API docs, construct the curl command, and run it yourself. With MCP, the AI handles all of that. You describe intent; MCP handles execution.

Installation

The codivupload-mcp package runs locally on your machine. It connects to the CodivUpload API using your API key — your key never leaves your local environment.

npm install -g codivupload-mcp
# or use npx (no install needed):
npx -y codivupload-mcp

Quick Setup

1. Get Your API Key

Go to Dashboard → Settings → API Keys and create a new key. It starts with cdv_.

2. Claude Desktop

Add to your claude_desktop_config.json:

{
  "mcpServers": {
    "codivupload": {
      "command": "npx",
      "args": ["-y", "codivupload-mcp"],
      "env": {
        "CODIVUPLOAD_API_KEY": "cdv_your_api_key"
      }
    }
  }
}

macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json

3. Claude Code (CLI)

claude mcp add codivupload \
  --command "npx -y codivupload-mcp" \
  --env CODIVUPLOAD_API_KEY=cdv_your_api_key

4. Cursor

Add to .cursor/mcp.json in your project root:

{
  "mcpServers": {
    "codivupload": {
      "command": "npx",
      "args": ["-y", "codivupload-mcp"],
      "env": {
        "CODIVUPLOAD_API_KEY": "cdv_your_api_key"
      }
    }
  }
}

5. Any MCP Client

Use npx -y codivupload-mcp as the command. Set CODIVUPLOAD_API_KEY as environment variable. The server uses stdio transport.

Authentication

Your API key is stored in your local MCP config file as an environment variable. When the MCP server starts, it reads the key and uses it to authenticate all requests to api.codivupload.com.

  • Your key never leaves your machine — it's not sent to Claude, Anthropic, or any third party.
  • The MCP server process runs locally and makes direct HTTPS calls to the CodivUpload API.
  • Your key is scoped to your workspace — MCP can only access profiles and posts in your account.
  • To revoke access, delete the API key from Dashboard → Settings → API Keys.

Available Tools

Once connected, your AI assistant can use these tools:

ToolDescriptionKey Parameters
publish_postPublish to 1-12 platforms in one callplatforms, post_type, description, media_urls, profile_name + 15 platform overrides
schedule_postQueue for future deliveryAll publish_post params + scheduled_date (UTC ISO 8601)
get_postsList recent posts with statuslimit, status filter, profile_name
get_post_statusCheck delivery status by post IDpost_id
list_profilesShow connected social profiles
create_profileCreate a new profileusername, profile_name
upload_mediaUpload media to CDNfile_url, profile_name
list_mediaList uploaded media assetslimit
list_broadcastsList YouTube live streams
create_broadcastStart a 24/7 live streamprofile_name, title, media_url, loop

Platform-Specific Overrides

The publish_post and schedule_post tools accept platform-specific parameters:

ParameterPlatformDescription
tiktok_privacy_levelTikTok0 = public, 1 = friends, 2 = private
tiktok_disable_duetTikTokDisable duet on this post
tiktok_disable_commentTikTokDisable comments
tiktok_disable_stitchTikTokDisable stitch
tiktok_brand_content_toggleTikTokEnable branded content
instagram_media_typeInstagramREELS, STORIES, or IMAGE
instagram_location_idInstagramLocation tag ID
youtube_typeYouTubevideo, short, or live
youtube_privacyYouTubepublic, unlisted, or private
youtube_category_idYouTubeCategory ID (e.g. 22 = People & Blogs)
youtube_tagsYouTubeArray of video tags
youtube_titleYouTubeVideo title (max 100 chars)
youtube_thumbnail_urlYouTubeThumbnail image URL
facebook_typeFacebookvideo, image, text, link, reel
linkedin_typeLinkedInpost or article
pinterest_board_idPinterestBoard ID to pin to
pinterest_linkPinterestDestination URL for the pin

Example Prompts

After connecting, try asking your AI:

  • "Upload this video to YouTube and TikTok for my_brand profile"
  • "Schedule a post to all platforms for tomorrow 9am EST"
  • "Show me all scheduled posts for this week"
  • "Create an Instagram Reel with this video URL"
  • "List my connected profiles and their platform accounts"
  • "Start a 24/7 YouTube live stream with this video"
  • "What's the status of my last post?"
  • "Publish this announcement to LinkedIn and X with different captions"

Environment Variables

VariableRequiredDescription
CODIVUPLOAD_API_KEYYesYour CodivUpload API key (starts with cdv_)
CODIVUPLOAD_API_BASE_URLNoAPI base URL (default: https://api.codivupload.com)

Troubleshooting

SymptomCauseFix
"CODIVUPLOAD_API_KEY is required"Missing API key in env configAdd CODIVUPLOAD_API_KEY to your MCP config env block
"Permission denied" or 401Invalid or expired API keyCreate a new key from Dashboard → Settings → API Keys
"npx: command not found"Node.js not installedInstall Node.js 18+ from nodejs.org
MCP tools not appearingServer failed to startRun 'npx -y codivupload-mcp' in terminal to see error output
Post created but not publishedPost was scheduledCheck scheduled_date parameter — if set, post is queued for later
"Rate limit exceeded" or 429Too many requestsWait and retry. Check your plan limits at /#pricing
Note: MCP executes real API calls on your behalf. Posts will be published to real social media accounts. Be careful with destructive operations.
Prefer programmatic access? TypeScript: npm install codivuploadnpm · GitHub | Python: pip install codivuploadPyPI · GitHub · SDK docs