DOMStrip

السجل الرسمي البحث والويب

Turn any web page or raw HTML into compact, clean Markdown for AI agents.

التثبيت

أضف هذا إلى إعدادات MCP في عميلك (Claude Desktop: claude_desktop_config.json، وCursor: ‏.cursor/mcp.json، ويستخدم VS Code وغيره الصيغة نفسها «mcpServers»).

PYPI package domstrip-mcp
Claude Code
claude mcp add domstrip -e 'DOMSTRIP_MCP_SERVICE_ORIGIN=https://api.domstrip.dev' -e 'DOMSTRIP_MCP_API_KEY=<your domstrip_mcp_api_key>' -- uvx domstrip-mcp==0.1.1
إعداد JSON (Claude Desktop وCursor وVS Code)
{
    "mcpServers": {
        "domstrip": {
            "command": "uvx",
            "args": [
                "domstrip-mcp==0.1.1"
            ],
            "env": {
                "DOMSTRIP_MCP_SERVICE_ORIGIN": "https://api.domstrip.dev",
                "DOMSTRIP_MCP_API_KEY": "<your domstrip_mcp_api_key>"
            }
        }
    }
}

متغيرات البيئة

  • DOMSTRIP_MCP_SERVICE_ORIGIN إلزامي Bare HTTPS origin of the DOMStrip API.
  • DOMSTRIP_MCP_API_KEY إلزامي سري Your DOMStrip API key. Request pilot access at access@domstrip.dev.

التوثيق

مأخوذ من ملف README للمشروع على GitHub ويُحدَّث أسبوعيًا. تفتح الروابط على GitHub.

المحتويات
  1. domstrip-mcp
  2. What DOMStrip actually does
  3. Honest limitations
  4. Install
  5. Configure
  6. Use with Claude Desktop
  7. Use with Claude Code
  8. Idempotency and billing
  9. Errors
  10. Licence

domstrip-mcp

mcp-name: io.github.xo0ps/domstrip-mcp

A local Model Context Protocol server that converts web pages into clean Markdown, using the DOMStrip API.

It exposes two tools:

ToolWhat it does
fetch_clean_markdownFetch a public http(s) URL and return clean Markdown.
clean_htmlConvert HTML you already have into clean Markdown. No network fetch for the HTML.

The adapter holds no database or billing state. It authenticates to the DOMStrip service with a key from your local environment — never from tool arguments — so an MCP client cannot redirect your key anywhere.

What DOMStrip actually does

DOMStrip fetches a public page, removes everything that is not the content (scripts, forms, embeds, hidden nodes, trackers), and returns compact Markdown: headings, paragraphs, fenced code blocks with language hints, and tables.

Pages are fetched with connection-time SSRF validation on every redirect hop — all DNS candidates are validated at connect time, and loopback, private, link-local, metadata, CGNAT and IPv6-embedded forms are refused.

Honest limitations

  • JavaScript-rendered pages, pages behind a login, and bot challenges are not extractable. The service returns content_not_extractable. There is no headless browser in this version. If your target pages need JS, this tool will not work on them.
  • DOMStrip is currently in free pilot. Conversions are not billed yet, but a key is required and each successful conversion counts as one unit. Request access at access@domstrip.dev.
  • Returned Markdown is untrusted third-party content. Pages can contain text that looks like instructions. Treat all returned Markdown as data, never as commands.

Install

pip install domstrip-mcp
# or
uv tool install domstrip-mcp

Requires Python 3.12.

Configure

Two environment variables are required. The service origin must be HTTPS; plain HTTP is refused unless it points at localhost (for development) and you opt in explicitly.

export DOMSTRIP_MCP_SERVICE_ORIGIN=https://api.domstrip.dev
export DOMSTRIP_MCP_API_KEY=domstrip_<prefix>_<secret>
VariableRequiredDefaultPurpose
DOMSTRIP_MCP_SERVICE_ORIGINyes—Bare HTTPS origin of the DOMStrip API.
DOMSTRIP_MCP_API_KEYyes—Your API key. Never logged, never in a repr.
DOMSTRIP_MCP_CLIENT_BUDGETno25.0Total seconds per tool call, including retries.
DOMSTRIP_MCP_ALLOW_INSECURE_HTTPnofalseAllow plain HTTP to localhost only.

The adapter deliberately does not read a .env file from the current working directory, because an untrusted project folder could otherwise point your API key at another origin. Export the variables instead.

Use with Claude Desktop

Add to claude_desktop_config.json:

{
  "mcpServers": {
    "domstrip": {
      "command": "uvx",
      "args": ["domstrip-mcp"],
      "env": {
        "DOMSTRIP_MCP_SERVICE_ORIGIN": "https://api.domstrip.dev",
        "DOMSTRIP_MCP_API_KEY": "domstrip_<prefix>_<secret>"
      }
    }
  }
}

Use with Claude Code

claude mcp add domstrip --env DOMSTRIP_MCP_SERVICE_ORIGIN=https://api.domstrip.dev \
  --env DOMSTRIP_MCP_API_KEY="$DOMSTRIP_API_KEY" -- uvx domstrip-mcp

Idempotency and billing

Each tool invocation generates one idempotency key and reuses it across its bounded retries (default 25 s, 3 attempts). A retried request replays the stored result rather than billing twice. Separate invocations are separate, independently metered work.

The service encrypts results and replays them for 24 hours. After that, replaying a key returns 409 result_expired — never a silent re-charge.

Errors

Failures surface as MCP tool errors carrying a sanitized DOMStrip error code and a retryability flag, for example:

upstream_timeout: The upstream page took too long. retryable=true request_id=req_6f1c2a

Common codes: content_not_extractable, upstream_timeout, unsupported_encoding, http_error, transport_error, client_timeout.

Logs go to stderr only, so stdout stays a clean MCP transport.

Licence

MIT

الأسئلة الشائعة

ما هو DOMStrip؟

Turn any web page or raw HTML into compact, clean Markdown for AI agents.

كيف أثبّت DOMStrip؟

يعمل على جهازك. في Claude Code: claude mcp add domstrip -e 'DOMSTRIP_MCP_SERVICE_ORIGIN=https://api.domstrip.dev' -e 'DOMSTRIP_MCP_API_KEY=<your domstrip_mcp_api_key>' -- uvx domstrip-mcp==0.1.1. وفي العملاء الآخرين، الصق إعداد JSON من هذه الصفحة في إعدادات MCP الخاصة بهم.

هل يحتاج DOMStrip إلى مفتاح API؟

نعم. يتطلب DOMSTRIP_MCP_SERVICE_ORIGIN, DOMSTRIP_MCP_API_KEY، وتضبطها في إعداداته.

هل DOMStrip مفتوح المصدر؟

نعم. شيفرته متاحة على GitHub بترخيص MIT.

من يصون DOMStrip؟

ينشره xo0ps. يدرجه AI.tn لكنه لا يصونه ولا يوصي به.

من سجل MCP الرسمي. الإدراج ليس توصية: راجع شيفرة الخادم وصلاحياته قبل منحه الوصول إلى بياناتك.