← All docs

MCP

PostMCP ships both a hosted remote MCP server and a local stdio MCP package. Use /mcp/tools.json for the current machine-readable tool catalog.

Hosted remote MCP server

https://mcp.postmcp.dev/mcp

Configure the hosted server with a scoped POSTMCP_API_KEY. Use agent keys with only the scopes needed for the workflow, such as posts.read, posts.schedule, posts.publish, media.upload, accounts.read, and usage.read.

Local stdio MCP package

npm install -g postmcp-mcp
postmcp-mcp

Required environment:

export POSTMCP_API_BASE_URL=https://api.postmcp.dev
export POSTMCP_API_KEY=pmcp_key_...
export POSTMCP_WORKSPACE_ID=wrk_123

Optional environment:

export POSTMCP_DEFAULT_SANDBOX=true

Use POSTMCP_API_BASE_URL=https://api.postmcp.dev for production MCP clients. Point it at a local or staging API only when intentionally testing non-production infrastructure.

Generate client config from the CLI:

postmcp mcp install --client claude --json
postmcp mcp install --client cursor --json

Claude Desktop can use /docs/claude.mcp.json. Cursor can use /docs/cursor.mcp.json.

P0 tools

list_connected_accounts
get_account_status
get_platform_capabilities
validate_post
create_draft
schedule_post
publish_post
upload_media
list_posts
get_post_status
delete_scheduled_post
get_usage
get_billing_warnings

Write safety

For post writes, prefer validate_post before schedule_post or publish_post. Write tools accept dry_run, idempotency_key, confirmation_required, auto_fix, sandbox, and per-target sandbox_behavior where applicable. Use get_billing_warnings before metered X URL posting.