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-mcpQuick 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_key4. 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:
| Tool | Description | Key Parameters |
|---|---|---|
| publish_post | Publish to 1-12 platforms in one call | platforms, post_type, description, media_urls, profile_name + 15 platform overrides |
| schedule_post | Queue for future delivery | All publish_post params + scheduled_date (UTC ISO 8601) |
| get_posts | List recent posts with status | limit, status filter, profile_name |
| get_post_status | Check delivery status by post ID | post_id |
| list_profiles | Show connected social profiles | — |
| create_profile | Create a new profile | username, profile_name |
| upload_media | Upload media to CDN | file_url, profile_name |
| list_media | List uploaded media assets | limit |
| list_broadcasts | List YouTube live streams | — |
| create_broadcast | Start a 24/7 live stream | profile_name, title, media_url, loop |
Platform-Specific Overrides
The publish_post and schedule_post tools accept platform-specific parameters:
| Parameter | Platform | Description |
|---|---|---|
| tiktok_privacy_level | TikTok | 0 = public, 1 = friends, 2 = private |
| tiktok_disable_duet | TikTok | Disable duet on this post |
| tiktok_disable_comment | TikTok | Disable comments |
| tiktok_disable_stitch | TikTok | Disable stitch |
| tiktok_brand_content_toggle | TikTok | Enable branded content |
| instagram_media_type | REELS, STORIES, or IMAGE | |
| instagram_location_id | Location tag ID | |
| youtube_type | YouTube | video, short, or live |
| youtube_privacy | YouTube | public, unlisted, or private |
| youtube_category_id | YouTube | Category ID (e.g. 22 = People & Blogs) |
| youtube_tags | YouTube | Array of video tags |
| youtube_title | YouTube | Video title (max 100 chars) |
| youtube_thumbnail_url | YouTube | Thumbnail image URL |
| facebook_type | video, image, text, link, reel | |
| linkedin_type | post or article | |
| pinterest_board_id | Board ID to pin to | |
| pinterest_link | Destination 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
| Variable | Required | Description |
|---|---|---|
| CODIVUPLOAD_API_KEY | Yes | Your CodivUpload API key (starts with cdv_) |
| CODIVUPLOAD_API_BASE_URL | No | API base URL (default: https://api.codivupload.com) |
Troubleshooting
| Symptom | Cause | Fix |
|---|---|---|
| "CODIVUPLOAD_API_KEY is required" | Missing API key in env config | Add CODIVUPLOAD_API_KEY to your MCP config env block |
| "Permission denied" or 401 | Invalid or expired API key | Create a new key from Dashboard → Settings → API Keys |
| "npx: command not found" | Node.js not installed | Install Node.js 18+ from nodejs.org |
| MCP tools not appearing | Server failed to start | Run 'npx -y codivupload-mcp' in terminal to see error output |
| Post created but not published | Post was scheduled | Check scheduled_date parameter — if set, post is queued for later |
| "Rate limit exceeded" or 429 | Too many requests | Wait and retry. Check your plan limits at /#pricing |