IOS MD · Справка / Help | ios.md
IOSMD Справка Help

Справка IOS MD

IOS MD Help

На этой странице описано, что делает IOS MD, как работает кэш и как подключить сервис в Claude Code или других ИИ-агентах.

This page explains what IOS MD does, how the cache works, and how to wire it into Claude Code or any other AI agent.

Новое в v3New in v3v3

В v3 IOS MD вырос из веб-ридера в универсальный сервис «всё в Markdown». Всё сверх обычного извлечения веб-страниц опционально и включается отдельно:

In v3, IOS MD grew from a web-page reader into a general anything-to-Markdown service. Everything beyond plain web extraction is optional and enabled individually:

Что делает IOS MD?What IOS MD does/api

IOS MD загружает любой URL и возвращает чистый Markdown. В зависимости от источника выбирается подходящий путь извлечения:

IOS MD fetches any URL and returns it as clean Markdown. It picks the right extraction path depending on the source:

Какой путь был использован, видно в заголовке ответа X-Source и в истории рядом с каждой записью.

Which path was used shows up in the response header X-Source and next to each entry in the history.

Cache & TTLCache & TTLSQLite

Каждый запрос сохраняется в SQLite. Важны два интервала:

Every pull is stored in a SQLite database. Two timeouts matter:

ЧтоЗначениеКогда сбрасывается? WhatValueWhen does it reset?
Повторная загрузка из источника 1 час При каждом успешном запросе того же URL — через /api?url=… или /s/:id. Re-fetch from source 1 hour On every successful pull of the same URL — regardless of whether it came through /api?url=… or /s/:id.
Срок жизни share-ссылки 90 дней При каждой повторной загрузке (запись в кэш). Вызовы /s/:id тоже продлевают срок, так как через 1 ч запускают re-fetch. Share link lifetime 90 days On every re-fetch (= cache write). /s/:id requests extend it too, since they trigger a re-fetch after 1h.

Как работает /s/:id

How /s/:id behaves

Совет: сабредdit как live-лента

Tip: subreddit as a live feed

Один раз загрузите URL листинга сабреддита, запомните share-ID — дальше вызывайте только /s/:id. Каждый час следующий запрос запускает свежую загрузку, share-ID остаётся стабильным, контент обновляется. Удобно для ИИ-агентов, которым нужен фиксированный endpoint с актуальным содержимым.

Pull a subreddit-listing URL once, remember the share ID — and from then on only call /s/:id. After each hour the next request triggers a fresh fetch, the share ID stays stable, and the content updates. Handy for AI agents that need a fixed endpoint with regularly refreshed content.

Настройка для ИИ-агентовSet up in AI agentssetup

Вариант 1 — универсальный: вставить prompt

Option 1 — Universal: paste a prompt

Работает в любом чат-агенте (ChatGPT, Claude.ai, Gemini, Perplexity, …). Скопируйте блок и вставьте как system- или custom-instruction:

Works in any chat-style agent (ChatGPT, Claude.ai, Gemini, Perplexity, …). Copy the block, paste it as a system or custom instruction:

prompt · drop-in
When you need to read a web page, fetch via IOS MD instead of raw HTML:

  GET https://ios.md/api?url=<URL>

Returns clean Markdown (text/markdown). Optional query params:

  comments=false        skip Reddit comments
  comment_depth=N       comment nesting depth (default 3)
  frontmatter=true      prepend YAML metadata block
  format=text           strip Markdown, return plain text
  nocache=true          bypass the 1h cache and refetch
  lang=ru|en            language for the comments section header

Response headers worth checking:
  X-Source       reddit | cloudflare | readability | trafilatura |
                 playwright | markitdown | youtube | pdf-ocr | ...
  X-Quality      0.0-1.0 extraction confidence
  X-Share-Id     8-hex permalink, openable as /s/<id>

Reddit URLs are auto-detected (incl. redd.it short links and /s/ shares).
Use this whenever you would otherwise fetch raw HTML — the markdown is
much cleaner and saves significant context window space.

Вариант 2 — Claude Code Skill

Option 2 — Claude Code skill

Для Claude Code есть готовый skill, который автоматически направляет WebFetch через IOS MD (с fallback). Скачайте zip и распакуйте в ~/.claude/skills/:

For Claude Code there's a ready-made skill that automatically routes WebFetch through IOS MD (with fallback). Download the zip and unpack into ~/.claude/skills/:

Скачать iosmd.zipDownload iosmd.zip

install · shell
curl -O https://ios.md/iosmd.zip
mkdir -p ~/.claude/skills
unzip iosmd.zip -d ~/.claude/skills/
# Restart Claude Code; the skill activates on web-reading requests.

Обновление с версии до v3: skill раньше назывался web-reader. Новый zip не заменяет существующую установку — сначала удалите старую (rm -rf ~/.claude/skills/web-reader), иначе оба skill будут активны параллельно.

Upgrading from pre-v3: the skill used to be called web-reader. The new zip does not replace an existing install — remove the old one first (rm -rf ~/.claude/skills/web-reader), otherwise both skills stay active side by side.

Вариант 3 — MCP-сервер (удалённый)

Option 3 — MCP server (remote)

IOS MD работает как удалённый MCP-сервер на https://ios.md/mcp (Streamable-HTTP, stateless). Три инструмента: read_url, get_share, list_recent. Серверные обновления автоматически доходят до всех клиентов — локальная установка не нужна.

IOS MD runs as a remote MCP server at https://ios.md/mcp (Streamable-HTTP transport, stateless). Three tools: read_url, get_share, list_recent. Server-side updates reach every client automatically — no local install needed.

Claude Code — вставьте prompt, Claude установит сам:

Claude Code — paste this prompt and Claude will install it for you:

prompt · claude code
Установите MCP-сервер IOS MD в Claude Code (user scope):
- Name: iosmd
- Transport: http
- URL: https://ios.md/mcp

Выполните: claude mcp add --transport http iosmd https://ios.md/mcp
Затем: claude mcp list для проверки.
Install the IOS MD MCP server in Claude Code (user scope):
- Name: iosmd
- Transport: http
- URL: https://ios.md/mcp

Run: claude mcp add --transport http iosmd https://ios.md/mcp
Then: claude mcp list to verify.

Claude Code — напрямую в терминале:

Claude Code — directly in the terminal:

claude code · cli
claude mcp add --transport http iosmd https://ios.md/mcp

Claude Desktop / Cursor / другие — JSON-конфиг:

Claude Desktop / Cursor / others — JSON config:

mcp config snippet
{
  "mcpServers": {
    "iosmd": {
      "type": "http",
      "url": "https://ios.md/mcp"
    }
  }
}

После регистрации три инструмента появляются в агенте нативно — prompt не нужен, LLM подхватывает их по описанию схемы.

Once registered, the three tools surface natively in the agent — no prompt instructions needed, the LLM picks them up via their schema descriptions.

Параметры APIAPI parametersGET /api

Param По умолчаниюОписание DefaultDescription
url Обязательный. Любой публичный URL. Required. Any public URL.
commentstrue Включать комментарии Reddit. false — только пост. Include Reddit comments. false returns just the post.
comment_depth3 Максимальная глубина вложенности (1–10). Max nesting depth (1–10).
comment_limit Опциональный лимит top-level комментариев (Reddit по умолчанию ~200). Optional cap on top-level comments (Reddit returns ~200 by default).
frontmatterfalse Добавить YAML-frontmatter с метаданными. Prepend YAML frontmatter with metadata.
formatmd text — убрать Markdown, вернуть plain text. json — структурированный ответ с метаданными. text = strip Markdown, return plain text. json = structured with metadata.
nocachefalse Обойти 1-часовой кэш, всегда загружать заново. Bypass the 1-hour cache, always refetch.
langru Язык заголовка секции комментариев (ru или en). Language for the comments header (ru or en).

Локальные HTML-файлыLocal HTML filesPOST /api/html

Сохранённые страницы («Сохранить как», экспорты SingleFile) можно конвертировать напрямую: перетащите .html на интерфейс IOS MD (desktop) или нажмите пункт под полем URL (desktop + mobile) — или через API:

Already-saved pages ("Save Page As", SingleFile exports) can be converted directly: drag-and-drop the .html file onto the IOS MD UI (desktop) or tap the dashed hint below the URL field to pick a file (desktop and mobile) - or via the API:

curl -s -X POST --data-binary @page.html \
  -H 'Content-Type: text/html' \
  "https://ios.md/api/html?filename=page.html"

Опциональные параметры: url=… (исходный URL — включает site recipes и заголовок со ссылкой), format=json|text, frontmatter=true, extractor=readability|trafilatura. Вместо ?filename= можно передать заголовок X-Filename (URI-encoded) — имя файла не попадёт в access-логи. Максимум 10 МБ. Локальные файлы не попадают в кэш — нет записи в истории и share-ссылки.

Optional parameters: url=… (original URL - enables site recipes and the linked header), format=json|text, frontmatter=true, extractor=readability|trafilatura. Instead of ?filename= you can send the X-Filename header (URI-encoded) - keeping the file name out of access logs. Max 10 MB. For privacy, local files are never cached - no history entry, no share link.

Share-ссылкиShare links/s/:id

Каждый запрос получает 8-символьный hex-ID как share-ссылку с точным снимком Markdown. ID виден в заголовке X-Share-Id и в share-bar под полем URL.

Every pull gets an 8-hex share ID returning the exact markdown snapshot. The ID surfaces in the response header X-Share-Id and in the share bar below the URL field.

FrontmatterFrontmatterYAML

С ?frontmatter=true перед контентом добавляется YAML-блок метаданных. Пустые поля опускаются:

With ?frontmatter=true a YAML metadata block is prepended to the content. Empty fields are omitted:

example
---
title: "Why I migrated my side-project from Postgres to SQLite"
url: https://news.ycombinator.com/item?id=42424242
source: readability
fetched: 2026-04-25T13:53:00Z
quality: 0.85
author: kentonv
published: 2026-04-24T18:42:00Z
description: "After two years on managed Postgres..."
language: en
share_id: a3f9c2
---

Базовые поля: title, url, source, fetched, quality, author, published, modified, description, language, image, site, extractor_reason, share_id. По источнику дополнительно: subreddit, upvotes (Reddit) · duration, views (YouTube) · image_size, audio_seconds, llm_model, llm_tokens, llm_prompt_tokens, llm_completion_tokens (медиа) · pdf_pages (PDF-OCR). Ответы MCP добавляют share_url, cached, refreshed, age_ms. IOSMD_FRONTMATTER_FIELDS ограничивает набор полей на сервере.

Base fields: title, url, source, fetched, quality, author, published, modified, description, language, image, site, extractor_reason, share_id. Depending on the source, additionally: subreddit, upvotes (Reddit) · duration, views (YouTube) · image_size, audio_seconds, llm_model, llm_tokens, llm_prompt_tokens, llm_completion_tokens (media) · pdf_pages (PDF OCR). MCP responses add share_url, cached, refreshed, age_ms. IOSMD_FRONTMATTER_FIELDS can trim the selection server-side.

В веб-приложении переключатель Frontmatter мгновенно показывает или скрывает YAML-блок — повторное извлечение не нужно.

In the web app the Frontmatter toggle switches the view instantly - the YAML block appears or disappears with no second extract.

Определение клиентаClient detectionhistory

Каждая запись в истории получает badge клиента — видно, откуда пришёл запрос:

Every history entry gets a client badge so you can see where the pull originated: