Skip to main content

medium-mcp

Code style: crackerjack Runtime: oneiric Framework: FastMCP uv Python: 3.14+

MCP server for Medium content via the unofficial medium2 RapidAPI.

Capabilities

13 tools + the free budget readout:

  • user_info (one-of user_id / username)
  • user_articles
  • article_metadata
  • article_content (full text opt-in, see Content policy below)
  • article_responses
  • publication_info (one-of publication_id / slug)
  • publication_articles
  • tag_info
  • tag_latest
  • search_articles
  • search_users
  • search_publications
  • budget_remaining — local read, never hits RapidAPI

Source

Data comes from the unofficial medium2 API on RapidAPI. The official Medium API was archived March 2023 and does not accept new integrations; medium-mcp is the project that documents what shape the unofficial API returns and how the budget guard turns it into a metered-but-capped service.

Setup

  1. Sign up at https://rapidapi.com and subscribe to medium2 (free tier: 150 calls / month).

  2. Export the key:

    export MEDIUM_MCP_RAPIDAPI_KEY=<your-key>
    
  3. Install + run:

    uv pip install -e ".[dev]"
    medium-mcp
    

Health

Two routes, answering different questions:

  • /health — always HTTP 200. Reports per-feed detail in components. For orchestrators and curl smoke probes.
  • /readyz — HTTP 503 when a required feed has not yet returned data, 200 otherwise. For readiness probes.

The budget counter requires an initial tool call to initialize, so a freshly started server returns 503 on /readyz until a tool call succeeds. That is intentional: a server whose counter has never been touched cannot guarantee its budget, and lies would defeat the only guard we have.

Budget

The server enforces a strict monthly budget (medium_mcp.budget.monthly_budget, default 150 metered calls / period) under a backend advisory lock. Once exhausted, metered calls are refused with this payload:

{
  "error": "budget_exhausted",
  "remaining_calls": 0,
  "requested_calls": 1,
  "period": "2026-09",
  "resets_at": "2026-10-01T00:00:00Z",
  "retryable": false,
  "cached_alternatives": ["user_info", "article_metadata", "tag_info"]
}

budget_remaining is always free; it reads the counter locally and reports calls_used, remaining_calls, monthly_budget, period, resets_at so the caller can decide whether to make the call themselves.

Content policy

article_content returns the full body only when the caller passes include_full_text=True. Five rules govern what the tool does and does not return, in order:

  1. Default-deny. article_content returns excerpt only when include_full_text=False, regardless of cache state. The cache may hold full_text under the content_key prefix; the gate is at the return point, not the cache key.
  2. Opt-in body. Set include_full_text=True to receive full_text alongside the excerpt. The cache hit path also honors the flag — a cached body is only returned when the flag was set.
  3. Truncation. excerpt is capped at excerpt_max_chars (default 500, max 2000) so a caller never receives an unbounded body. The truncated: bool field tells the caller whether the cap fired.
  4. Format. format is one of "markdown", "html", or "text". The tool does not transcode between formats; what the upstream returned is what the tool returns, gated only by the include flag.
  5. No export. allow_content_export: bool (default false) is a hard-stop on writing full text to disk or to a downstream store. Treat the body as in-memory-only; do not persist it.

The settings section (MEDIUM_MCP_* env vars, prefix-defined) carries excerpt_max_chars, allow_content_export, monthly_budget, and the rest. See settings/medium-mcp.yaml for the full list.

License

BSD-3-Clause.

Built on Oneiric for runtime configuration and mcp-common for the FastMCP baseline. Crackerjack gates every commit.

Metadata

Release files for medium-mcp 0.1.4

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-mcp 0.1.4
File Size Uploaded Provenance Actions
medium_mcp-0.1.4.tar.gz 240.1 kB Without provenance Details for medium_mcp-0.1.4.tar.gz

Built distribution (wheel)

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

Total release size: 271.9 kB

Release files / medium_mcp-0.1.4.tar.gz

Download URL medium_mcp-0.1.4.tar.gz
Size 240.1 kB
Tags Source
SHA-256 checksum
How to use checksums
54699d15d1fec8460f6c2b3c64ef048464ae3f387737f18766e96e3b1efc8dee
BLAKE2b-256 checksum
How to use checksums
0f14ab62a0053197f1cd3fbaadc01ce26ea8e34a8838fb11dbf32955ba1348b1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.10 {"installer":{"name":"uv","version":"0.12.10","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_mcp-0.1.4-py3-none-any.whl

Download URL medium_mcp-0.1.4-py3-none-any.whl
Size 31.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7db73fc9807cbbbc02f33443946f2de921a2e3cd87fe26b4453f638d7c89dbc2
BLAKE2b-256 checksum
How to use checksums
c6189fe98f479ac1e612421c0af72c10cdd67ed3ff83faa0c73f582ab364f030
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.10 {"installer":{"name":"uv","version":"0.12.10","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-mcp 0.1.4

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.

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