Get the FREE Ultimate OpenClaw Setup Guide →

mcp-fetch-node

A Model Context Protocol server that provides web content fetching capabilities.

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio tgambet-mcp-fetch-node node server.js \
  --env PORT="8080 (default)" \
  --env USER_AGENT="Optional; override default User-Agent string when provided" \
  --env IGNORE_ROBOTS_TXT="Optional; set to 1 to ignore robots.txt behavior (use with caution)"

How to use

mcp-fetch-node exposes a web-accessible content fetch tool that converts web pages into Markdown-friendly content for consumption by LLMs. The server runs as a web service (SSE endpoint) at /sse by default on port 8080 and provides a fetch tool that retrieves a URL and returns its extracted content. The fetch tool supports pagination through start_index and can limit length with max_length, making it suitable for chunked reading of long pages. You can also customize the User-Agent or disable robots.txt handling via command-line arguments when starting the server.

To use the tools, start the server and then call the /sse endpoint or integrate the fetch tool in your MCP workflow. The available tool described in the README is fetch, which takes a URL and returns the page content converted to Markdown; prompts can also reuse the same fetch capability by referencing the fetch tool description provided in the server's API.

How to install

Prerequisites:

  • Node.js (recommended LTS version) and npm or pnpm installed on your system
  • Optional: Docker if you prefer containerized running

Install and run from source:

  1. Clone the repository git clone https://github.com/tgambet/mcp-fetch-node.git cd mcp-fetch-node

  2. Install dependencies npm install

    or if you use pnpm

    pnpm install

  3. Build (if the project requires a build step) npm run build

    or pnpm run build

  4. Run the server (default port 8080) node server.js

  5. Verify the server is running curl http://localhost:8080/sse

Running with npx (quick start): npx -y mcp-fetch-node

Running with Docker (image tgambet/mcp-fetch-node): docker run -it tgambet/mcp-fetch-node

Additional notes

Notes and tips:

  • The server by default exposes an SSE endpoint at /sse on port 8080. You can override the port with the PORT environment variable when launching.
  • Robots.txt handling can be customized per request by providing the --ignore-robots-txt flag or via environment variables.
  • Customize the User-Agent string with --user-agent or by setting the USER_AGENT environment variable to apply to tool calls initiated by a model or a user prompt.
  • If you plan to deploy behind a reverse proxy, ensure proper CORS/headers configuration if your client is not server-side.

Related MCP Servers

Sponsor this space

Reach thousands of developers