Skip to main content
Glama
tatn

MCP Server Fetch Python

by tatn

mcp-server-fetch-python

An MCP server for fetching and transforming web content into various formats. This server provides comprehensive tools for extracting content from web pages, including support for JavaScript-rendered content and media files.

Features

Tools

The server provides four specialized tools:

  • get-raw-text: Extracts raw text content directly from URLs without browser rendering

    • Arguments:

      • url: URL of the target web page (text, JSON, XML, csv, tsv, etc.) (required)

    • Best used for structured data formats or when fast, direct access is needed

  • get-rendered-html: Fetches fully rendered HTML content using a headless browser

    • Arguments:

      • url: URL of the target web page (required)

    • Essential for modern web applications and SPAs that require JavaScript rendering

  • get-markdown: Converts web page content to well-formatted Markdown

    • Arguments:

      • url: URL of the target web page (required)

    • Preserves structural elements while providing clean, readable text output

  • get-markdown-from-media: Performs AI-powered content extraction from media files

    • Arguments:

      • url: URL of the target media file (images, videos) (required)

    • Utilizes computer vision and OCR for visual content analysis

    • Requires a valid OPENAI_API_KEY to be set in environment variables

    • Will return an error message if the API key is not set or if there are issues processing the media file

Related MCP server: Fetch MCP

Usage

Claude Desktop

To use with Claude Desktop, add the server configuration:

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

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

Environment Variables

The following environment variables can be configured:

  • OPENAI_API_KEY: Required for using the get-markdown-from-media tool. This key is needed for AI-powered image analysis and content extraction.

  • PYTHONIOENCODING: Set to "utf-8" if you encounter character encoding issues in the output.

  • MODEL_NAME: Specifies the model name to use. Defaults to "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",        
    }
  }
}

Local Installation

Alternatively, you can install and run the server locally:

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

Then add the following configuration to Claude Desktop config file:

"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"
    ]
  }
}

Development

Debugging

You can start the MCP Inspector using npxwith the following commands:

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.

TDQS

A4/5.0
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
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

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/tatn/mcp-server-fetch-python'

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