This MCP server provides functionality to fetch web content in various formats, including HTML, JSON, plain text, and Markdown. This improved version offers Windows compatibility and simplified installation.
The following tools are available for fetching and processing web content:
- Purpose: Fetches and returns raw HTML content from any URL.
- Input:
url
(string, required): URL of the website to fetchheaders
(object, optional): Custom headers for the request
- Output: Raw HTML content of the webpage.
- Purpose: Fetches and parses JSON data from any URL.
- Input:
url
(string, required): URL of the JSON resourceheaders
(object, optional): Custom headers for the request
- Output: Parsed JSON object.
- Purpose: Fetches and returns clean plain text content, removing HTML tags and scripts.
- Input:
url
(string, required): URL of the website to fetchheaders
(object, optional): Custom headers for the request
- Output: Plain text content of the webpage.
- Purpose: Fetches content and converts it to well-formatted Markdown.
- Input:
url
(string, required): URL of the website to fetchheaders
(object, optional): Custom headers for the request
- Output: Markdown representation of the webpage content.
# Use directly without installation
pnpx github:Nazza77/better-fetch-mcp
# Use directly without installation
npx -y github:Nazza77/better-fetch-mcp
# Clone the repository
git clone https://github.com/Nazza77/better-fetch-mcp.git
cd better-fetch-mcp
# Install dependencies using pnpm
pnpm install
# Build the server using pnpm
pnpm build
# Run the server using pnpm
pnpm start
Add this configuration to your configuration file:
{
"mcpServers": {
"better-fetch": {
"command": "pnpx",
"args": ["github:Nazza77/better-fetch-mcp"]
}
}
}
{
"mcpServers": {
"better-fetch": {
"command": "npx",
"args": ["-y", "github:Nazza77/better-fetch-mcp"]
}
}
}
- Fetches web content using modern fetch API.
- Supports custom headers for requests.
- Provides content in multiple formats: HTML, JSON, plain text, and Markdown.
- Uses JSDOM for HTML parsing and text extraction.
- Uses TurndownService for HTML to Markdown conversion.
- Windows compatible (added shx for build scripts).
- Directly executable via pnpx or npx without prior installation.
- Run
pnpm dev
to start the TypeScript compiler in watch mode. - Use
pnpm test
to run the test suite.
- Added Windows compatibility.
- Added
bin
property for direct execution with pnpx/npx. - Updated dependencies (including jsdom to version 26.0.0).
- Improved logging for easier debugging.
This project is licensed under the MIT License.