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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@sylphlab/tools-fetch-mcp

v0.5.1

Published

MCP server providing fetch tool

Readme

@sylphlab/tools-fetch-mcp

NPM version

Make HTTP requests remotely via the Model Context Protocol (MCP).

This package provides a ready-to-run MCP server that exposes network fetch capabilities, likely based on the tools defined in @sylphlab/tools-net.

Purpose

This server allows MCP clients (like AI agents or other applications) to request web resources over HTTP/HTTPS. It acts as a secure gateway, taking the core fetch logic from @sylphlab/tools-net, adapting it using @sylphlab/tools-adaptor-mcp, and serving it over the MCP standard (stdio). This is crucial for agents that need to interact with external APIs or retrieve web content but may not have direct network access themselves.

Features

  • MCP Server: Implements the Model Context Protocol for tool execution.
  • Exposes Fetch Tool: Provides a tool (likely named fetch or similar) to perform HTTP/HTTPS requests (GET, POST, etc.).
    • Supports various methods, headers, and body payloads.
    • Returns response status, headers, and body content.
  • Executable: Provides a binary (mcp-fetch) for easy execution.
  • Secure: Acts as a controlled interface for network requests initiated by an MCP client.

Installation

This package is intended to be used as a standalone server.

Using npm/pnpm/yarn (Recommended)

Install as a dependency or globally:

# Globally
npm install -g @sylphlab/tools-fetch-mcp
# Or in a project
pnpm add @sylphlab/tools-fetch-mcp

Configure your MCP host (e.g., mcp_settings.json) to use npx or the installed binary path:

// Using npx
{
  "mcpServers": {
    "fetch-mcp": {
      "command": "npx",
      "args": ["@sylphlab/tools-fetch-mcp"],
      "name": "Fetch Tool (npx)"
    }
  }
}

// Or using global install path (example)
{
  "mcpServers": {
    "fetch-mcp": {
      "command": "mcp-fetch", // Assumes it's in PATH
      "name": "Fetch Tool (Global)"
    }
  }
}

Using Docker (If Available)

(Assuming a Docker image sylphlab/tools-fetch-mcp:latest exists)

docker pull sylphlab/tools-fetch-mcp:latest

Configure your MCP host:

{
  "mcpServers": {
    "fetch-mcp": {
      "command": "docker",
      "args": [
        "run",
        "-i", // Essential for stdio communication
        "--rm",
        "sylphlab/tools-fetch-mcp:latest"
      ],
      "name": "Fetch Tool (Docker)"
    }
  }
}

Local Build (For Development)

  1. Build: From the monorepo root: pnpm build --filter @sylphlab/tools-fetch-mcp
  2. Configure MCP Host:
    {
      "mcpServers": {
        "fetch-mcp": {
          "command": "node",
          // Adjust path as needed
          "args": ["./packages/tools-fetch-mcp/dist/index.js"],
          "name": "Fetch Tool (Local Build)"
        }
      }
    }

Usage

Once the server is running and configured in your MCP host, clients can send requests.

MCP Request Example (Conceptual GET):

{
  "tool_name": "fetch", // Assuming tool name is 'fetch'
  "arguments": {
    "url": "https://api.example.com/data",
    "method": "GET",
    "headers": {
      "Accept": "application/json"
    }
  }
}

Expected Response Snippet (Conceptual):

{
  "result": {
    "status": 200,
    "statusText": "OK",
    "headers": {
      "content-type": "application/json",
      // ... other headers
    },
    "body": "{\"key\":\"value\"}" // Body as string
  }
}

Dependencies

  • @modelcontextprotocol/sdk: For creating the MCP server instance.
  • @sylphlab/tools-adaptor-mcp: To adapt the core tool definitions to MCP format.
  • @sylphlab/tools-net: Contains the underlying logic for making HTTP requests.
  • @sylphlab/tools-core: Provides the base tool definition structure.

Developed by Sylph Lab.