markfetch
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@markfetchget markdown of https://en.wikipedia.org/wiki/Markdown"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
markfetch
Reader View for AI agents and your shell. Fetch any URL, get back clean markdown — with a real Chrome's request fingerprint, not curl's.
The built-in fetch tools that ship with AI coding agents return raw HTML, broken markdown, or 403 from Cloudflare more often than you'd like. markfetch sends a coherent Chrome header set so bot-detection systems see a real browser, then runs the response through the same Reader View pipeline your browser uses (Mozilla's Readability → turndown). The output is markdown indistinguishable from a human running "Save as Markdown" — on sites that would block a naive curl.
One command, two surfaces:
CLI — pass a URL. Print to stdout or
-oto a file.
npm i -g markfetch
markfetch https://en.wikipedia.org/wiki/Markdown
MCP stdio server — bare invocation. Drop into Claude Desktop / Claude Code / Cursor / Goose / any stdio-MCP client.
{
"mcpServers": {
"markfetch": {
"command": "npx",
"args": ["-y", "markfetch"]
}
}
}That snippet is the whole MCP setup — or jump to CLI usage to drive the same command from a shell.
MCP install commands
Claude Code
claude mcp add --scope user markfetch -- npx -y markfetchCodex
codex mcp add markfetch -- npx -y markfetchGemini CLI
gemini mcp add -s user markfetch npx -y markfetchRelated MCP server: nab
Why markfetch?
Real-browser fingerprint | Reader-View extraction | Structured errors | Zero config | |
Built-in agent fetch tools | – | – | – | ✓ |
Generic Playwright / Puppeteer | ✓ | – | – | – |
| – | basic | – | – |
CloudFlare | ✓ | ✓ | – | paid |
| ✓ | ✓ | ✓ (8 codes) | ✓ |
Real-browser request fingerprint.
User-Agent,Sec-CH-UA-*,Sec-Fetch-*,Accept-*— a coherent Chrome header set. A Chrome UA with no client hints is a stronger automation signal than curl, somarkfetchsends the full set, derived from the UA at startup so an override stays internally consistent. HTTP/1.1 over TLS: some CDNs fingerprint undici's HTTP/2 connection and 403 it.Reader-View-quality extraction. linkedom → @mozilla/readability → turndown with GFM tables, strikethrough, and task lists. Code fences preserve
language-Xhints. Sphinx-style bare<pre>blocks render as code, not escaped prose. Intraword underscores stay un-escaped — no morelist\_tools.One tool, one shape (MCP).
fetch_markdown(url, savePath?, raw?)returns markdown incontent[0].text. NostructuredContent, no frontmatter, no metadata fields. Several major MCP clients (Claude Code CLI, VS Code/Copilot) forward onlystructuredContentto the model and dropcontent[]when both are present —markfetchdeliberately stays on the channel your LLM can actually read.savePath/-oescape valve. Pass an absolute path (MCPsavePath) or-o <path>(CLI) and the output lands on disk instead of the response channel. Use it when your client's inline tool-result cap would truncate large responses, or to redirect output from a shell pipeline. The file is only ever the fetched output (extracted markdown, or the raw body with--raw) — fetch errors return a[code]string and never touch the disk.Whole document or honest failure. No pagination, no truncation. If the document doesn't fit in
MARKFETCH_MAX_BYTES, you gettoo_large— never a half-truth.Stdio-clean. Stdout is reserved for MCP frames. Stderr is fatal-only. No log spam, no ANSI escapes — keeping stderr parseable for shell consumers.
Pure Node, no subprocesses. No Playwright, no headless Chromium, no Python hop. Single Node process — one Node process whether you invoke it as an MCP server or from the shell.
CLI usage
markfetch doubles as a shell tool: when invoked with at least one argument it parses argv as a CLI instead of starting the MCP server. Bare invocation (zero args) keeps the existing MCP-server behavior — every MCP client config in the wild keeps working unchanged.
# Print clean markdown to stdout
npx -y markfetch https://example.com/article
# Save to a file (absolute or relative path)
npx -y markfetch https://example.com/article -o article.md
# Pipe into another tool
npx -y markfetch https://example.com/article | pandoc -o article.pdf
# Fetch JSON / APIs / page source verbatim
npx -y markfetch --raw https://api.github.com/repos/vasylenko/markfetchFor repeat use, install once:
npm i -g markfetch # then anywhere: markfetch <url>
# or, as a project devDependency
npm i -D markfetch # then in package.json scripts: "markfetch <url>"Flags:
Flag | Purpose |
| Save the output to a file (absolute or relative path). Default is stdout. |
| Return the unprocessed response body as UTF-8 text — skips Readability and the content-type gate. For JSON, XML, plain text, or page source (binary is not byte-preserved). |
| Print version and exit. |
| Print usage and exit. |
Errors go to stderr with the same [code] message shape the MCP tool returns (see the table below), and the process exits with a non-zero status. The same env vars (MARKFETCH_TIMEOUT_MS, MARKFETCH_MAX_BYTES, MARKFETCH_USER_AGENT) apply in both modes. MARKFETCH_ALLOWED_WRITE_ROOTS is MCP-only — see Write sandbox.
Errors carry one of eight deterministic codes:
Code | Meaning |
| DNS / TCP / TLS failure, or an unexpected internal error from the fetcher. |
| Upstream returned a non-2xx status. |
| Per-request budget |
| Response was not |
| Readability returned no article content, or what it returned was page furniture (a filter panel, a nav strip) rather than an article. Typical for pages that build their content with JavaScript. Not raised with |
| Response body or extracted markdown exceeded |
|
|
|
|
What it is not
Not a crawler. No recursion, no
robots.txtparsing, no rate-limit orchestration. One URL in, one document out.Not authenticated. Anonymous fetch only — no cookie jar, no auth headers, no session reuse. Pages behind login walls return whatever the public response is, usually surfaced as
http_error.Not a JS renderer. Pages that build their content with JavaScript return
extraction_failed, including the ones that ship a static shell of nav and filter widgets around the missing content. SPAs with server-rendered or SEO-prerendered HTML will extract whatever static content they ship.
Configuration
Variable | Default | Purpose |
|
| Per-request timeout in ms |
|
| Cap on response body and extracted markdown |
| Pinned Chrome 130 string | Override the UA. Must be a Chrome UA — |
|
| MCP-only. Path-delimiter-separated list of absolute paths permitted as MCP |
Pass overrides via the env block of your MCP client config:
{
"mcpServers": {
"markfetch": {
"command": "npx",
"args": ["-y", "markfetch"],
"env": {
"MARKFETCH_TIMEOUT_MS": "60000"
}
}
}
}Write sandbox
MCP savePath writes are confined to a set of allowed root directories. By default the allowed set is os.tmpdir() ∪ process.cwd() (each resolved via fs.realpath once at startup). A savePath outside that set returns save_forbidden and no file is created.
Override the default set with MARKFETCH_ALLOWED_WRITE_ROOTS — a list of absolute paths separated by the platform's path delimiter (: on POSIX, ; on Windows). When set, the override replaces the defaults entirely — it does not merge. To keep os.tmpdir() or process.cwd() accessible, list them yourself; the example below shows /tmp for that reason. A malformed value (non-absolute entry, or a directory that doesn't exist) fails fast on stderr at startup.
{
"mcpServers": {
"markfetch": {
"command": "npx",
"args": ["-y", "markfetch"],
"env": {
"MARKFETCH_ALLOWED_WRITE_ROOTS": "/Users/me/markfetch-out:/tmp"
}
}
}
}On Windows, use backslashes and ; as the delimiter:
{
"mcpServers": {
"markfetch": {
"command": "npx",
"args": ["-y", "markfetch"],
"env": {
"MARKFETCH_ALLOWED_WRITE_ROOTS": "C:\\Users\\me\\markfetch-out;C:\\Users\\me\\AppData\\Local\\Temp"
}
}
}
}Notes:
The sandbox is MCP-only by design. The CLI is unrestricted — a human at the shell is the security boundary, and the markfetch CLI doesn't run any sandbox check at all. The asymmetry exists because the MCP tool is driven by a language model, which may be steered by content from a page it just fetched.
Symlinks pointing outside are blocked. Each candidate
savePathis resolved viafs.realpathto its real destination before the containment check, so a symlink planted inside the sandbox cannot be used to escape.Containment is case-insensitive on Windows (
C:\Users\Bobandc:\users\bobare the same path).
Develop
Requires Node.js ≥ 24. Tested on Linux, macOS, and Windows in CI.
When iterating on CLI changes, tsx src/index.ts <url> and tsx src/index.ts --help route through the same argv-discriminated dispatcher as the built dist/index.js — no rebuild needed between edits.
To point an MCP client at a local source build, swap npx for node + an absolute path to dist/index.js:
{
"mcpServers": {
"markfetch": {
"command": "node",
"args": ["/absolute/path/to/markfetch/dist/index.js"]
}
}
}Responsible use
markfetch is a per-call fetch tool, not a crawler. Use it on URLs whose targets you have permission to fetch, and respect the terms of service of any site you query. The maintainer assumes no liability for misuse — see LICENSE.
License
Available Tools
1 toolfetch_markdownA
Fetch a public HTTP/S URL and return its main article content as clean markdown. Best for articles, documentation, blog posts, and reference pages. Non-HTML responses return unsupported_content_type unless raw is set; pure client-rendered SPAs return extraction_failed. Set savePath to write the output to a file instead of returning it inline.
| Name | Required | Description | Default |
|---|---|---|---|
| raw | No | Return the response body verbatim as UTF-8 text (binary is not byte-preserved), skipping Readability and the HTML content-type gate — for JSON, APIs, or raw page source. `MARKFETCH_MAX_BYTES` still applies. | |
| url | Yes | Absolute http(s) URL of the page to fetch. The server follows redirects automatically. No authentication headers, cookies, or session state are sent. | |
| savePath | No | Absolute path to write the output to instead of returning it inline; the response becomes a short confirmation. Use when the output might exceed your client's tool-result cap. Relative and `~` paths are rejected. Writes are sandboxed to allowed roots (defaults: system temp dir and the server's working directory; override with `MARKFETCH_ALLOWED_WRITE_ROOTS`) — paths outside return `save_forbidden`. Existing files are overwritten; the parent directory must exist. Fetch errors never touch the file. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It discloses specific error outcomes (unsupported_content_type, extraction_failed), file-write behavior (overwrites, parent must exist, sandboxing, save_forbidden), and guarantees (fetch errors never touch the file). This is exceptional transparency beyond basic operation.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is four sentences, front-loaded with purpose, followed by key behavioral caveats and parameter guidance. Every sentence earns its place; there is no redundancy or filler. It is dense but highly readable.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Even without annotations or an output schema, the description is remarkably complete for a tool of this complexity. It covers purpose, use cases, error conditions (unsupported_content_type, extraction_failed), parameter effects, file-write security, and the raw bypass. No critical ambiguity remains for an agent to invoke it correctly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema already has 100% coverage with rich descriptions for all three parameters. The description adds meaningful context, such as 'Non-HTML responses return unsupported_content_type unless raw is set' and 'Set savePath to write the output to a file instead of returning it inline,' which reinforces and extends schema semantics. Baseline is 3 due to high coverage; the added value warrants a 4.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description opens with a specific action ('Fetch a public HTTP/S URL') and a clear output ('main article content as clean markdown'). It lists target use cases (articles, documentation, blog posts, reference pages), which distinguishes it from generic fetch tools. The verb and resource are explicit and unambiguous.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description explicitly states when to use the tool via 'Best for articles, documentation, blog posts, and reference pages.' It also implies when to use raw mode ('Non-HTML responses return unsupported_content_type unless raw is set') but does not provide formal when-not-to-use guidance or alternative tool names. This is clear context without exclusions.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
1 tool update
v0.7.1- First observed
fetch_markdown
TDQS
Only one tool exists, so there is no ambiguity or overlap. The tool's purpose is clearly defined as fetching markdown from URLs.
The single tool name 'fetch_markdown' follows a clear verb_noun pattern, which is internally consistent and readable.
With only one tool, the count is minimal, but it matches the server's narrow purpose of fetching markdown. It is slightly under the typical range but not insufficient.
The tool covers the core operation of fetching markdown, including options for raw output and file saving. Minor non-essential features like batch fetching are absent, but no critical gaps for the stated scope.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
MCP server (stdio): fetch web pages as clean readable markdown via the AgentForge API
Fetch any URL and get clean Markdown. Web scraping for AI agents.
Converts any URL to clean, LLM-ready Markdown using real Chrome browsers
Read any web page as clean Markdown for AI agents: fetch, search, metadata, links. SSRF-safe.
Related MCP Servers
- AlicenseAqualityCmaintenanceFetch URLs and return clean, LLM-ready markdown with metadata and layered prompt injection defense. Configurable timeouts, word limits, JS rendering, and link extraction. All-in-one MCP server + CLI.11MIT
- AlicenseAqualityAmaintenanceUltra-fast web fetcher and MCP server written in Rust. Fetches any URL as clean Markdown with HTTP/3, JavaScript rendering, anti-fingerprinting, browser cookie authentication from Chrome/Firefox/Brave, and 1Password integration.812MIT
- AlicenseNot gradedqualityCmaintenanceMCP server for AI agents -- fetch any URL with full JavaScript rendering (Playwright/Chromium) and convert to clean, token-efficient markdown. Works on React, Vue, Angular, and any JS-heavy page. Includes web search, batch fetching, binary file download, LRU cache, SSRF protection, and structured output.25MIT
- AlicenseAqualityCmaintenanceMCP server that converts URLs to clean Markdown/Text for LLM agents.5735MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/vasylenko/markfetch'
If you have feedback or need assistance with the MCP directory API, please join our Discord server