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 MCP is, briefly

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.”

Postproxy’s MCP server

Postproxy ships two ways to run it:

  • Hosted (remote)https://mcp.postproxy.dev/mcp. No install. Auth via ?api_key=....
  • Local (stdio) — npm package postproxy-mcp. Runs on your machine.

Both expose the same tools.

Wiring it into Claude Code (remote)

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.

Wiring it into Claude Code (local)

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

Available tools

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

Authentication

  • auth_status — verify API key, list workspaces

Profiles

  • profiles_list — list connected social accounts
  • profiles_placements — list company pages, boards, organizations available 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

  • comments_list, comments_get, comments_create, comments_delete
  • comments_hide, comments_unhide, comments_like, comments_unlike

History

  • history_list — published-post history with stats

A real example

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.”

Building your 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-7",
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.

Security model

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.

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.