Productivity & Tools

Claude Code for Social Media: Schedule Posts from Your Terminal

Serge Bulaev

· Updated

Claude Code for Social Media: Schedule Posts from Your Terminal

TL;DR

Learn how to schedule social media posts to Instagram, LinkedIn, X, and 7 more platforms directly from Claude Code. Six real use cases with terminal examples: scheduling, carousels, cross-posting, analytics, bulk CSV imports, and git hook automation.

Why Manage Social Media from the Terminal?

If you're a developer, your terminal is home. You write code, commit changes, deploy services, and debug production issues — all without touching a mouse. But the moment you need to post a product update to LinkedIn or schedule an Instagram carousel, you're yanked out of your flow and into a browser-based dashboard.

That context switch is expensive. Studies estimate it takes 23 minutes to regain deep focus after switching tasks. For developers who ship code and then need to announce it on social media, the traditional workflow looks like this: finish the feature, open a new tab, navigate to your scheduling tool, write the post, pick the time, upload the image, click publish, close the tab, try to remember what you were doing.

What if you could do all of that without leaving the terminal?

What you'll learn in this guide:

  • How to connect Publora's MCP server to Claude Code in one command
  • 6 real-world use cases with terminal conversation examples
  • How to cross-post, check analytics, and bulk-schedule from your shell
  • Power user tips: aliases, git hooks, and combining MCP servers
  • Full platform support table for all 10 supported networks

0

Context switches needed

20

MCP tools available

10

Platforms supported

With Claude Code — Anthropic's official CLI for Claude — and Publora's MCP server, you get a terminal-native social media workflow that is scriptable, version-controllable, and fits into the same environment where you already spend your day. No dashboards. No browser tabs. Just your terminal and natural language.

One-Command Setup

Connecting Claude Code to Publora takes one command and a browser sign-in — no API key to copy. The only prerequisite is at least one social media account connected in the Publora dashboard. Add the server, then run /mcp in Claude Code, select publora, choose Authenticate and approve access in the browser window that opens.

claude mcp add --transport http --scope user publora https://mcp.publora.com/mcp

For CI or a machine that can't open a browser, use a Publora API key instead (from API in the sidebar at app.publora.com) and add --header "Authorization: Bearer sk_YOUR_API_KEY" to the same command. Once you've signed in, verify the connection:

You: /mcp

Claude: Connected MCP servers:

publora (http, https://mcp.publora.com/mcp) — connected
  tools: account_context, list_posts, create_post, get_post, update_post, delete_post, get_upload_url, complete_media, list_connections, post_stats, profile_stats, linkedin_create_comment ...

Alternative: project-level config

If you prefer a config file over the CLI command, create .mcp.json in your project root. This is useful for teams — everyone who clones the repo gets the MCP connection automatically, and each teammate signs in once with /mcp. For CI, add a headers entry with "Authorization": "Bearer ${PUBLORA_API_KEY}" and keep the key in an environment variable, never in the file. See the MCP client setup guide for all config options.

// .mcp.json — drop this in your project root
{
  "mcpServers": {
    "publora": {
      "type": "http",
      "url": "https://mcp.publora.com/mcp"
    }
  }
}

Use Case 1: Schedule a LinkedIn Post for Tomorrow Morning

You just finished a feature and want to announce it on LinkedIn. In a browser workflow, that's: open Buffer/Hootsuite, write the copy, pick the time, click schedule. In Claude Code, it's a conversation:

You: Schedule a LinkedIn post for tomorrow at 9am EST. Text: "Just shipped dark mode for our dashboard. Took 3 weeks of careful color system work, but the result is buttery smooth. Here's what I learned about building accessible dark themes in Next.js 15. Thread below."

Claude: I'll schedule that LinkedIn post. Let me first check your connected accounts.

Called list_connections

Called create_post with platforms: ["linkedin-ABC123"], scheduledTime: "2026-03-21T14:00:00Z"

Done! Your LinkedIn post is scheduled:

Post ID: pg_7f8a9b2c
Platform: LinkedIn (linkedin-ABC123)
Scheduled: March 21, 2026 at 9:00 AM EST (14:00 UTC)
Status: scheduled

Notice what happened: Claude Code automatically called list_connections to find your LinkedIn platform ID, converted "9am EST" to ISO 8601 UTC, and called create_post. You didn't need to know any API details.

You have a set of product screenshots in your ./marketing/ folder and want to turn them into an Instagram carousel. Claude Code can read your filesystem, find the images, upload them, and create the post.

You: Create an Instagram carousel from the 5 JPEG images in ./marketing/product-launch/. Schedule it for Saturday at 11am UTC. Caption: "5 features that make our new dashboard incredible. Swipe to see them all. #productlaunch #saas #ux"

Claude: I found 5 JPEG images in ./marketing/product-launch/:

1. feature-analytics.jpg (1.8 MB)
2. feature-calendar.jpg (2.1 MB)
3. feature-composer.jpg (1.5 MB)
4. feature-darkmode.jpg (1.9 MB)
5. feature-integrations.jpg (1.2 MB)

Called create_post (draft, no scheduledTime) → postGroupId: pg_carousel_01

Called get_upload_url + complete_media x5 → all uploads successful

Called update_post → status: scheduled, scheduledTime: 2026-12-05T11:00:00Z

Instagram carousel scheduled:

Post ID: pg_carousel_01
Images: 5 slides uploaded
Platform: Instagram (instagram-789012)
Scheduled: Saturday, December 5, 2026 at 11:00 AM UTC
Status: scheduled

Instagram image requirements

Instagram accepts JPEG, PNG and WebP images (WebP is converted to JPEG automatically); animated GIF, BMP and TIFF are rejected. Max 8 MB per image, 2-10 items per carousel. See the Instagram platform docs for full media limits.

Use Case 3: Cross-Post to 5 Platforms Simultaneously

One of Publora's most powerful features is cross-platform posting. A single API call can schedule the same post to multiple platforms. Claude Code makes this conversational:

You: Post this to LinkedIn, X, Threads, Mastodon, and Bluesky at 2pm UTC today: "We just open-sourced our design system. 400+ components, fully accessible, MIT licensed. Check it out: github.com/acme/design-system"

Claude: Let me check your connected accounts for those platforms.

Called list_connections → found 5 matching platforms

Called create_post with platforms: ["linkedin-ABC123", "twitter-DEF456", "threads-GHI789", "mastodon-JKL012", "bluesky-MNO345"]

Cross-platform post scheduled for 2:00 PM UTC today:

LinkedIn (linkedin-ABC123) — scheduled
X/Twitter (twitter-DEF456) — scheduled
Threads (threads-GHI789) — scheduled
Mastodon (mastodon-JKL012) — scheduled
Bluesky (bluesky-MNO345) — scheduled

Post ID: pg_cross_01
All 5 platforms will publish simultaneously.

Publora handles the platform-specific differences automatically. Your 280-character limit on X? If the content is too long, it auto-splits into a thread. Threads' 500-character cap? Same treatment. Bluesky and Mastodon don't thread, so Publora flags a post that's too long for them before it's scheduled.

With Claude Code + Publora

  • One natural language command
  • Auto-detects all connected platforms
  • Handles character limit differences
  • Auto-threads on X and Threads
  • Total time: ~15 seconds

Traditional dashboard workflow

  • Open browser, navigate to tool
  • Copy-paste content 5 times
  • Manually adjust for each platform
  • Click schedule on each one
  • Total time: ~5 minutes

Use Case 4: Check Your Analytics — "How Did My Last LinkedIn Post Perform?"

You posted a thought leadership piece on LinkedIn last Tuesday. You want to know how it did — but you don't want to open the LinkedIn app or a dashboard. Just ask Claude Code:

You: How did my last LinkedIn post perform? Show me the full stats.

Claude: Let me pull the stats for your most recent LinkedIn post.

Called list_posts with platform: "linkedin", limit: 1, status: "published"

Called Publora's LinkedIn statistics endpoint (REST API, via curl) with queryTypes: "ALL"

Here are the stats for your post "Why we switched from REST to tRPC" (published March 18):

Impressions: 4,287
Unique reach: 3,112 members
Reactions: 89
Comments: 23
Reshares: 7

That's solid engagement — a 2.8% engagement rate.

You: Nice. How does that compare to my previous 5 posts?

Claude: Let me pull stats for your last 6 LinkedIn posts.

Called list_posts with platform: "linkedin", limit: 6, status: "published"

Called the LinkedIn statistics endpoint x6

Post performance comparison:

1. "Why we switched from REST to tRPC" — 4,287 impressions, 89 reactions
2. "Our hiring process is broken" — 6,102 impressions, 142 reactions
3. "3 lessons from scaling to 1M users" — 3,891 impressions, 67 reactions
4. "Hot take: TypeScript is not enough" — 2,445 impressions, 38 reactions
5. "Announcing our public roadmap" — 1,822 impressions, 29 reactions
6. "Team offsite recap" — 987 impressions, 15 reactions

Your controversial/opinion posts consistently outperform announcements. The "broken hiring" post got 3x more engagement than announcements.

The key insight here: Claude Code doesn't just fetch data — it analyzes it. It noticed the pattern in your engagement and called it out, something a regular analytics dashboard wouldn't do. This is where AI-powered workflows genuinely outperform traditional tools.

Analytics availability

LinkedIn post metrics (impressions, reach, reactions, comments, reshares) come from Publora's REST API: Claude Code calls the LinkedIn statistics endpoint with curl and your API key (create one under API in the sidebar), and can pull follower counts and profile summaries the same way. The MCP server's own post_stats and profile_stats tools cover Mastodon and Bluesky. Publora does not return analytics for the other platforms.

Use Case 5: Bulk Schedule a Week's Content from a CSV

This is where the terminal workflow gets really powerful. You have a content plan in a CSV file — maybe your marketing team created it in Google Sheets and exported it. Instead of manually creating 7 posts, you hand the file to Claude Code:

day,time,platform,content
Monday,09:00,linkedin,"Starting the week with a deep dive into our new caching layer..."
Tuesday,14:00,twitter,"Hot take: Most API rate limiting is done wrong. Here's why..."
Wednesday,10:00,linkedin,"3 things I wish I knew before building a multi-tenant SaaS..."
Thursday,11:00,twitter+linkedin,"We just hit 10K users. Here's the growth chart and what we learned..."
Friday,09:00,linkedin,"Weekend reading: The best engineering blog posts I read this week..."
Saturday,11:00,instagram,"Behind the scenes of our engineering team offsite..."
Sunday,16:00,twitter,"Week in review: shipped 12 PRs, fixed 3 bugs, broke prod once..."

You: Read the file content-plan.csv and schedule all 7 posts for next week. Use my connected LinkedIn, X, and Instagram accounts.

Claude: I'll read your CSV and schedule each post. Let me first check your connected accounts.

Read content-plan.csv (7 rows)

Called list_connections → linkedin-ABC123, twitter-DEF456, instagram-789012

Called account_context → plan, quota and scheduling window checked

Called create_post x7

All 7 posts scheduled for next week:

Mon Mar 23, 09:00 — LinkedIn — "Starting the week..."
Tue Mar 24, 14:00 — X — "Hot take: Most API..."
Wed Mar 25, 10:00 — LinkedIn — "3 things I wish..."
Thu Mar 26, 11:00 — LinkedIn + X — "We just hit 10K..."
Fri Mar 27, 09:00 — LinkedIn — "Weekend reading..."
Sat Mar 28, 11:00 — Instagram — "Behind the scenes..."
Sun Mar 29, 16:00 — X — "Week in review..."

7/7 posts scheduled successfully. Thursday's post will go to both LinkedIn and X simultaneously.

This is something you simply cannot do quickly in a web dashboard. Reading a local file, parsing it, and creating 7 API calls — Claude Code handles all of it in one conversation turn. For the full API reference on bulk operations, see the bulk scheduling guide.

Use Case 6: Auto-Post When You Ship Code (Git Hook)

This is the developer dream: you push a release to production, and your social media automatically announces it. There are two approaches — a git hook with Claude Code, or a simpler curl-based approach using the REST API directly.

Option A: Git hook with Claude Code

Create a .git/hooks/post-commit (or use Husky) that invokes Claude Code in non-interactive mode:

#!/bin/bash
# .git/hooks/post-commit (make executable: chmod +x)

# Only trigger on main branch
BRANCH=$(git rev-parse --abbrev-ref HEAD)
if [ "$BRANCH" != "main" ]; then
  exit 0
fi

# Get the commit message
COMMIT_MSG=$(git log -1 --pretty=%B)

# Only announce releases (commits starting with "release:")
if [[ "$COMMIT_MSG" == release:* ]]; then
  echo "Announcing release on social media..."
  # Print mode can't stop to ask for permission, so allow the two Publora tools it needs
  claude --print "Based on this release commit message, create a professional LinkedIn post announcing the release. Schedule it for 30 minutes from now. Commit message: $COMMIT_MSG" \
    --allowedTools "mcp__publora__list_connections" "mcp__publora__create_post" 2>/dev/null &
fi

Option B: Direct API call (no Claude Code)

For CI/CD pipelines (GitHub Actions, GitLab CI), a direct curl call to Publora's REST API is simpler and faster:

#!/bin/bash
# In your CI/CD pipeline after deploy step

RELEASE_VERSION=$(git describe --tags --abbrev=0)

curl -s -X POST https://api.publora.com/api/v1/create-post \
  -H "Content-Type: application/json" \
  -H "x-publora-key: $PUBLORA_API_KEY" \
  -d "{
    \"content\": \"v${RELEASE_VERSION} is live! Check out the changelog: github.com/acme/app/releases/tag/${RELEASE_VERSION}\",
    \"platforms\": [\"linkedin-ABC123\", \"twitter-DEF456\"],
    \"scheduledTime\": \"$(date -u -d '+30 minutes' +%Y-%m-%dT%H:%M:%SZ)\"
  }"

Do

  • Use the REST API in CI/CD — it's stateless and fast
  • Add a 30-minute delay so you can cancel if the deploy breaks
  • Only trigger on release/tag commits, not every push
  • Store the API key as a CI/CD secret

Don't

  • Don't auto-post on every commit — that's spam
  • Don't hardcode API keys in the hook script
  • Don't schedule for immediate publish — give yourself a buffer
  • Don't forget to test the hook with a dry run first

Power User Tips

Once you have the basic workflow down, here are some techniques to make it even faster.

Shell aliases for common tasks

# Add to ~/.bashrc or ~/.zshrc
# Print mode can't stop to ask for permission, so allow Publora's tools up front
social() { claude --print "$*" --allowedTools "mcp__publora"; }

# Usage:
social "Schedule a LinkedIn post for tomorrow at 9am: Just shipped our new API docs"
social "What are my scheduled posts for this week?"
social "Delete the post I scheduled for Friday"

Combine with other MCP servers

Claude Code supports multiple MCP servers simultaneously. You can connect Publora alongside other tools for powerful combined workflows:

{
  "mcpServers": {
    "publora": {
      "type": "http",
      "url": "https://mcp.publora.com",
      "headers": { "Authorization": "Bearer sk_PUBLORA_KEY" }
    },
    "github": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-github"]
    },
    "filesystem": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-filesystem", "./content"]
    }
  }
}

You: Look at the latest closed GitHub issues this week, summarize the highlights, and schedule a "This Week in Open Source" LinkedIn post for Monday at 8am.

Claude: I'll check your GitHub issues and create a summary post.

Called github.list_issues → 8 issues closed this week

Called publora.create_post with summary content

LinkedIn post scheduled for Monday 8:00 AM UTC:

"This Week in Open Source: We closed 8 issues including a major performance fix (3x faster cold starts), added WebSocket support, and shipped better error messages. Thanks to @contributor1 and @contributor2 for their PRs..."

This is the killer feature of the MCP ecosystem — tools compose naturally. Claude Code reads from GitHub, processes the data, and writes to Publora in a single conversational flow.

Content templates as local files

Store your recurring post formats as text files and reference them from Claude Code:

# ~/templates/release-announce.txt
We just shipped {version}!

Key highlights:
{highlights}

Full changelog: {url}

#opensource #devtools #release

You: Use the template in ~/templates/release-announce.txt. Version is 2.4.0, highlights are: WebSocket support, 3x faster cold starts, new CLI flags. URL is github.com/acme/app/releases/v2.4.0. Post to LinkedIn and X for tomorrow 10am.

Supported Platforms

Publora supports 10 social media platforms through its API and MCP server. Here's what you can do from Claude Code on each one:

Platform Post Types Character Limit Media Analytics
LinkedIn Text, image, video, documents (PDF) 3,000 Images, video Impressions, reach, reactions, comments, reshares (REST API)
X (Twitter) Text, image, video, auto-threads 280 (auto-threads if longer) Images, video, GIF Not available
Instagram Photo, carousel (2-10), Reels, Stories 2,200 JPEG, PNG, WebP (WebP auto-converted), 8 MB; video MP4, MOV Not available
Threads Text, image, video 500 Images, video Not available
Telegram Text, image, video 4,096 (text) / 1,024 (captions) Images, video, documents Not available
Facebook Text, image, video 63,206 Images, video Not available
TikTok Video 2,200 Video (MP4) Not available
YouTube Video 5,000 (description) Video Not available
Mastodon Text, image, video 500 Images, video Engagement counts, followers (post_stats, profile_stats)
Bluesky Text, image, video 300 Images, video Engagement counts, followers (post_stats, profile_stats)
Pinterest Connect only (Publora can't publish to Pinterest) — — —

Platform connection

Each platform is connected once through the Publora dashboard: most via OAuth, Bluesky with an app password and Telegram with a bot token from BotFather. Once connected, Claude Code can post to it using the platform ID. Run list_connections in Claude Code to see all your connected accounts and their IDs.

The Complete MCP Tools Reference

When you connect Publora to Claude Code, you get access to 20 active MCP tools, plus 12 company_* tools for Agency client work that this guide doesn't cover. Here's a quick-reference of the most commonly used ones:

Content Management

  • create_post — Create and schedule posts
  • list_posts — List with filters (status, platform, date)
  • get_post — Get post details by ID
  • update_post — Edit content or reschedule
  • delete_post — Remove a scheduled post
  • get_upload_url — Get presigned upload URLs

Accounts, Analytics & LinkedIn

  • account_context — Plan limits and posting quota
  • list_connections — See connected platforms
  • post_stats — Mastodon/Bluesky post metrics
  • profile_stats — Mastodon/Bluesky follower counts
  • linkedin_create_comment — Comment on a LinkedIn post
  • linkedin_create_reaction — React to a LinkedIn post
  • linkedin_create_reshare — Reshare a LinkedIn post

For the full reference with parameters and response examples, see the MCP tools reference.

Why Claude Code + MCP Is Different from Other Integrations

You might be wondering: "Can't I already do this with Zapier or n8n?" Yes — and Publora supports Zapier, n8n, and Make. But the Claude Code + MCP approach is fundamentally different:

Zapier / n8n / Make

Pre-defined workflows. You build a flow once and it runs on triggers. Great for automation, but rigid — you can't improvise or ask follow-up questions.

REST API / SDKs

Full control, but you write code for every operation. Good for production pipelines, but high friction for quick tasks.

Claude Code + MCP

Conversational and contextual. You can ask questions, chain operations, analyze data, and improvise — all in natural language from your terminal.

The MCP approach shines for interactive, ad-hoc tasks — the kind of social media work that developers do alongside coding. It's not a replacement for automation pipelines; it's a complement that fills the gap where automation is too rigid and manual dashboards are too slow.

Getting Started in 60 Seconds

Here's the fastest path from zero to your first terminal-scheduled post:

  1. Create a Publora account and connect at least one social media account
  2. Add to Claude Code:
claude mcp add --transport http --scope user publora https://mcp.publora.com/mcp
  1. In Claude Code, run /mcp, select publora, choose Authenticate and sign in to Publora in the browser window that opens — no API key needed. For CI or a headless machine, create a key under API in the sidebar and add --header "Authorization: Bearer sk_YOUR_API_KEY" to the command instead.
  2. Try your first command:

You: Show my connected social accounts

That's it. You're managing social media from your terminal. No dashboards, no browser tabs, no context switching.

Ready to try it?

Connect Publora to Claude Code and schedule your first post from the terminal in under a minute.

Get Started Free

API/MCP access included on every plan, including free Starter. Setup docs

Frequently Asked Questions

What is Claude Code and how does it work with social media?

Claude Code is Anthropic's official command-line interface for Claude AI. By connecting it to Publora's MCP server, Claude Code gains 20 social media management tools — create posts, upload media, check Mastodon and Bluesky stats, engage on LinkedIn, list connections, and more. You interact in natural language from your terminal and Claude Code calls the appropriate Publora tools behind the scenes. No API knowledge required.

Which social media platforms can I manage from Claude Code?

Through Publora's MCP server, Claude Code can manage posts on Instagram, LinkedIn, X (Twitter), Threads, Telegram, Facebook, TikTok, YouTube, Mastodon, and Bluesky. Pinterest can be connected, but Publora can't publish to it. Each platform is connected once through the Publora dashboard: most via OAuth, Bluesky with an app password and Telegram with a bot token from BotFather.

Is Claude Code free to use with Publora?

Claude Code requires a paid Claude plan (Pro, Max, Team or Enterprise; Pro is $20/month billed monthly) or pay-per-use via API key. On the Publora side, API and MCP access are included on every plan, including the free Starter plan. Once both are set up, there are no per-call fees for the MCP integration itself.

Can I bulk schedule posts from a CSV file using Claude Code?

Yes. Claude Code can read files from your local filesystem, parse CSV data, and create posts via Publora's API in a loop. You can schedule an entire week or month of content from a single CSV file. See bulk scheduling guide for the API details, or just hand the CSV to Claude Code and it figures out the rest.

How do I set up Claude Code with Publora?

One command: claude mcp add --transport http --scope user publora https://mcp.publora.com/mcp. Then run /mcp in Claude Code, select publora, and sign in to Publora in the browser window that opens — no API key needed. For CI or headless machines, add --header "Authorization: Bearer sk_YOUR_API_KEY" with a Publora API key from API in the app.publora.com sidebar.

Can Claude Code upload images and create carousels?

Yes. Claude Code can call the get_upload_url tool to get presigned URLs from Publora, upload local images from your filesystem, then confirm each upload with complete_media. For Instagram carousels, it uploads 2-10 images to the same post. Instagram accepts JPEG, PNG and WebP images (WebP is converted to JPEG automatically) up to 8 MB each. See the media upload guide for details.

What MCP tools does Publora expose to Claude Code?

Publora exposes 20 active MCP tools: list_posts, create_post, get_post, update_post, delete_post, get_upload_url, complete_media, attach_media, account_context, list_connections, post_stats, profile_stats, linkedin_create_comment, linkedin_create_reaction, linkedin_create_reshare, and more. See the full MCP tools reference for parameters and examples.

Can I automate posting when I push code to GitHub?

Yes. You can create a git post-commit hook that invokes Claude Code in non-interactive mode, or use a direct curl call to the Publora REST API in your CI/CD pipeline. The REST API approach is simpler for automated workflows since it doesn't need Claude Code in the loop. Both approaches are covered in this guide's git hook section.

Further Reading

Related Articles