MCP llms.txt

Markdown for AI, Compressed

Feeding markdown to LLMs is already the standard.
With compression and precise content targeting, you can cut token usage dramatically.

Prepend compress.new/ to any URL and get markdown instantly
compress.new/
Select Features docs
compress experimental main_only CSS selector schema_org retain_images metadata
https://compress.new/https://example.com

Result


Why Markdown for AI?

HTML was built for browsers. Markdown was built for reading.
When you're feeding content to an LLM, the format matters more than you think.

The Token Problem

The same content in different formats consumes wildly different amounts of your context window. HTML is bloated with tags, attributes, and boilerplate that carry zero semantic value for an LLM.

Raw HTML
~12,400 tokens
baseline
Markdown
~4,700 tokens
−62%
Compressed
~2,200 tokens
−82%

Typical results for a 3,000-word article page. Actual savings vary by content.

What Gets Stripped, What Stays

HTML <div class="article-wrap"> <h1 id="title">Hello</h1> <p class="intro"> Read <a href="/more" class="link--primary"> more</a> here. </p> </div>
Markdown # Hello Read [more](/more) here. ↓ same content, ~70% fewer tokens

Markdown preserves document structure — headings, lists, links, emphasis — with minimal overhead. No closing tags, no attributes, no class names. LLMs already speak it natively, so you get more content per request and more accurate parsing.


Built for Real Workflows

Whether you're building agents, running research, or processing content at scale — clean markdown is the starting point.

01

AI Agents & Assistants

Give your agent the ability to read any webpage. Connect via MCP or API and let it fetch, compress, and reason over web content autonomously.

02

Research & Analysis

Pull articles, documentation, or reports into your LLM context. Strip the noise, keep the signal — analyze multiple sources in a single prompt.

03

RAG Pipelines

Ingest web content into your retrieval-augmented generation system. Clean markdown chunks better, embeds better, and retrieves more accurately.

04

Content Monitoring

Track changes on competitor pages, pricing tables, or documentation. Markdown diffs are clean and meaningful — no noise from layout shifts.

05

Data Extraction

Target specific page sections with CSS selectors. Pull structured data from schema.org tags. Get exactly what you need — nothing more.

06

Documentation Processing

Convert technical docs, API references, or help pages into a format your AI assistant can reason over. Feed entire doc sites into your context.


Features

Every feature is opt-in via query parameters.
Combine them to build the exact output your pipeline needs.

Compression experimental

compress[=low|med|high|true]

Scans markdown for repeated substrings and replaces them with short tokens like §1, §2. Presets control aggressiveness: low, med, high, true. compress (no value) defaults to med.

Repetitive content wastes context window. Compression is only returned when the final output (including note + dictionary) saves at least 5% tokens; otherwise the original markdown is returned.

Content Extraction

main_only=true

Removes structural chrome — headers, footers, navigation, sidebars — by stripping common landmark elements and IDs, then isolates the primary content area of the page before selector filtering.

Most webpages are 70%+ boilerplate. Stripping it means your LLM reads the article, not the cookie banner.

CSS Selector

selector=".article"

Extracts only the DOM nodes matching a CSS selector before conversion. Supports any valid CSS selector — classes, IDs, attribute selectors, combinators. When combined with main_only=true, matching happens after main-content cleanup.

When you know exactly where the content lives, a targeted selector gives you a clean extraction with zero noise.

Metadata

metadata=true

Extracts the page title, description, URL, Open Graph type, and canonical image from meta tags, then prepends them as YAML front matter at the top of the markdown.

Gives your LLM structured context about the source — what the page is, where it came from — without parsing the content itself.

Schema.org Structured Data

schema_org=true

Extracts <script type="application/ld+json"> blocks containing schema.org data before they are stripped, then appends them as fenced JSON blocks at the end of the output.

Schema.org carries rich semantic data — recipes, products, articles, events — that is invisible in rendered HTML but highly valuable for LLM reasoning.

Image Retention

retain_images=true

By default, images are stripped from the output to save tokens. This flag preserves them as standard markdown image syntax with alt text and title attributes.

Useful when images carry meaning — diagrams, charts, screenshots — and your downstream model supports vision or you need the URLs.


The Response You Get

200 — Success

The body is the converted markdown text. Two custom headers report token counts using o200k_base encoding (GPT-5 compatible). Compression is only kept when total token savings are at least 5%:

Content-Type: text/markdown; charset=utf-8
x-markdown-tokens: 1247           ← always present
x-markdown-tokens-compressed: 312  ← with valid compress preset; tokens saved vs. uncompressed (0 if savings < 5%)

Errors

All errors return JSON with a human-readable message:

Content-Type: application/json; charset=utf-8

{"error": "reason the request failed"}
400 Bad request — Target URL is missing, invalid, or uses a non-HTTP(S) protocol.
403 Forbidden — The site's robots.txt disallows automated access.
429 Rate limited — More than 500 requests from this IP today. Resets at UTC midnight.
502 Bad gateway — Target page couldn't be fetched: upstream error, DNS resolution failure, bot block, or empty content after extraction.
504 Timeout — Target page didn't respond within 15 seconds.

MCP Server

Connect your AI agent directly to compress.new.
Convert any URL to markdown without leaving your workflow.

What is MCP?

The Model Context Protocol is an open standard that lets AI agents call external tools. The compress.new MCP server exposes a fetch_url tool that converts any URL to clean, token-optimized markdown — with full support for all query parameters like compress, main_only, and selector.

Instead of copy-pasting content into your prompt, your agent fetches and compresses it automatically — keeping your context window lean.

Setup

Add the server to your agent's MCP configuration. No API key required:

{
  "mcpServers": {
    "compress-new": {
      "url": "https://mcp.compress.new"
    }
  }
}

Agent Setup Guides

Where to place the config depends on your agent:

Claude Code Run claude mcp add compress-new https://mcp.compress.new or add to .claude/settings.json
Claude Desktop Add to claude_desktop_config.json under mcpServers
Cursor Add to .cursor/mcp.json in your project root
Windsurf Add to ~/.codeium/windsurf/mcp_config.json

Example Usage

Once connected, your agent can call the tool directly:

// Agent prompt:
"Read this article and summarize the key points"

// The agent calls the MCP tool behind the scenes,
// fetches clean markdown, and reasons over it.

FAQ

What is compress.new?
compress.new is a free web service that converts any webpage into clean markdown, optimized for feeding into LLMs. Just prepend compress.new/ to any URL and you get a markdown version of the page — stripped of navigation, ads, and boilerplate — ready for AI context windows.

Beyond basic conversion, compress.new offers several tools to further reduce noise and cut token usage: content extraction (main_only=true) strips headers, footers, and sidebars to keep only the primary content; CSS selector targeting (selector=".article") lets you extract just the DOM nodes you need (after main-content cleanup when both flags are used); and compression (compress or compress=high) deduplicates repeated text with preset-based aggressiveness — applied only when it actually saves at least 5% of tokens. Together these features can reduce context window usage by up to 90%.
How do I use it?
Prepend compress.new/ to any URL in your browser's address bar — for example, compress.new/https://example.com. You can also use it as an API with curl or fetch. Add query parameters like ?main_only=true or ?compress to customize output. Compression presets are low, med, high, and true; omitting the value defaults to med. Compression is returned only when it reduces total tokens by at least 5%.
How does compression work, and is it reliable?
Compression is an experimental feature. When enabled, compress.new scans the converted markdown for repeated substrings and replaces them with short reference tokens like §1, §2. A compact dictionary is prepended so the model can expand tokens during reasoning. Compression is kept only when it saves at least 5% tokens overall; otherwise compress.new returns the original markdown untouched. The compress param defaults to med when no value is given; use compress=low, compress=med, compress=high, or compress=true to control aggressiveness.

Because compressed output is a non-standard encoding, results vary significantly by model. More capable models generally follow the dictionary convention reliably and reason correctly over compressed content. Weaker or lower-tier models may struggle to consistently apply the substitutions and could produce degraded output. We recommend testing compressed output against your specific model before using it in production pipelines, and treating this feature as experimental for now.
Are there rate limits?
Yes. Each IP address is limited to 500 requests per day. This is more than enough for most use cases including development, research, and moderate production workloads.
Is it free?
Yes, compress.new is completely free to use within the rate limits. No API key, no sign-up, no credit card required.
Is it legal to use?
Yes. compress.new fetches publicly available web pages on your behalf — similar to how a browser, search engine crawler, or read-it-later service works. You are responsible for complying with the terms of service of the websites you access, just as you would when visiting them directly.
How can I block compress.new from my site?
compress.new identifies itself with the user agent compress.new/1.0. You can block it by adding the following to your robots.txt:

User-agent: compress.new Disallow: /
We respect robots.txt directives. You can also block specific paths instead of your entire site by adjusting the Disallow rules.