Skip to content

MCP Server

The PostProxy MCP Server provides tools for publishing posts, checking statuses, and managing social media profiles through Claude Code. This server implements the Model Context Protocol (MCP) to enable seamless integration between PostProxy and Claude Code.


Install the MCP server globally using npm:

Terminal window
npm install -g postproxy-mcp

Install the MCP server locally in your project:

Terminal window
npm install postproxy-mcp

Claude Code stores MCP server configuration under ~/.claude/plugins/. After installing postproxy-mcp, Claude will automatically detect the server on restart.


After installing postproxy-mcp, register it with Claude Code using the claude mcp add command:

Terminal window
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

Replace your-api-key with your actual PostProxy API key.

The configuration will be automatically saved to ~/.claude/plugins/. After running this command:

  1. Restart your Claude Code session
  2. Test the connection by asking Claude: “Check my PostProxy authentication status”
  3. If tools are available, Claude will be able to use them automatically

For non-technical users, you can use the interactive setup command:

Terminal window
postproxy-mcp setup

This will guide you through the setup process step by step and register the server using claude mcp add automatically.


The MCP server provides the following tools for interacting with PostProxy:

ToolDescription
auth.statusCheck authentication status and API configuration
profiles.listList all available social media profiles
post.publishPublish a post to specified targets
post.statusGet status of a published post by job ID
post.deleteDelete a post by job ID
history.listList recent post jobs

Check authentication status, API configuration, and workspace information.

NameTypeRequiredDescription
None--This tool requires no parameters
{
"authenticated": true,
"base_url": "https://api.postproxy.dev/api",
"profile_groups_count": 2
}
FieldTypeDescription
authenticatedbooleanWhether the API key is valid and authenticated
base_urlstringBase URL of the PostProxy API
profile_groups_countintegerNumber of profile groups in the account

List all available social media profiles (targets) for posting.

NameTypeRequiredDescription
None--This tool requires no parameters
{
"targets": [
{
"id": "profile-123",
"name": "My Twitter Account",
"platform": "twitter",
"profile_group_id": 1
}
]
}
FieldTypeDescription
targetsarrayArray of available profile objects
targets[].idstringUnique profile identifier
targets[].namestringDisplay name of the connected account
targets[].platformstringPlatform identifier (twitter, facebook, instagram, etc.)
targets[].profile_group_idintegerID of the profile group this profile belongs to

Publish a post to specified targets.

NameTypeRequiredDefaultDescription
contentstringYes-Post content text
targetsstring[]Yes-Array of target profile IDs (must belong to same profile group)
schedulestringNo-ISO 8601 scheduled time
mediastring[]No-Array of media URLs
idempotency_keystringNo-Idempotency key for deduplication
require_confirmationbooleanNofalseIf true, return summary without publishing
draftbooleanNofalseIf true, creates a draft post that won’t publish automatically
{
"job_id": "job-123",
"accepted_at": "2024-01-01T12:00:00Z",
"status": "pending"
}
FieldTypeDescription
job_idstringUnique job identifier for tracking the post
accepted_atstringISO 8601 timestamp when the post was accepted
statusstringInitial status of the post: pending, processing, complete

Get status of a published post by job ID.

NameTypeRequiredDescription
job_idstringYesJob ID from post.publish response
{
"job_id": "job-123",
"overall_status": "complete",
"platforms": [
{
"platform": "twitter",
"status": "ok",
"url": "https://twitter.com/status/123",
"post_id": "123"
}
]
}
FieldTypeDescription
job_idstringJob identifier
overall_statusstringOverall status: pending, processing, complete, failed
platformsarrayArray of platform-specific posting results
platforms[].platformstringPlatform identifier
platforms[].statusstringPlatform posting status: ok, failed, pending
platforms[].urlstring|nullURL of the published post (if available)
platforms[].post_idstring|nullPlatform-specific post ID (if available)

Delete a post by job ID.

NameTypeRequiredDescription
job_idstringYesJob ID to delete
{
"job_id": "job-123",
"deleted": true
}
FieldTypeDescription
job_idstringJob identifier that was deleted
deletedbooleanWhether the deletion was successful

List recent post jobs.

NameTypeRequiredDefaultDescription
limitnumberNo10Maximum number of jobs to return
{
"jobs": [
{
"job_id": "job-123",
"content_preview": "Post content preview...",
"created_at": "2024-01-01T12:00:00Z",
"overall_status": "complete",
"platforms_count": 2
}
]
}
FieldTypeDescription
jobsarrayArray of job objects
jobs[].job_idstringUnique job identifier
jobs[].content_previewstringPreview of the post content
jobs[].created_atstringISO 8601 timestamp when the job was created
jobs[].overall_statusstringOverall status of the job
jobs[].platforms_countintegerNumber of platforms the post was published to

Here are some example prompts you can use with Claude Code:

Check my PostProxy authentication status
Show me all my available social media profiles
Publish this post: "Check out our new product!" to accounts ["profile-123"]
What's the status of job job-123?
Delete post job-123
Show me the last 5 posts I published

  • Check API Key: Ensure POSTPROXY_API_KEY is set when registering with claude mcp add
  • Check Node Version: Requires Node.js >= 18.0.0
  • Check Installation: Verify postproxy-mcp is installed and in PATH
  • Check Registration: Ensure the server is registered via claude mcp add and configuration is saved in ~/.claude/plugins/
  • AUTH_MISSING: API key is not configured. Make sure you included --env POSTPROXY_API_KEY=... when running claude mcp add
  • AUTH_INVALID: API key is invalid. Verify your API key is correct.
  • TARGET_NOT_FOUND: One or more target profile IDs don’t exist. Use profiles.list to see available targets.
  • VALIDATION_ERROR: Post content or parameters are invalid. Check error messages for details.
  • API_ERROR: PostProxy API returned an error. Check the error message for details.
  • Timeout: Request took longer than 30 seconds. Check your network connection and API status.

Enable debug logging by setting POSTPROXY_MCP_DEBUG=1 when registering the server:

Terminal window
claude mcp add --transport stdio postproxy-mcp --env POSTPROXY_API_KEY=your-api-key --env POSTPROXY_BASE_URL=https://api.postproxy.dev/api --env POSTPROXY_MCP_DEBUG=1 -- postproxy-mcp