Skip to main content

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:

Tool What it does
fetch_clean_markdown Fetch a public http(s) URL and return clean Markdown.
clean_html Convert 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>
Variable Required Default Purpose
DOMSTRIP_MCP_SERVICE_ORIGIN yes — Bare HTTPS origin of the DOMStrip API.
DOMSTRIP_MCP_API_KEY yes — Your API key. Never logged, never in a repr.
DOMSTRIP_MCP_CLIENT_BUDGET no 25.0 Total seconds per tool call, including retries.
DOMSTRIP_MCP_ALLOW_INSECURE_HTTP no false Allow 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

Metadata

Release files for domstrip-mcp 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for domstrip-mcp 0.1.1
File Size Uploaded Provenance Actions
domstrip_mcp-0.1.1.tar.gz 10.6 kB Without provenance Details for domstrip_mcp-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for domstrip-mcp 0.1.1
File Interpreter ABI Platform Actions
domstrip_mcp-0.1.1-py3-none-any.whl Python 3 none any Details for domstrip_mcp-0.1.1-py3-none-any.whl

Total release size: 20.1 kB

Release files / domstrip_mcp-0.1.1.tar.gz

Download URL domstrip_mcp-0.1.1.tar.gz
Size 10.6 kB
Tags Source
SHA-256 checksum
How to use checksums
d8b37aa12ec2480a87ff9ffd6cc172438840383bcf2bb82ff3650071bf3a9d5e
BLAKE2b-256 checksum
How to use checksums
7b9278ad958a226fa7113acfb2a4063d6ebb8363c3ac5147822e177f4d6cabc4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.16

Release files / domstrip_mcp-0.1.1-py3-none-any.whl

Download URL domstrip_mcp-0.1.1-py3-none-any.whl
Size 9.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6589fd04621f65f3091a31cdde0e7bde0c87b9e90904da67cd29c5d6d707b8c9
BLAKE2b-256 checksum
How to use checksums
03672c7144ed7bfa8e194f2c31b93343266936f00347b0e7ef47d17e6195b055
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.16

Security for domstrip-mcp 0.1.1

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.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files No provenance

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