How to Let AI Agents Publish to Social Media via MCP

MCP gives Claude Code, Cursor, and other LLM agents the ability to publish posts. Here's how to wire the Postproxy MCP server.

What is MCP?

MCP is a protocol for giving an LLM access to tools, resources, and prompts that live outside the model. An MCP server exposes a set of tool definitions; an MCP client (Claude Code, Claude Desktop, Cursor) discovers them and can call them with structured arguments.

For social media publishing, MCP turns “the model wants to post this” into “the model called post_publish(profiles=['twitter','linkedin'], body='...') and got back a post ID.”

What is the Postproxy MCP server?

Postproxy ships two ways to run it:

  • Hosted (remote)https://mcp.postproxy.dev/mcp. No install. Auth via ?api_key=... query param, or an X-Postproxy-API-Key header if your client prefers headers.
  • Local (stdio) — npm package postproxy-mcp. Runs on your machine over stdio.

Both expose the same tools, and both work with any MCP-compatible client: Claude Code, Claude Desktop, Cursor, Windsurf, or your own agent loop.

How do I add the remote server to Claude Code?

Terminal window
claude mcp add --transport http postproxy \
https://mcp.postproxy.dev/mcp?api_key=YOUR_POSTPROXY_API_KEY

Restart your Claude Code session. Ask: “Check my Postproxy authentication status.” Claude Code will call auth_status and report back.

How do I run the local server in Claude Code?

Terminal window
npm install -g postproxy-mcp
claude mcp add --transport stdio postproxy-mcp \
--env POSTPROXY_API_KEY=your-api-key \
--env POSTPROXY_BASE_URL=https://api.postproxy.dev/api \
-- postproxy-mcp

There’s also an interactive setup that runs the claude mcp add command for you:

Terminal window
postproxy-mcp setup

How do I wire it into Cursor, Claude Desktop, and other clients?

Clients that read a JSON config file take the remote server directly. Add Postproxy to the mcpServers block:

{
"mcpServers": {
"postproxy": {
"url": "https://mcp.postproxy.dev/mcp?api_key=YOUR_POSTPROXY_API_KEY"
}
}
}

For the local stdio package instead:

{
"mcpServers": {
"postproxy": {
"command": "postproxy-mcp",
"env": {
"POSTPROXY_API_KEY": "your-api-key",
"POSTPROXY_BASE_URL": "https://api.postproxy.dev/api"
}
}
}
}

The config file is the same shape for Cursor (.cursor/mcp.json), Claude Desktop (claude_desktop_config.json), and most other clients. Restart the client, then confirm with a prompt like “List my connected Postproxy profiles.” — the agent calls profiles_list and reports the accounts it can reach.

Which tools does the MCP server expose?

The Postproxy MCP server exposes these tools (full schemas at postproxy.dev/automation/mcp):

Authentication

  • auth_status — verify API key, count profile groups

Profiles

  • profile_groups_list — list workspaces / profile groups the key can reach
  • profiles_list — list connected social accounts (filterable by group)
  • profiles_placements — list company pages, boards, organizations available for a profile
  • profiles_stats — follower/engagement timeseries for a profile

Posts

  • post_publish — create and publish a post
  • post_publish_draft — turn an existing draft into a published post
  • post_status — get a post’s current state and per-platform results
  • post_update — edit a draft or scheduled post
  • post_delete — remove a post
  • post_delete_on_platform — delete from social platforms (where supported)
  • post_stats — engagement metrics

Queues

  • queues_list, queues_get, queues_create, queues_update, queues_delete, queues_next_slot

Comments & DMs

  • comments_list, comments_get, comments_create, comments_delete
  • comments_hide, comments_unhide, comments_like, comments_unlike
  • dm_chats_list, dm_messages_list, dm_message_send, dm_comment_private_reply, and the rest of the engagement surface

History

  • history_list — published-post history with stats

The publishing and scheduling tools are covered below; the engagement tools (DMs, comments, Google reviews) get their own walkthrough in How to Let AI Agents Answer DMs and Comments via MCP.

What does a real workflow look like?

Prompt to the agent: “Read this week’s changelog at /CHANGELOG.md, draft a post per major item, ask me to approve, then schedule them across LinkedIn and X for the next 5 weekdays at 10am ET.”

The agent will:

  1. Read the changelog (its file system tool).
  2. Draft 5 posts.
  3. Show each one for approval.
  4. On your approval, call post_publish 5 times with the right scheduled_at.
  5. Confirm back the 5 post IDs.

Without MCP this is “an agent that suggests” — with MCP it’s “an agent that ships.”

How do I post to every platform in one call?

The agent doesn’t loop over platforms. post_publish takes a profiles array — pass profile IDs or bare platform names and one call fans out everywhere:

{
"content": "New release is out.",
"profiles": ["linkedin", "twitter", "instagram", "threads", "facebook"]
}

Per-platform tailoring lives in the same call. The platforms object holds platform-specific options (an Instagram carousel, a YouTube title, a TikTok privacy setting), and thread turns one post into an X or Threads thread. So the agent can write a long-form LinkedIn post and a tight three-tweet thread from the same prompt without you wiring up five different platform APIs. Full options are in the platform parameters reference.

For the platforms each profile supports — Instagram, TikTok, X, LinkedIn, Facebook, YouTube, Threads, Pinterest, Bluesky, Mastodon, Google Business, and more — see the platforms directory.

How do I schedule posts through the agent?

Two ways for an agent to schedule instead of publish now:

  • Explicit time — pass schedule with an ISO 8601 timestamp. “Post this tomorrow at 9am ET” becomes post_publish(..., schedule="2026-06-23T13:00:00Z").
  • Queue slot — pass queue_id and let the queue pick the slot. The agent manages queues with queues_create (weekly timeslots), queues_list, queues_next_slot, and queues_update to pause or reshuffle.

That covers the “fill my posting calendar for the week” prompt: the agent drafts, reads the open slots with queues_next_slot, and drops each post into the queue at queue_priority you set — no fixed timestamps to hand-calculate.

How do I pull analytics back through the agent?

Publishing is half of it. The same server reads results, so the agent can close the loop:

  • post_stats — engagement snapshots for one or more posts
  • profiles_stats — follower and engagement timeseries per account
  • history_list — recent published-post history with stats

Now “which of last month’s LinkedIn posts beat the median, and what did they have in common?” is a single agent run: history_list to enumerate, post_stats to score, the model to summarize. The reporting and the publishing share one tool boundary, so the agent that ships the posts is the same one that reports on them.

How do I manage multiple accounts and clients?

For agencies and anyone running more than one brand, profiles are grouped. profile_groups_list returns the workspaces a key can reach, and profiles_list takes a group filter so the agent scopes its work to one client at a time. Issue a key per client and the agent simply can’t touch the wrong account — the boundary is the key, not a prompt instruction.

How do I build my own MCP-driven agent?

Beyond Claude Code and Cursor, you can use the Anthropic SDK with MCP tool access:

from anthropic import Anthropic
client = Anthropic()
mcp_servers = [{
"type": "url",
"url": "https://mcp.postproxy.dev/mcp?api_key=YOUR_POSTPROXY_API_KEY",
"name": "postproxy",
}]
response = client.beta.messages.create(
model="claude-opus-4-8",
max_tokens=4096,
mcp_servers=mcp_servers,
messages=[{
"role": "user",
"content": "Schedule a post for tomorrow 9am ET on LinkedIn and X: 'New release out, link in bio'."
}],
)

Claude calls post_publish itself, returns the post ID, and you didn’t write a line of platform-specific code.

Useful jobs to delegate to the agent

  • Repurpose a blog post — read the blog, draft platform-specific captions, schedule across 5 platforms.
  • Reply to comments — watch comments_list, draft replies, post on approval (comments_create).
  • Weekly recap — read commits, ship an X thread + LinkedIn post.
  • Calendar auditqueues_list + queues_next_slot + history_list → “what’s scheduled, what’s missing.”

All routed through MCP → Postproxy. The agent doesn’t see OAuth tokens. The platforms don’t see the agent.

How does authentication and security work?

The MCP server scopes everything to your Postproxy API key — same auth boundary as our REST API. The agent gets only the profiles you’ve connected. Rate limits and per-platform quotas apply. There’s no separate “agent permission” — the API key is the permission.

FAQ

What is a social media MCP server? An MCP server that exposes social publishing and engagement as typed tools an LLM agent can call. The agent asks for post_publish or comments_create; the server runs it against the connected accounts. Postproxy’s is at https://mcp.postproxy.dev/mcp.

Do I need to install anything? No. The hosted server needs only an API key and a client that speaks HTTP transport. The local postproxy-mcp npm package is there if you’d rather run it over stdio on your own machine.

Which AI clients work with it? Any MCP client — Claude Code, Claude Desktop, Cursor, Windsurf — plus your own agent via the Anthropic SDK’s mcp_servers parameter. All use the same endpoint and tools.

Which platforms can the agent post to? Every platform a Postproxy profile supports, including Instagram, TikTok, X, LinkedIn, Facebook, YouTube, Threads, Pinterest, Bluesky, Mastodon, and Google Business. One post_publish call fans out across all of them.

Can the agent schedule instead of posting immediately? Yes — pass an ISO timestamp in schedule, or a queue_id to drop the post into a recurring queue slot.

Can it read DMs and comments, not just publish? Yes. The same server exposes the engagement tools — see How to Let AI Agents Answer DMs and Comments via MCP.

Does the agent see my OAuth tokens? No. The agent only ever sees Postproxy tools scoped to your API key. Platform tokens stay inside Postproxy; the platforms never see the agent.

For deeper context, see MCP servers for social media, Social media MCP server, and Remote MCP server.

Ready to get started?

Start with our free plan and scale as your needs grow. No credit card required.