# markdown-for-agents-mcp [Health: Active]

**Category:** 💻 Developer Tools  
**Repository:** https://github.com/JohnnyFoulds/markdown-for-agents-mcp  
**GitHub Stars:** 0  
**npm Downloads (last month):** 136  
**Views:** 1  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/markdown-for-agents-mcp

## Description
MCP 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.

## Tools
Capabilities this server exposes over MCP:

- **url** — URL to fetch and convert
- **timeout** — Request timeout in ms (overrides `FETCH_TIMEOUT_MS`)

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "markdown-for-agents-mcp": {
    "command": "npx",
    "args": ["-y","markdown-for-agents-mcp"]
  }
}
```

## Documentation

## What markdown-for-agents-mcp does

markdown-for-agents-mcp gives MCP clients access to browser-rendered web content. It launches Chromium through Playwright, waits for the page to render, identifies the main content area, removes common boilerplate, and converts the result to markdown for agent use. The extraction logic prioritizes elements such as `main`, `article`, and `#content` before falling back to the page body.

Rendering makes the server suitable for sites whose useful content is inserted by JavaScript, including React, Vue, Angular, single-page applications, lazy-loaded pages, and infinite-scroll pages. The output is designed to use fewer tokens than raw HTML; the project reports reductions of up to 80 percent in its benchmarks.

## How it works

The primary `fetch_url` tool accepts a URL and an optional timeout in milliseconds. It returns markdown text and, for MCP SDK clients that support `structuredContent`, fields such as the source URL, page title, fetched timestamp, markdown, and content size.

`fetch_urls` accepts an array of URLs and processes them concurrently. Each result includes success information and the combined response contains a summary of successful and failed fetches. The default maximum parallelism is five and can be adjusted with `MAX_CONCURRENT_FETCHES`.

`web_search` queries DuckDuckGo over a plain HTTP endpoint. It can return search results alone or fetch and convert the top result pages through Playwright. Search requests support result limits, domain allowlists, domain blocklists, and a timeout. Other available tools include `download_file` for downloading files and `health_check` for exposing cache and fetch metrics.

A 50 MB in-memory LRU cache with a 15-minute TTL can avoid repeated fetches. Domain filtering includes a built-in blocklist for tracker and social domains, with request-level allow and block lists and a server-level allowlist mode. Browser traffic can be routed through a proxy, and browser identification includes user-agent rotation and webdriver spoofing.

## Setup and configuration

Install the package globally with npm and use the `markdown-mcp` command, or run it through `npx`:

```bash
npm install -g markdown-for-agents-mcp
npx markdown-for-agents-mcp
```

Chromium is downloaded automatically by the package's postinstall process. The server runs over stdio by default, so an MCP client can launch it with the `markdown-mcp` command or a local `dist/index.js` path.

It also supports Streamable HTTP mode. Start it on a selected port with `markdown-mcp --http 3456` or set `HTTP_PORT`. MCP traffic uses `/mcp`. Set `MCP_AUTH_TOKEN` to require a bearer token on requests, and set `PLAYWRIGHT_PROXY` to route browser traffic through a proxy. `FETCH_TIMEOUT_MS` provides the default request timeout, while a tool-level `timeout` overrides it. `LOG_LEVEL` controls logging, and `MAX_CONCURRENT_FETCHES` controls batch-fetch parallelism.

## Tools and capabilities

- Fetch one JavaScript-rendered URL as clean markdown.
- Fetch multiple URLs concurrently with per-request results and totals.
- Search DuckDuckGo and optionally convert the top results to markdown.
- Download files through the server's available download tool.
- Inspect cache and fetch statistics with `health_check`.
- Return text output plus typed structured content when supported by the MCP client.
- Run through stdio or Streamable HTTP with optional bearer authentication.
- Filter domains, cache repeated requests, and use a Playwright proxy.

## Limitations and notes

Search itself uses plain HTTP rather than Playwright; browser rendering applies when search results are optionally fetched. Structured output requires an MCP SDK 1.11 or newer client capability. Browser-based fetching requires Chromium, which the installation process normally downloads automatically. HTTP deployments should protect the endpoint with `MCP_AUTH_TOKEN` when bearer authentication is needed.

_Full upstream README: https://allmcps.com/mcp/markdown-for-agents-mcp/readme_

