{
  "markdown": "# content-distribution-mcp\n\n**Publish your content everywhere—without rewriting for every platform.**\n\nA MCP server that distributes a single piece of content across 8+ channels (DEV.to, Hashnode, GitHub Discussions, Reddit, Bluesky, LinkedIn, Medium, Twitter) with **automatic platform-specific adaptation**, idempotent publishing, per-community anti-spam rules, and centralized state management.\n\n## The Problem It Solves\n\nCreating and publishing content at scale is friction-heavy:\n- **Different formats**: Reddit strips formatting, Twitter has character limits, DEV.to supports embeds and rich media. Each needs customized copy.\n- **Platform rules**: Subreddits enforce cooldowns and flair requirements. Communities have posting patterns and automoderator gates. LinkedIn suppresses external links.\n- **State chaos**: Which posts went live where? What if a publish fails halfway? Did that Reddit post get auto-removed by spam filters?\n\nThis MCP handles distribution complexity. Write your core message once, generate platform-specific variants, publish everywhere safely.\n\n## How It Works\n\n1. **Your agent** generates channel-specific copy variants (rewritten titles, trimmed text, platform-appropriate tags, audience-matched tone).\n2. **This MCP** publishes each variant with idempotency, OAuth, API retries, and scheduling—enforcing platform constraints automatically.\n3. **You control** which platforms get what. The MCP returns per-channel hints (character limits, tag vocabularies, cooldowns) but leaves creative decisions to you.\n\nNo LLM calls inside. No walled-in agents. Just a clean API for multi-platform content distribution at scale.\n\n## Install\n\n```bash\nnpx @automatelab/content-distribution-mcp\n```\n\nOr add it permanently to your MCP host.\n\n## Wire into your MCP host\n\n**Claude Code** — add to `.claude/mcp.json`:\n\n```json\n{\n  \"mcpServers\": {\n    \"content-distribution\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@automatelab/content-distribution-mcp\"]\n    }\n  }\n}\n```\n\n**Claude Desktop** — add to `claude_desktop_config.json`:\n\n```json\n{\n  \"mcpServers\": {\n    \"content-distribution\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@automatelab/content-distribution-mcp\"]\n    }\n  }\n}\n```\n\n**n8n** — use the MCP Client node, point it at `npx @automatelab/content-distribution-mcp` over stdio.\n\n**Cursor / Windsurf / any MCP host** — same `npx -y content-distribution-mcp` pattern.\n\n## Configure credentials\n\nThe server reads credentials from a **Distribution Profile** stored in `~/.distribution-mcp/profiles.yaml`:\n\n```yaml\n# ~/.distribution-mcp/profiles.yaml\ndefault:\n  credentials:\n    DEV_TO_API_KEY: \"your-devto-api-key\"\n    HASHNODE_TOKEN: \"your-hashnode-token\"\n    HASHNODE_PUBLICATION_ID: \"your-pub-id\"\n    GITHUB_TOKEN: \"ghp_...\"\n    GITHUB_DISCUSSION_REPO: \"owner/repo\"\n    REDDIT_CLIENT_ID: \"...\"\n    REDDIT_CLIENT_SECRET: \"...\"\n    REDDIT_USERNAME: \"...\"\n    REDDIT_PASSWORD: \"...\"\n    BLUESKY_IDENTIFIER: \"you.bsky.social\"\n    BLUESKY_PASSWORD: \"...\"\n  subreddits:\n    - ClaudeAI\n    - LocalLLaMA\n```\n\nOnly set credentials for channels you intend to use. LinkedIn, Medium, and Twitter/X return `needs_browser` with a compose URL — no credentials needed.\n\n## MCP tool surface\n\nEight tools, dot-notation names form a navigable tree (`post.*`, `channel.*`, `profile.*`, `subreddit.*`). Every tool declares an `outputSchema` (callers can type-check responses) and MCP `annotations` (read-only / destructive / idempotent / open-world hints). No LLM calls inside the server.\n\n| Tool | Purpose |\n|---|---|\n| `post_publish` | Immediate publish; idempotent on `(content.id, channel)` |\n| `post_schedule` | Queue variants for `schedule_at`, publish the rest immediately |\n| `post_drain` | Fire all scheduled posts due now — run from cron |\n| `post_status` | Per-channel state for a content piece or channel |\n| `post_unpublish` | Best-effort delete (DEV.to sets unpublished; others vary) |\n| `channel_hints` | Per-channel metadata: char limits, Markdown support, tag vocab |\n| `profile_list` | Names of configured distribution profiles |\n| `subreddit_list` | Subreddit Catalog: cooldowns, flair vocab, last-posted |\n\n> **v2.2.0 breaking change.** Tools were renamed from flat names (`publish`, `schedule`, ...) to dot-notation (`post_publish`, `post_schedule`, ...). Update any prompts, agent skills, or n8n nodes that referenced the old names.\n\n## Channels\n\n| Channel key | Tier | Auth |\n|---|---|---|\n| `devto` | Auto | `DEV_TO_API_KEY` |\n| `hashnode` | Auto | `HASHNODE_TOKEN` + `HASHNODE_PUBLICATION_ID` |\n| `github_discussions` | Auto | `GITHUB_TOKEN` + `GITHUB_DISCUSSION_REPO` |\n| `reddit` | Auto-gated | `REDDIT_CLIENT_ID/SECRET/USERNAME/PASSWORD` |\n| `bluesky` | Auto | `BLUESKY_IDENTIFIER` + `BLUESKY_PASSWORD` |\n| `linkedin` | Browser fallback | returns `needs_browser` + compose URL |\n| `medium` | Browser fallback | returns `needs_browser` + compose URL |\n| `twitter` / `x` | Browser fallback | returns `needs_browser` + compose URL |\n\n## Example agent call\n\n```jsonc\n// post_publish tool\n{\n  \"content\": {\n    \"id\": \"n8n-webhook-setup@2026-05-20\",\n    \"title\": \"How to set up an n8n webhook\",\n    \"body_md\": \"...\",\n    \"tags\": [\"automation\", \"n8n\", \"tutorial\"],\n    \"canonical_url\": \"https://yourblog.com/n8n-webhook-setup\",\n    \"author\": \"You\"\n  },\n  \"variants\": [\n    {\n      \"channel\": \"devto:main\",\n      \"title\": \"How to set up an n8n webhook\",\n      \"body\": \"...\",\n      \"tags\": [\"automation\", \"n8n\", \"tutorial\", \"devops\"],\n      \"canonical_url\": \"https://yourblog.com/n8n-webhook-setup\",\n      \"extras\": {}\n    },\n    {\n      \"channel\": \"reddit:ClaudeAI\",\n      \"title\": \"Built a webhook automation with n8n\",\n      \"body\": \"Here's how I set it up...\",\n      \"tags\": [],\n      \"extras\": { \"flair\": \"Project\" }\n    }\n  ],\n  \"profile_name\": \"default\"\n}\n```\n\n## Idempotency\n\nRe-running `post_publish` with the same `content.id` + `channel` pair returns the existing `live_url` immediately without making another platform API call. Safe to retry on failure.\n\n## Scheduling\n\nVariants with `schedule_at` (ISO-8601 with timezone, e.g. `\"2026-05-21T09:00:00+00:00\"`) are stored in `~/.distribution-mcp/scheduled.yaml` and fired on the next `post_drain` call. Run `drain` from cron:\n\n```bash\n# fire due posts every 5 minutes\n*/5 * * * * npx -y content-distribution-mcp drain\n```\n\nOr call the `post_drain` MCP tool directly from an agent.\n\n## Environment variables\n\n| Variable | Default | Purpose |\n|---|---|---|\n| `DISTRIBUTION_BACKEND` | `yaml` | State backend (`yaml` only in v1) |\n| `DISTRIBUTION_BACKEND_DIR` | `~/.distribution-mcp` | Directory for YAML state files |\n\n## Requirements\n\n- Node.js 18 or later\n\n## Architecture\n\n```\nAgent (Claude Code / n8n / Cursor / any MCP host)\n  │  generates per-channel copy, calls MCP tools\n  ▼\ncontent-distribution-mcp  (this package, stdio transport)\n  │  no LLM calls — pure I/O\n  ├── adapters/   devto · hashnode · github-discussions · reddit · bluesky · browser\n  └── backends/   yaml (post log · profiles · schedule queue · subreddit catalog)\n```\n\n## Works with any MCP client\n\nNo Anthropic-specific code anywhere. Verify:\n\n```bash\ngrep -ri \"anthropic\" node_modules/content-distribution-mcp/dist/  # returns nothing\n```\n\n## Part of the AutomateLab stack\n\n- [agency-os](https://github.com/AutomateLab-tech/agency-os) — control plane\n- **content-distribution-mcp** — this package\n- [automatelab.tech](https://automatelab.tech) — blog and tutorials\n\n## License\n\nMIT\n",
  "bytes": 7449,
  "sha": "6cdbeef87b77bf0fb7fe82b1c2d25283820eca21a109794bba44f4aa497a9457",
  "repo_slug": "automatelab-tech/content-distribution-mcp",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_automatelab_tech_content_distr_bbdaf435/readme"
}