DEV Community

PipepostDev
PipepostDev

Posted on • Originally published at pipepost.dev

Publish to Dev.to from Claude Code in one MCP call

If you live inside Claude Code (or any MCP client), the trip from "draft is ready" to "post is live on Dev.to" is friction. You leave the editor, open the Dev.to web app, paste the markdown, fix the canonical URL, set tags, hit publish. That's a workflow you do less often when you're tired.

Here's the same trip without leaving Claude Code.

What you need

  • A Dev.to API key — generate it in two clicks under "DEV Community API Keys".
  • The Pipepost MCP servernpm install -g pipepost-mcp.
  • Claude Code, Cursor, Windsurf, or any MCP client wired to that server.

One-time setup

In your MCP client, add Pipepost as a server. For Claude Code, add this to your mcp.json:

{
  "mcpServers": {
    "pipepost": {
      "command": "npx",
      "args": ["-y", "pipepost-mcp"]
    }
  }
}
Enter fullscreen mode Exit fullscreen mode

Then run setup once to save your Dev.to API key:

setup platform="devto" credentials={api_key: "YOUR_KEY"}
Enter fullscreen mode Exit fullscreen mode

The key gets written to ~/.pipepost/config.json and used for every future call.

Publishing a draft

Open the markdown file you've been writing in Claude Code. Tell the assistant:

Publish this to Dev.to as a draft.

Pipepost reads the file, calls Dev.to's POST /api/articles with published: false, and returns the draft URL. You can review it on Dev.to before flipping the switch.

Publishing live

Same flow, but tell it to publish (or pass published=true). The article goes live immediately and Pipepost returns the canonical URL it landed on.

The detail that matters: canonical URLs

If you're cross-posting (Dev.to + your own blog + Hashnode + Medium), Google needs to know which URL is the source. Dev.to honors a canonical_url field — set it to your own blog post URL and Dev.to will tell search engines "this content lives at the canonical URL, not here."

Pipepost auto-wires this. If you have a blog at pipepost.dev/blog, you can pass canonical_url="https://pipepost.dev/blog/my-slug" and Pipepost forwards it to Dev.to. The result: the Dev.to copy still ranks for branded queries, but doesn't compete with your own blog for the same content.

Tags, cover image, and series

Pipepost passes through everything Dev.to's API supports:

  • tags — up to 4, no spaces
  • cover_image — full URL to a hosted image (1000x420 is the recommended ratio)
  • series — group multi-part posts under one series name
  • description — overrides the auto-generated meta description

The full schema is in the Pipepost source: src/cms/devto.ts.

What this is good for (and what it isn't)

Good for: developer-blogger workflows where you write in markdown locally, want low-friction publishing, and want canonical URLs handled correctly the first time.

Not for: cases where Dev.to-specific features (like the rich-text editor's image upload) matter to you. The API publishes raw markdown — if you need the WYSIWYG, use the web app.

What about the other platforms?

Pipepost ships clients for Hashnode, Ghost, WordPress, and Medium too. The same MCP call structure works:

hashnode_post body_markdown="..." title="..."
ghost_post html="..." title="..."
wordpress_post content="..." title="..."
medium_post content="..." title="..."
Enter fullscreen mode Exit fullscreen mode

And for promotion: bluesky_post, mastodon_post, linkedin_post, x_post are all in the same server.

The point

Publishing to Dev.to from Claude Code isn't novel — anyone with a curl call and the API docs can do it. The point of an MCP server is removing the steps between "I have a draft" and "it's live": no shell, no API key copy-paste, no checking that you got the canonical URL right, no remembering which tag format Dev.to wants.

If you publish more than once a month, the math works out fast.

Source on GitHub. npm. PRs welcome.

Top comments (0)