Skip to main content
Glama
tatn

MCP Server Fetch Python

by tatn

mcp-servidor-fetch-python

Un servidor MCP para obtener y transformar contenido web a diversos formatos. Este servidor proporciona herramientas integrales para extraer contenido de páginas web, incluyendo compatibilidad con contenido renderizado en JavaScript y archivos multimedia.

Características

Herramientas

El servidor proporciona cuatro herramientas especializadas:

  • get-raw-text : extrae contenido de texto sin procesar directamente de las URL sin necesidad de renderizarlo en el navegador

    • Argumentos:

      • url : URL de la página web de destino (texto, JSON, XML, csv, tsv, etc.) (obligatorio)

    • Se utiliza mejor para formatos de datos estructurados o cuando se necesita acceso rápido y directo.

  • get-rendered-html : obtiene contenido HTML completamente renderizado mediante un navegador sin interfaz gráfica

    • Argumentos:

      • url : URL de la página web de destino (obligatorio)

    • Esencial para aplicaciones web modernas y SPA que requieren representación de JavaScript

  • get-markdown : Convierte el contenido de la página web a Markdown bien formateado

    • Argumentos:

      • url : URL de la página web de destino (obligatorio)

    • Conserva los elementos estructurales al tiempo que proporciona una salida de texto limpia y legible.

  • get-markdown-from-media : realiza la extracción de contenido de archivos multimedia mediante IA.

    • Argumentos:

      • url : URL del archivo multimedia de destino (imágenes, vídeos) (obligatorio)

    • Utiliza visión artificial y OCR para el análisis de contenido visual.

    • Requiere que se configure una OPENAI_API_KEY válida en las variables de entorno

    • Devolverá un mensaje de error si la clave API no está configurada o si hay problemas al procesar el archivo multimedia

Related MCP server: Fetch MCP

Uso

Escritorio de Claude

Para utilizar con Claude Desktop, agregue la configuración del servidor:

En MacOS: ~/Library/Application\ Support/Claude/claude_desktop_config.json
En Windows: %APPDATA%/Claude/claude_desktop_config.json

"mcpServers": {
  "mcp-server-fetch-python": {
    "command": "uvx",
    "args": [
      "mcp-server-fetch-python"
    ]
  }
}

Variables de entorno

Se pueden configurar las siguientes variables de entorno:

  • OPENAI_API_KEY : Necesaria para usar la herramienta get-markdown-from-media . Esta clave es necesaria para el análisis de imágenes y la extracción de contenido con IA.

  • PYTHONIOENCODING : configúrelo en "utf-8" si encuentra problemas de codificación de caracteres en la salida.

  • MODEL_NAME : Especifica el nombre del modelo a utilizar. El valor predeterminado es "gpt-4o".

"mcpServers": {
  "mcp-server-fetch-python": {
    "command": "uvx",
    "args": [
      "mcp-server-fetch-python"
    ],
    "env": {
        "OPENAI_API_KEY": "sk-****",
        "PYTHONIOENCODING": "utf-8",
        "MODEL_NAME": "gpt-4o",        
    }
  }
}

Instalación local

Alternativamente, puede instalar y ejecutar el servidor localmente:

git clone https://github.com/tatn/mcp-server-fetch-python.git
cd mcp-server-fetch-python
uv sync
uv build

Luego agregue la siguiente configuración al archivo de configuración de Claude Desktop:

"mcpServers": {
  "mcp-server-fetch-python": {
    "command": "uv",
    "args": [
      "--directory",
      "path\\to\\mcp-server-fetch-python",  # Replace with actual path to the cloned repository
      "run",
      "mcp-server-fetch-python"
    ]
  }
}

Desarrollo

Depuración

Puede iniciar el Inspector MCP usando npx con los siguientes comandos:

npx @modelcontextprotocol/inspector uvx mcp-server-fetch-python
npx @modelcontextprotocol/inspector uv --directory path\\to\\mcp-server-fetch-python run mcp-server-fetch-python

Available Tools

4 tools
get-markdownA

Converts web page content to well-formatted Markdown, preserving structural elements like tables and definition lists. Recommended as the default tool for web content extraction when a clean, readable text format is needed while maintaining document structure.

ParametersJSON Schema
NameRequiredDescriptionDefault
urlYesURL of the target web page (ordinary HTML, etc.).

TDQS

A4.2/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It describes the tool's behavior ('preserving structural elements like tables and definition lists') and output format ('well-formatted Markdown'), but lacks details on error handling, rate limits, or authentication needs. It's adequate but has gaps in behavioral disclosure.

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?

Two sentences, zero waste: the first states the purpose and key features, the second provides usage guidance. It's front-loaded with the core functionality and efficiently structured without redundancy.

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

Completeness4/5

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

Given the tool's moderate complexity (single parameter, no output schema, no annotations), the description is mostly complete: it covers purpose, usage, and behavioral traits. However, it lacks details on output format specifics or error cases, leaving some gaps in context.

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 the 'url' parameter. The description adds context by specifying the type of web page ('ordinary HTML, etc.') and the goal of conversion, but doesn't provide additional syntax or format details beyond what the schema implies. 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.

Purpose5/5

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

The description clearly states the specific action ('Converts web page content to well-formatted Markdown') and resource ('web page'), and distinguishes it from siblings by mentioning it's 'Recommended as the default tool for web content extraction' and preserves structural elements like tables and definition lists, unlike get-raw-text which likely doesn't preserve structure.

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

Usage Guidelines5/5

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

It explicitly provides when to use ('Recommended as the default tool for web content extraction when a clean, readable text format is needed while maintaining document structure') and implies alternatives (siblings like get-raw-text for less structured extraction or get-rendered-html for HTML output), giving clear context for selection.

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

get-markdown-from-mediaB

Performs AI-powered content extraction from media files (images and videos) and converts the results to Markdown format. Specialized tool for visual content analysis that utilizes computer vision and OCR capabilities to generate descriptive text from media sources.

ParametersJSON Schema
NameRequiredDescriptionDefault
urlYesURL of the target web page (images, videos, etc.).

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 AI-powered extraction and computer vision/OCR capabilities, which adds some context about the tool's approach. However, it does not disclose critical behavioral traits such as rate limits, authentication needs, error handling, or whether the operation is read-only or has side effects, which is a significant gap for a tool with no annotation coverage.

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

Conciseness4/5

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

The description is appropriately sized with two sentences that are front-loaded with the core purpose. The first sentence clearly states the tool's function, and the second adds specialized context. There is minimal redundancy, though the second sentence could be slightly more concise.

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

Completeness3/5

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

Given the tool's complexity (AI-powered media analysis) and lack of annotations or output schema, the description is moderately complete. It explains the tool's purpose and specialization but omits details on output format, error conditions, and behavioral constraints. This leaves gaps for an agent to understand full usage, though the core functionality is adequately described.

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 input schema has 100% description coverage, with the 'url' parameter documented as 'URL of the target web page (images, videos, etc.)'. The description does not add meaning beyond this, as it does not elaborate on parameter usage, format, or constraints. The baseline score of 3 is appropriate since the schema adequately covers the single parameter.

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: 'Performs AI-powered content extraction from media files (images and videos) and converts the results to Markdown format.' It specifies the action (extraction and conversion), resources (media files), and distinguishes from siblings by focusing on visual content analysis with computer vision/OCR rather than text or HTML processing.

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 ('Specialized tool for visual content analysis') but does not explicitly state when to use this tool versus alternatives like 'get-markdown' or 'get-raw-text'. It suggests media files as input but lacks guidance on exclusions or prerequisites, leaving some ambiguity for the agent.

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

get-raw-textA

Extracts raw text content directly from URLs without browser rendering. Ideal for structured data formats like JSON, XML, CSV, TSV, or plain text files. Best used when fast, direct access to the source content is needed without processing dynamic elements.

ParametersJSON Schema
NameRequiredDescriptionDefault
urlYesURL of the target web page (text, JSON, XML, csv, tsv, etc.).

TDQS

A3.9/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It discloses key behavioral traits such as operating 'without browser rendering' and handling 'structured data formats', but lacks details on error handling, rate limits, authentication needs, or output format specifics, which are important for a tool interacting with external URLs.

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 appropriately sized and front-loaded, with three concise sentences that each add value: the first states the core purpose, the second specifies ideal use cases, and the third provides usage context. There is no wasted text.

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

Completeness3/5

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

Given the tool's complexity (interacting with external URLs) and lack of annotations and output schema, the description is somewhat complete but has gaps. It covers purpose and usage well, but omits behavioral details like error responses, performance characteristics, or output structure, which are important for an agent to use it effectively.

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 input schema has 100% description coverage, so the schema already documents the 'url' parameter adequately. The description adds marginal value by implying the types of URLs supported ('text, JSON, XML, csv, tsv, etc.'), but does not provide additional syntax or format details beyond what the schema states.

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 ('Extracts') and resource ('raw text content directly from URLs'), and distinguishes it from siblings by emphasizing 'without browser rendering' and 'structured data formats', contrasting with tools like get-rendered-html that likely involve rendering.

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

Usage Guidelines4/5

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

The description provides clear context on when to use this tool ('Ideal for structured data formats', 'Best used when fast, direct access to the source content is needed without processing dynamic elements'), but does not explicitly mention when not to use it or name specific alternatives among siblings like get-markdown.

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

get-rendered-htmlB

Fetches fully rendered HTML content using a headless browser, including JavaScript-generated content. Essential for modern web applications, single-page applications (SPAs), or any content that requires client-side rendering to be complete.

ParametersJSON Schema
NameRequiredDescriptionDefault
urlYesURL of the target web page (ordinary HTML including JavaScript, etc.).

TDQS

B3.4/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It mentions that the tool uses a headless browser and fetches JavaScript-generated content, which adds some context beyond the basic 'fetch' operation. However, it lacks details on performance characteristics (e.g., speed, timeouts), error handling, or output format, leaving significant gaps in understanding how the tool behaves in practice.

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

Conciseness4/5

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

The description is appropriately sized with two sentences that are front-loaded with key information (purpose and method). Every sentence contributes meaningfully, though the second sentence could be slightly more concise by combining the examples of use cases.

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

Completeness3/5

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

Given the tool's moderate complexity (involving headless browsers and dynamic content) and the absence of both annotations and an output schema, the description is incomplete. It explains what the tool does and when to use it but lacks details on behavioral traits (e.g., performance, errors) and output format, which are critical for effective use. However, it covers the core purpose adequately for a basic 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 the single parameter 'url' clearly documented in the schema. The description doesn't add any parameter-specific information beyond what's in the schema (e.g., no examples, constraints, or format details), so it meets the baseline for high schema coverage without compensating with extra value.

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 tool's purpose with specific verbs ('fetches fully rendered HTML content') and resources ('using a headless browser'), and distinguishes it from likely siblings by emphasizing JavaScript-generated content and client-side rendering. However, it doesn't explicitly name or differentiate from the actual sibling tools (get-markdown, get-markdown-from-media, get-raw-text).

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

Usage Guidelines4/5

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

The description provides clear context for when to use this tool ('modern web applications, single-page applications (SPAs), or any content that requires client-side rendering'), which implicitly suggests alternatives for static content. It doesn't explicitly state when not to use it or name specific alternative tools, but the context is sufficiently detailed to guide usage decisions.

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

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 4 tool updatesv1.0.0
    • First observedget-markdown
    • First observedget-markdown-from-media
    • First observedget-raw-text
    • First observedget-rendered-html

TDQS

A4/5.0

Scored across 4 tools

Disambiguation5/5

Each tool has a clearly distinct purpose with no overlap: get-markdown for general web content conversion, get-markdown-from-media for AI-powered media extraction, get-raw-text for direct access to structured data, and get-rendered-html for JavaScript-rendered content. The descriptions explicitly differentiate use cases, preventing misselection.

Naming Consistency5/5

All tool names follow a consistent verb_noun pattern with 'get-' prefix and descriptive suffixes (e.g., get-markdown, get-raw-text). This uniformity makes the tool set predictable and easy to navigate, with no deviations in naming style.

Tool Count5/5

With 4 tools, the server is well-scoped for web content extraction, covering key scenarios like general conversion, media analysis, raw data access, and rendered content. Each tool earns its place without redundancy, and the count is appropriate for the domain.

Completeness5/5

The tool set provides complete coverage for web content extraction, addressing diverse needs from structured data to dynamic pages and media files. There are no obvious gaps; agents can handle various extraction workflows without dead ends.

Maintenance

ActivityInactive
ResponsivenessUnresponsive

Related MCP Connectors

Related MCP Servers