Node MCP Server

A light-weight module that brings Fetch API to node.js

Local serverstdioTypeScript

What is the Node MCP server?

A light-weight module that brings Fetch API to node.js. That is what the node mcp server brings to an AI assistant: the same capability, reachable through the Model Context Protocol rather than a separate app or dashboard.

The short version

Instead of implementing XMLHttpRequest in Node.js to run browser-specific Fetch polyfill, why not go from native http to fetch API directly? Hence, node-fetch, minimal code for a window.fetch compatible API on Node.js runtime.

  • Stay consistent with window.fetch API
  • Make conscious trade-off when following [WHATWG fetch spec][whatwg-fetch] and stream spec implementation details, document known differences
  • Use native promise and async functions
  • Use native Node streams for body, on both request and response
  • Decode content encoding (gzip/deflate/brotli) properly, and convert string output (such as res.text() and res.json()) to UTF-8 automatically
  • Useful extensions such as redirect limit, response size limit, [explicit errors][error-handling.md] for troubleshooting

The tools it exposes

The server publishes 3 tools. What each one is for:

  • CommonJS — node-fetch from v3 is an ESM-only module - you are not able to import it with require()
  • Streams — The "Node.js way" is to use streams when possible. You can pipe res.body to another stream. This example uses
  • Options — // The following properties are node-fetch extensions follow: 20, // maximum redirect count. 0 to not follow redirect compress: true, // support

Getting it running

node-fetch on npm is all you need. Most clients run it directly, so configuration is a few lines and a restart.

How it compares

This sits in the developer tooling group, where several servers overlap in what they claim to do but differ sharply once you actually set them up. Node's toolset — CommonJS, Streams, Options — is a fair guide to whether it matches your workflow. It is maintained by node-fetch-bot; worth a glance at recent repository activity before you build anything load-bearing on it.

We check each listing at SyncDev against the project's documentation before it goes live — if something here drifts out of date, it is a bug worth reporting.

Things to watch

  • It runs with your machine's permissions. That is convenient and also the reason to think about what you point it at before you approve a tool call.
  • Keep per-call confirmation enabled while you learn its behaviour; it is the cheapest safeguard you have.

Available tools

ToolWhat it does
CommonJSnode-fetch from v3 is an ESM-only module - you are not able to import it with require().
StreamsThe "Node.js way" is to use streams when possible. You can pipe res.body to another stream. This example uses [stream.pipeline](https://nodejs.org/api/stream.html#stream_stream_pipeline_streams_callback) to attach stream
Options// The following properties are node-fetch extensions follow: 20, // maximum redirect count. 0 to not follow redirect compress: true, // support gzip/deflate content encoding. false to disable size: 0, // maximum respons

How to install the Node MCP server

{
  "mcpServers": {
    "server-fetch-1": {
      "command": "npx",
      "args": ["-y", "node-fetch"]
    }
  }
}

Add to claude_desktop_config.json, then restart Claude Desktop.

Example prompts to try

  • Use Node to CommonJS.
  • Use Node to Streams.
  • Use Node to Options.

Frequently asked questions

It connects Node to MCP-compatible AI assistants such as Claude and Cursor, exposing 3 tools (CommonJS, Streams, Options) that the assistant can call on your behalf. Instead of copying data back and forth by hand, the assistant works with Node directly.