← Back to blog
AI Agents11 min read

How to Automate Social Media Posts with Claude Code

PostAxis Team·
Claude Code logo next to the PostAxis logo with the title How to Automate Social Media Posts with Claude Code

You can automate social media posts with Claude Code by adding the PostAxis MCP server with one terminal command. After that, Claude Code can read your CHANGELOG, commits or a branch diff, write a version of the announcement for each network, and schedule it to X, LinkedIn, Threads, Telegram and more without you leaving the terminal. This guide is for developers and small product teams who ship often and keep forgetting to tell anyone.

What you can automate with Claude Code

Claude Code already knows what changed in your repository. That makes it the right place to write about it.

  • Release announcements from CHANGELOG.md or the commits since the last tag, scheduled for the hour you want them out.
  • Feature posts from a branch before or right after you merge it.
  • A weekly "what's new" digest for Telegram and LinkedIn, built from the week's commits.
  • Launch plans from a roadmap or docs file: a validated set of posts spread over two weeks.
  • Queue checks: list what is scheduled this week and fix posts that break a network's rules.
  • Release posts from CI, by running Claude Code non-interactively after a tag is pushed.

What you need

  • A PostAxis account. Sign up at app.postaxis.io; every plan starts with a 7-day free trial and includes MCP access with OAuth sign-in.
  • At least one social account connected under Accounts in PostAxis (Instagram, TikTok, YouTube, X, LinkedIn, Facebook Pages, Threads or Telegram channels).
  • Claude Code installed in your terminal or IDE.
  • The PostAxis API add-on only if you want to use an API key instead of OAuth, which mostly matters for CI.

How to connect Claude Code to PostAxis (step by step)

It takes about a minute.

  1. Create your PostAxis account and connect your social accounts. Open Accounts in PostAxis and connect the networks you post to. Claude Code can only post to accounts connected there, and it never sees your social media passwords.

  2. Add the server. Run this in your terminal:

claude mcp add --transport http postaxis https://postaxis.io/api/mcp

By default this adds PostAxis to the current project. Add --scope user to make it available in every project:

claude mcp add --transport http --scope user postaxis https://postaxis.io/api/mcp
  1. Authenticate. Start Claude Code, type /mcp, select postaxis and choose Authenticate. Your browser opens the PostAxis sign-in. Log in and click Approve.

  2. Check it works. Run /mcp again. postaxis should show as connected with 11 tools. Then ask a read-only question to be sure:

Which social accounts can you post to?

Claude Code calls list_accounts and lists your connected profiles.

  1. Ask for a post. Use plain language, for example "post today's release notes to X and LinkedIn at 5pm". Claude Code asks permission before calling tools, so nothing is created without you seeing the call first.

5 workflows you can copy

Turn a release into an X post and a LinkedIn post

Use this right after you cut a release, while the changelog entry is fresh. The two networks want different things: X wants one sharp line, LinkedIn can take a short story with a list.

Read CHANGELOG.md and find the entry for v2.4. Write an X post (one
concrete benefit, no hashtags, under 260 characters) and a LinkedIn
post (3 short paragraphs plus a bullet list of the top changes).
Schedule both for 17:00 Europe/Berlin today.

Claude Code reads the file, calls list_accounts to find your X and LinkedIn profiles, checks get_platform_rules for the caption limits, then calls create_post once with a caption override for each account. You get something like: "Scheduled for 17:00 today: an X post (238 characters) and a LinkedIn post. Both passed the rules check."

Announce what is on this branch

Good for features that deserve their own moment, not just a line in the release notes. Run it from the feature branch.

Look at the diff between this branch and main. Summarise the user-facing
feature in a short X post and a Threads post. Plain words, no internal
names or ticket numbers. Schedule both for tomorrow at 10:00 America/New_York.

Claude Code runs git diff itself, writes the copy, then uses create_post with separate captions for X and Threads. If the diff is mostly refactoring, it should tell you there is nothing user-facing to announce. That is a feature.

Publish a weekly changelog digest

Telegram channels and LinkedIn are good homes for a weekly roundup. Telegram allows long text posts, so you can include more detail there.

Summarise the commits merged to main since last Monday as a "What's new
this week" post. Group them into New, Improved and Fixed. Skip chores,
dependency bumps and CI changes. Publish the full version to our Telegram
channel now, and a shorter version to LinkedIn now.

Claude Code reads git log, filters out noise, and calls create_post with publish set to now. If you would rather look first, end the prompt with "save as drafts instead" and review them under Drafts in PostAxis.

Plan a two-week launch from your roadmap

When a bigger release is coming, plan the whole run of posts at once and check it before anything is scheduled.

Read docs/roadmap.md and the v3.0 section of CHANGELOG.md. Plan 10 posts
over the next two weeks for X and LinkedIn: teasers, launch day, then one
post per major feature. Weekdays only, 09:30 Europe/London. Validate the
whole plan first and show me a table before scheduling anything.

Claude Code calls create_posts_bulk with validate_only set to true. PostAxis checks every post and saves nothing. You read the table, ask for edits ("make post 4 less salesy"), and only then does Claude Code send the same call for real. Bulk calls take up to 50 posts but cannot publish immediately, which is what you want for a plan anyway.

Fix the queue before it fails

Posts written by hand, or by a teammate, sometimes break a rule: an Instagram post with no image, an X caption that grew during editing.

List everything scheduled this week. For each post, check it against the
rules for every network it targets. Fix captions that are too long by
shortening them, and tell me about any Instagram post missing media
instead of changing it.

Claude Code calls list_posts for the date range, get_post for details, get_platform_rules for the limits, then update_post for the fixes it can make. It reports the rest back to you.

Network limits Claude Code works within

NetworkCaption limitMedia rules
X (Twitter)280 charactersText-only allowed; up to 4 images or a video
LinkedIn3,000 charactersText-only allowed; up to 9 images or a video
Threads500 charactersText-only allowed; up to 10 images or a video
Telegram4,096 characters (1,024 with media)Text-only allowed; up to 10 images or a video
Instagram2,200 charactersMedia required: 1–10 images or one video (Reel); professional account

Videos must be MP4 or MOV, 3 to 300 seconds, in 16:9, 9:16, 4:3, 3:4 or 1:1. One video per post, and images and video cannot be mixed.

PostAxis checks every post against these rules before it saves anything. A post that would fail on the network is rejected with an error saying what to change, so Claude Code can fix it in the same session instead of you finding a failed post tomorrow.

Tips for better posts

  • Put your brand voice in CLAUDE.md. Claude Code reads it at the start of every session. A few lines go a long way: who you write for, words you never use, whether you use emoji, how you sign off. Every release post then sounds like you without repeating the instructions.
  • Turn the release prompt into a custom command. Save your release prompt as a Markdown file in .claude/commands/ (for example announce.md) and run it as /announce v2.4. The file can use $ARGUMENTS for the version. Check the Claude Code docs if the format has changed in your version.
  • Validate first on anything with more than two posts. Ask for validate_only and a table. It costs nothing and catches length and media problems before they reach your calendar.
  • Always say the timezone. "17:00 Europe/Berlin" is unambiguous. "5pm" is whatever timezone Claude Code assumes, often UTC.
  • Use drafts when the wording matters. "Save as drafts" puts the posts in PostAxis under Drafts, where you or a teammate can edit and schedule them.
  • Attach real screenshots, not generated ones. PostAxis does not create images. Point Claude Code at a public image URL (it uses upload_media_from_url) or ask for an upload link for a local file (create_upload_link).

Running it from CI

Claude Code can run non-interactively with claude -p, which makes a "post on release" step possible. A runner has no browser for OAuth, so add the server with a PostAxis API key in the header instead (this needs the API add-on):

claude mcp add --transport http postaxis https://postaxis.io/api/mcp \
  --header "Authorization: Bearer $POSTAXIS_API_KEY"

Then call Claude Code in your release job and pre-approve only the tools it needs. Tool names follow the mcp__server__tool pattern; flag names can change between versions, so check claude --help:

claude -p "Read CHANGELOG.md, write an X post about the newest version and schedule it for 17:00 UTC today. Print the post ID." \
  --allowedTools "Read,mcp__postaxis__list_accounts,mcp__postaxis__get_platform_rules,mcp__postaxis__create_post"

Leaving out delete_post and update_post means the job can add posts but never change existing ones.

Troubleshooting

/mcp shows postaxis as failed or needing auth. Select it and choose Authenticate again. If the sign-in expired or was revoked, this opens the PostAxis page again. With an API key, check the key is still active under Settings → API keys.

Claude Code says no accounts are connected. Connect at least one social account under Accounts in PostAxis. If you use several workspaces, tell it which one: "use my Acme workspace".

PostAxis is missing in another project. You added it with the default project scope. Remove it and add it again with --scope user.

A post was rejected before saving. PostAxis checks caption length, media count, video length and format first. The error says what to change. Ask Claude Code to fix that post and try again.

Posts went out at the wrong time. Say the timezone in the request. Without one, the agent uses the timezone it was told or UTC.

FAQ

Can Claude Code post to social media automatically?

Yes. With the PostAxis MCP server added, Claude Code can create, schedule, publish, edit and delete posts on Instagram, TikTok, YouTube Shorts, X, LinkedIn, Facebook Pages, Threads and Telegram channels. It asks your permission before calling tools in interactive sessions.

Can Claude Code post from a CI job or script?

Yes. Run Claude Code non-interactively with claude -p in your pipeline with PostAxis configured. Machines without a browser should use an API key in the server headers instead of OAuth, which needs the API add-on.

Does it work in the Claude Code VS Code and JetBrains extensions?

Yes. MCP servers added to Claude Code are available wherever Claude Code runs, including the IDE extensions.

Does Claude Code see my social media passwords?

No. You connect social accounts inside PostAxis. Claude Code gets an OAuth token for PostAxis, stored in its own credential store, and you can revoke it any time under Settings → API keys → Connected agents.

Is it free?

MCP access with OAuth is included in every PostAxis plan, and every plan starts with a 7-day free trial. API keys need the API add-on.

Does Claude Code write a different version for each network?

It can, and it should. X counts characters, LinkedIn rewards a longer read, Telegram has no title. Name the networks in one request and Claude Code sends one post with a version per account. PostAxis rejects any version that breaks that network's limits before it is saved.

Ready to ship your next release announcement from the terminal? See the Claude Code agent page for the quick setup, the MCP server reference for every tool, and the complete guide to AI agents for social media for the bigger picture. If your team also uses other tools, read how to automate social media with OpenAI Codex or post release notes from Cursor. Then start your free trial and connect your first account.

automate social media with claude codeclaude code mcpclaude code social mediarelease notes to social mediasocial media mcp server

Ready to simplify your social media?

PostAxis helps builders and creators publish to all platforms from one dashboard with scheduling, cross-posting, and automation.

Join the waitlist →

Wide list of social channels
on one axis

Harness every network you need. Platforms orbit PostAxis; you stay at the center.

Browse all platform pages

Frequently asked questions

You get a 7-day free trial. A card is required to start. Cancel before the trial ends and you pay nothing. After that, you pick a Creator, Growth, or Pro plan.