Publish to Medium from Claude Code
Claude Code can publish and schedule Medium articles through Postiz. Add the Postiz MCP server with one command, sign in with OAuth, and ask Claude Code to turn a markdown file into a Medium story with a title, subtitle, tags, a canonical link back to your blog, and an optional publication, without leaving the terminal.
Please make sure there is always a human in the loop.
Last updated: September 2026
How to post to Medium from Claude Code
Add the Postiz MCP server to Claude Code once, sign in with OAuth, connect Medium in Postiz, and then describe the post in plain language. Setup takes about a minute.
Setup once, then just ask
# One-time setup: add the Postiz MCP server (OAuth, no API key)
claude mcp add --transport http postiz https://mcp.postiz.com/mcp-oauth-dynamic
# Or install the Postiz skill instead
npx skills add gitroomhq/postiz-agent
export POSTIZ_API_KEY=your_api_key
# Then ask Claude Code:
> Publish docs/blog/why-we-built-an-agent.md to
Medium with the subtitle "Lessons from year
one" and canonical URL to our blog
Claude Code: Done! Medium article scheduled
with title, subtitle and canonical set.What can Claude Code do on Medium?
On Medium, Claude Code can publish a full article with a title and subtitle, point the canonical URL at your original post, publish under a publication, and add tags.
Article Publishing
Publish long-form articles directly to Medium with full Markdown support. Write once, publish seamlessly.
Publication Support
Publish articles under any Medium publication you belong to. Reach established audiences with a single setting.
Canonical URLs
Set canonical URLs for SEO to link back to your original content. Avoid duplicate content penalties across platforms.
Smart Tagging
Add up to 4 tags per article to improve discoverability. Tags help Medium surface your content to the right readers.
Scheduled Publishing
Schedule articles for future publication with precise timestamps. Plan your content calendar weeks in advance.
AI-Powered Workflows
Let AI agents draft, format, and publish your articles. From idea to published post without leaving your chat app.
How does Claude Code post to Medium through Postiz?
You describe what you want in plain language and Claude Code handles the Postiz calls for you. Here is how a typical conversation goes.
Find Your Medium Integration
Ask Claude Code whether your Medium account is connected. It also checks which options the platform supports.
Example conversation
> Is my Medium account connected to Postiz?
Claude Code: Yes — your Medium account is connected
and ready. Want me to post something?Write Your Article
Compose your article content in Markdown. Medium supports rich formatting including headers, code blocks, images, and embedded links.
Example conversation
> Draft a Medium post about our new
feature launch
Claude Code: Here's a draft for Medium:
"We just shipped something big..."
Want me to add media and schedule it?Publish Your Article
Create a post with your article content, title, subtitle, tags, and optional publication and canonical URL settings.
Example conversation
> Yes — add screenshot.png and schedule
it for tomorrow at 9am
Claude Code: Done! Scheduled on Medium for
tomorrow at 9:00 AM.Medium Settings Reference
Mention any of these in plain language and Claude Code sets them for you. These are the Medium options it can apply to any post.
| Field | Type | Description |
|---|---|---|
__type | string | Must be "medium" |
title | string | Article title (min 2 characters) |
subtitle | string | Article subtitle (min 2 characters) |
canonical | string | Original URL for SEO canonical link |
publication | string | Publication ID to publish under |
tags | array | Up to 4 tags: [{value: string, label: string}] |
Common Configurations
Ask Claude Code for any of these common Medium publishing scenarios and it applies the matching settings.
Simple Article with Tags
Just ask
> Post it with: Simple Article with Tags
Claude Code: Got it. Applying:
title: Getting Started with TypeScript
subtitle: A beginner-friendly introduction
tags: TypeScript, JavaScript, ProgrammingCross-Posted Article with Canonical URL
Just ask
> Post it with: Cross-Posted Article with Canonical URL
Claude Code: Got it. Applying:
title: How We Scaled to 1M Users
subtitle: Lessons from our growth journey
canonical: https://engineering.myblog.com/scaling-to-1m
tags: Startup, Scaling, EngineeringPublication Article
Just ask
> Post it with: Publication Article
Claude Code: Got it. Applying:
title: The Future of AI Agents
subtitle: Why autonomous agents are the next paradigm
publication: towards-data-science-id
tags: Artificial Intelligence, AI Agents, Automation, FutureExample prompts for Medium in Claude Code
These are prompts you can type into a Claude Code session, or pass to claude -p in a script. Claude Code reads your repo, calls Postiz, and confirms before publishing.
Repost a blog article with canonical
Claude Code
> Republish ./content/posts/rate-limiting.md on
Medium, canonical https://example.com/blog/
rate-limiting, tags api, backend, nodejs
Claude Code: Title and subtitle taken from the
file, canonical set, 3 tags added. Scheduled.Publish under a publication
Claude Code
> Which Medium publications can I post to?
Publish the article to the engineering one
Claude Code: Publications: Engineering Blog,
Personal. Using publication: Engineering Blog.Weekly digest, headless
Claude Code
$ claude -p "Turn this week's merged PRs into a
short Medium article titled 'Changelog, week
38' and schedule it via Postiz for Friday."
# Run every Friday from cronMedium limits and gotchas to know
Medium has required fields that Claude Code fills from your file or request.
- ✓title and subtitle are both required (minimum 2 characters each). Claude Code takes them from the markdown heading or asks.
- ✓Set canonical when the article first appeared on your own blog, so search engines credit the original.
- ✓Tags are passed as value and label pairs; the settings table allows up to 4.
- ✓publication is optional and needs the publication ID; Claude Code can list your publications.
What is Claude Code?
Claude Code is Anthropic's agentic coding tool that lives in your terminal. It handles software engineering tasks — writing features, fixing bugs, and answering questions about your codebase — and it can run shell commands and MCP tools like Postiz.
Not the same as Claude Cowork (Anthropic's desktop agent for knowledge workers) or the Postiz connector for Claude.ai (chat in the browser or desktop app). Claude Code runs in your terminal and IDE and can read your repository while it writes Medium posts.
Terminal & IDE Native
Claude Code runs in your terminal, with extensions for VS Code and JetBrains. You type what you want in plain English and it handles Postiz for you.
Agentic Execution
Claude Code plans and works through multi-step tasks on its own — discovering channels, uploading media, and scheduling posts — and asks for permission before it acts.
Parallel Tasks
Run several Claude Code sessions side by side, or spawn subagents in one. Schedule posts to different platforms while it handles other coding work.
How Postiz Works with Claude Code
Claude Code discovers Postiz through the Postiz skill or the Postiz MCP server. It reads the SKILL.md (or the MCP tool list) to learn what it can do, then chains calls together for social media workflows.
- ✓Install the Postiz skill, or add the Postiz MCP server with claude mcp add
- ✓Claude Code discovers the Postiz tools over MCP, or reads SKILL.md when you use the skill
- ✓MCP route: sign in with OAuth, no API key. Skill route: set POSTIZ_API_KEY
- ✓Claude Code asks for permission before running commands
- ✓Works alongside your coding tasks in parallel
Install Postiz
# Option A: add the Postiz MCP server
claude mcp add --transport http postiz https://mcp.postiz.com/mcp-oauth-dynamic
# Option B: install the Postiz skill
npx skills add gitroomhq/postiz-agent
export POSTIZ_API_KEY=your_api_key
# Then just ask
claude "list my social media integrations"Medium Publishing with Claude Code
Tell Claude Code what to post from your terminal or IDE — it discovers your integrations via Postiz and handles the entire publishing workflow.
Just Ask Claude Code
Terminal and IDE integration
Tell Claude Code what to post from your terminal or IDE — it discovers your integrations via Postiz and handles the entire publishing workflow.
Claude Code CLI
$ claude "Post to Medium about our
new feature launch, schedule for
tomorrow at 9am"
Claude Code: I'll handle that.
Found your Medium integration.
Composing and scheduling the post.
Done! Your post is scheduled.
Post ID: abc-123Parallel Tasks
Multiple tasks at once
Claude Code runs headless with claude -p, so several tasks can run in parallel. Schedule posts to different platforms while it works on other coding tasks.
Claude Code Parallel Tasks
# Run multiple posting tasks in parallel
$ claude -p "Schedule a post about our
launch to X for tomorrow 9am" &
$ claude -p "Write a LinkedIn article
about our new feature and schedule
for tomorrow noon" &
$ claude -p "Fix the bug in auth.ts"
# All three tasks run simultaneouslyWhy Claude Code + Postiz for Medium
Claude Code's autonomous execution makes Postiz a natural fit. The agent reads the SKILL.md to understand every available command, then autonomously chains them together for Medium workflows.
- ✓Runs in your terminal or IDE — just type what you want
- ✓Permission-based execution — you stay in control
- ✓Parallel task support — post while coding
- ✓Canonical URLs applied automatically when cross-posting from your blog
- ✓Cross-post to Medium + other platforms in a single session
- ✓Powered by Claude — Anthropic's most capable models
SKILL.md (auto-discovered)
---
name: postiz
description: Social media automation
CLI for scheduling posts across
30+ platforms including Medium
metadata:
claude-code:
requirements:
env:
- POSTIZ_API_KEY
binaries:
- postiz
---
# Available Commands
- postiz integrations:list
- postiz integrations:settings <id>
- postiz posts:create
- postiz upload <file>
- postiz analytics:platform <id>
# Medium Settings
title, subtitle, canonical,
publication, tagsAlso Works with Claude Cowork
Postiz works with any AI agent that can run commands or call MCP tools. That includes Claude Cowork, Anthropic's desktop agent, and the Claude.ai connector. See the agents overview for every supported agent.
Claude Cowork
by Anthropic
Claude Cowork reads the Postiz skill so it knows what it can do, then autonomously discovers your Medium integration, formats your article, applies tags and publication settings, and publishes the post.
Claude Cowork
> Publish my API design article to Medium
under the engineering publication with
a canonical URL back to my blog
Claude Cowork: Done! Scheduled on Medium for
tomorrow at 9:00 AM.Post to Medium and other platforms from Claude Code
One request can schedule the same content to Medium and other channels, and each platform keeps its own settings. Every platform below has its own Claude Code guide.
Example
> Post "Excited to announce our new feature!" to
Medium and Dev.to tomorrow at 9am, then schedule
a daily tip on Medium every weekday at 10am
Claude Code: Done! Scheduled:
- Medium + Dev.to: tomorrow 9:00 AM
- Daily tips on Medium: Mon-Fri 10:00 AMSee all 25 platforms in the Claude Code social media guide, compare agents on the AI agents overview, read about the Postiz MCP server, or check pricing. For the channel itself, seeMedium scheduling features in Postiz.
Medium and Claude Code: frequently asked questions
How do I publish to Medium from Claude Code?
Add the Postiz MCP server to Claude Code, sign in to Postiz with OAuth, and connect your Medium account in Postiz. Then point Claude Code at a markdown file or describe the article. It sets the title, subtitle, tags, and canonical URL, asks for permission, and publishes or schedules the story through Postiz.
Can Claude Code set a canonical URL on a Medium article?
Yes. Mention the original URL and Claude Code sets the canonical field so Medium points search engines to your blog as the source. This is the recommended way to syndicate content you already published, and it avoids the article on Medium competing with your own page in search.
Can Claude Code publish to a Medium publication?
Yes. Ask which publications you can post to and Claude Code lists them from Postiz. Name the one you want and it sets the publication ID. Without a publication, the article is published on your personal Medium profile. Both routes support tags, subtitle, and canonical URL.
Can Claude Code write a Medium article from my repo?
Yes. That is where a coding agent shines: Claude Code can read a design doc, changelog, or merged pull requests and draft a full article, then publish it through Postiz with the right metadata. Review the draft before approving, since Claude Code always asks for permission before it publishes.
Start publishing to Medium
Install Postiz Agent and automate your Medium content strategy with AI-powered scheduling and publishing.