Skip to main content
Glama
micaelmalta

Fetch MCP Server

by micaelmalta

Fetch MCP Server

The high-efficiency networking layer for LLMs. Reduce token consumption by 73–87% by cleaning web and API data before it hits your context window.

No API keys required — search is powered by DuckDuckGo.

Why

When an LLM fetches a URL or calls an API, most of the response is noise — nav bars, scripts, tracking pixels, templated API URLs, null fields, repeated sub-objects. You pay for all of it in tokens, latency, and reduced reasoning room.

Fetch MCP sits between your agent and the network. It strips the noise, returns only what matters, and lets the agent drill into specifics on demand.

Related MCP server: Scraper MCP

How It Works

Agent calls smart_fetch(url)
        │
        ▼
   ┌─────────┐
   │  Fetch   │
   └────┬─────┘
        │
   HTML ▼          JSON ▼
┌──────────────┐  ┌──────────────────────┐
│ → Markdown   │  │ Strip URL templates  │
│ Strip noise  │  │ Remove nulls/empties │
│ 73% savings  │  │ Dedup sub-objects    │
└──────────────┘  │ Schema-first mode    │
                  │ 87% savings          │
                  └──────────────────────┘

For JSON, the default behavior is schema-first: large arrays return the structure + 2 sample items instead of all data. The agent then uses jsonpath to fetch exactly what it needs.

1. smart_fetch("https://api.github.com/orgs/python/repos")
   → { _schema: {id: int, name: string, ...}, _count: 30, _sample: [...2 items] }

2. smart_fetch("https://api.github.com/orgs/python/repos", jsonpath="$[*].name")
   → ["cpython", "mypy", "typeshed", ...]

Token Savings

Run uv run python scripts/benchmark.py to reproduce. Results from real endpoints:

HTML → Markdown

Page

Raw tokens

Optimized

Saved

GitHub Blog

92,352

26,459

71%

Hacker News

11,790

4,237

64%

MDN — JavaScript

51,417

8,855

83%

BBC News

116,111

27,207

77%

Rust Lang

5,107

1,163

77%

Go pkg — net/http

121,427

55,383

54%

Python docs — asyncio

6,692

1,473

78%

Socket.dev — Axios compromise

138,981

23,788

83%

Total

543,877

148,565

73%

JSON → Schema-first

Endpoint

Raw tokens

Pruned

Schema-first

Best

GitHub API — repos

16,518

7,055

2,474

85%

GitHub API — issues

20,790

16,690

3,785

82%

JSONPlaceholder — posts

8,761

8,761

315

96%

JSONPlaceholder — todos

8,240

8,240

202

98%

JSONPlaceholder — users

1,839

1,839

529

71%

JSONPlaceholder — comments

492

479

330

33%

npm — typescript

1,750

1,745

n/a

0%

OpenLibrary — search

1,646

1,640

n/a

0%

Total

60,036

11,020

82%

At Sonnet pricing ($3/M), that's $1.33 saved per batch. At Opus pricing ($15/M), $6.66.

Tools

Tool

What it does

smart_fetch

Fetch any URL — auto-optimizes HTML (→ markdown) and JSON (→ schema-first)

browser_fetch

Fetch JavaScript-rendered pages with Playwright/Chrome

web_search

Search the web via DuckDuckGo, no API key needed

css_query

Fetch a page, return only elements matching a CSS selector

pdf_fetch

Fetch a PDF URL and return its text content (requires pdfminer.six)

optimize_json

Optimize any JSON blob — use on output from other MCP servers

smart_fetch

Fetches a URL and auto-detects the content type:

  • HTML — strips navigation, ads, scripts, and tracking. Converts to clean markdown.

  • JSON arrays (5+ items) — returns schema + 2 sample items. Use jsonpath to drill in.

  • JSON objects / small arrays — prunes empty values, strips URL templates, deduplicates.

Parameter

Type

Default

Description

url

str

required

URL to fetch

jsonpath

str

None

JSONPath to extract specific fields (e.g. $[*].name, $[?@.id==42])

max_depth

int

5

Max JSON nesting depth before flattening to dot-notation

extract_metadata

bool

False

Include YAML frontmatter with page metadata (HTML only)

max_chars

int

20000

Maximum characters in output (1,000–100,000)

headers

dict

None

Optional HTTP headers (e.g. {"Authorization": "Bearer token"})

use_cache

bool

True

Return cached response if available (TTL-scoped per URL + params)

ttl

int

1800

Cache TTL in seconds (60–86400)

browser_fetch

Fetches a URL with Playwright/Chrome, waits for the rendered page, and converts the final HTML to markdown.

Use this for pages that block simple HTTP clients or require JavaScript rendering. It does not bypass CAPTCHA; use headed mode when a human needs to complete a challenge or login before extraction.

Parameter

Type

Default

Description

url

str

required

URL to fetch

selector

str

None

Optional CSS selector to extract from the rendered page

wait_ms

int

3000

Milliseconds to wait after DOMContentLoaded

timeout_ms

int

30000

Navigation timeout in milliseconds

headed

bool

False

Open a visible browser window for manual CAPTCHA/login

extract_metadata

bool

False

Include YAML frontmatter with page metadata

max_chars

int

20000

Maximum characters in output (1,000–100,000)

headers

dict

None

Optional HTTP headers injected into the browser context

Search the web via DuckDuckGo. Returns results as a markdown list.

Parameter

Type

Default

Description

query

str

required

Search query

max_results

int

10

Number of results (1–20)

region

str

"wt-wt"

Region code ("us-en", "wt-wt" for global)

css_query

Fetch a page and return only content matching a CSS selector. Use when you know exactly which part of a page you need (a pricing table, an article body, a specific div).

Parameter

Type

Default

Description

url

str

required

URL to fetch

selector

str

required

CSS selector (e.g. #pricing-table, .product-card, article)

max_chars

int

20000

Maximum characters in output (1,000–100,000)

use_cache

bool

True

Return cached response if available

ttl

int

1800

Cache TTL in seconds (60–86400)

pdf_fetch

Fetch a URL that serves a PDF and return its text as plain markdown. Falls back to HTML→markdown if the URL does not return a PDF.

Parameter

Type

Default

Description

url

str

required

URL of a PDF document

pages

str

None

Page range to extract, e.g. "1-5" or "3". Default: all pages.

headers

dict

None

Optional HTTP headers (e.g. {"Authorization": "Bearer token"})

max_chars

int

20000

Maximum characters in output (1,000–100,000)

optimize_json

Optimize any JSON payload — from other MCP servers, API responses, or files. This is the key tool for reducing token usage across your entire MCP stack.

Accepts raw JSON strings or file paths. When an MCP tool response is too large and gets saved to a file by Claude, pass the file path directly.

Parameter

Type

Default

Description

data

str

required

Raw JSON string, or a file path to a JSON file

jsonpath

str

None

JSONPath to extract specific fields

max_depth

int

5

Max nesting depth before flattening

max_chars

int

20000

Maximum characters in output (1,000–100,000)

Typical workflow with other MCP servers:

1. Call mcp__github__list_pull_requests → agent gets large JSON response
2. Call optimize_json(data=<response>) → schema + 2 samples, 85% fewer tokens
3. Call optimize_json(data=<response>, jsonpath="$[?@.state=='open'].title") → exactly what's needed

JSON Optimization Pipeline

Applied by both smart_fetch (on JSON URLs) and optimize_json (on any JSON blob):

Step

What it does

Impact

Schema-first mode

Large arrays → structure + 2 samples

Huge on list endpoints

URL template stripping

Removes forks_url, keys_url{/key_id}, etc.

~30 keys per object in REST APIs

Empty/null removal

Strips null, "", [], {}

Moderate

Sub-object dedup

Identical nested dicts (e.g. owner) extracted once

Large on org/user APIs

Deep flattening

Dicts beyond max_depth → dot-notation keys

Prevents runaway nesting

JSONPath drill-in

Extract only matching fields on follow-up calls

Surgical precision

CLI

The fetcher and optimizer are also available as a standalone CLI for shell pipes, scripts, and hooks.

# Smart-fetch any URL
uv run fetch-mcp smart_fetch https://example.com

# Smart-fetch JSON and extract specific fields with JSONPath
uv run fetch-mcp smart_fetch https://api.github.com/orgs/python/repos --jsonpath '$[*].name'

# Browser-fetch a JavaScript-rendered or HTTP-client-blocked page
uv run fetch-mcp browser_fetch https://example.com

# Open a visible browser for manual CAPTCHA/login, then extract after waiting
uv run fetch-mcp browser_fetch https://example.com --headed --wait-ms 30000

# Fetch a PDF and extract its text
uv run fetch-mcp pdf_fetch https://example.com/paper.pdf

# Extract specific pages from a PDF
uv run fetch-mcp pdf_fetch https://example.com/report.pdf --pages 1-5

# Optimize any JSON from stdin
curl -s https://api.github.com/orgs/python/repos | uv run fetch-mcp optimize

# Extract specific fields with JSONPath
cat response.json | uv run fetch-mcp optimize --jsonpath '$[*].name'

# Control nesting depth
echo '{"deep": {"nested": {"data": 1}}}' | uv run fetch-mcp optimize --max-depth 2

# View savings report
uv run fetch-mcp report

Savings Tracking

Every call to optimize_json, smart_fetch, and the CLI logs the before/after character counts to ~/.local/share/fetch-mcp/savings.jsonl. View the cumulative report:

uv run fetch-mcp report
Source                          Calls    Raw chars    Opt chars        Saved       %
------------------------------------------------------------------------------------
optimize_json                      12      284,103       41,220      242,883   85.5%
smart_fetch:https://api.gith       3       59,986       24,823       35,163   58.6%
hook:mcp__jira__jira_search         5       93,052       93,052            0    0.0%
------------------------------------------------------------------------------------
TOTAL                              20      437,141      159,095      278,046   63.6%

The hook:* entries track raw MCP response sizes before optimization. The optimize_json entries track actual savings.

Override the log path with REQUEST_MCP_SAVINGS_LOG=/custom/path.jsonl.

Setup

No local clone required — run directly from GitHub with uv:

uvx --from git+https://github.com/micaelmalta/fetch-mcp.git fetch-mcp

Or clone locally for development:

git clone https://github.com/micaelmalta/fetch-mcp.git && cd fetch-mcp
uv sync --group dev

Install as a Claude skill:

curl -fsSL https://raw.githubusercontent.com/micaelmalta/fetch-mcp/main/install.sh | bash

Install a different branch or tag:

curl -fsSL https://raw.githubusercontent.com/micaelmalta/fetch-mcp/main/install.sh | REQUEST_MCP_REF=your-branch-or-tag bash

Integration

Claude Code

1. Add the MCP server:

claude mcp add fetch-mcp -- uvx --from git+https://github.com/micaelmalta/fetch-mcp.git fetch-mcp

2. (Optional) Instruct the agent via CLAUDE.md:

## JSON Optimization

When any MCP tool (GitHub, Jira, Datadog, Confluence, etc.) returns a JSON response
larger than ~50 lines, pass it through the `optimize_json` tool from fetch-mcp before
reasoning over it. You can pass raw JSON or a file path directly. Use jsonpath to drill
into specifics rather than consuming the full payload.

3. (Optional) Auto-hook for logging + nudging:

Add to ~/.claude/settings.json to automatically log MCP response sizes and remind the agent to optimize:

{
  "hooks": {
    "PostToolUse": [
      {
        "matcher": "mcp__github__*|mcp__jira__*|mcp__datadog__*|mcp__confluence__*",
        "hooks": [
          {
            "type": "command",
            "command": "jq -r '{tool: .tool_name, chars: (.tool_response | tostring | length)}' | jq -r '\"\\(.tool) \\(.chars)\"' | { read -r tool chars; mkdir -p ~/.local/share/fetch-mcp; echo \"{\\\"ts\\\":\\\"$(date -u +%Y-%m-%dT%H:%M:%SZ)\\\",\\\"source\\\":\\\"hook:$tool\\\",\\\"raw_chars\\\":$chars,\\\"opt_chars\\\":$chars,\\\"saved_chars\\\":0,\\\"saved_pct\\\":0}\" >> ~/.local/share/fetch-mcp/savings.jsonl; echo \"{\\\"hookSpecificOutput\\\":{\\\"hookEventName\\\":\\\"PostToolUse\\\",\\\"additionalContext\\\":\\\"MCP response was ${chars} chars. Pipe it through optimize_json from fetch-mcp to reduce token usage. You can pass raw JSON or a file path directly.\\\"}}\"; }"
          }
        ]
      }
    ]
  }
}

Add or remove MCP prefixes from the matcher as needed.

Cursor

1. Add to .cursor/mcp.json (project) or ~/.cursor/mcp.json (global):

{
  "mcpServers": {
    "fetch-mcp": {
      "type": "stdio",
      "command": "uvx",
      "args": ["--from", "git+https://github.com/micaelmalta/fetch-mcp.git", "fetch-mcp"]
    }
  }
}

2. Add to Cursor Rules (Settings > Rules, or .cursorrules):

When any MCP tool returns a large JSON response (>50 lines), pass it through the
optimize_json tool from fetch-mcp before reasoning. You can pass raw JSON or a
file path directly. Use the jsonpath parameter to drill into specific fields.

OpenCode

1. Add to .opencode.json (project) or ~/.opencode.json (global):

{
  "mcpServers": {
    "fetch-mcp": {
      "type": "stdio",
      "command": "uvx",
      "args": ["--from", "git+https://github.com/micaelmalta/fetch-mcp.git", "fetch-mcp"]
    }
  }
}

2. Add to .opencode.md (project memory):

## JSON Optimization

When any MCP tool (GitHub, Jira, Datadog, Confluence, etc.) returns a JSON response
larger than ~50 lines, pass it through the `optimize_json` tool from fetch-mcp before
reasoning over it. You can pass raw JSON or a file path directly. Use jsonpath to drill
into specifics rather than consuming the full payload.

Claude Desktop

Add to ~/Library/Application Support/Claude/claude_desktop_config.json:

{
  "mcpServers": {
    "fetch-mcp": {
      "command": "uvx",
      "args": ["--from", "git+https://github.com/micaelmalta/fetch-mcp.git", "fetch-mcp"]
    }
  }
}

MCP Inspector (dev)

uv run mcp dev fetch_mcp/server.py

Integration Summary

Claude Code

Cursor

OpenCode

Claude Desktop

Add MCP

claude mcp add

.cursor/mcp.json

.opencode.json

claude_desktop_config.json

Instruct agent

CLAUDE.md

.cursorrules

.opencode.md

Server instructions (built-in)

Auto-hook + logging

PostToolUse hook

Not supported

Not supported

Not supported

CLI pipe

| uv run fetch-mcp optimize

N/A

N/A

N/A

Benchmark

uv run python scripts/benchmark.py

Fetches real pages and API endpoints, counts tokens with tiktoken (cl100k_base), and compares raw vs optimized output across HTML and JSON with cost estimates.

Dependencies

Package

Purpose

mcp

FastMCP server framework

httpx

Async HTTP client

html-to-markdown

Rust-based HTML → Markdown (~200 MB/s)

beautifulsoup4

CSS selector extraction

jsonpath-ng

JSONPath query support

ddgs

DuckDuckGo search (no API key)

truststore

System certificate store for SSL

pdfminer.six

PDF text extraction for pdf_fetch

tiktoken

Token counting (dev only, for benchmark)

Available Tools

6 tools
browser_fetchA
Read-onlyIdempotent

Fetch a JavaScript-rendered page with Playwright and return markdown.

ParametersJSON Schema
NameRequiredDescriptionDefault
urlYesURL to fetch with a real browser
headedNoOpen a visible browser window for human-in-the-loop CAPTCHA/login
headersNoOptional HTTP headers injected into the browser context
wait_msNoMilliseconds to wait after DOMContentLoaded
selectorNoOptional CSS selector to extract from the rendered page
max_charsNoMaximum characters in output
timeout_msNoNavigation timeout in milliseconds
extract_metadataNoInclude YAML frontmatter with page metadata

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already indicate read-only, idempotent, and non-destructive behavior. The description adds useful context: it uses a real browser (Playwright) and converts to markdown, which is beyond what annotations provide. It does not mention edge cases like CAPTCHA handling, but the schema covers that via the 'headed' parameter.

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, front-loaded sentence that conveys the essential purpose without unnecessary words. It earns its place and is easily scanned.

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 (8 params, output schema present), the description is sufficient: it names the core function and output. It does not need to explain return format since the output schema exists. Slightly more context about when to prefer this over smart_fetch could improve it, but it's already fairly complete.

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 coverage is 100%, so the baseline is 3. The description does not add meaning beyond the schema; all parameter details are already in the input schema. It adds no new semantic information to justify a higher score.

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 fetches JavaScript-rendered pages using Playwright and returns markdown, with a specific verb ('fetch'), resource ('page'), and output format. This distinguishes it from sibling tools like pdf_fetch (PDFs) and web_search (search results).

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 implies this tool is for pages that require JavaScript rendering, giving clear context on when to use it. However, it does not explicitly mention alternatives or exclusion criteria, so it stops short of a 5.

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

css_queryA
Read-onlyIdempotent

Fetch a page and return only the content matching a CSS selector.

ParametersJSON Schema
NameRequiredDescriptionDefault
ttlNoCache TTL in seconds (default 1800)
urlYesURL to fetch
selectorYesCSS selector to extract (e.g. '#pricing-table', '.product-description', 'article')
max_charsNoMaximum characters in output
use_cacheNoReturn cached response if available (default True)

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A3.6/5.0
Behavior3/5

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

The annotations already declare readOnlyHint, idempotentHint, and destructiveHint=false, so the safety profile is known. The description adds that only content matching the selector is returned, which is useful behavioral context, but it does not disclose caching nuances, failure modes, or handling of no-match scenarios.

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 sentence that front-loads the core action and output. There is no filler or redundant information, making it highly concise and well-structured.

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 presence of a rich input schema, output schema, and annotations, the description is sufficient for an agent to understand the tool's core function. It lacks sibling differentiation, but that is partially addressed by the clarity of the CSS selector extraction purpose. The lack of cache mention is mitigated by the schema descriptions.

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 provides 100% coverage for all parameters with descriptions, including examples for the selector. The description itself does not add meaningful parameter explanation beyond restating the selector's purpose, which is already in the schema. Baseline 3 is appropriate.

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 function: fetching a page and extracting content matching a CSS selector. It uses a specific verb ('Fetch') and resource (page + CSS selector), effectively distinguishing it from siblings like web_search or pdf_fetch.

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?

There is no explicit guidance on when to use this tool versus alternatives like smart_fetch or browser_fetch. The description implies the use case but does not provide exclusions or mention alternative tools, leaving the agent to infer when this is the right choice.

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

optimize_jsonA
Read-onlyIdempotent

Optimize any JSON payload to reduce token usage.

ParametersJSON Schema
NameRequiredDescriptionDefault
dataYesRaw JSON string to optimize, OR a file path to a JSON file. When an MCP tool response is too large and gets saved to a file, pass the file path here (e.g. '/path/to/tool-results/file.txt').
jsonpathNoJSONPath expression to extract specific fields (e.g. '$[*].name', '$[?@.state=="open"]')
max_charsNoMaximum characters in output
max_depthNoMax nesting depth before flattening (default 5)

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, and destructiveHint, so the safety profile is covered. The description adds no extra behavioral context such as side effects, permissions, or result format, but does not contradict annotations.

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, front-loaded sentence with no wasted words, making it highly concise and structured.

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?

The combination of a clear one-sentence description and a fully documented schema with an output schema provides sufficient information for an agent to invoke the tool. However, it could benefit from a note about file path handling, though that is already in the schema.

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?

All four parameters are fully described in the schema with 100% coverage, so the description adds no additional parameter semantics. The schema's parameter descriptions carry the full burden.

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 uses a specific verb ('Optimize') with a clear resource ('any JSON payload') and purpose ('reduce token usage'), effectively distinguishing it from the sibling fetch/search tools.

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 implies usage for reducing token consumption of JSON payloads, but it does not explicitly state when to use it vs alternatives or any exclusions. Given unrelated siblings, the context is clear but not exhaustive.

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

pdf_fetchA
Read-onlyIdempotent

Fetch a PDF URL and return its text content as markdown.

Falls back to HTML markdown if the URL does not return a PDF.

ParametersJSON Schema
NameRequiredDescriptionDefault
urlYesURL of a PDF document
pagesNoPage range to extract, e.g. '1-5' or '3'. Default: all pages.
headersNoOptional HTTP headers (e.g. Authorization)
max_charsNoMaximum characters in output

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, and destructiveHint, so the safety profile is covered. The description adds the key behavioral detail of falling back to HTML markdown when the URL is not a PDF, which goes beyond the annotations and clarifies expected behavior.

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 two sentences with no wasted words. It front-loads the primary action and then provides the fallback behavior, making it easy to scan.

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?

The description captures the core functionality and fallback, and the output schema covers return values. While it does not mention limitations like pagination behavior or timeouts, the rich schema and annotations make the description sufficiently complete for a tool of this complexity.

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%, and the parameter descriptions in the schema already explain url, pages, headers, and max_chars. The description itself does not add extra parameter semantics, so it rests at the baseline of 3.

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 fetches a PDF URL and returns markdown text, with a specific verb ('Fetch'), resource ('PDF URL'), and output ('text content as markdown'). It also distinguishes itself from generic fetch tools by mentioning the PDF conversion and fallback behavior.

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 for PDF extraction but does not explicitly state when to use this tool over siblings like smart_fetch or browser_fetch. The fallback to HTML markdown is mentioned, but no exclusions or alternative recommendations are provided.

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

smart_fetchA
Read-onlyIdempotent

Fetch any URL and auto-optimize based on content type.

For HTML: converts to clean markdown, stripping navigation, ads, and scripts. For JSON: returns a schema + sample by default for large arrays. Use the jsonpath parameter to drill into specific items or fields on follow-up calls. Dramatically reduces token usage compared to raw fetching.

ParametersJSON Schema
NameRequiredDescriptionDefault
ttlNoCache TTL in seconds (default 1800)
urlYesURL to fetch
headersNoOptional HTTP headers (e.g. {'Authorization': 'Bearer token'})
jsonpathNoJSONPath expression to drill into JSON data (e.g. '$[0:5]', '$[*].name', '$[?@.id==42]')
max_charsNoMaximum characters in output
max_depthNoMax nesting depth for JSON before flattening (default 5)
use_cacheNoReturn cached response if available (default True)
extract_metadataNoInclude YAML frontmatter with page metadata (HTML only)

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4.4/5.0
Behavior4/5

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

Goes beyond the readOnly/idempotent annotations by disclosing the HTML transformation (stripping navigation, ads, scripts), JSON default behavior (schema + sample for large arrays), and the availability of jsonpath for refinement. This adds meaningful behavioral context without contradiction.

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?

Three short, focused paragraphs. The main purpose is front-loaded, and every sentence provides useful detail without redundancy. It is appropriately concise given the tool's complexity.

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?

The description covers the two primary content types and key behaviors, and the presence of an output schema reduces the need to explain return values. It does not mention caching, headers, or error handling, but these are documented in the schema/annotations, making the overall definition sufficiently complete for effective use.

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

Parameters4/5

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

Schema descriptions cover 100% of parameters, but the description adds semantic value by explaining the intended use of jsonpath (drill into specific items on follow-up calls) and the default JSON output behavior. It also highlights token-reduction benefits that influence parameter choices like max_chars.

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 opens with a specific verb+resource: 'Fetch any URL and auto-optimize based on content type.' It clearly distinguishes from siblings by highlighting content-type adaptation (HTML→markdown, JSON→schema+sample) and token reduction, which sets it apart from browser_fetch or pdf_fetch.

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?

Provides clear context on when to use the tool: for HTML vs JSON, and instructs to use the jsonpath parameter for follow-up drilling into JSON data. It also implies a token-saving use case, though it does not explicitly name alternative tools or state when not to use it.

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. Dates show when Glama detected each change.

  1. 6 tool updatesv0.1.0
    • First observedbrowser_fetch
    • First observedcss_query
    • First observedoptimize_json
    • First observedpdf_fetch
    • First observedsmart_fetch
    • First observedweb_search

TDQS

A3.9/5.0
Disambiguation4/5

Each tool has a clear primary purpose (fetch, search, CSS extraction, JS rendering, PDF, JSON optimization), but smart_fetch overlaps somewhat with the specialized fetch tools, requiring attention to descriptions to pick the right one.

Naming Consistency3/5

Most tools follow an object_action pattern (web_search, css_query, browser_fetch, pdf_fetch), but smart_fetch and optimize_json deviate by putting the action first, resulting in mixed conventions.

Tool Count5/5

Six tools is well-scoped for a fetch server, covering general fetching, specialized fetch modes, search, and JSON optimization without redundancy.

Completeness4/5

The server covers major fetch types (HTML, PDF, JS-rendered) and adds search and JSON optimization. A minor gap is the lack of a raw HTML fetch without transformation, but smart_fetch and css_query nearly fill this need.

Maintenance

ActivityMaintained
ResponsivenessNo issues

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
    A
    quality
    D
    maintenance
    Provides AI coding assistants with context optimization tools including targeted file analysis, intelligent terminal command execution with LLM-powered output extraction, and web research capabilities. Helps reduce token usage by extracting only relevant information instead of processing entire files and command outputs.
    5
    22
    62
    TypeScript
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    A context-optimized web scraping server that converts HTML to markdown/text and applies CSS selectors server-side, reducing token usage by 70-90% while providing AI tools with clean, filtered web content.
    7
    MIT
  • A
    license
    Not graded
    quality
    B
    maintenance
    The web data platform for AI agents. Fetch, search, crawl, extract, monitor, and screenshot any URL. 55+ domain extractors, 65-98% token savings. 7 MCP tools included.
    332
    12
    AGPL 3.0
  • A
    license
    Not graded
    quality
    C
    maintenance
    Token compression for AI contexts, reducing token consumption by compressing conversation exchanges before they enter the LLM context window.
    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/micaelmalta/fetch-mcp'

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