Skip to main content

MCP server for Medium API — publish posts, manage publications, RSS feeds, upload images

Project description

MCP Server Medium

MCP (Model Context Protocol) server for interacting with the Medium API. Allows AI agents to publish posts, manage publications, upload images, and parse RSS feeds to JSON.

Quick Start

# Run with uvx (no install needed) — uses MEDIUM_API_KEY env var
MEDIUM_API_KEY=your_token_here uvx mcp-server-medium

# Or use a config file instead
mkdir -p ~/.medium
echo 'api_key: your_token_here' > ~/.medium/config.yaml
uvx mcp-server-medium

# Or install and run
uv tool install mcp-server-medium
mcp-server-medium

Authentication

The server resolves your API key in this order:

  1. MEDIUM_API_KEY environment variable — best for MCP clients
  2. ~/.medium/config.yaml — persistent local config

Create ~/.medium/config.yaml:

api_key: your_integration_token_here

Get your token at medium.com/me/settings (look for "Integration Tokens").

Tools

Tool Description
get_profile Get the authenticated user's Medium profile
list_publications List all publications the user is related to
list_contributors List contributors for a publication
create_post Create a post on the user's Medium profile
create_publication_post Create a post under a specific publication
upload_image Upload an image to Medium from a URL
get_rss_feed Fetch and parse Medium RSS feeds into JSON

RSS Feed Shorthands

The get_rss_feed tool accepts flexible input:

Shorthand Resolves to
@username https://medium.com/feed/@username
publication-name https://medium.com/feed/publication-name
tag/tag-name https://medium.com/feed/tag/tag-name
pub-name/tagged/tag https://medium.com/feed/pub-name/tagged/tag
Full URL Used as-is

Development

# Clone and setup
git clone https://github.com/afikrim/medium-mcp-server
cd medium-mcp-server
uv sync

# Run locally
MEDIUM_API_KEY=your_key uv run medium-mcp-server

# Use with MCP inspector
MEDIUM_API_KEY=your_key npx @modelcontextprotocol/inspector uv run medium-mcp-server

Configuration

Configure in your MCP client (e.g., Claude Desktop, Cursor):

{
  "mcpServers": {
    "medium": {
      "command": "uvx",
      "args": ["mcp-server-medium"],
      "env": {
        "MEDIUM_API_KEY": "your_token_here"
      }
    }
  }
}

Or using the config file (no env needed):

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

With ~/.medium/config.yaml:

api_key: your_token_here

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mcp_server_medium-0.1.0.tar.gz (5.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mcp_server_medium-0.1.0-py3-none-any.whl (7.3 kB view details)

Uploaded Python 3

File details

Details for the file mcp_server_medium-0.1.0.tar.gz.

File metadata

  • Download URL: mcp_server_medium-0.1.0.tar.gz
  • Upload date:
  • Size: 5.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.19 {"installer":{"name":"uv","version":"0.11.19","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}

File hashes

Hashes for mcp_server_medium-0.1.0.tar.gz
Algorithm Hash digest
SHA256 5a2f6ab5b2782a9fcb80d58dd7488a8148e412fe43f481f5dad3d83c9a196ccc
MD5 3c3a71df78b9f9c5be575761de8dbfcd
BLAKE2b-256 b00ca9394818f455c72c68396fc0332ac8d82ef741418986dd6ae525e6fce93e

See more details on using hashes here.

File details

Details for the file mcp_server_medium-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: mcp_server_medium-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 7.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.19 {"installer":{"name":"uv","version":"0.11.19","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}

File hashes

Hashes for mcp_server_medium-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 682acf5bb235ed4867396dcedc2c6cbd4b52e1c197effbde1d0dfde1b142cd7b
MD5 66a4bd6b3a645e7584bbd1ae38000aa2
BLAKE2b-256 b7b6e87c009c8c3ff711641f920857595b07fb303cb3ce515237e29248fc5a23

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page