@postai/mcp

use postai from
any ai agent.

PostAI exposes a full Model Context Protocol server. connect it to Claude Desktop, Cursor, or any MCP-compatible client and schedule posts, generate content, and query analytics — all through natural language.

$npx @postai/mcp

available on Pro Plus plan ($99/mo) and above · free for self-hosted

connect to your ai client

works with any MCP-compatible agent — three quick-start configs below

🤖

Claude Desktop

The most powerful setup. Claude reads your calendar, drafts posts, and schedules them using natural language — all inside Claude Desktop.

claude_desktop_config.jsonjson
{
  "mcpServers": {
    "postai": {
      "command": "npx",
      "args": ["@postai/mcp"],
      "env": {
        "POSTAI_API_KEY": "your-api-key"
      }
    }
  }
}
⌨️

Cursor

Schedule posts and query analytics right from your editor. Great for developers who want to automate content alongside code shipping.

.cursor/mcp.jsonjson
{
  "mcpServers": {
    "postai": {
      "command": "npx @postai/mcp",
      "env": {
        "POSTAI_API_KEY": "your-api-key"
      }
    }
  }
}
⚙️

Custom Agent

Building your own AI agent? PostAI's MCP server runs over stdio — any MCP-compatible client that can launch a local process works out of the box. A remote HTTP transport is in progress.

SSE endpointjson
# SSE transport for web-based clients
npx -y @postai/mcp

Authorization: Bearer <your-api-key>
Content-Type: text/event-stream

available MCP tools

13 tools covering scheduling, media, analytics, and content generation

schedule_post

Schedule a post to connected platforms at a specific time

create_draft

Save a draft post for review before scheduling

list_posts

List posts filtered by status, platform, or count

list_queue

View upcoming scheduled posts across every connected platform

get_post_status

Check the publishing status of a post, per platform

get_analytics

Query X or LinkedIn analytics — impressions, engagement, follower growth

search_viral_posts

Keyword search over PostAI's viral post corpus, ranked by engagement

generate_content

Run the AI Content Agent on a URL, text, or topic to produce posts

get_agent_run_status

Check on a content-agent run and collect its output

list_accounts

List connected social accounts and their status

get_next_slot

Find the next free posting slot from your configured queue

add_media_from_url

Import an image or video from a URL into your media library

generate_image

Generate an image from a text prompt (5 AI credits)

api key setup

1
sign up or sign in to PostAI
you need a Pro Plus or Agency plan to access the MCP server. see pricing →
2
generate an API key
go to Settings → API Keys and create a new key. copy it — it won't be shown again.
3
set the environment variable
add your key to the MCP config in your AI client:
POSTAI_API_KEY=postai_sk_live_xxxxxxxxxxxxxxxxxxxx

see it in action

a demo conversation — Claude Desktop scheduling a post via PostAI MCP

Claude Desktop — postai MCP connected
postai mcp active

Schedule a LinkedIn post about our new product feature launching tomorrow. Make it professional but exciting, around 200 words.

you
C

I'll generate that LinkedIn post and schedule it for tomorrow morning at optimal time.

calling generate_content
// generate_content
{
  "platform": "linkedin",
  "topic": "new product feature launch",
  "tone": "professional, exciting",
  "length": "~200 words"
}
C

Got it. Generated a 194-word post. Scheduling for tomorrow at 8:00 AM based on your account's best engagement window.

calling schedule_post
// schedule_post
{
  "platform": "linkedin",
  "publish_at": "2025-05-01T08:00:00Z",
  "status": "scheduled",
  "post_id": "post_a4k2m9"
}
C

Done. Your LinkedIn post is scheduled for tomorrow at 8:00 AM ET. I can preview it or make edits if you'd like.

let your ai assistant post for you.

set up in 2 minutes. schedule your first post from Claude Desktop.

get your API key →

available on Pro Plus ($99/mo) · self-hostable · free trial