# Postdom MCP

Connect an MCP-compatible agent to a Postdom workspace. Create a workspace key in Postdom Accounts, then use the configuration Postdom displays.

```json
{
  "mcpServers": {
    "postdom": {
      "command": "npx",
      "args": ["-y", "@postdom/mcp@0.4.0"],
      "env": {
        "POSTDOM_API_URL": "https://api.example.com/v1",
        "POSTDOM_API_KEY": "your-workspace-key"
      }
    }
  }
}
```

The key is workspace-scoped and shown once. Keep it in the agent client's secure configuration; never commit or print it. Social account authorization remains a human OAuth action.

The same fourteen tools are also available over Streamable HTTP at `https://api.postdom.com/mcp`.

For local video, call `upload_media` with `content_type`, exact `size_bytes`, target `platforms`, and measured `width_pixels`, `height_pixels`, and `duration_seconds`. Measurements are required positive integers; never guess or default them. Tool discovery advertises all six required fields, and tool calls enforce the core platform preflight constraints. PUT the bytes directly to the returned short-lived URL using the returned headers, then call `get_media` until it returns `stored`. Pass that `media_handle` to `publish_video`. Video bytes never pass through the MCP or Postdom API process.
