Skip to main content

medium-writer-mcp

CI PyPI

An MCP server that lets Claude read Medium and get your articles Medium-ready. Works in Claude Code (terminal or the VS Code extension), the Claude desktop app, and any other MCP client.

How it works (no token needed)

  1. Research: ask Claude what's being written under a tag or by an author.

  2. Draft: /mcp__medium__draft_from_code <topic> writes an article from code in your project.

  3. Prepare: prepare_article fixes what Medium can't display (tables, deep headings, checklists) and warns about the rest.

  4. Open in Medium (macOS): open_in_medium copies the article to your clipboard as formatted text and opens medium.com/new-story in Safari, where you're already signed in. Click the title line, press Cmd+V, review, and publish. Medium keeps headings, bold, links, lists, quotes, images and code blocks. Add tags and subtitle in Medium's publish dialog.

    Not on macOS? export_article writes <post>.medium.html instead: open it, click in the article, Cmd+A, Cmd+C, and paste into Medium.

There's no Medium login in this server, on purpose. Medium no longer gives new apps API access, and its site blocks automated browsers, so the server hands the article to your normal browser and you do the final paste.

Tools

Tool What it does
get_user_stories Latest stories by an author, with full text (public RSS)
get_publication_stories Latest stories in a publication
get_tag_stories Latest stories under a tag (Medium only includes an excerpt here)
prepare_article Checks Markdown against what Medium supports, fixes what it can, returns warnings, word count and reading time
export_article Runs prepare_article, then writes a paste-ready HTML page
open_in_medium macOS: runs prepare_article, copies the result as rich text, opens a new Medium story. Replaces your clipboard

Plus one prompt, draft_from_code, which shows up as a slash command in Claude Code.

Limits to know

  • RSS feeds only return the ~10 newest stories. There's no full archive or stats.
  • Medium has no public way to post without an API token, and stopped issuing tokens in January 2025, hence the copy-paste step.

Install

Add it to Claude Code for all your projects (needs uv):

claude mcp add --scope user medium -- uvx medium-writer-mcp

Start a new Claude Code session and type /mcp to confirm medium is connected. It works the same in the VS Code extension and the terminal.

For the Claude desktop app or another MCP client, add this to its config:

{
  "mcpServers": {
    "medium": { "command": "uvx", "args": ["medium-writer-mcp"] }
  }
}

Without uv: pip install medium-writer-mcp and use medium-writer-mcp as the command.

Choosing the browser

open_in_medium uses Safari unless told otherwise. Pass browser per call, or set a default with an environment variable (any app name from /Applications, or default for your system browser):

claude mcp add --scope user medium -e MEDIUM_BROWSER="Google Chrome" -- uvx medium-writer-mcp

Try it

  • "What has @username published on Medium lately?"
  • "What's being written under the fastapi tag this week? Summarize the angles."
  • "/mcp__medium__draft_from_code the caching layer in src/cache"
  • "Run prepare_article on docs/post.md and fix the warnings."
  • "Open docs/post.md in Medium."

Development

git clone https://github.com/MuhammadAsher/medium-mcp.git
cd medium-mcp
python3 -m venv .venv && source .venv/bin/activate
pip install -e ".[dev]"
pytest            # 43 tests, all offline

To run your local copy in Claude Code, point the command at .venv/bin/medium-mcp.

Releasing: bump __version__ in src/medium_mcp/__init__.py, add a CHANGELOG entry, then push a matching tag (git tag v0.2.1 && git push --tags). GitHub Actions tests, builds and publishes to PyPI.

Project layout

src/medium_mcp/
  server.py      MCP tools, prompt, entry point
  feeds.py       RSS fetch/parse, HTML -> Markdown (stdlib only)
  formatter.py   Medium compatibility checks and rewrites
  export.py      Markdown -> paste-ready HTML
  handoff.py     macOS clipboard + open browser (osascript, open)
  _http.py       HTTPS using the OS trust store
  medium_api.py  Legacy REST client (token only)
tests/           Offline tests with a fixture feed

Dependencies: the mcp SDK (v2) and truststore (so HTTPS works with python.org builds on macOS). HTTP, XML and Markdown use the standard library.

Legacy: direct publishing with an old token

Only if you have an integration token created before January 2025. Setting one adds get_medium_profile, list_my_publications, upload_image and create_post (defaults to draft; Medium's API can't edit or delete posts afterwards).

"medium": {
  "command": "uvx",
  "args": ["medium-writer-mcp"],
  "env": { "MEDIUM_INTEGRATION_TOKEN": "your-token" }
}

Don't commit a .mcp.json that contains your token. Put it in ~/.claude.json via claude mcp add --scope user ... -e MEDIUM_INTEGRATION_TOKEN=... instead.

Metadata

Release files for medium-writer-mcp 0.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for medium-writer-mcp 0.2.1
File Size Uploaded Provenance Actions
medium_writer_mcp-0.2.1.tar.gz 25.4 kB Without provenance Details for medium_writer_mcp-0.2.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for medium-writer-mcp 0.2.1
File Interpreter ABI Platform Actions
medium_writer_mcp-0.2.1-py3-none-any.whl Python 3 none any Details for medium_writer_mcp-0.2.1-py3-none-any.whl

Total release size: 49.6 kB

Release files / medium_writer_mcp-0.2.1.tar.gz

Download URL medium_writer_mcp-0.2.1.tar.gz
Size 25.4 kB
Tags Source
SHA-256 checksum
How to use checksums
2d85740f3b404ec0387b26888d91c720ccc13c9394f2d90ef2fec7acfb4af2b4
BLAKE2b-256 checksum
How to use checksums
8d9c84d73d3b86792008275b9be094c541c03bb24a4e7a8da795133252cc95e3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.6 {"installer":{"name":"uv","version":"0.12.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / medium_writer_mcp-0.2.1-py3-none-any.whl

Download URL medium_writer_mcp-0.2.1-py3-none-any.whl
Size 24.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f331bc51df77958f5ffa7685df6ceccff8db8dfa33bfed7333523564a0eaef07
BLAKE2b-256 checksum
How to use checksums
b059150dbe3bedccfe75d4bc5f3913e6c94ba51948505c735f52eb3b9111945b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.6 {"installer":{"name":"uv","version":"0.12.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for medium-writer-mcp 0.2.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.2.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page