WebSearch
WebSearch: herramienta avanzada de búsqueda web y extracción de contenido
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
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\binClonar el repositorio:
git clone https://github.com/yourusername/websearch.git
cd websearchCrear 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/activateInstalar dependencias con uv:
# Install from requirements.txt
uv syncConfigurar 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:
Localice o cree su archivo de configuración de Claude for Desktop:
Ventanas:
%env:AppData%\Claude\claude_desktop_config.jsonmacOS:
~/Library/Application Support/Claude/claude_desktop_config.json
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"
]
}
}
}Asegúrese de reemplazar la ruta del directorio con la ruta absoluta a la carpeta del proyecto WebSearch.
Guarde el archivo de configuración y reinicie Claude for Desktop.
Una vez configuradas, las herramientas de WebSearch aparecerán en el menú de herramientas (icono de martillo) en Claude for Desktop.
Herramientas disponibles
Buscar
Extraer información
Rastrear sitios web
Extraer contenido
Referencia de API
Buscar
query(str): La consulta de búsquedaDevuelve: Resultados de búsqueda en formato JSON
Extracto
urls(List[str]): Lista de URL de las que extraer informaciónprompt(str): Instrucciones para la extracciónenableWebSearch(bool): Habilitar búsqueda web complementariashowSources(bool): incluye referencias de origenDevuelve: información extraída en el formato especificado
Gatear
url(str): URL de iniciomaxDepth(int): profundidad máxima de rastreolimit(int): Máximo de páginas a rastrearDevoluciones: contenido rastreado en formato Markdown/HTML
Raspar
url(str): URL de destinoDevoluciones: 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:
Copia el archivo de ejemplo:
# On Unix/MacOS
cp .env.example .env
# On Windows
copy .env.example .envEdite el archivo
.envcon 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_hereObtener las claves API
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
Clave API de Firecrawl :
Visita el sitio web de Firecrawl
Crear una cuenta
Navega a tu panel de control
Generar una nueva clave API
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:
Asegúrese de que todas las claves API necesarias estén configuradas en su archivo
.envVerifique que las claves API sean válidas y no hayan expirado
Verifique que el archivo
.envesté en el directorio raíz del proyectoAsegúrese de que las variables de entorno se estén cargando correctamente
🤝 Contribuyendo
Bifurcar el repositorio
Crea tu rama de funciones (
git checkout -b feature/AmazingFeature)Confirme sus cambios (
git commit -m 'Add some AmazingFeature')Empujar a la rama (
git push origin feature/AmazingFeature)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 toolscrawlB
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
Inputs: url (required), maxDepth (required), limit (required).
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
Inputs: url (required), prompt (required), enabaleWebSearch (required), showSources (required).
scrapeD
Inputs: url (required).
searchC
Performs web searches and retrieves up-to-date information from the internet. Args: - prompt: Specific query or topic to search for on the internet - limit: Maximum number of results to return (between 1 and 20)
Returns:
- Search results with relevant information about the requested topic
Inputs: query (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 4 tools
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.
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.
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.
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
Scrape, crawl, and search the web via Firecrawl’s official hosted MCP.
Firecrawl, the context API for AI agents: search, scrape, interact with the web, plus paper search.
Web search API and MCP server for developers building AI agents.
Unofficial Firecrawl MCP — wraps the Firecrawl API (firecrawl.dev) for web scraping / crawling /…
Related MCP Servers
- AlicenseAqualityDmaintenanceA Model Context Protocol server that enables web search, scraping, crawling, and content extraction through multiple engines including SearXNG, Firecrawl, and Tavily.4230 npm148MIT
- AlicenseBqualityDmaintenanceA Model Context Protocol server that enables AI assistants to perform advanced web scraping, crawling, searching, and data extraction through the Firecrawl API.9MIT
- AlicenseAqualityDmaintenanceA Model Context Protocol server that enables web scraping, crawling, and content extraction capabilities through integration with Firecrawl.82MIT
- FlicenseAqualityDmaintenanceA 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-
Appeared in Searches
- Web search tools and methods that don't require API keys
- A server for searching research papers, Kaggle datasets, and websites for ML/AI model training data
- iPhone 16e camera review summary and table creation in Italian
- Web scraping and content extraction
- Web scraping tool for extracting content from SearXNG search results