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

@patruff/server-curl

v1.1.0

Published

MCP server for making curl/HTTP requests to fetch resources from the internet, with optional image conversion

Readme

🌐 @patruff/server-curl

An MCP (Model Context Protocol) server that allows Claude and other LLMs to make HTTP requests to fetch resources from the internet, with optional image conversion and automatic file saving.

🚀 Features

  • 📡 Make HTTP requests (GET, POST, PUT, etc.) to any URL
  • 🖼️ Automatically handles binary data (images, PDFs, etc.) and returns them as base64-encoded strings
  • 👁️ Includes image preview for image responses
  • 🔄 Fast image format conversion with graceful fallback (tries PNG/JPEG but reverts quickly if it can't convert)
  • 💾 Direct file saving capability - save directly to the filesystem
  • 🔧 Set custom headers, request body, timeout, and more

📦 Installation

# Install globally
npm install -g @patruff/server-curl

# Or install locally
npm install @patruff/server-curl

🔧 Usage

Start the server:

# If installed globally
server-curl

# If installed locally
npx @patruff/server-curl

The MCP server runs on stdio, making it compatible with LLM interfaces that support the Model Context Protocol.

🛠️ API

The server exposes a single tool:

curl

Makes an HTTP request to the specified URL, with options for conversion and saving.

Parameters

  • url (string, required): The URL to send the request to
  • method (string, optional): HTTP method (GET, POST, PUT, etc.), defaults to "GET"
  • headers (object, optional): HTTP headers to include in the request
  • body (string, optional): Request body for POST/PUT/PATCH requests
  • timeout (number, optional): Request timeout in milliseconds, defaults to 30000
  • convertTo (string, optional): Convert image to specified format (png, jpeg, jpg, webp, gif)
  • saveAs (string, optional): Save the response directly to this filename

Response

The response includes:

  • success (boolean): Whether the request was successful
  • statusCode (number): HTTP status code
  • headers (object): Response headers
  • contentType (string): Content-Type of the response
  • isBinary (boolean): Whether the response is binary data
  • data (string): Response data (text or base64-encoded binary)
  • error (string): Error message if the request failed
  • saved (string): Path where the file was saved (if saveAs was specified)
  • converted (boolean): Whether image conversion was successful

💡 Examples

Fetching an image

{
  "url": "https://example.com/image.png"
}

Fetching a Flux-generated image and converting to PNG

{
  "url": "https://replicate.delivery/pbxt/example-image-url",
  "convertTo": "png"
}

Fetching and saving an image directly to disk

{
  "url": "https://example.com/image.jpg",
  "saveAs": "downloaded_image.jpg"
}

Fetching a Flux image, converting to PNG, and saving

{
  "url": "https://replicate.delivery/pbxt/example-flux-image",
  "convertTo": "png",
  "saveAs": "flux_image.png"
}

Making a POST request

{
  "url": "https://api.example.com/data",
  "method": "POST",
  "headers": {
    "Content-Type": "application/json",
    "Authorization": "Bearer token123"
  },
  "body": "{\"key\": \"value\"}"
}

⚡ Fast Conversion

The MCP uses a smart approach to image conversion:

  • Attempts to convert using Sharp but with a strict 3-second timeout
  • If conversion fails or takes too long, immediately falls back to the original format
  • Adjusts the file extension when saving to match the actual format

🔐 Security Considerations

  • This MCP allows arbitrary HTTP requests to any URL
  • Consider implementing URL allowlisting/denylisting for production use
  • Be cautious when handling sensitive data

🤝 Contributing

Contributions are welcome! Feel free to open issues or submit pull requests.