Fetches a website and returns the content as HTML
Fetches a JSON file from a URL and returns the parsed JSON content
Fetches a website and returns the content as plain text with HTML tags, scripts, and styles removed
Fetches a website and returns the content converted to Markdown format
Fetch Web Content is a versatile tool that enables you to retrieve and transform web content from any URL. It supports multiple output formats including HTML, plain text, JSON, and Markdown, making it ideal for data extraction and content processing workflows. With support for custom headers and flexible formatting options, this tool simplifies the process of integrating external web content into your applications. Whether you need raw HTML for parsing, clean text for analysis, or formatted Markdown for display, Fetch Web Content provides a streamlined interface for all your web content needs.
Fetch Web Content provides a simple yet powerful way to retrieve content from websites and web APIs in various formats. This tool is particularly useful for data extraction, content aggregation, and integrating external web content into your applications.
To install and use the Fetch Web Content server:
{
"mcpServers": {
"fetch": {
"command": "node",
"args": [
"/path/to/fetch-mcp/dist/index.js"
]
}
}
}
Replace /path/to/fetch-mcp/dist/index.js
with the absolute path to the server's index.js file after building the project.
If you prefer to build the server from source:
Clone the repository:
git clone https://github.com/zcaceres/fetch-mcp.git
Install dependencies:
npm install
Build the server:
npm run build
Start the server:
npm start
The Fetch Web Content server provides four main tools for retrieving web content in different formats:
fetch_html
: Retrieves the raw HTML content of a webpagefetch_txt
: Extracts plain text content from a webpage (removes HTML tags, scripts, and styles)fetch_json
: Fetches and parses JSON data from a URLfetch_markdown
: Converts webpage content to Markdown formatEach tool accepts a required url
parameter and an optional headers
parameter for customizing the HTTP request.
For development purposes:
npm run dev
to start the TypeScript compiler in watch modenpm test
to run the test suiteThis project is licensed under the MIT License.