Content Automation MCP Server

Automated content publishing for Pinterest and Instagram

README.md

Content Automation

Automated content publishing for Pinterest and Instagram with AI-powered content generation and scheduling.

Features

  • MCP Integration ⭐ - Natural language control through AI assistants (primary way of working)
  • TypeScript - Full type safety for reliability and better IDE support
  • Late API - Publishing to Instagram and Pinterest through a unified API
  • Local Image Processing - Automatic conversion (HEIC/PNG/GIF → JPG) and center-crop to platform aspect ratios via sharp
  • SCP Upload to CDN - Processed images are automatically uploaded to your CDN server via scp
  • ✅ Unique AI-powered content generation for Pinterest and Instagram (OpenAI with customizable prompts)
  • ✅ Publication scheduling through Late API (no local scheduler needed)
  • Instagram Stories Support - Publishing Stories through Late API
  • Instagram Carousel - Publish 2–10 photos in one post (via MCP)
  • ✅ Publishing to both platforms with a single request
  • ✅ Processed image tracking
  • ✅ OpenAI integration for content generation (optional)
  • ✅ CLI commands - alternative way of working through terminal

Installation

  1. Install dependencies:
npm install
  1. Build the TypeScript project:
npm run build
  1. Copy .env.example to .env and fill it:
cp .env.example .env
  1. Configure environment variables in .env:
    • Late API (required): Get API key at getlate.dev
    • CDN Base URL (required): Specify the base CDN URL where images are hosted
    • SCP Upload (optional): Configure SCP to auto-upload processed local images to CDN
    • OpenAI API (optional): For AI-powered content generation
    • Content Prompt (optional): Customize content generation by copying prompts/content-prompt.example.txt to prompts/content-prompt.txt and editing it

Getting API Keys

Late API (Required) ⭐

The project uses only Late API for publishing to Instagram and Pinterest.

  1. Register at getlate.dev
  2. Get API key
  3. Connect Instagram and Pinterest accounts
  4. Get Profile ID and Account IDs from the dashboard
  5. Add to .env:
    LATE_API_KEY=your_key
    LATE_PROFILE_ID=your_profile_id
    LATE_INSTAGRAM_ACCOUNT_ID=your_instagram_account_id
    LATE_PINTEREST_ACCOUNT_ID=your_pinterest_account_id
    

Late API Benefits:

  • ✅ No local scheduler needed - Late API publishes on schedule automatically
  • ✅ Reliable scheduling on Late servers
  • Publishing to Instagram AND Pinterest with a single request - saves API requests!
  • ✅ Free plan available (60 requests/minute)
  • ✅ Support for 13 platforms (Instagram, Pinterest, Facebook, LinkedIn, Twitter/X, TikTok, YouTube, Reddit, Bluesky, Threads, Google Business, Telegram, Snapchat)

Supported Platforms: Instagram, Pinterest, Facebook, LinkedIn, Twitter/X, TikTok, YouTube, Reddit, Bluesky, Threads, Google Business, Telegram, Snapchat

Usage

The project supports two ways of working:

  1. Through MCP agent (recommended) - Natural language control through AI assistant
  2. Through CLI commands - Traditional way through terminal

Setup Check

Before starting, check API connection:

npm run check

This will check:

  • Late API connection (required)
  • CDN configuration (required)
  • SCP upload configuration (optional)
  • OpenAI API availability (optional)

CLI Commands

Publishing Images
npm run publish -- --image=IMG_5857.jpg [options]

Image Input:

  • Local file (recommended): Place source images (HEIC, JPG, PNG, GIF) in the images directory. By default the system looks in images/ (relative to project root); you can override with IMAGES_SOURCE_DIR in .env (e.g. an absolute path like /path/to/story-matcher). The system will convert to JPG, center-crop to platform aspect ratios, upload to CDN via SCP, and use the CDN URLs for publishing.
  • CDN URL: If the image is already on CDN, pass the full URL — processing is skipped.
  • Filename only: If SCP is not configured, the filename is resolved against CDN_BASE_URL directly (existing behavior).

Examples:

# Local image: auto-process + upload + publish to all platforms
npm run publish -- --image=IMG_5857.HEIC

# Publish in 1 hour
npm run publish -- --image=IMG_5857.jpg 1

# Draft with publication date
npm run publish -- --image=IMG_5857.jpg --date="tomorrow 18:00" --draft

# With context
npm run publish -- --image=IMG_5857.jpg 1 --context="City center"

# Instagram post only
npm run publish -- --image=IMG_5857.jpg --post

# Instagram story only
npm run publish -- --image=IMG_5857.jpg --story

# Instagram story + Pinterest pin (comma-separated)
npm run publish -- --image=IMG_5857.jpg --types=story,pin

# Instagram post + Pinterest pin
npm run publish -- --image=IMG_5857.jpg --types=post,pin

# Pinterest pin only
npm

Tools 1

publishPublishes content to Instagram and Pinterest with optional AI-generated captions and scheduling.

Environment Variables

LATE_API_KEYrequiredAPI key from getlate.dev
LATE_PROFILE_IDrequiredProfile ID from Late dashboard
LATE_INSTAGRAM_ACCOUNT_IDrequiredInstagram account ID from Late dashboard
LATE_PINTEREST_ACCOUNT_IDrequiredPinterest account ID from Late dashboard
CDN_BASE_URLrequiredBase URL where images are hosted
OPENAI_API_KEYAPI key for AI-powered content generation

Try it

Generate a catchy Instagram caption for my new product photo and schedule it for tomorrow at 6 PM.
Publish the image IMG_5857.jpg to both Instagram and Pinterest with a professional description.
Create an Instagram story post using the image in my images folder and add a relevant caption about city life.
Schedule a Pinterest pin for next week using the latest image in my directory.

Frequently Asked Questions

What are the key features of Content Automation?

Natural language control via MCP for content publishing. Automated image processing including conversion and center-cropping. Unified publishing to Instagram and Pinterest via Late API. AI-powered caption generation using OpenAI. Support for Instagram Stories and Carousels.

What can I use Content Automation for?

Social media managers automating cross-platform posting to Instagram and Pinterest. Content creators needing to schedule posts in advance without a local scheduler. Users requiring automated image resizing and CDN uploading for social media assets.

How do I install Content Automation?

Install Content Automation by running: npm install && npm run build

What MCP clients work with Content Automation?

Content Automation works with any MCP-compatible client including Claude Desktop, Claude Code, Cursor, and other editors with MCP support.

Turn this server into reusable context

Keep Content Automation docs, env vars, and workflow notes in Conare so your agent carries them across sessions.

Open Conare