Skip to main content
Glama
goswamig

Fetch MCP Server

by goswamig

Fetch MCP Server

fetch mcp logo

This MCP server provides functionality to fetch web content in various formats, including HTML, JSON, plain text, and Markdown.

Components

Tools

  • fetch_html

    • Fetch a website and return the content as HTML

    • Input:

      • url (string, required): URL of the website to fetch

      • headers (object, optional): Custom headers to include in the request

    • Returns the raw HTML content of the webpage

  • fetch_json

    • Fetch a JSON file from a URL

    • Input:

      • url (string, required): URL of the JSON to fetch

      • headers (object, optional): Custom headers to include in the request

    • Returns the parsed JSON content

  • fetch_txt

    • Fetch a website and return the content as plain text (no HTML)

    • Input:

      • url (string, required): URL of the website to fetch

      • headers (object, optional): Custom headers to include in the request

    • Returns the text content of the webpage with HTML tags, scripts, and styles removed

  • fetch_markdown

    • Fetch a website and return the content as Markdown

    • Input:

      • url (string, required): URL of the website to fetch

      • headers (object, optional): Custom headers to include in the request

    • Returns the content of the webpage converted to Markdown format

Resources

This server does not provide any persistent resources. It's designed to fetch and transform web content on demand.

Related MCP server: Fetch MCP Server

Getting started

  1. Clone the repository

  2. Install dependencies: npm install

  3. Build the server: npm run build

Installing via Smithery

To install fetch-mcp for Claude Desktop automatically via Smithery:

npx -y @smithery/cli install @goswamig/fetch-mcp --client claude

Usage

To use the server, you can run it directly:

npm start

This will start the Fetch MCP Server running on stdio.

Usage with Desktop App

To integrate this server with a desktop app, add the following to your app's server configuration:

{
  "mcpServers": {
    "fetch": {
      "command": "node",
      "args": [
        "{ABSOLUTE PATH TO FILE HERE}/dist/index.js"
      ]
    }
  }
}

Features

  • 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

Development

  • Run npm run dev to start the TypeScript compiler in watch mode

  • Use npm test to run the test suite

License

This project is licensed under the MIT License.

Available Tools

4 tools
fetch_htmlC

Fetch a website and return the content as HTML

ParametersJSON Schema
NameRequiredDescriptionDefault
headersNoOptional headers to include in the request
urlYesURL of the website to fetch

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden for behavioral disclosure. It mentions fetching and returning HTML but doesn't cover important aspects like error handling, timeout behavior, authentication needs, rate limits, or whether it follows redirects. The description is minimal and lacks operational context.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise - a single sentence that directly states the tool's function. Every word earns its place with no redundancy or unnecessary elaboration. It's front-loaded with the core purpose.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool that performs network operations with no annotations and no output schema, the description is insufficient. It doesn't explain what happens with failed requests, what HTML is returned (full page vs. processed), or any behavioral characteristics. The minimal description leaves too many operational questions unanswered.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents both parameters (url and headers) adequately. The description doesn't add any parameter-specific information beyond what's in the schema. Baseline 3 is appropriate when the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('fetch') and resource ('a website'), specifying the return format ('as HTML'). It distinguishes from sibling tools like fetch_json and fetch_markdown by explicitly mentioning HTML output. However, it doesn't fully differentiate from fetch_txt which might also fetch websites but return plain text.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives like fetch_json or fetch_markdown. It doesn't mention scenarios where HTML is preferred over other formats, nor does it discuss prerequisites or limitations. Usage context is implied but not explicitly stated.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

fetch_jsonC

Fetch a JSON file from a URL

ParametersJSON Schema
NameRequiredDescriptionDefault
headersNoOptional headers to include in the request
urlYesURL of the JSON to fetch

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions fetching from a URL but lacks details on error handling, timeouts, authentication needs, rate limits, or response format. For a network operation tool, this leaves critical behavioral traits unspecified, making it inadequate for safe and effective use.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that directly states the tool's purpose without any fluff. It is front-loaded and appropriately sized for a simple tool, making it easy to parse and understand quickly. Every word earns its place, contributing to clarity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity of a network fetch operation, no annotations, and no output schema, the description is incomplete. It doesn't explain what the tool returns (e.g., parsed JSON object, raw response), error conditions, or behavioral nuances. This lack of context makes it insufficient for an agent to use the tool reliably without additional assumptions.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, with clear descriptions for both parameters (url and headers). The description adds no additional parameter semantics beyond what the schema provides, such as examples or constraints. However, the baseline score of 3 is appropriate since the schema adequately documents the parameters, and no extra value is needed here.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Fetch') and resource ('a JSON file from a URL'), making the purpose immediately understandable. It distinguishes from siblings by specifying JSON format (vs. HTML, markdown, or txt), though it doesn't explicitly contrast with them. The description is specific but could be more precise about the verb (e.g., 'Retrieve' or 'Download').

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus the sibling tools (fetch_html, fetch_markdown, fetch_txt). The description implies usage for JSON files specifically, but it doesn't state alternatives, prerequisites, or exclusions. The agent must infer usage based on format alone, which is insufficient for clear decision-making.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

fetch_markdownC

Fetch a website and return the content as Markdown

ParametersJSON Schema
NameRequiredDescriptionDefault
headersNoOptional headers to include in the request
urlYesURL of the website to fetch

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the tool fetches and converts to Markdown but lacks details on error handling, rate limits, authentication needs, or whether it performs web scraping vs. API calls. This is inadequate for a tool that interacts with external websites.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence with zero wasted words. It front-loads the core purpose and output, making it easy to parse quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool that fetches external websites with 2 parameters and no annotations or output schema, the description is incomplete. It doesn't cover behavioral aspects like error cases, conversion limitations, or output structure, leaving significant gaps for an AI agent to use it correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema fully documents both parameters (url and headers). The description adds no additional meaning beyond implying the URL is for a website, which is already clear from the schema. Baseline 3 is appropriate as the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Fetch a website') and the output format ('return the content as Markdown'), which distinguishes it from sibling tools like fetch_html, fetch_json, and fetch_txt that return different formats. However, it doesn't explicitly mention how it differs beyond output format (e.g., conversion process).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus its siblings. It doesn't mention scenarios where Markdown output is preferred over HTML, JSON, or plain text, nor does it specify prerequisites like URL accessibility or content type suitability.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

fetch_txtB

Fetch a website, return the content as plain text (no HTML)

ParametersJSON Schema
NameRequiredDescriptionDefault
headersNoOptional headers to include in the request
urlYesURL of the website to fetch

TDQS

B3.4/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions the action ('fetch a website') and output format, but fails to disclose critical traits such as error handling, rate limits, authentication needs, or whether it follows redirects. This leaves significant gaps in understanding the tool's behavior beyond basic functionality.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise and front-loaded, consisting of a single sentence that directly states the tool's purpose and key differentiator. There is no wasted language, and every word earns its place by conveying essential information efficiently.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity of a web-fetching tool with no annotations and no output schema, the description is incomplete. It lacks details on behavioral aspects (e.g., error handling, timeouts) and output specifics (e.g., structure of returned text), which are crucial for effective use. The description does not compensate for the absence of structured data, leaving significant gaps in understanding.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema description coverage is 100%, with clear descriptions for both parameters (e.g., 'URL of the website to fetch'). The description adds no additional parameter semantics beyond what the schema provides, such as format examples or constraints. Given the high schema coverage, the baseline score of 3 is appropriate, as the schema adequately documents the parameters.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose with a specific verb ('fetch') and resource ('website'), and explicitly distinguishes it from siblings by specifying the output format ('plain text (no HTML)'). This directly contrasts with fetch_html, fetch_json, and fetch_markdown, making the differentiation unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage context by specifying the output format ('plain text'), which suggests when to use this tool over siblings that return HTML, JSON, or Markdown. However, it lacks explicit guidance on when not to use it or detailed alternatives beyond the sibling names, leaving some ambiguity about specific use cases.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

TDQS

B3.3/5.0
Disambiguation4/5

The tools are mostly distinct, with each handling a different content type (HTML, JSON, Markdown, plain text). However, fetch_html and fetch_txt could be slightly confusing as both fetch websites, but their output formats (HTML vs. plain text) clarify the distinction. There is no significant overlap in purpose.

Naming Consistency5/5

All tool names follow a consistent verb_noun pattern with 'fetch_' prefix and descriptive suffixes (html, json, markdown, txt). The naming is predictable and uniform, making it easy to understand the tool set at a glance.

Tool Count4/5

With 4 tools, the count is reasonable for a fetch server focused on retrieving different content types. It is slightly lean but covers core use cases well. A few additional tools (e.g., for handling errors or metadata) might enhance it, but it's not incomplete.

Completeness3/5

The server covers fetching various content types, which aligns with its purpose. However, there are notable gaps: no tools for handling HTTP methods beyond GET (e.g., POST), error handling, or configuration (e.g., headers, timeouts). This limits advanced use cases but suffices for basic retrieval.

Maintenance

ActivityInactive
ResponsivenessSyncing

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    C
    maintenance
    Provides functionality to fetch and transform web content in various formats (HTML, JSON, plain text, and Markdown) through simple API calls.
    102,856
    1
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables fetching and converting web content into various formats including HTML, JSON, plain text, and Markdown. It supports custom request headers and provides specialized tools for on-demand web data retrieval and transformation.
    102,856
    MIT

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/goswamig/fetch-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server