webfetch_mcp CLAUDE.md

webfetch_mcp CLAUDE.md is an instructions file for coding agents from simonediroma/webfetch_mcp. It costs 1,999 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

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add instructions/simonediroma/webfetch_mcp/claude-md
Clone the repo
git clone --depth 1 https://github.com/simonediroma/webfetch_mcp

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.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.svg" alt="Measured on agentmods" height="20"></a>
Per session 1,999 This file is loaded in full into every session.
When invoked 1,999 The same file — it is already loaded in full.
Security scan B 1 finding. Scan, not verified.
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.01999 $0.01999
Opus 5 $0.01000 $0.01000
Sonnet 5 $0.00400 $0.00400
Haiku 4.5 $0.00200 $0.00200

Measured 5d ago against content hash 91ac5d8223d2, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade B, and why

webfetch_mcp CLAUDE.md scanned grade B with 1 finding 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 5d 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`:
CLAUDE.md · 223 lines

How it starts

The opening of the file, as written. The whole thing — 223 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 · 223 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. 5d 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 (1 stars, last pushed 1mo ago), licensed MIT. It adds 1,999 tokens to every session, about $0.0100 per session on Opus 5. A static security scan graded it B with 1 finding (reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other instructions, from other repositories

agentic-playwright common-tasks.instructions.md

Instructions for idavidov13/agentic-playwright, covering ai prompt templates for agentic playwright, critical, instructions, phase 1: identify the task category and resolve paths and phase 2: select and customize the matching prompt template.

idavidov13/agentic-playwright · 5,109 tokens

agentic-playwright debugging.instructions.md

Instructions for idavidov13/agentic-playwright, covering debugging, critical, capture defaults (this scaffold), built-in npm scripts for debugging and instructions.

idavidov13/agentic-playwright · 4,500 tokens

agentic-playwright selectors.instructions.md

Instructions for idavidov13/agentic-playwright, covering selector strategy, critical, instructions, phase 1: open and authenticate and phase 2: explore like a user.

idavidov13/agentic-playwright · 2,174 tokens

agentic-playwright playwright-cli.instructions.md

Instructions for idavidov13/agentic-playwright, covering browser automation with playwright-cli, quick start, open new browser, navigate to a page and interact with the page using refs from the snapshot.

idavidov13/agentic-playwright · 1,693 tokens

inspecto CLAUDE.md

Claude Code instructions for inspecto-dev/inspecto, covering inspecto — claude code development guide, project overview, monorepo structure, development phases (load each file as needed) and key architectural decisions.

inspecto-dev/inspecto · 1,014 tokens

demo-video-skill AGENTS.md

Instructions for Kminer2053/demo-video-skill, covering agents.md — demo-video capability, when to use this, what it does, workflow (order is fixed) and setup.

Kminer2053/demo-video-skill · 1,099 tokens