paimon-mcp-fetch
A lightweight MCP server that fetches URLs and returns clean, readable markdown, enabling AI assistants to read any webpage with article extraction, caching, and security features.
README
paimon-mcp-fetch
Give your AI assistant the ability to read any webpage.
A lightweight MCP server that fetches URLs and returns clean, readable markdown. Built with Go — starts in 5ms, uses ~10MB RAM, zero runtime dependencies.
What It Does
You give it a URL → it returns clean markdown.
Good for:
- Reading articles, blog posts, documentation
- Extracting data from news sites, forums, schedules
- Summarizing web content for your AI assistant
- Getting structured output (headings, lists, tables, code blocks preserved)
Not good for:
- Scraping login-protected pages
- Bypassing paywalls
- Replacing a full browser automation tool
Quick Start
1. Install
Pick one method:
# Go (recommended)
go install github.com/paimonchan/paimon-mcp-fetch/cmd/paimon-mcp-fetch@latest
# Homebrew (macOS/Linux)
brew tap paimonchan/tap
brew install paimon-mcp-fetch
# Scoop (Windows)
scoop bucket add paimonchan https://github.com/paimonchan/scoop-bucket
scoop install paimon-mcp-fetch
# Winget (Windows)
winget install paimonchan.paimon-mcp-fetch
# Docker
docker run -i --rm ghcr.io/paimonchan/paimon-mcp-fetch:latest
2. Configure Your AI Assistant
Add this to your MCP client config:
{
"mcp": {
"paimon-mcp-fetch": {
"type": "local",
"command": ["paimon-mcp-fetch"],
"enabled": true
}
}
}
3. Done
Your AI can now read any URL you give it.
Why This Over Other Fetch Tools?
| paimon-mcp-fetch | Basic text fetch | |
|---|---|---|
| Output | Structured markdown | Plain text |
| Article extraction | Readability algorithm (strips ads, nav, sidebars) | Raw HTML body |
| Images | Optional extraction + processing | None |
| JS rendering | Optional (headless Chrome) | Static only |
| Caching | Built-in LRU cache | None |
| Rate limiting | Per-domain, configurable | None |
| SSRF protection | 7-layer defense | None |
| Startup time | ~5ms | Varies |
| Memory | ~10MB | Varies |
Configuration
Everything is controlled via environment variables. You probably don't need to change anything — defaults work well for most use cases.
| Variable | Default | What it does |
|---|---|---|
PAIMON_MCP_FETCH_TIMEOUT_MS |
12000 |
Request timeout (ms) |
PAIMON_MCP_FETCH_MAX_HTML_BYTES |
10485760 |
Max page size (10MB) |
PAIMON_MCP_FETCH_CACHE_TTL_SECS |
300 |
Cache lifetime (5 min) |
PAIMON_MCP_FETCH_RATE_LIMIT_PER_SECOND |
5.0 |
Requests/sec per domain |
PAIMON_MCP_FETCH_RATE_LIMIT_BURST |
10 |
Max burst size |
PAIMON_MCP_FETCH_RETRY_MAX_ATTEMPTS |
3 |
Retry on transient errors |
PAIMON_MCP_FETCH_JS_RENDER_ENABLED |
false |
Enable headless Chrome |
Optional Features
Image Processing
Extract and process images from webpages:
go build -tags image -o paimon-mcp-fetch ./cmd/paimon-mcp-fetch/
JS Rendering
For JavaScript-heavy sites (SPAs, dynamic content):
go build -tags jsrender -o paimon-mcp-fetch ./cmd/paimon-mcp-fetch/
PAIMON_MCP_FETCH_JS_RENDER_ENABLED=true ./paimon-mcp-fetch
Note: Requires Chrome or Chromium installed. Slower (~3-5s/page) but handles sites that static fetch can't.
Supported AI Assistants
Works with any MCP-compatible client. Add the configuration below to your client's config file.
OpenCode
Config file: ~/.config/opencode/opencode.json
{
"mcp": {
"paimon-mcp-fetch": {
"type": "local",
"command": ["paimon-mcp-fetch"],
"enabled": true
}
}
}
Claude Desktop
Config file: claude_desktop_config.json
{
"mcpServers": {
"paimon-mcp-fetch": {
"command": "paimon-mcp-fetch"
}
}
}
Cursor
Config file: .cursor/mcp.json (project) or ~/.cursor/mcp.json (global)
{
"mcpServers": {
"paimon-mcp-fetch": {
"command": "paimon-mcp-fetch",
"env": {}
}
}
}
VS Code (GitHub Copilot)
Config file: .vscode/mcp.json (workspace) or user settings
{
"servers": {
"paimon-mcp-fetch": {
"type": "stdio",
"command": "paimon-mcp-fetch"
}
}
}
Cline
Config file: .cline/mcp.json
{
"mcpServers": {
"paimon-mcp-fetch": {
"command": "paimon-mcp-fetch"
}
}
}
Windsurf
Config file: .windsurf/mcp.json
{
"mcpServers": {
"paimon-mcp-fetch": {
"command": "paimon-mcp-fetch"
}
}
}
With Custom Configuration
All clients support environment variables. Example with custom timeout and cache:
{
"mcpServers": {
"paimon-mcp-fetch": {
"command": "paimon-mcp-fetch",
"env": {
"PAIMON_MCP_FETCH_TIMEOUT_MS": "30000",
"PAIMON_MCP_FETCH_CACHE_TTL_SECS": "600"
}
}
}
}
Security
Built with security in mind from day one:
- SSRF Protection — 7-layer defense against server-side request forgery
- Private IP blocking — Can't access localhost or internal networks
- Redirect validation — Every redirect hop re-checked for safety
- Size limits — Stream-based reading, no memory bombs
- Timeouts — All requests have deadlines
- No secrets in logs — API keys and tokens never logged
Windows Antivirus
Some antivirus may flag unsigned Go binaries as a false positive. This is a known industry issue. Solutions:
- Use
go install— antivirus sees the signed Go compiler - Use Docker — no local binary
- Build from source — verify the code yourself
Architecture
Built with Clean Architecture principles:
MCP Server → UseCase → Domain (entities, ports)
↑
Adapters implement interfaces
- Domain — Business rules, zero external dependencies
- UseCase — Orchestration logic
- Adapters — HTTP client, content extractor, cache, rate limiter, image processor, JS renderer
Full details in the project plan.
License
MIT — do whatever you want with it.
Built with Go. Zero runtime dependencies. Single binary. ~10MB RAM. Starts in 5ms.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。