webfetch_mcp: Instructions file for Claude Code

CLAUDE.md

webfetch_mcp CLAUDE.md is an instructions file for Claude Code from simonediroma/webfetch_mcp. It costs 2,393 tokens per session, scanned B, original, MIT.

Instructions for using a local web-fetching server that retrieves and extracts content from web pages. They specify which fetch operation and output settings to use, including support for domain-specific request headers.

In plain words
What is it for?
Use them when fetching URLs through the webfetch server, especially for sites that need particular request headers.
Why use it?
They prevent incorrect fetch settings that could return noisy page content or ignore custom authentication headers.

Instructions file for Claude Code

Written for Claude Code: the file is CLAUDE.md. Also seen: reads .claude/ paths; mentions Claude Code.

This is simonediroma/webfetch_mcp's own configuration. It tells Claude Code how to work on webfetch_mcp itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything webfetch_mcp configures →

Reuse

Borrowing it

Nothing to install: this file belongs to simonediroma/webfetch_mcp. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/simonediroma/webfetch_mcp/main/CLAUDE.md
Clone the repo
git clone --depth 1 https://github.com/simonediroma/webfetch_mcp

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for webfetch_mcp CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/simonediroma/webfetch_mcp/claude-md/github.svg)](https://agentmods.dev/instructions/simonediroma/webfetch_mcp/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/simonediroma/webfetch_mcp/claude-md"><img src="https://agentmods.dev/badge/instructions/simonediroma/webfetch_mcp/claude-md/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for webfetch_mcp CLAUDE.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/simonediroma/webfetch_mcp/claude-md"><img src="https://agentmods.dev/badge/instructions/simonediroma/webfetch_mcp/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 2,393 This file is loaded in full into every session.
When invoked 2,393 The same file — it is already loaded in full.
Security scan B 2 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.02393 $0.02393
Opus 5.5 $0.00957 $0.00957
Sonnet 5.5 $0.00479 $0.00479
Haiku 4.5 $0.00239 $0.00239

Measured 3d ago against content hash c00ecc828fb6, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade B, and why

webfetch_mcp CLAUDE.md scanned grade B with 2 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Reads agent configuration directoriesmediumAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

Add to `~/.claude/settings.json`:

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

impersonate: str | None, # curl-cffi TLS fingerprint target, e.g. "chrome131"
CLAUDE.md · 238 lines

How it starts

The opening of the file, as written. The whole thing — 238 lines — stays where its author put it; the contents beside it link to each section on GitHub.

WebFetch MCP Server


IMPORTANT — How to use this tool correctly

Always use mcp__webfetch__fetch to fetch URLs. Never use the built-in WebFetch tool — it ignores all custom headers and output format configuration.

Never pass output_format or extract_text unless the user explicitly asks for a specific format. The server is configured with a default output format (currently trafilatura). Passing output_format="raw" or extract_text=True overrides that configured default and produces lower-quality output.

Rules:

  • ✅ mcp__webfetch__fetch(url="https://example.com") — correct, uses configured defaults
  • ❌ mcp__webfetch__fetch(url="...", output_format="raw") — wrong, overrides trafilatura default
  • ❌ mcp__webfetch__fetch(url="...", extract_text=True) — wrong, produces noisy CSS-contaminated text
  • ✅ mcp__webfetch__fetch(url="...", output_format="markdown") — ok only if the user explicitly asked for markdown

Local Python MCP server that replaces the AI assistant's built-in WebFetch tool. Main purpose: inject domain-scoped custom HTTP headers into every outbound request, used to inject provider-specific authentication headers on specific domains.


Project structure

webfetch_mcp/
├── server.py            # MCP server — single entrypoint
├── requirements.txt     # Python dependencies
├── .env.example         # Header config template (copy to .env)
└── .claude/
    └── launch.json      # Dev server config for Claude Code preview_start

Setup

python -m venv .venv

# Windows
.venv\Scripts\pip install -r requirements.txt

# Mac / Linux
.venv/bin/pip install -r requirements.txt

cp .env.example .env   # then edit .env with real tokens

Configuration (.env)

WEBFETCH_HEADERS — domain-scoped request headers

WEBFETCH_HEADERS is a single-line JSON object with domain-scoped headers:

WEBFETCH_HEADERS={"*": {"User-Agent": "MyBot/1.0"}, "example.com": {"X-Auth-Token": "TOKEN"}}

Read the full file on GitHub · 238 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago Changed · +15 lines · +394 tokens per session c00ecc828fb6
  2. 2mo ago First seen · 223 lines · 1,999 tokens per session scan B 91ac5d8223d2

Subscribe to this mod's changes

webfetch_mcp CLAUDE.md is an instructions file published in the GitHub repository simonediroma/webfetch_mcp (2 stars, last pushed 5d ago), licensed MIT. It adds 2,393 tokens to every session, about $0.0096 per session on Opus 5.5. A static security scan graded it B with 2 findings (reads agent configuration directories, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

webfetch_mcp CLAUDE.md compared with instructions from other repositories

webfetch_mcp CLAUDE.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
webfetch_mcp CLAUDE.mdsimonediroma/webfetch_mcpInstructions file25d agoMITB2,393Claude Code
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file196ktodayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file144ktodayMITA8,130Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file196ktodayMITA5,685GitHub Copilot
langchain AGENTS.mdlangchain-ai/langchainInstructions file150ktodayMITA4,680Codex, OpenCode
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file196ktodayMITA3,153GitHub Copilot
generative-ai-for-beginners AGENTS.mdmicrosoft/generative-ai-for-beginnersInstructions file124ktodayMITA2,981Codex, OpenCode