markdown-anything
Provides web search through DuckDuckGo, including unwrapping DuckDuckGo redirect links, exposed via the search_web tool and CLI search command.
Provides a built-in GitHub site harness to fetch GitHub pages and repository content as navigable IMDF Markdown, with GitHub-oriented skills and discovery support.
Provides a structured Wikipedia harness and Wikipedia site search to retrieve Wikipedia pages and search results as IMDF Markdown.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
Markdown-Anything
It makes the open web AI-native. No browser needed. No API keys. No Docker.
Navigable, interactive, prompt-injection-safe Markdown (IMDF v1.0) for AI agents — with clickable links (@a1..@aN), pagination (@next), typed forms (@f1..@fM), stateful navigation, a site-harness hub (md-hub), and a zero-dependency MCP server (md-anything mcp). Inspired by HKUDS/CLI-Anything.
Side-by-Side: Raw HTML vs. IMDF v1.0
Even on Hacker News — already one of the lightest HTML pages on the web — md-anything cuts payload size by 80.5% (5.1× smaller) while adding hash-tagged prompt-injection boundaries and 31 deterministic clickable actions (@a1..@a30, @next):
curl -sL https://news.ycombinator.com | wc -c
# 32,618 bytes (raw HTML tables & boilerplate)
md-anything open https://news.ycombinator.com | wc -c
# 6,374 bytes (IMDF v1.0 Markdown + YAML frontmatter + 31 actions)Metric | Raw HTML ( |
|
Payload size (HN front page) | 32,618 bytes | 6,374 bytes (-80.5%) |
Prompt-injection trust boundary | None | SHA-256 hash-tagged wrapper |
Navigation affordances | Raw DOM / | Deterministic |
Structured JSON mode | Manual HTML parsing | Built-in |
Related MCP server: searxNcrawl
Key Features
IMDF v1.0 (
docs/SPEC.md):Trusted YAML frontmatter (
format: imdf/1.0,url,title,tier,harness,status,fetched_at,content_hash,action_count,warnings).Hash-tagged prompt-injection trust boundaries (
<!-- BEGIN UNTRUSTED WEB CONTENT (sha256:...) -->/<!-- END UNTRUSTED WEB CONTENT (sha256:...) -->), zero-width/bidi stripping, hidden CSS/ARIA & boilerplate removal, and spoofed boundary redaction.Deterministic inline + tabular action affordances (
@a1..@aN,@next,@f1..@fM) and--jsonoutput across all commands.
3-Tier Resolution Engine (
docs/ARCHITECTURE.md):Tier 1 — Native: Sends
Accept: text/markdown, text/plain;q=0.8, text/html;q=0.7and natively ingeststext/markdown,/llms.txt, and/webagents.md.Tier 2 — Site Harnesses: Built-in structured harnesses for
github,hackernews,wikipedia, andsearch(DuckDuckGo with/l/?uddg=redirect unwrapping), with automatic fallback to Tier 3 on API error or rate limit.Tier 3 — Generic HTML-to-IMDF: Zero-dependency pure-Python
html.parserconverter supporting headings, lists, code blocks, blockquotes, tables, images, links, pagination hints, and forms, plus optional Playwright JS rendering (--render-js).
Agent-Readiness Discovery (
md-anything discover <url>): ProbesAccept: text/markdown,/llms.txt,/webagents.md, andHarnessRegistry.Stateful Navigation, CLI & REPL: Persistent JSON session history (
open,click,submit,actions,back,forward,search,repl).Markdown-Hub (
md-hub): Browse, search, inspect, and scaffold new<site>/site-harness/bundles.Optional FastAPI Gateway (
md-anything serve): HTTP API for/health,/harnesses,/md,/discover, and/session/{open,click,submit}.
Installation
Core installation has zero required third-party dependencies (Python 3.10+ stdlib only).
Option A: Global Install with pipx (Recommended)
Works cleanly on macOS and Linux without modifying system Python:
pipx install git+https://github.com/Vibherpunk/Markdown-Anything.gitTo upgrade later:
pipx install --force git+https://github.com/Vibherpunk/Markdown-Anything.gitOption B: Install from Source (Virtual Environment)
git clone https://github.com/Vibherpunk/Markdown-Anything.git
cd Markdown-Anything
python3 -m venv .venv
source .venv/bin/activate
pip install -e .Optional Extras
# Optional FastAPI HTTP gateway (md-anything serve)
pip install -e ".[server]"
# Optional Playwright JS rendering (--render-js)
pip install -e ".[js]"
playwright install chromiumQuick Start
CLI & Stateful Navigation
# Open a URL (auto-selects Tier 1 -> Tier 2 -> Tier 3)
md-anything open https://github.com/Vibherpunk/Markdown-Anything
# Inspect clickable actions and forms
md-anything actions
# Click a link or pagination affordance
md-anything click @a1
# Submit a form with required-field validation
md-anything submit @f1 q="agent markdown"
# Navigate history
md-anything back
md-anything forward
# Web, GitHub, or Wikipedia search
md-anything search "IMDF markdown"
md-anything search "markdown" --site wikipedia
# Probe agent readiness of any site
md-anything discover https://example.com --json
# Launch the stateful interactive REPL
md-anything replMarkdown-Hub (md-hub)
md-hub list
md-hub search github
md-hub info hackernews --json
md-hub scaffold docs.python.org --out ./harnessesNative MCP Server (Claude Desktop, Cursor, Windsurf, Claude Code)
Zero-dependency JSON-RPC 2.0 MCP server over stdio exposing open_url, click_action, submit_form, list_actions, go_back, go_forward, search_web, and discover_url.
Find your installed
md-anythingpath:which md-anythingAdd it to your AI client's MCP config file (replace
/path/to/md-anythingwith the output ofwhich md-anything):Claude Desktop (macOS):
~/Library/Application Support/Claude/claude_desktop_config.jsonCursor:
~/.cursor/mcp.jsonClaude Code (one-liner):
claude mcp add markdown-anything $(which md-anything) mcp
{
"mcpServers": {
"markdown-anything": {
"command": "/path/to/md-anything",
"args": ["mcp"]
}
}
}Restart your AI app (it launches
md-anything mcpautomatically in the background). To verify the server directly in a terminal:
printf '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{}}\n{"jsonrpc":"2.0","id":2,"method":"tools/list"}\n' | md-anything mcpNative LLM Tool Schemas (OpenAI & Anthropic)
Drop Markdown-Anything directly into any Python agent loop without a terminal:
from markdown_anything import ToolDispatcher, get_openai_tools, get_anthropic_tools
tools = get_openai_tools() # or get_anthropic_tools()
dispatcher = ToolDispatcher()
# When your model emits a tool call:
result = dispatcher.call("open_url", {"url": "https://news.ycombinator.com"})Optional FastAPI HTTP Gateway
md-anything serve --host 127.0.0.1 --port 8000Endpoints:
GET /healthGET /harnessesGET /md?url=...&tier=auto&format=markdown|jsonGET /discover?url=...POST /session/openPOST /session/clickPOST /session/submit
Agent Skills
Pre-built agent skill guides live under skills/:
Running Tests
PYTHONPATH=src python3 -m unittest discover -s tests -vLicense
MIT License — see LICENSE for details.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Web pages as Markdown, text or HTML, plus Google Maps places and reviews, for AI agents.
Web search and any page as LLM-ready Markdown for AI agents. Free keyless tier, no signup.
Read any web page as clean Markdown for AI agents: fetch, search, metadata, links. SSRF-safe.
Pages, crawls and URL batches as clean Markdown and JSON for AI agents, with an Evidence Record.
Related MCP Servers
- AlicenseAqualityDmaintenanceEnables AI agents to fetch any web page as clean markdown or screenshot it, turning URLs into LLM-ready context.29 npmMIT
- FlicenseNot gradedqualityAmaintenanceEnables AI agents to search the web through configured providers and crawl pages or entire sites into clean, deduplicated Markdown or JSON, including authenticated crawls.-
- FlicenseNot gradedqualityAmaintenanceEnables AI agents to search the web through configured providers and crawl single pages or entire sites into clean, deduplicated Markdown or JSON, including authenticated pages.-
- FlicenseNot gradedqualityAmaintenanceEnables AI agents to search the web through configured providers and crawl pages or whole sites into clean, deduplicated Markdown or JSON, including authenticated crawls.-