DM

dishant27/medium-mcp-server

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

28 stars 9 forks 质量 82 趋势 25MIT

MCP服务器允许AI助手读取你的Medium资料和出版物,并通过(遗留的)Medium API发布草稿。

概览

一个小型模型上下文协议服务器,允许MCP客户端(Claude Desktop、Cursor等)创建Medium草稿并阅读你的Medium配置文件和出版物。 Medium 不再支持其 API,并停止发布新的集成令牌。这个服务器只有在你拥有 Medium 集成令牌时才能工作。如果没有,目前没有官方途径获得集成令牌,而这个项目也无法解决这个问题。 从思考到发表:MediumMCP如何简化AI到Medium平台的工作流程 这些工具以1:1映射到Medium v1 API实际拥有的端点: 它的功能是:搜索文章、阅读帖子、查看统计数据,或者编辑/删除帖子。官方API从来没有这些端点。 要求:Node.js 18+及一个现有的Medium集成令牌。 将 .env.example 复制到 .env 并设置你的令牌: 然后问一些类似“创建一个名为......从这个折扣价中”这样的问题,并在发布前在Medium上审阅草稿。

概述(AI 翻译)

一个小型模型上下文协议服务器,允许MCP客户端(Claude Desktop、Cursor等)创建Medium草稿并阅读你的Medium配置文件和出版物。

[!警告] Medium 的官方 API 已被弃用。 Medium 不再支持其 API,并停止发布新的集成令牌。该服务器只有在你已经拥有** Medium 集成令牌时才能使用。如果没有,目前没有官方途径获得,而本项目无法解决这个问题。

📖 背景

从思考到发表:MediumMCP如何简化AI到Medium平台的工作流程

它能做什么

这些工具以1:1映射到Medium v1 API实际拥有的端点:

工具 它的作用 中等端点
get-profile 你的用户ID、用户名、姓名、个人资料网址 GET /me
get-publications 您拥有、编辑或撰稿的出版物 GET /users/{userId}/publications
publish-article 创建帖子(Markdown 或 HTML)。** 默认为 draft**,可以是 public 或 unlisted,可选地出现在出版物内部 POST /users/{userId}/posts, POST /publications/{id}/posts

本页由 AI 翻译,技术细节请以原文为准。

README

Medium MCP Server

A small Model Context Protocol server that lets an MCP client (Claude Desktop, Cursor, etc.) create Medium drafts and read your Medium profile and publications.

[!WARNING] Medium’s official API is deprecated. Medium no longer supports its API and has stopped issuing new integration tokens. This server only works if you already have a Medium integration token. If you don’t, there is currently no official way to get one, and this project can’t fix that.

📖 Background

From Thought to Published: How MediumMCP Streamlines the AI-to-Medium Platform Workflow

What it can do

The tools map 1:1 to the endpoints Medium’s v1 API actually has:

Tool What it does Medium endpoint
get-profile Your user id, username, name, profile URL GET /me
get-publications Publications you own, edit or write for GET /users/{userId}/publications
publish-article Creates a post (markdown or HTML). Defaults to draft, can be public or unlisted, optionally inside a publication POST /users/{userId}/posts, POST /publications/{id}/posts

What it can’t do: search articles, read posts, read stats, or edit/delete posts. The official API never had those endpoints.

Setup

Requirements: Node.js 18+ and an existing Medium integration token.

git clone https://github.com/Dishant27/medium-mcp-server.git
cd medium-mcp-server
npm install
npm run build

Copy .env.example to .env and set your token:

MEDIUM_INTEGRATION_TOKEN=your_existing_integration_token

Use with Claude Desktop (or any MCP client)

{
  "mcpServers": {
    "medium": {
      "command": "node",
      "args": ["/absolute/path/to/medium-mcp-server/dist/index.js"],
      "env": {
        "MEDIUM_INTEGRATION_TOKEN": "your_existing_integration_token"
      }
    }
  }
}

Then ask things like “Create a Medium draft titled … from this markdown” and review the draft on Medium before publishing.

No token? Alternatives

  • Write to markdown files and import them with Medium’s import tool, which also sets the canonical link.
  • Publish on a platform with a working API (e.g. dev.to, Hashnode) and cross-post to Medium with a canonical URL.
  • Browser automation against medium.com works but is fragile and may break Medium’s terms, so it isn’t included here.

License

MIT

在 GitHub 查看完整 README

安装

This server does not publish a one-line install command.

Open the repository installation guide 新手?先看 mcpskill.org 教程 →

配置

{ "mcpServers": { "medium": { "command": "node", "args": ["/absolute/path/to/medium-mcp-server/dist/index.js"], "env": { "MEDIUM_INTEGRATION_TOKEN": "your_existing_integration_token" } } } }