tz-mcp
README.md
# tz-mcp 📰
mcp-name: io.github.mohammad-abbasi-sh/tz-mcp
Unofficial **read-only** MCP server for **[tz.de](https://www.tz.de)** (tz, the Münchner tz) — the Munich tabloid (Ippen group), the Munich household name, sold circulation 91,464 copies — via its official RSS feeds (no key, no login) and article pages, whose full text comes from the server-rendered `<article>` paragraphs. Latest news, news by section, keyword search, news by author, the sections directory, and full article text. No key, no login.
> Built by Mohammad Abbasi as part of the "Germany MCP factory". Not affiliated with tz.de.
## For AI agents
Add to your MCP client config (stdio):
```json
{
"mcpServers": {
"tz": {
"command": "uvx",
"args": ["tz-mcp==0.1.0"]
}
}
}
```
Or run locally: `python -m tz_mcp.server` (needs `mcp<2`, `httpx`).
## Tools
| Tool | Description |
|------|-------------|
| `tz_latest` | Latest tz.de news (the official main RSS feed, 40 items), newest first — `limit` 1..40. Every item carries a title, a per-article link, a teaser, the section (from the link path), the author (dc:creator — empty on about two thirds of the items), an image URL (media:thumbnail, 1200x675) and publish time |
| `tz_section` | Latest tz.de news from one section (the official section RSS feed, 40 items — reise 27) — `section`: `politik`, `sport`, `muenchen`, `bayern`, `deutschland`, `welt`, `wirtschaft`, `stars`, `tv`, `digital`, `gesundheit`, `reise`, `geld`, `meinung`, `verbraucher` or `auto` ("München" is accepted as an alias for `muenchen`); `limit` 1..40. wetter is NOT a section (its feed returns HTTP 200 but carries 0 items) |
| `tz_search_news` | Search tz.de news by keyword (title + teaser + section + author) across the official main RSS feed and the sixteen section feeds — `query` (e.g. "München" or "Bayern"), `limit` 1..40. Newest first, de-duplicated by link |
| `tz_by_author` | Latest tz.de news by one author (the feeds' dc:creator field) across the main + section feeds — `author` (e.g. "Timo Keck", substring match, case-insensitive), `limit` 1..40. About two thirds of the feed items carry no author, so those never match |
| `tz_sections` | The tz.de sections with their official RSS feed URLs — politik, sport, muenchen, bayern, deutschland, welt, wirtschaft, stars, tv, digital, gesundheit, reise, geld, meinung, verbraucher, auto |
| `tz_get_article` | Full text of one tz.de article page (the server-rendered `<article>` paragraphs) — `url`: a tz.de article URL (/wissen/<slug>-zr-<id>.html). Returns title, publish time, author ("" on agency pieces without a byline), section, body text and word count. A paywalled page, if one appears, returns `paywalled: true` with the teaser only. Feed URLs, the home page and off-site links are refused |
| `tz_health` | Reachability probe (ok / blocked / error) — one polite request |
Example output (`tz_latest`, `limit` 1):
```json
{"feed_title": "tz - tz", "total_results": 40, "count": 1,
"items": [
{"title": "30 Prozent weniger Sterberisiko: So einfach lässt sich das laut Studie mit Gehen erreichen",
"link": "https://www.tz.de/wissen/schritte-pro-tag-wie-gehtempo-und-sterberisiko-zusammenhaengen-zr-94622700.html",
"description": "Schrittzahl und Gehtempo hängen mit dem Sterberisiko zusammen. Schon kleine Änderungen könnten zählen – entscheidend ist, was dauerhaft passt.",
"published": "2026-12-04T10:37:49+00:00",
"section": "wissen", "author": "",
"image_url": "https://www.tz.de/assets/images/33/171/33171891-kinderloses-paar-beim-spaziergang-2xmMFlbctDef.jpg"},
...]}
```
Notes:
- The server reads the official **RSS feeds** — main feed `https://www.tz.de/rssfeed.rdf` (40 items, channel title "tz - tz", verified live 2026-12-04) and the sixteen section feeds `https://www.tz.de/<section>/rssfeed.rdf` (40 items each — reise 27: politik, sport, muenchen, bayern, deutschland, welt, wirtschaft, stars, tv, digital, gesundheit, reise, geld, meinung, verbraucher, auto — all verified live 2026-12-04; section feeds carry distinct items, the main feed overlaps politik by only 5 of 40 items).
- **Feed items carry an author and an image, but no category** — the section is derived from the link path (/politik/, /sport/fussball/, …). 13 of 40 main-feed items carry a `dc:creator` author; all 40 carry a `media:thumbnail` image (1200x675). All 40 sampled feed links are on tz.de — no off-site links were seen, but the guard stays.
- **Article text, honestly:** tz.de pages carry **no JSON-LD articleBody** (only a WebPage block on both sampled pages) — the body is read from the `<article>` paragraphs. The chrome paragraphs are filtered out: the "Von: …" / "Von …" byline (kept as the author — "Von: Timo Keck" at the top on one sampled page, "Von Gretchen Reynolds." at the bottom on the other), the "KommentareDruckenTeilen…" share-widget JavaScript blob — which on tz is **merged into the first `<p>` together with the image caption and the lede, so the whole paragraph is dropped** — and promo paragraphs ("Ihr Qualitäts-Ticket der washingtonpost.com …", "Unser Newsletter versorgt Sie jeden Abend …"). The teaser comes from the page's meta description instead of the lede paragraph. The cooperation credit ("Dieser Artikel entstand in Kooperation mit …" / "Dieser Artikel war zuerst … bei der Washingtonpost.com erschienen …") is real article text and is kept. One sampled paragraph carries an inline gallery promo fragment ("Fotostrecke ansehen") inside otherwise real text — it is left as-is rather than surgically edited. Sampled: a Wissen article 31 paragraphs / 936 words, a Stars article 10 paragraphs / 362 words.
- **The date comes from the `<time datetime="…Z">` tag** (ISO, UTC) — tz pages carry no "Stand:" date line.
- **Paywall (defensive, unverified):** no "tz+" marker and no dataLayer `isPaywallContent` flag appeared on either sampled article; the feeds carry no premium flag — no paywalled article could be sampled. The paywall branch (marker + empty body → `paywalled: true` + teaser) is implemented and unit-tested with a synthetic fixture; a page with no usable body and no marker raises an error, never a fabricated paywall claim.
- **wetter is not a section:** /wetter/rssfeed.rdf returns HTTP 200 but carries 0 items (verified live 2026-12-04).
- **No video pages:** no video links were found in any feed (all 40 main-feed links end in `.html`) — there is no video branch.
- **Name note:** `tz-mcp` on PyPI is free; the npm name `tz-mcp` is taken by an unrelated scoped timezone toolkit (`@nopilot/tz-mcp`, latbert) and the official registry lists `io.github.latbert/tz-mcp` — a different lane, like the zeit-mcp npm collision. This server is `io.github.mohammad-abbasi-sh/tz-mcp`, for tz.de news only.
- Data: tz.de's public RSS feeds and article pages — no key, no login, read-only.
## Development
```bash
python3 -m venv .venv && .venv/bin/pip install "mcp<2" httpx pytest
.venv/bin/pip install -e .
.venv/bin/python -m pytest tests/ -q
```
- `tests/test_domain.py` — offline, parses the real captured feeds (main 40 items, Politik 40) plus two real article pages (Wissen, Stars) and a synthetic paywall fixture
- `tests/test_live.py` — cautious live requests against tz.de
Tests: 33/33 green (25 offline + 8 live, 2026-12-04).
## License
[PolyForm Noncommercial 1.0.0](https://polyformproject.org/licenses/noncommercial/1.0.0/) — free for personal and non-commercial use; commercial use needs a separate license (see LICENSE).
---
Built by [Mohammad Abbasi](https://github.com/mohammad-abbasi-sh) — [Almanibama](https://almanibama.ir) · [mabbasi.ir](https://mabbasi.ir)
This server cannot be deployed
Maintenance
ActivityMaintained
ResponsivenessNo recent community issues