mcp-fetch-node
A Model Context Protocol server that provides web content fetching capabilities.
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:
-
Clone the repository git clone https://github.com/tgambet/mcp-fetch-node.git cd mcp-fetch-node
-
Install dependencies npm install
or if you use pnpm
pnpm install
-
Build (if the project requires a build step) npm run build
or pnpm run build
-
Run the server (default port 8080) node server.js
-
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
context7
Context7 MCP Server -- Up-to-date code documentation for LLMs and AI code editors
obsidian -tools
Add Obsidian integrations like semantic search and custom Templater prompts to Claude or any MCP client.
MiniMax -JS
Official MiniMax Model Context Protocol (MCP) JavaScript implementation that provides seamless integration with MiniMax's powerful AI capabilities including image generation, video generation, text-to-speech, and voice cloning APIs.
mcp-bundler
Is the MCP configuration too complicated? You can easily share your own simplified setup!
akyn-sdk
Turn any data source into an MCP server in 5 minutes. Build AI-agents-ready knowledge bases.
promptboard
The Shared Whiteboard for Your AI Agents via MCP. Paste screenshots, mark them up, and share with AI.