Post to Facebook from Claude Code
Claude Code can schedule and publish Facebook Page posts through Postiz. Add the Postiz MCP server with one terminal command, sign in with OAuth, and ask Claude Code to post an update, attach a link so Facebook renders a preview card, or upload an image or video from your repo, all from the command line.
Please make sure there is always a human in the loop.
Last updated: September 2026
How to post to Facebook from Claude Code
Add the Postiz MCP server to Claude Code once, sign in with OAuth, connect Facebook in Postiz, and then describe the post in plain language. Setup takes about a minute.
Setup once, then just ask
# One-time setup: add the Postiz MCP server (OAuth, no API key)
claude mcp add --transport http postiz https://mcp.postiz.com/mcp-oauth-dynamic
# Or install the Postiz skill instead
npx skills add gitroomhq/postiz-agent
export POSTIZ_API_KEY=your_api_key
# Then ask Claude Code:
> Post our v2.4 release announcement to our
Facebook Page with the link to the blog
post, tomorrow at 10am
Claude Code: Done! Facebook Page post
scheduled for tomorrow at 10:00 AM with
a link preview.What can Claude Code do on Facebook?
On Facebook, Claude Code can publish text posts, link posts with a rich preview, and image or video posts to the Pages you have connected in Postiz.
Text Posts
Publish engaging text posts with emojis, hashtags, and mentions. Perfect for quick updates, announcements, and community engagement.
Link Previews
Attach URLs to generate rich link previews with title, description, and thumbnail. Drive traffic to your website or blog.
Media Attachments
Upload and attach images or videos to your posts. Share visual content that drives higher engagement on Facebook.
Page Management
Post as your Facebook Page to maintain your brand voice. Schedule content for your business page effortlessly.
Analytics Tracking
Track post performance with Postiz analytics. Monitor reach, engagement, and clicks across your Facebook content.
Scheduled Posting
Schedule posts with precise timestamps. Plan your Facebook content calendar and let Postiz handle the publishing.
How does Claude Code post to Facebook through Postiz?
You describe what you want in plain language and Claude Code handles the Postiz calls for you. Here is how a typical conversation goes.
Find Your Facebook Integration
Ask Claude Code whether your Facebook account is connected. It also checks which options the platform supports.
Example conversation
> Is my Facebook account connected to Postiz?
Claude Code: Yes — your Facebook account is connected
and ready. Want me to post something?Prepare Your Content
Write your post content and optionally upload media. For link posts, just include the URL in settings — Facebook generates the preview automatically.
Example conversation
> Draft a Facebook post about our new
feature launch
Claude Code: Here's a draft for Facebook:
"We just shipped something big..."
Want me to add media and schedule it?Create Your Post
Schedule a Facebook post with your content, optional media, and platform-specific settings like link URL for rich previews.
Example conversation
> Yes — add screenshot.png and schedule
it for tomorrow at 9am
Claude Code: Done! Scheduled on Facebook for
tomorrow at 9:00 AM.Facebook Settings Reference
Mention any of these in plain language and Claude Code sets them for you. These are the Facebook options it can apply to any post.
| Field | Type | Description |
|---|---|---|
__type | string | Must be "facebook" |
url | string | Link URL to attach for rich link previews |
Common Configurations
Ask Claude Code for any of these common Facebook scenarios and it applies the matching settings.
Simple Text Post
Just ask
> Post it with: Simple Text Post
Claude Code: Got it. Applying:
(defaults)Post with Link Preview
Just ask
> Post it with: Post with Link Preview
Claude Code: Got it. Applying:
url: https://example.com/blog/my-articleProduct Launch Announcement
Just ask
> Post it with: Product Launch Announcement
Claude Code: Got it. Applying:
url: https://myproduct.com/launchExample prompts for Facebook in Claude Code
These are prompts you can type into a Claude Code session, or pass to claude -p in a script. Claude Code reads your repo, calls Postiz, and confirms before publishing.
Link post with preview
Claude Code
> Post a 2-sentence teaser for
https://example.com/blog/v2-4 to Facebook
and attach the URL so it shows a preview,
Thursday 9am
Claude Code: Scheduled on Facebook with
url: https://example.com/blog/v2-4 for
Thursday 9:00 AM.Image post from the repo
Claude Code
> Post ./assets/team-offsite.jpg to our
Facebook Page with a short caption, today
at 5pm
Claude Code: Uploaded team-offsite.jpg.
Scheduled on Facebook for 5:00 PM today.Nightly digest, headless
Claude Code
$ claude -p "Read today's closed issues and post
a friendly 3-line update to our Facebook Page
via Postiz for 6pm."
# Works from cron or CI; Claude Code
# exits when the post is scheduledFacebook limits and gotchas to know
Facebook posting through Postiz targets Pages, and a few details affect how Claude Code composes the post.
- ✓Postiz posts to Facebook Pages you have connected, so connect the Page in Postiz first and name it in your request if you manage several.
- ✓Set url when you want Facebook to render a link preview card; a URL only inside the text does not always produce one.
- ✓Media is uploaded through Postiz, so reference a local file or a public URL and Claude Code takes care of the upload.
- ✓Claude Code asks for permission before publishing, which is useful when a post goes to a public Page.
What is Claude Code?
Claude Code is Anthropic's agentic coding tool that lives in your terminal. It handles software engineering tasks — writing features, fixing bugs, and answering questions about your codebase — and it can run shell commands and MCP tools like Postiz.
Not the same as Claude Cowork (Anthropic's desktop agent for knowledge workers) or the Postiz connector for Claude.ai (chat in the browser or desktop app). Claude Code runs in your terminal and IDE and can read your repository while it writes Facebook posts.
Terminal & IDE Native
Claude Code runs in your terminal, with extensions for VS Code and JetBrains. You type what you want in plain English and it handles Postiz for you.
Agentic Execution
Claude Code plans and works through multi-step tasks on its own — discovering channels, uploading media, and scheduling posts — and asks for permission before it acts.
Parallel Tasks
Run several Claude Code sessions side by side, or spawn subagents in one. Schedule posts to different platforms while it handles other coding work.
How Postiz Works with Claude Code
Claude Code discovers Postiz through the Postiz skill or the Postiz MCP server. It reads the SKILL.md (or the MCP tool list) to learn what it can do, then chains calls together for social media workflows.
- ✓Install the Postiz skill, or add the Postiz MCP server with claude mcp add
- ✓Claude Code discovers the Postiz tools over MCP, or reads SKILL.md when you use the skill
- ✓MCP route: sign in with OAuth, no API key. Skill route: set POSTIZ_API_KEY
- ✓Claude Code asks for permission before running commands
- ✓Works alongside your coding tasks in parallel
Install Postiz
# Option A: add the Postiz MCP server
claude mcp add --transport http postiz https://mcp.postiz.com/mcp-oauth-dynamic
# Option B: install the Postiz skill
npx skills add gitroomhq/postiz-agent
export POSTIZ_API_KEY=your_api_key
# Then just ask
claude "list my social media integrations"Facebook Posting with Claude Code
Tell Claude Code what to post from your terminal or IDE — it discovers your integrations via Postiz and handles the entire publishing workflow.
Just Ask Claude Code
Terminal and IDE integration
Tell Claude Code what to post from your terminal or IDE — it discovers your integrations via Postiz and handles the entire publishing workflow.
Claude Code CLI
$ claude "Post to Facebook about our
new feature launch, schedule for
tomorrow at 9am"
Claude Code: I'll handle that.
Found your Facebook integration.
Composing and scheduling the post.
Done! Your post is scheduled.
Post ID: abc-123Parallel Tasks
Multiple tasks at once
Claude Code runs headless with claude -p, so several tasks can run in parallel. Schedule posts to different platforms while it works on other coding tasks.
Claude Code Parallel Tasks
# Run multiple posting tasks in parallel
$ claude -p "Schedule a post about our
launch to X for tomorrow 9am" &
$ claude -p "Write a LinkedIn article
about our new feature and schedule
for tomorrow noon" &
$ claude -p "Fix the bug in auth.ts"
# All three tasks run simultaneouslyWhy Claude Code + Postiz for Facebook
Claude Code's autonomous execution makes Postiz a natural fit. The agent reads the SKILL.md to understand every available command, then autonomously chains them together for Facebook workflows.
- ✓Runs in your terminal or IDE — just type what you want
- ✓Permission-based execution — you stay in control
- ✓Parallel task support — post while coding
- ✓Link previews generated automatically when a URL is provided
- ✓Cross-post to Facebook + other platforms in a single session
- ✓Powered by Claude — Anthropic's most capable models
SKILL.md (auto-discovered)
---
name: postiz
description: Social media automation
CLI for scheduling posts across
30+ platforms including Facebook
metadata:
claude-code:
requirements:
env:
- POSTIZ_API_KEY
binaries:
- postiz
---
# Available Commands
- postiz integrations:list
- postiz integrations:settings <id>
- postiz posts:create
- postiz upload <file>
- postiz analytics:platform <id>
# Facebook Settings
__type, urlAlso Works with Claude Cowork
Postiz works with any AI agent that can run commands or call MCP tools. That includes Claude Cowork, Anthropic's desktop agent, and the Claude.ai connector. See the agents overview for every supported agent.
Claude Cowork
by Anthropic
Claude Cowork reads the Postiz skill so it knows what it can do, then autonomously discovers your Facebook integration, composes your post with a link preview if needed, and schedules the post.
Claude Cowork
> Share our new blog post on Facebook
with a link preview, schedule for
tomorrow morning
Claude Cowork: Done! Scheduled on Facebook for
tomorrow at 9:00 AM.Post to Facebook and other platforms from Claude Code
One request can schedule the same content to Facebook and other channels, and each platform keeps its own settings. Every platform below has its own Claude Code guide.
Example
> Post "Excited to announce our new feature!" to
Facebook and Instagram tomorrow at 9am, then schedule
a daily tip on Facebook every weekday at 10am
Claude Code: Done! Scheduled:
- Facebook + Instagram: tomorrow 9:00 AM
- Daily tips on Facebook: Mon-Fri 10:00 AMSee all 25 platforms in the Claude Code social media guide, compare agents on the AI agents overview, read about the Postiz MCP server, or check pricing. For the channel itself, seeFacebook scheduling features in Postiz.
Post Types
Text Post
No media, no URLLink Post
Include url in settingsMedia Post
Attach an image or videoFacebook and Claude Code: frequently asked questions
How do I post to a Facebook Page from Claude Code?
Install the Postiz MCP server in Claude Code with claude mcp add --transport http postiz https://mcp.postiz.com/mcp-oauth-dynamic, sign in, and connect your Facebook Page in Postiz. Then ask Claude Code to publish or schedule a post. It writes the copy, uploads media if you named a file, and confirms the scheduled time.
Can Claude Code attach a link preview to a Facebook post?
Yes. Ask Claude Code to attach a URL and it sets the Facebook url field, which tells Postiz to publish the post as a link post so Facebook renders the preview card with title and image. This is the right choice for blog posts, release pages, and landing pages.
Does Claude Code post to Facebook profiles or groups?
Postiz publishes to Facebook Pages you have connected. If you manage more than one Page, tell Claude Code which one to use, or ask it to list your connected channels first. The same request can also go to other platforms, such as Instagram or LinkedIn, in one session.
Can I schedule Facebook posts from a script with Claude Code?
Yes. Run claude -p with your prompt from a shell script, cron job, or GitHub Action. Claude Code reads any files you reference, calls Postiz, schedules the Facebook post, and exits. The Postiz MCP server or skill must be configured on the machine that runs the job.
Do I need a Facebook developer app or token to use this?
No. You connect the Facebook Page inside Postiz using Facebook's own login flow, and Claude Code authenticates to Postiz with OAuth when you add the MCP server. There are no Graph API tokens to create or refresh yourself. With the skill route, the only key is POSTIZ_API_KEY.
Start posting to Facebook
Install Postiz Agent and automate your Facebook content strategy with AI-powered scheduling and publishing.