npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

nm-mcp-url-fetcher

v0.0.10

Published

MCP server for fetching and processing content from URLs in various formats

Downloads

7

Readme

MCP URL Fetcher

A Model Context Protocol (MCP) server that enables LLMs to fetch and process web content in multiple formats.

Overview

MCP URL Fetcher provides tools for retrieving content from the web in HTML, JSON, Markdown, and plain text formats. It's designed to work with any MCP-compatible client, including Claude for Desktop, enabling LLMs to access and analyze web content securely.

Features

  • 📄 Multi-format Support: Fetch content in HTML, JSON, Markdown, and plain text
  • 🔍 Automatic Content Detection: Smart format detection based on HTTP headers and file extensions
  • 🔧 Format-specific Processing:
    • HTML content extraction
    • JSON pretty-printing and path-based extraction
    • Complete Markdown rendering
    • Raw text retrieval
  • 📜 History Tracking: Maintains logs of recently fetched URLs
  • 📋 Pre-built Prompts: Ready-to-use templates for web content analysis
  • 🛡️ Robust Error Handling: Comprehensive error handling for all operations

Installation

Prerequisites

  • Node.js 16.x or higher
  • npm or yarn

Quick Start

  1. Clone the repository:

    git clone https://github.com/yourusername/mcp-url-fetcher.git
    cd mcp-url-fetcher
  2. Install dependencies:

    npm install
  3. Build the project:

    npm run build
  4. Run the server:

    npm start

Integration with Claude for Desktop

  1. Open your Claude for Desktop configuration file:

    • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
    • Windows: %APPDATA%\Claude\claude_desktop_config.json
  2. Add the URL Fetcher server to your configuration:

    {
        "mcpServers": {
            "url-fetcher": {
                "command": "node",
                "args": ["/absolute/path/to/mcp-url-fetcher/build/index.js"]
            }
        }
    }
  3. Restart Claude for Desktop

Available Tools

fetch

Fetches content from a URL with automatic format detection.

Parameters:

  • url (string, required): The URL to fetch content from
  • format (string, optional): Format to fetch (auto, html, json, markdown, text). Default: auto

Example:

Can you fetch the content from https://example.com and tell me what it's about?

fetch-html

Fetches HTML content from a URL.

Parameters:

  • url (string, required): The URL to fetch HTML from
  • extractText (boolean, optional): Whether to extract text content only. Default: false

Example:

Can you fetch the HTML structure of https://example.com?

fetch-json

Fetches and parses JSON content from a URL.

Parameters:

  • url (string, required): The URL to fetch JSON from
  • prettyPrint (boolean, optional): Whether to pretty-print the JSON. Default: true
  • path (string, optional): JSONPath-like expression to extract specific data

Example:

Can you fetch the user data from https://api.example.com/users/1?

fetch-markdown

Fetches Markdown content from a URL.

Parameters:

  • url (string, required): The URL to fetch Markdown from

Example:

Can you fetch and render the README from https://raw.githubusercontent.com/user/repo/main/README.md?

fetch-text

Fetches plain text content from a URL.

Parameters:

  • url (string, required): The URL to fetch text from

Example:

Can you fetch the text content from https://example.com/robots.txt?

Available Resources

recent-urls://list

Returns a list of recently fetched URLs with timestamps and content types.

Example:

What URLs have I fetched recently?

Available Prompts

fetch-website

Template for fetching and analyzing website content.

Parameters:

  • url (string, required): URL of the website to fetch
  • format (string, optional): Format to fetch (html or text). Default: text

fetch-api

Template for fetching and analyzing API data.

Parameters:

  • url (string, required): URL of the API endpoint
  • path (string, optional): JSON path to extract specific data

Testing

You can test the server using the MCP Inspector:

npm run test

Troubleshooting

Common Issues

  1. Connection errors: Verify that the URL is accessible and correctly formatted
  2. JSON parsing errors: Confirm that the URL returns valid JSON
  3. Cross-origin issues: Some websites may block requests from unknown sources

Debug Mode

For additional debugging information, set the DEBUG environment variable:

DEBUG=mcp:* npm start

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments


Made with ❤️ for the MCP community