Skip to main content
Glama

WebSearch: herramienta avanzada de búsqueda web y extracción de contenido

LicenciaVersión de PythonFirecrawlultravioleta

Una potente herramienta de búsqueda web y extracción de contenido creada con Python, que aprovecha la API Firecrawl para obtener capacidades avanzadas de análisis de contenido, búsqueda y raspado web.

🚀 Características

  • Búsqueda web avanzada : realice búsquedas web inteligentes con parámetros personalizables

  • Extracción de contenido : extraiga información específica de páginas web mediante indicaciones en lenguaje natural

  • Rastreo web : rastreo de sitios web con profundidad y límites configurables

  • Web Scraping : Extraiga páginas web con soporte para varios formatos de salida

  • Integración MCP : Construido como un servidor de Protocolo de Contexto Modelo (MCP) para una integración perfecta

Related MCP server: Firecrawl MCP Server

📋 Requisitos previos

  • Python 3.8 o superior

  • administrador de paquetes uv

  • Clave API de Firecrawl

  • Clave API de OpenAI (opcional, para funciones mejoradas)

  • Clave API de Tavily (opcional, para capacidades de búsqueda adicionales)

🛠️ Instalación

  1. Instalar uv:

# On Windows (using pip)
pip install uv

# On Unix/MacOS
curl -LsSf https://astral.sh/uv/install.sh | sh

# Add uv to PATH (Unix/MacOS)
export PATH="$HOME/.local/bin:$PATH"

# Add uv to PATH (Windows - add to Environment Variables)
# Add: %USERPROFILE%\.local\bin
  1. Clonar el repositorio:

git clone https://github.com/yourusername/websearch.git
cd websearch
  1. Crear y activar un entorno virtual con uv:

# Create virtual environment
uv venv

# Activate on Windows
.\.venv\Scripts\activate.ps1

# Activate on Unix/MacOS
source .venv/bin/activate
  1. Instalar dependencias con uv:

# Install from requirements.txt
uv sync
  1. Configurar variables de entorno:

# Create .env file
touch .env

# Add your API keys
FIRECRAWL_API_KEY=your_firecrawl_api_key
OPENAI_API_KEY=your_openai_api_key

🎯 Uso

Configuración con Claude para escritorio

En lugar de ejecutar el servidor directamente, puede configurar Claude for Desktop para acceder a las herramientas de búsqueda web:

  1. Localice o cree su archivo de configuración de Claude for Desktop:

    • Ventanas: %env:AppData%\Claude\claude_desktop_config.json

    • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json

  2. Agregue la configuración del servidor WebSearch a la sección mcpServers :

{
  "mcpServers": {
    "websearch": {
      "command": "uv",
      "args": [
        "--directory",
        "D:\\ABSOLUTE\\PATH\\TO\\WebSearch",
        "run",
        "main.py"
      ]
    }
  }
}
  1. Asegúrese de reemplazar la ruta del directorio con la ruta absoluta a la carpeta del proyecto WebSearch.

  2. Guarde el archivo de configuración y reinicie Claude for Desktop.

  3. Una vez configuradas, las herramientas de WebSearch aparecerán en el menú de herramientas (icono de martillo) en Claude for Desktop.

Herramientas disponibles

  1. Buscar

  2. Extraer información

  3. Rastrear sitios web

  4. Extraer contenido

Referencia de API

Buscar

  • query (str): La consulta de búsqueda

  • Devuelve: Resultados de búsqueda en formato JSON

Extracto

  • urls (List[str]): Lista de URL de las que extraer información

  • prompt (str): Instrucciones para la extracción

  • enableWebSearch (bool): Habilitar búsqueda web complementaria

  • showSources (bool): incluye referencias de origen

  • Devuelve: información extraída en el formato especificado

Gatear

  • url (str): URL de inicio

  • maxDepth (int): profundidad máxima de rastreo

  • limit (int): Máximo de páginas a rastrear

  • Devoluciones: contenido rastreado en formato Markdown/HTML

Raspar

  • url (str): URL de destino

  • Devoluciones: contenido extraído con capturas de pantalla opcionales

🔧 Configuración

Variables de entorno

La herramienta requiere ciertas claves API para funcionar. Proporcionamos un archivo .env.example que puede usar como plantilla:

  1. Copia el archivo de ejemplo:

# On Unix/MacOS
cp .env.example .env

# On Windows
copy .env.example .env
  1. Edite el archivo .env con sus claves API:

# OpenAI API key - Required for AI-powered features
OPENAI_API_KEY=your_openai_api_key_here

# Firecrawl API key - Required for web scraping and searching
FIRECRAWL_API_KEY=your_firecrawl_api_key_here

Obtener las claves API

  1. Clave API de OpenAI :

    • Visita la plataforma de OpenAI

    • Regístrate o inicia sesión

    • Navegar a la sección de claves API

    • Crear una nueva clave secreta

  2. Clave API de Firecrawl :

Si todo está configurado correctamente, debería recibir una respuesta JSON con los resultados de la búsqueda.

Solución de problemas

Si encuentra errores:

  1. Asegúrese de que todas las claves API necesarias estén configuradas en su archivo .env

  2. Verifique que las claves API sean válidas y no hayan expirado

  3. Verifique que el archivo .env esté en el directorio raíz del proyecto

  4. Asegúrese de que las variables de entorno se estén cargando correctamente

🤝 Contribuyendo

  1. Bifurcar el repositorio

  2. Crea tu rama de funciones ( git checkout -b feature/AmazingFeature )

  3. Confirme sus cambios ( git commit -m 'Add some AmazingFeature' )

  4. Empujar a la rama ( git push origin feature/AmazingFeature )

  5. Abrir una solicitud de extracción

📝 Licencia

Este proyecto está licenciado bajo la licencia MIT: consulte el archivo de LICENCIA para obtener más detalles.

🙏 Agradecimientos

  • Firecrawl por su potente API de raspado web

  • OpenAI para capacidades de IA

  • MCP La comunidad MCP para la especificación del protocolo

📬 Contacto

José Martín Rodríguez Mortaloni - @m4s1t425 - jmrodriguezm13@gmail.com


Hecho con ❤️ usando Python y Firecrawl

Available Tools

4 tools
crawlB

Crawls a website starting from the specified URL and extracts content from multiple pages. Args: - url: The complete URL of the web page to start crawling from - maxDepth: The maximum depth level for crawling linked pages - limit: The maximum number of pages to crawl

Returns:
- Content extracted from the crawled pages in markdown and HTML format
ParametersJSON Schema
NameRequiredDescriptionDefault
urlYes
maxDepthYes
limitYes

TDQS

B3.2/5.0
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the tool crawls and extracts content, implying it performs read operations, but lacks details on permissions, rate limits, potential impacts on target sites, or error handling. For a web crawling tool with zero annotation coverage, this is a significant gap in transparency.

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 efficiently structured: a concise opening sentence states the purpose, followed by a bulleted list for args and returns. Every sentence earns its place by delivering essential information without redundancy, making it easy to parse and front-loaded with key details.

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 (web crawling with 3 parameters), no annotations, and no output schema, the description is moderately complete. It covers the basic purpose and parameters but lacks details on behavioral traits, error cases, or output format specifics beyond 'markdown and HTML format'. This is adequate for a minimal viable description but has clear gaps.

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?

The description adds substantial meaning beyond the input schema, which has 0% description coverage. It explains each parameter's purpose: 'url' as the starting point, 'maxDepth' for crawl depth, and 'limit' for page count. This compensates well for the schema's lack of descriptions, providing clear semantics for all three parameters.

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: 'Crawls a website starting from the specified URL and extracts content from multiple pages.' It specifies the verb ('crawls'), resource ('website'), and scope ('extracts content from multiple pages'), making the action clear. However, it doesn't explicitly differentiate from sibling tools like 'extract' or 'scrape', which likely have overlapping functions.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives like 'extract' or 'scrape'. It mentions the tool's function but offers no context about prerequisites, exclusions, or comparative use cases. This leaves the agent without clear direction for tool selection among siblings.

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

extractB

Extracts specific information from a web page based on a prompt. Args: - url: The complete URL of the web page to extract information from - prompt: Instructions specifying what information to extract from the page - enabaleWebSearch: Whether to allow web searches to supplement the extraction - showSources: Whether to include source references in the response

Returns:
- Extracted information from the web page based on the prompt
ParametersJSON Schema
NameRequiredDescriptionDefault
urlYes
promptYes
enabaleWebSearchYes
showSourcesYes

TDQS

B3.1/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 that the tool extracts information and includes parameters for web search and source references, but doesn't describe what happens during extraction (e.g., rate limits, authentication needs, error conditions, or what 'extracted information' looks like). For a tool with 4 parameters and no annotations, this is insufficient behavioral context.

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 well-structured with a clear purpose statement followed by parameter explanations and return value description. It's appropriately sized for a 4-parameter tool, though the 'Returns' section could be more specific. Every sentence adds value, and there's no unnecessary repetition or fluff.

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 (4 parameters, no annotations, no output schema), the description is moderately complete. It covers the basic purpose and parameters but lacks details about behavioral traits, error handling, and what the extracted information actually contains. Without an output schema, the return value description is vague ('Extracted information from the web page based on the prompt').

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?

The description provides clear semantic explanations for all 4 parameters beyond what the input schema offers (which has 0% description coverage). It explains that 'url' is for the web page, 'prompt' specifies what to extract, 'enableWebSearch' allows supplemental searches, and 'showSources' includes references. This adds significant value over the bare schema, though it doesn't detail parameter interactions or constraints.

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: extracting specific information from a web page based on a prompt. It specifies the verb ('extracts') and resource ('web page'), but doesn't explicitly differentiate from sibling tools like 'crawl', 'scrape', or 'search' beyond the extraction focus. The description is specific about the action but lacks sibling tool comparison.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives like 'crawl', 'scrape', or 'search'. It doesn't mention prerequisites, use cases, or exclusions. The only implied usage is for extracting information from web pages, but with no context about when this is preferable to other tools on the server.

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

scrapeD
ParametersJSON Schema
NameRequiredDescriptionDefault
urlYes

TDQS

D1/5.0
Behavior1/5

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

Tool has no description.

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

Conciseness1/5

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

Tool has no description.

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

Completeness1/5

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

Tool has no description.

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

Parameters1/5

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

Tool has no description.

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

Purpose1/5

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

Tool has no description.

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

Usage Guidelines1/5

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

Tool has no description.

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 observedcrawl
    • First observedextract
    • First observedscrape
    • First observedsearch

TDQS

C2.4/5.0

Scored across 4 tools

Disambiguation2/5

The tools have significant overlap and unclear boundaries. 'crawl' extracts content from multiple pages, 'extract' pulls specific info from a single page, and 'scrape' (with no description) is ambiguous—likely overlapping with both. 'search' is distinct for web searches, but the others could easily be confused for similar web content tasks.

Naming Consistency5/5

All tool names follow a consistent, simple verb pattern (crawl, extract, scrape, search). They are short, clear, and uniformly styled without mixing conventions, making them predictable and easy to parse.

Tool Count4/5

Four tools is reasonable for a web search domain, allowing coverage of crawling, extraction, scraping, and searching. It's slightly thin but manageable, as each tool addresses a core aspect of web data retrieval without being overly bloated.

Completeness3/5

There are notable gaps in the tool surface. The server covers basic retrieval (crawl, search) and extraction, but lacks update/delete operations (e.g., no tool to modify or clear cached data) and has a dead tool ('scrape' with no description), which limits functionality. However, agents can work around this for common web search tasks.

Related MCP Connectors

Related MCP Servers

  • A
    license
    A
    quality
    D
    maintenance
    A Model Context Protocol server that enables web scraping, crawling, and content extraction capabilities through integration with Firecrawl.
    8
    22,552 npm
    2
    MIT
  • F
    license
    A
    quality
    D
    maintenance
    A production-ready Model Context Protocol (MCP) server that integrates with the Firecrawl API to give AI assistants the power to scrape, crawl, and search the web.
    3
    -