Skip to main content
Python

Web Fetch

v0.1.3
200

@nimblebraininc/webfetch

Fetch web pages and answer questions about their content using Claude

python

README

WebFetch MCP Server

mpak NimbleBrain Discord License: MIT

A Model Context Protocol (MCP) server that fetches web pages, converts HTML to markdown, and uses Claude to answer questions about the content. Get AI-powered summaries and analysis of any web page from any MCP client.

View on mpak registry | Built by NimbleBrain

Install

Install with mpak:

mpak install @nimblebraininc/webfetch

Configuration

Get your API key from Anthropic Console, then configure:

mpak config set @nimblebraininc/webfetch anthropic_api_key YOUR_API_KEY

Claude Code

claude mcp add webfetch -- mpak run @nimblebraininc/webfetch

Claude Desktop

Add to your claude_desktop_config.json:

{
  "mcpServers": {
    "webfetch": {
      "command": "mpak",
      "args": ["run", "@nimblebraininc/webfetch"]
    }
  }
}

See the mpak registry page for full install options.

Tools

web_fetch

Fetch a web page and answer questions about its content. The page is fetched, converted to markdown, and sent to Claude Haiku for analysis.

ParameterTypeRequiredDescription
urlstringYesURL to fetch. HTTP URLs are auto-upgraded to HTTPS.
promptstringYesQuestion or instruction about the page content.

Example call:

{
  "name": "web_fetch",
  "arguments": {
    "url": "https://example.com",
    "prompt": "What is this page about? Summarize the main points."
  }
}

Example response:

This page is the IANA example domain, reserved for use in documentation
and examples. It contains a simple heading and a paragraph explaining
that the domain is established for illustrative purposes.

Features:

  • Automatic HTTP to HTTPS upgrade
  • HTML cleaned and converted to markdown (strips scripts, styles, nav, headers, footers)
  • 15-minute in-memory cache for repeated fetches of the same URL
  • Cross-host redirect detection (returns redirect URL for you to follow)
  • Content truncation for very large pages

Quick Start

Local Development

git clone https://github.com/NimbleBrainInc/mcp-webfetch.git
cd mcp-webfetch

# Install dependencies
uv sync

# Set API key
export ANTHROPIC_API_KEY=your-key-here

# Run the server (stdio mode)
uv run python -m mcp_webfetch.server

The server supports HTTP transport with:

  • Health check: GET /health
  • MCP endpoint: POST /mcp

Development

# Install with dev dependencies
uv sync --group dev

# Run all checks (format, lint, typecheck, unit tests)
make check

# Run unit tests
make test

# Run with coverage
make test-cov

About

WebFetch MCP Server is published on the mpak registry and built by NimbleBrain. mpak is an open registry for Model Context Protocol servers.

License

MIT