Facebook MCP server and Page posting API for AI agents
Why not call the Facebook API directly?
Doing it yourself with the Facebook API
- Create a Meta developer app and pass App Review for Page publishing permissions such as pages_manage_posts.
- Exchange user tokens for Page access tokens and keep them valid.
- Upload large videos in chunks, and photos as separate uploads, before creating the post.
With SleekPost
- Connect a Facebook Page in the dashboard once. No developer app, review or token handling on your side.
- Give your agent an API key. Revoke it anytime.
- One create_post call publishes, schedules or drafts, on Facebook and any other network.
- Facebook's limits are checked before anything goes live, and errors say exactly what to fix.
Set up in a few minutes
1. Connect Facebook
Meta's API publishes to Pages you manage, not to personal profiles.
Connect accounts →claude mcp add --transport http sleekpost https://sleekpost.com/mcp --header "Authorization: Bearer YOUR_SLEEKPOST_API_KEY"Example: post to Facebook
You ask your agent
“Share our holiday opening hours on the Facebook Page now.”
The agent calls list_accounts to find the account id, then makes one create_post call.
{
"tool": "create_post",
"arguments": {
"text": "Holiday hours 🎄 We're open 10am to 4pm on December 24 and closed on December 25. See you soon!",
"account_ids": [
"ACCOUNT_ID"
],
"publish_now": true
}
}Facebook rules your agent doesn't have to memorize
| Text limit | 63,206 characters (post text) |
|---|---|
| Media | Optional (text-only posts work) |
| Images per post | Several |
| Video | Yes |
| Connect with | A Facebook Page |
If your agent sends a 63,300-character post to Facebook, nothing is published and the API explains what to change:
{
"error": {
"code": "invalid_request",
"message": "The post can't be published as-is: Facebook allows 63206 characters; this text has 63300. Shorten it, or give this account its own shorter text in text_overrides.",
"hint": "Fix the listed problems and send the request again. text_overrides lets you give individual accounts their own text.",
"details": {
"problems": [
{
"account_id": "ACCOUNT_ID",
"platform": "facebook",
"message": "Facebook allows 63206 characters; this text has 63300. Shorten it, or give this account its own shorter text in text_overrides."
}
]
}
}
}MCP tools
list_accountsList connected social accounts and their ids.
create_postPublish now, schedule, or draft a post to one or more accounts, with optional images/videos.
upload_mediaImport an image or video from a public URL and get a media id.
list_postsList scheduled, published, failed or draft posts.
get_postGet a post's per-account status, errors and live URLs.
delete_postDelete a draft or cancel a scheduled post.
Machine-readable docs: /llms.txt · /llms-full.txt · OpenAPI · MCP endpoint https://sleekpost.com/mcp
Other networks, same MCP server
Frequently asked questions
Do I need my own Facebook developer app?
No. You connect a Facebook Page in the SleekPost dashboard once, and your agent only needs a SleekPost API key. It never sees your Facebook login or tokens.
Which AI tools can use the MCP server?
Claude Code, Cursor, VS Code, Codex, Gemini CLI and Claude Desktop, and any other client that supports remote MCP servers over HTTP. Anything that can send HTTP requests can use the REST API instead.
Can my agent schedule Facebook posts for later?
Yes. Pass scheduled_at as an ISO 8601 time to schedule, publish_now: true to post immediately, or draft: true to save a draft for a person to review.
How does the agent attach images or video?
Pass public URLs in media_urls. SleekPost downloads, converts and hosts the files, then publishes them with the post.
What does API and MCP access cost?
API and MCP access are included in every plan. Plans start at $9/month ($5.40/month billed yearly) with unlimited posts and a 7-day free trial.
Give your agent Facebook.
API and MCP access are included in every plan. Plans start at $9/month ($5.40/month billed yearly) with unlimited posts and a 7-day free trial.