web2md
An MCP (Model Context Protocol) server that converts web pages to clean Markdown.
MCP(Model Context Protocol) 서버로, 웹 페이지를 깨끗한 마크다운으로 변환합니다.
Why Markdown? / 마크다운을 사용하는 이유
LLM Token Savings — Raw HTML is bloated with tags, scripts, and boilerplate that waste context.
web2md strips all of that and returns only clean Markdown, drastically reducing the token count fed to your LLM.
With the optional summaryLevel parameter, you can get an extractive summary instead of the full page,
cutting token usage even further when only an overview is needed.
LLM 토큰 절감 — 원본 HTML에는 태그, 스크립트, 불필요한 보일러플레이트가 가득해 컨텍스트 낭비가 큽니다.
web2md는 이를 모두 제거하고 깨끗한 마크다운만 반환해 LLM에 전달되는 토큰 수를 대폭 줄입니다.
선택적인 summaryLevel 파라미터를 사용하면 전체 내용 대신 추출 요약본을 받아
개요만 필요한 경우 토큰 사용량을 더욱 줄일 수 있습니다.
Performance Example / 성능 향상 예시
claude fetch — $0.12 token cost, 9839 context tokens used
web2md (summaryLevel=3) — $0.08 token cost, 5 context tokens used
claude fetch 사용시 — $0.12 토큰 사용, 컨텍스트 9839 사용
web2md 사용시 (summaryLevel=3) — $0.08 토큰 사용, 컨텍스트 5 사용
Installation / 설치
Option 1: Claude Code Plugin (Recommended / 추천)
MCP 서버, web-summarize 스킬, /web2md 커맨드를 한 번에 설치합니다.
Installs the MCP server, web-summarize skill, and /web2md command in one step.
claude plugin marketplace add kevstevie/web2md
claude plugin install web2md
Requires Node.js 18+. Playwright (Chromium) is installed automatically on first npm install.
Option 2: Claude Code — MCP only / MCP 서버만 등록
Claude Code에 MCP 서버만 바로 등록합니다.
claude mcp add web2md -- npx -y web2md-mcp@latest
Requires Node.js 18+. Playwright (Chromium) is installed automatically on first npm install.
Option 3: Build from source / 소스에서 빌드
git clone https://github.com/kevstevie/web2md.git
cd web2md
npm install
npm run build
Getting Started (Source Build) / 시작하기 (소스 빌드)
Skip this section if you installed via claude plugin install or npm.
claude plugin install 또는 npm으로 설치했다면 이 섹션은 건너뛰세요.
Prerequisites / 사전 요구사항
Build / 빌드
npm run build
Run / 실행
node dist/index.js
The server runs in STDIO mode and communicates via JSON-RPC over stdin/stdout.
서버는 STDIO 모드로 실행되며, stdin/stdout을 통해 JSON-RPC로 통신합니다.
Claude Desktop Configuration / Claude Desktop 설정
After installing via Option 1–3, add the following to claude_desktop_config.json.
Option 1~3으로 설치 후, claude_desktop_config.json에 아래 내용을 추가하세요.
Via npm:
{
"mcpServers": {
"web2md": {
"command": "npx",
"args": ["-y", "web2md-mcp@latest"]
}
}
}
Via git clone:
{
"mcpServers": {
"web2md": {
"command": "node",
"args": ["/absolute/path/to/web2md/dist/index.js"]
}
}
}
Features / 기능
- Web Page Fetching - Fetches HTML from any public URL using Node.js built-in
fetch with browser-like headers
- Playwright Support - Renders JavaScript-heavy pages (React, Vue, Angular, etc.) using Playwright (Chromium)
- Smart Content Extraction - Automatically finds the main content (
<main>, <article>, [role=main])
- HTML Cleanup - Removes scripts, styles, nav, footer, ads, and other non-content elements
- Markdown Conversion - Converts clean HTML to Markdown using cheerio + turndown
- Extractive Summarization - Summarizes content using TF-IDF + TextRank with Korean language support. No API key required.
- SSRF Protection - Blocks requests to private/internal IP addresses (127.0.0.1, 10.x, 192.168.x, etc.) including redirect chains and JS-issued requests
- Claude Code Plugin - Bundles
web-summarize skill (auto-invokes web2md on URL requests) and /web2md slash command
- 웹 페이지 가져오기 - 브라우저와 유사한 헤더로 Node.js 내장
fetch를 사용하여 공개 URL에서 HTML을 가져옵니다
- Playwright 지원 - Playwright(Chromium)을 사용하여 JS로 렌더링되는 페이지(React, Vue, Angular 등)를 처리합니다
- 스마트 본문 추출 -
<main>, <article>, [role=main] 순으로 본문을 자동 감지합니다
- HTML 정리 - script, style, nav, footer, 광고 등 불필요한 요소를 제거합니다
- 마크다운 변환 - cheerio + turndown을 사용하여 정리된 HTML을 마크다운으로 변환합니다
- 추출 요약 - TF-IDF + TextRank 알고리즘과 한국어 지원 토크나이저를 활용한 요약. API 키 불필요.
- SSRF 방어 - 사설/내부 IP(127.0.0.1, 10.x, 192.168.x 등)로의 요청 및 리다이렉트·JS 발행 요청을 모두 차단합니다
- Claude Code 플러그인 - URL 요청 시 자동으로 web2md를 사용하는
web-summarize 스킬과 /web2md 슬래시 커맨드 포함
Tech Stack / 기술 스택
| Component | Technology |
|---|
| Language | TypeScript 5 / Node.js 18+ |
| MCP | @modelcontextprotocol/sdk 1.x |
| Transport | STDIO |
| HTML Parsing | cheerio 1.x |
| JS Rendering | Playwright 1.49+ (Chromium) |
| Markdown Conversion | turndown 7.x |
| Summarization | TF-IDF + TextRank |
| Build | TypeScript (tsc) |
Available Tools / 사용 가능한 도구
webToMarkdown