MCP.so
登录
W

Webfetch MCP Server

@simonediroma

基本信息

分类

其他

传输方式

stdio

作者

simonediroma

提交者

simonediroma

关于 Webfetch MCP Server

暂无概览

#webfetch#http-client#trafilatura#http-request#custom-http-header

Webfetch MCP Server 配置

使用下面的配置,将此服务器添加到你的 MCP 客户端。

{
  "mcpServers": {
    "webfetch": {
      "command": "/absolute/path/to/.venv/bin/python",
      "args": [
        "/absolute/path/to/server.py"
      ],
      "env": {
        "WEBFETCH_CONFIG": "/absolute/path/to/webfetch.yaml"
      }
    }
  }
}

Webfetch MCP Server 工具

工具列表暂未提供

当前收录暂时没有可展示的工具列表,不代表服务没有工具。请查阅项目文档了解支持的能力。

工具是从 README 中自动提取的。维护者可以在 ## Tools 标题下列出工具,即可填充这部分内容。

概览

What is webfetch-mcp?

webfetch-mcp is a local Python MCP server that replaces an AI assistant’s built-in WebFetch tool with a fully configurable HTTP client. It supports domain-scoped headers, retries, proxies, timeouts, output formats, bot-block detection, and prompt-injection sanitization.

How to use webfetch-mcp?

Clone the repository, create a Python 3.10+ virtual environment, install dependencies from requirements.txt, copy and edit the YAML configuration file (webfetch.yaml.example → webfetch.yaml), then register the server’s command, args, and env in your AI assistant’s MCP server settings (e.g., ~/.claude/settings.json). Restart the assistant; the tool is exposed as mcp__webfetch__fetch.

Key features of webfetch-mcp

  • Domain-scoped custom headers and auth tokens.
  • Configurable YAML config file.
  • Retry with exponential backoff on failures.
  • Bot-block detection with optional retry.
  • Prompt-injection sanitization (flag or strip).
  • JavaScript rendering via Playwright (optional).

Use cases of webfetch-mcp

  • Fetching authenticated API content with per-domain tokens.
  • Scraping bot-protected websites (Cloudflare, Akamai).
  • Extracting main article content with trafilatura format.
  • Running CI/CD smoke tests using response assertions.
  • Rendering JavaScript-heavy SPAs before content extraction.

常见问题

1

How is webfetch-mcp different from a built-in WebFetch tool?

The built-in tool sends requests without custom headers, so it is blocked by bot-protection systems and cannot authenticate against APIs. webfetch-mcp allows per-domain headers, retries, proxies, and output formatting, all configured automatically.

2

What are the runtime dependencies of webfetch-mcp?

Python 3.10+ and the packages in `requirements.txt`: `mcp[cli]`, `httpx`, `python-dotenv`, `markdownify`, `trafilatura`, `pyyaml`, and `beautifulsoup4`. JS rendering requires Playwright (`playwright install chromium`).

3

Where does the fetched data live?

The server fetches data directly and returns it to the AI assistant in the response. No data is stored or persisted by the server itself. Response length can be capped with `max_bytes`.

4

What transports or authentication does webfetch-mcp support?

It communicates with MCP-compatible assistants over stdio (the command-line invocation). Authentication is handled by domain-scoped headers set in the YAML config file.

5

Are there any known limits of webfetch-mcp?

The README does not document explicit functional limits. It supports response truncation via `max_bytes` to avoid filling the assistant’s context window.

评论

其他 分类下的更多 MCP 服务器