URL Fetcher MCP server

Enables fetching and processing content from URLs in various formats including HTML, JSON, Markdown, and plain text, with specialized tools for each format type and automatic content type detection for web research and data retrieval tasks.
Back to servers
Setup instructions
Provider
nathanonn
Release date
Mar 23, 2025
Language
TypeScript
Stats
4 stars

The MCP URL Format Converter is a server that fetches content from any web URL and transforms it into various formats (HTML, JSON, Markdown, or plain text), regardless of the original content type. It works with any MCP-compatible client, including Claude for Desktop, enabling LLMs to access and analyze web content in consistent formats.

Installation

Prerequisites

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

Setup Steps

  1. Clone the repository:

    git clone https://github.com/yourusername/mcp-url-converter.git
    cd mcp-url-converter
    
  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 converter server to your configuration:

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

Using the Tools

Fetch Tool

Automatically detects and converts content to the best output format.

Parameters:

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

Example:

Can you fetch https://example.com and choose the best format to display it?

Fetch-JSON Tool

Converts content to JSON format.

Parameters:

  • url (required): The URL to fetch content from
  • prettyPrint (optional): Whether to pretty-print the JSON. Default: true

Example:

Can you fetch https://example.com and convert it to JSON format?

Fetch-HTML Tool

Converts content to HTML format.

Parameters:

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

Example:

Can you fetch https://api.example.com/users and convert it to HTML?

Fetch-Markdown Tool

Converts content to Markdown format.

Parameters:

  • url (required): The URL to fetch content from

Example:

Can you fetch https://example.com and convert it to Markdown?

Fetch-Text Tool

Converts content to plain text format.

Parameters:

  • url (required): The URL to fetch content from

Example:

Can you fetch https://example.com and convert it to plain text?

Web-Search and Deep-Research Tools

These tools provide interfaces to Perplexity search capabilities (when supported by the MCP host).

Accessing Recent History

You can view a list of recently fetched URLs using the following resource:

What URLs have I fetched recently?

This will return a list of URLs with timestamps and output formats.

Troubleshooting

Common Issues

  1. Connection errors: Verify that the URL is accessible and correctly formatted
  2. Conversion errors: Some complex content may not convert cleanly between formats
  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

How to install this MCP server

For Claude Code

To add this MCP server to Claude Code, run this command in your terminal:

claude mcp add-json "url-converter" '{"command":"node","args":["/absolute/path/to/mcp-url-converter/build/index.js"]}'

See the official Claude Code MCP documentation for more details.

For Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "url-converter": {
            "command": "node",
            "args": [
                "/absolute/path/to/mcp-url-converter/build/index.js"
            ]
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.

For Claude Desktop

To add this MCP server to Claude Desktop:

1. Find your configuration file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json

2. Add this to your configuration file:

{
    "mcpServers": {
        "url-converter": {
            "command": "node",
            "args": [
                "/absolute/path/to/mcp-url-converter/build/index.js"
            ]
        }
    }
}

3. Restart Claude Desktop for the changes to take effect

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later