Skip to main content
Glama
yoloyash

web-basics-mcp

by yoloyash

web-basics-mcp

Herramientas web pequeñas y fiables para agentes. Sin claves API ni infraestructura incluida.

Herramientas

Herramienta

Qué hace

web_search

Busca una consulta a través de una instancia existente de SearXNG

fetch_url

Obtiene una página, documento de texto, PDF, imagen o publicación de Reddit

fetch_url devuelve Markdown limpio para páginas HTML y publicaciones de Reddit, texto seleccionable para PDFs, contenido directo para respuestas de texto/Markdown/JSON/XML, y contenido de imagen MCP nativo para imágenes PNG, JPEG, WebP y GIF.

El texto largo se lee en fragmentos limitados. Llame a la misma URL nuevamente con el next_start_index devuelto:

{
  "url": "https://example.com/long-page",
  "start_index": 8000,
  "max_length": 8000
}

Las obtenciones exitosas se almacenan en caché en memoria durante cinco minutos, por lo que las lecturas offset normalmente usan el mismo documento extraído. Los resultados de búsqueda se almacenan en caché durante dos minutos para evitar repetir trabajo idéntico de SearXNG durante una ejecución del agente. Ambas cachés están limitadas, fusionan solicitudes duplicadas concurrentes y pueden descartarse en cualquier momento; la corrección de las herramientas nunca depende de ellas.

Related MCP server: Basic MCP Tools

Requisitos

  • Node.js 20.18.1 o superior

  • Una instancia existente de SearXNG con respuestas JSON habilitadas

Establezca su URL base en el entorno o en el archivo .env de este paquete:

SEARXNG_URL=http://127.0.0.1:8088

El servidor se inicia incluso cuando SearXNG no está disponible, por lo que fetch_url sigue siendo utilizable. Las llamadas a web_search devuelven un error de conexión claro hasta que SearXNG sea accesible.

Instalación

git clone https://github.com/yoloyash/web-basics-mcp.git
cd web-basics-mcp
npm install
npm run build

Configure un cliente MCP para ejecutar build/index.js sobre stdio. Por ejemplo:

codex mcp add web-basics -- node /absolute/path/to/web-basics-mcp/build/index.js

Entradas de las herramientas

{
  "query": "Model Context Protocol",
  "limit": 5
}

limit por defecto es 5 y acepta valores del 1 al 10. Los resultados usan la forma estable {link, title, snippet}.

fetch_url

{
  "url": "https://example.com",
  "start_index": 0,
  "max_length": 8000
}
  • start_index por defecto es 0.

  • max_length por defecto es 8000 y está limitado a 20000.

  • Las respuestas de texto informan total_chars, returned_chars, truncated y, cuando queda más contenido, next_start_index.

  • HTML usa Defuddle primero y Mozilla Readability como respaldo controlado. La respuesta informa el extractor seleccionado y el motivo del respaldo cuando corresponda.

  • Los extractores opcionales respaldados por red de Defuddle están deshabilitados. Cada solicitud remota permanece en la ruta HTTP validada de este servidor.

  • Las URLs de publicaciones de Reddit se obtienen a través del feed RSS de Reddit e incluyen la publicación más los comentarios disponibles en ese feed. RSS puede contener menos comentarios que el sitio web.

Seguridad y límites

  • Solo se aceptan URLs HTTP(S) públicas.

  • Se rechazan credenciales en URL, nombres de host privados, resultados DNS privados y redirecciones no seguras.

  • Cada redirección se valida de forma independiente.

  • Las solicitudes usan tiempos de espera, reintentos limitados, límites de tamaño de respuesta y un agente de usuario estable.

  • Las respuestas estándar e imágenes están limitadas a 5 MiB; los PDFs están limitados a 15 MiB.

  • El almacenamiento en caché de obtención respeta Cache-Control: no-store, no-cache y max-age=0.

Este servidor intencionalmente no proporciona automatización de navegador, renderizado de JavaScript, rastreo, autenticación, cookies, enrutamiento proxy/VPN ni síntesis de respuestas.

Desarrollo

npm test
npm pack --dry-run

Las pruebas usan fixtures guardados y stubs locales en lugar de consultar repetidamente servicios públicos.

Available Tools

2 tools
fetch_urlA
Read-onlyIdempotent

Fetch one public HTTP(S) URL. Returns clean Markdown for pages and Reddit posts, extracted PDF text, direct text data, or a supported image. Use start_index to continue truncated text.

ParametersJSON Schema
NameRequiredDescriptionDefault
urlYesTarget URL
max_lengthNoMaximum text characters to return
start_indexNoCharacter index to start text content from

Output Schema

ParametersJSON Schema
NameRequiredDescription
urlYes
linksNo
titleNo
contentNo
metadataNo
extractorYes
pageCountNo
truncatedNo
wordCountNo
byteLengthNo
contentTypeYes
start_indexNo
total_charsNo
returned_charsNo
fallback_reasonNo
next_start_indexNo

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare the tool read-only, idempotent, and non-destructive. The description adds useful behavior: it specifies supported content types (Markdown, PDF text, etc.) and discloses that text can be truncated, with a pointer to start_index for continuation. No contradiction with 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?

Two sentences with zero filler. The main action and return types are front-loaded, and the start_index hint is a separate, purposeful clause. Nothing extraneous.

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 an output schema and the simple nature of the tool, the description covers the essential aspects: what it fetches, what it returns, and how to handle truncation. It does not mention error cases or rate limits, but those are not critical for correct invocation and are partially implied by the annotations.

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 coverage is 100% describing all three parameters. The description supplements the start_index parameter by explicitly connecting it to truncated text continuation, which adds semantic value beyond the generic schema description. max_length and url are already well-documented in the schema.

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 action ('Fetch') and the resource ('one public HTTP(S) URL'), and enumerates the output types. This unambiguously distinguishes it from the sibling web_search (which searches rather than fetches a known URL).

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: you should use this tool when you have a specific URL to fetch. However, it never explicitly contrasts with web_search or states when NOT to use it. The only usage hint provided is about start_index for continuing truncated text, which is a parameter-level instruction, not a tool-selection guideline.

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. 2 tool updatesv0.5.0
    • Changedfetch_url3 fields changed
      • addedInput schema / properties / max_length
        Added value: +{
        +  "default": 8000,
        +  "description": "Maximum text characters to return",
        +  "maximum": 20000,
        +  "minimum": 1,
        +  "type": "integer"
        +}
      • addedInput schema / properties / start_index
        Added value: +{
        +  "default": 0,
        +  "description": "Character index to start text content from",
        +  "minimum": 0,
        +  "type": "integer"
        +}
      • changedOutput schema / (root)
        Previous value: -nullNew value: +{
        +  "$schema": "http://json-schema.org/draft-07/schema#",
        +  "additionalProperties": false,
        +  "properties": {
        +    "byteLength": {
        +      "minimum": 0,
        +      "type": "integer"
        +    },
        +    "content": {
        +      "type": "string"
        +    },
        +    "contentType": {
        +      "type": "string"
        +    },
        +    "extractor": {
        +      "enum": [
        +        "defuddle",
        +        "readability",
        +        "unpdf",
        +        "reddit",
        +        "text",
        +        "image"
        +      ],
        +      "type": "string"
        +    },
        +    "fallback_reason": {
        +      "type": "string"
        +    },
        +    "links": {
        +      "items": {
        +        "type": "string"
        +      },
        +      "type": "array"
        +    },
        +    "metadata": {
        +      "additionalProperties": {
        +        "type": [
        +          "string",
        +          "number",
        +          "boolean",
        +          "null"
        +        ]
        +      },
        +      "type": "object"
        +    },
        +    "next_start_index": {
        +      "minimum": 0,
        +      "type": "integer"
        +    },
        +    "pageCount": {
        +      "minimum": 1,
        +      "type": "integer"
        +    },
        +    "returned_chars": {
        +      "minimum": 0,
        +      "type": "integer"
        +    },
        +    "start_index": {
        +      "minimum": 0,
        +      "type": "integer"
        +    },
        +    "title": {
        +      "type": "string"
        +    },
        +    "total_chars": {
        +      "minimum": 0,
        +      "type": "integer"
        +    },
        +    "truncated": {
        +      "type": "boolean"
        +    },
        +    "url": {
        +      "type": "string"
        +    },
        +    "wordCount": {
        +      "minimum": 0,
        +      "type": "integer"
        +    }
        +  },
        +  "required": [
        +    "url",
        +    "contentType",
        +    "extractor"
        +  ],
        +  "type": "object"
        +}
    • Changedweb_search5 fields changed
      • addedInput schema / properties / max_tokens
        Added value: +{
        +  "description": "Provider answer token cap when supported",
        +  "exclusiveMinimum": 0,
        +  "type": "integer"
        +}
      • addedInput schema / properties / num_search_results
        Added value: +{
        +  "description": "Requested search breadth or local result cap",
        +  "maximum": 10,
        +  "minimum": 1,
        +  "type": "integer"
        +}
      • addedInput schema / properties / recency
        Added value: +{
        +  "description": "Relative time filter",
        +  "enum": [
        +    "day",
        +    "week",
        +    "month",
        +    "year"
        +  ],
        +  "type": "string"
        +}
      • addedInput schema / properties / temperature
        Added value: +{
        +  "description": "Provider sampling temperature when supported",
        +  "type": "number"
        +}
      • changedOutput schema / (root)
        Previous value: -nullNew value: +{
        +  "$schema": "http://json-schema.org/draft-07/schema#",
        +  "additionalProperties": false,
        +  "properties": {
        +    "error": {
        +      "type": "string"
        +    },
        +    "response": {
        +      "additionalProperties": false,
        +      "properties": {
        +        "answer": {
        +          "type": "string"
        +        },
        +        "authMode": {
        +          "type": "string"
        +        },
        +        "citations": {
        +          "items": {
        +            "additionalProperties": false,
        +            "properties": {
        +              "citedText": {
        +                "type": "string"
        +              },
        +              "title": {
        +                "type": "string"
        +              },
        +              "url": {
        +                "type": "string"
        +              }
        +            },
        +            "required": [
        +              "url",
        +              "title"
        +            ],
        +            "type": "object"
        +          },
        +          "type": "array"
        +        },
        +        "model": {
        +          "type": "string"
        +        },
        +        "provider": {
        +          "enum": [
        +            "brave",
        +            "duckduckgo",
        +            "exa",
        +            "firecrawl",
        +            "none",
        +            "searxng"
        +          ],
        +          "type": "string"
        +        },
        +        "relatedQuestions": {
        +          "items": {
        +            "type": "string"
        +          },
        +          "type": "array"
        +        },
        +        "requestId": {
        +          "type": "string"
        +        },
        +        "searchQueries": {
        +          "items": {
        +            "type": "string"
        +          },
        +          "type": "array"
        +        },
        +        "sources": {
        +          "items": {
        +            "additionalProperties": false,
        +            "properties": {
        +              "ageSeconds": {
        +                "type": "number"
        +              },
        +              "author": {
        +                "type": "string"
        +              },
        +              "publishedDate": {
        +                "type": "string"
        +              },
        +              "snippet": {
        +                "type": "string"
        +              },
        +              "title": {
        +                "type": "string"
        +              },
        +              "url": {
        +                "type": "string"
        +              }
        +            },
        +            "required": [
        +              "url",
        +              "title"
        +            ],
        +            "type": "object"
        +          },
        +          "type": "array"
        +        },
        +        "usage": {
        +          "additionalProperties": false,
        +          "properties": {
        +            "inputTokens": {
        +              "type": "number"
        +            },
        +            "outputTokens": {
        +              "type": "number"
        +            },
        +            "searchRequests": {
        +              "type": "number"
        +            },
        +            "totalTokens": {
        +              "type": "number"
        +            }
        +          },
        +          "type": "object"
        +        }
        +      },
        +      "required": [
        +        "provider",
        +        "sources"
        +      ],
        +      "type": "object"
        +    }
        +  },
        +  "required": [
        +    "response"
        +  ],
        +  "type": "object"
        +}
  2. 2 tool updatesv1.0.0
    • First observedfetch_url
    • First observedweb_search

TDQS

A3.9/5.0

Scored across 2 tools

Disambiguation5/5

The two tools perform fundamentally different operations: one searches the web, the other fetches a specific URL. There is zero overlap in purpose, so an agent can clearly distinguish which tool to use for a given task.

Naming Consistency4/5

Both tools use a verb_noun pattern ('web_search' and 'fetch_url'), which is consistent and readable. 'web_search' could be parsed as 'search the web' but the prefix 'web_' is used similarly, so the pattern is predictable. Minor deviation: 'web_search' vs 'fetch_url' both place the verb first, so it's actually consistent.

Tool Count3/5

With only two tools, the server feels minimal, which is on the borderline for a dedicated web-basics server. Both tools are essential and non-redundant, but the count is thin—though it may be appropriate for a focused utility server.

Completeness4/5

For a 'web-basics' domain, search and fetch cover the core operations an agent would need. The fetch tool handles multiple content types and page truncation, which is good. Minor gaps exist (e.g., no way to submit forms or list search history), but these are not expected for a basics server.

Maintenance

ActivitySlowing
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • F
    license
    A
    quality
    D
    maintenance
    MCP server that provides a search_web tool to query a self-hosted SearXNG instance and return structured web search results.
    1
    -
  • F
    license
    Not graded
    quality
    C
    maintenance
    A self-hosted MCP server providing private web search, web page fetching, and current date/time tools, powered by a bundled SearXNG instance for API-key-free local search.
    2
    -