Skip to main content
Glama
artivus-labs

DuckDuckGo MCP Server

by artivus-labs

Servidor MCP ddg-mcp

API de búsqueda de DuckDuckGo MCP: un servidor que proporciona capacidades de búsqueda de DuckDuckGo a través del Protocolo de contexto de modelo.

Componentes

Indicaciones

El servidor proporciona las siguientes indicaciones:

  • search-results-summary : Crea un resumen de los resultados de búsqueda de DuckDuckGo

    • Argumento de "consulta" obligatorio para el término de búsqueda

    • Argumento opcional "estilo" para controlar el nivel de detalle (breve/detallado)

Herramientas

El servidor implementa las siguientes herramientas de búsqueda de DuckDuckGo:

  • ddg-text-search : Busque resultados de texto en la web usando DuckDuckGo

    • Obligatorio: "palabras clave" - Palabras clave de la consulta de búsqueda

    • Opcional: "región", "búsqueda segura", "límite de tiempo", "resultados máximos"

  • ddg-image-search : Busca imágenes en la web con DuckDuckGo

    • Obligatorio: "palabras clave" - Palabras clave de la consulta de búsqueda

    • Opcional: "región", "búsqueda segura", "límite de tiempo", "tamaño", "color", "tipo_de_imagen", "diseño", "imagen_de_licencia", "resultados_máximos"

  • ddg-news-search : Busca noticias con DuckDuckGo

    • Obligatorio: "palabras clave" - Palabras clave de la consulta de búsqueda

    • Opcional: "región", "búsqueda segura", "límite de tiempo", "resultados máximos"

  • ddg-video-search : Busca vídeos con DuckDuckGo

    • Obligatorio: "palabras clave" - Palabras clave de la consulta de búsqueda

    • Opcional: "región", "búsqueda segura", "límite de tiempo", "resolución", "duración", "licencia_videos", "máx_resultados"

  • ddg-ai-chat : Chatea con la IA de DuckDuckGo

    • Obligatorio: "palabras clave" - Mensaje o pregunta para enviar a la IA

    • Opcional: "modelo": modelo de IA a utilizar (opciones: "gpt-4o-mini", "llama-3.3-70b", "claude-3-haiku", "o3-mini", "mistral-small-3")

Related MCP server: DuckDuckGo MCP Server

Instalación

Prerrequisitos

  • Python 3.9 o superior

  • uv (recomendado) o pip

Instalar desde PyPI

# Using uv
uv install ddg-mcp

# Using pip
pip install ddg-mcp

Instalar desde la fuente

  1. Clonar el repositorio:

git clone https://github.com/misanthropic-ai/ddg-mcp.git
cd ddg-mcp
  1. Instalar el paquete:

# Using uv
uv install -e .

# Using pip
pip install -e .

Configuración

Dependencias requeridas

El servidor requiere el paquete duckduckgo-search , que se instalará automáticamente cuando instale ddg-mcp .

Si necesita instalarlo manualmente:

uv install duckduckgo-search
# or
pip install duckduckgo-search

Parámetros de búsqueda de DuckDuckGo

Parámetros comunes

Estos parámetros están disponibles para la mayoría de los tipos de búsqueda:

  • región : código de región para resultados localizados (predeterminado: "wt-wt")

    • Ejemplos: "us-en" (inglés estadounidense), "uk-en" (inglés británico), "ru-ru" (ruso)

    • Consulte las regiones de DuckDuckGo para obtener más opciones

  • safesearch : Nivel de filtrado de contenido (predeterminado: "moderado")

    • "on": Filtrado estricto

    • "moderado": Filtrado moderado

    • "off": Sin filtrado

  • límite de tiempo : rango de tiempo para los resultados

    • "d": Último día

    • "w": La semana pasada

    • "m": El mes pasado

    • "y": El año pasado (no disponible para noticias/vídeos)

  • max_results : Número máximo de resultados a devolver (predeterminado: 10)

Operadores de búsqueda

Puede utilizar estos operadores en sus palabras clave de búsqueda:

  • cats dogs : Resultados sobre gatos o perros

  • "cats and dogs" : Resultados para el término exacto "Gatos y perros"

  • cats -dogs : Menos perros en los resultados

  • cats +dogs : Más perros en los resultados

  • cats filetype:pdf : PDF sobre gatos (compatibles: pdf, doc(x), xls(x), ppt(x), html)

  • dogs site:example.com : Páginas sobre perros de ejemplo.com

  • cats -site:example.com : Páginas sobre gatos, excluyendo example.com

  • intitle:dogs : El título de la página incluye la palabra "perros"

  • inurl:cats : La URL de la página incluye la palabra "cats"

Parámetros específicos de búsqueda de imágenes

  • Tamaño : "Pequeño", "Mediano", "Grande", "Fondo de pantalla"

  • Color : "color", "monocromo", "rojo", "naranja", "amarillo", "verde", "azul", "morado", "rosa", "marrón", "negro", "gris", "verde azulado", "blanco"

  • tipo_imagen : "foto", "clipart", "gif", "transparente", "línea"

  • Disposición : "Cuadrado", "Alto", "Ancho"

  • license_image : "cualquiera", "Público", "Compartir", "CompartirComercialmente", "Modificar", "ModificarComercialmente"

Parámetros específicos de búsqueda de vídeo

  • resolución : "alta", "estándar"

  • duración : "corta", "media", "larga"

  • licencia_videos : "creativeCommon", "youtube"

Modelos de chat de IA

  • gpt-4o-mini : modelo mini GPT-4o de OpenAI

  • llama-3.3-70b : modelo Llama 3.3 70B de Meta

  • claude-3-haiku : Modelo de Haiku Claude 3 de Anthropic

  • o3-mini : modelo mini O3 de OpenAI

  • mistral-small-3 : El modelo pequeño de Mistral AI

Inicio rápido

Instalar

Escritorio de Claude

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

Ejemplos de uso

Búsqueda de texto

Use the ddg-text-search tool to search for "climate change solutions"

Ejemplo avanzado:

Use the ddg-text-search tool to search for "renewable energy filetype:pdf site:edu" with region "us-en", safesearch "off", timelimit "y", and max_results 20

Búsqueda de imágenes

Use the ddg-image-search tool to find images of "renewable energy" with color set to "Green"

Ejemplo avanzado:

Use the ddg-image-search tool to find images of "mountain landscape" with size "Large", color "Blue", type_image "photo", layout "Wide", and license_image "Public"

Búsqueda de noticias

Use the ddg-news-search tool to find recent news about "artificial intelligence" from the last day

Ejemplo avanzado:

Use the ddg-news-search tool to search for "space exploration" with region "uk-en", timelimit "w", and max_results 15

Búsqueda de vídeos

Use the ddg-video-search tool to find videos about "machine learning tutorials" with duration set to "medium"

Ejemplo avanzado:

Use the ddg-video-search tool to search for "cooking recipes" with resolution "high", duration "short", license_videos "creativeCommon", and max_results 10

Chat de IA

Use the ddg-ai-chat tool to ask "What are the latest developments in quantum computing?" using the claude-3-haiku model

Resumen de resultados de búsqueda

Use the search-results-summary prompt with query "space exploration" and style "detailed"

Configuración de Claude

"ddg-mcp": { "comando": "uv", "argumentos": [ "--directorio", "/RUTA/A/SU/INSTALACIÓN/ddg-mcp", "ejecutar", "ddg-mcp" ] },

Desarrollo

Construcción y publicación

Para preparar el paquete para su distribución:

  1. Sincronizar dependencias y actualizar archivo de bloqueo:

uv sync
  1. Distribuciones de paquetes de compilación:

uv build

Esto creará distribuciones de origen y de rueda en el directorio dist/ .

  1. Publicar en PyPI:

uv publish

Nota: Deberás configurar las credenciales de PyPI a través de variables de entorno o indicadores de comando:

  • Token: --token o UV_PUBLISH_TOKEN

  • O nombre de usuario/contraseña: --username / UV_PUBLISH_USERNAME y --password / UV_PUBLISH_PASSWORD

Publicación automatizada con acciones de GitHub

Este repositorio incluye un flujo de trabajo de GitHub Actions para la publicación automatizada en PyPI. El flujo de trabajo se activa cuando:

  1. Se crea una nueva versión de GitHub

  2. El flujo de trabajo se activa manualmente a través de la interfaz de Acciones de GitHub

Para configurar la publicación automatizada:

  1. Generar un token de API de PyPI:

  2. Agrega el token a los secretos de tu repositorio de GitHub:

    • Vaya a su repositorio en GitHub

    • Vaya a Configuración > Secretos y variables > Acciones

    • Haga clic en "Nuevo secreto del repositorio".

    • Nombre: PYPI_API_TOKEN

    • Valor: Pegue su token PyPI

    • Haga clic en "Agregar secreto"

  3. Para publicar una nueva versión:

    • Actualice el número de versión en pyproject.toml

    • Cree una nueva versión en GitHub o active manualmente el flujo de trabajo

Depuración

Dado que los servidores MCP se ejecutan en stdio, la depuración puede ser complicada. Para una experiencia óptima, recomendamos usar el Inspector MCP .

Puede iniciar el Inspector MCP a través de npm con este comando:

npx @modelcontextprotocol/inspector uv --directory /path/to/your/ddg-mcp run ddg-mcp

Al iniciarse, el Inspector mostrará una URL a la que podrá acceder en su navegador para comenzar a depurar.

Available Tools

5 tools
ddg-ai-chatC

Chat with DuckDuckGo AI

ParametersJSON Schema
NameRequiredDescriptionDefault
keywordsYesMessage or question to send to the AI
modelNoAI model to usegpt-4o-mini

TDQS

C2.7/5.0
Behavior1/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 but offers almost none. 'Chat with DuckDuckGo AI' doesn't reveal whether this is a read-only operation, if it requires authentication, what rate limits apply, whether conversations are persistent, or what the typical response format looks like. For a chat tool with zero annotation coverage, this is a significant gap in behavioral 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 extremely concise at just four words, with zero wasted language. It's front-loaded with the core functionality ('Chat with DuckDuckGo AI') and every word earns its place. This is a model of efficiency in tool description writing.

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

Completeness2/5

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

Given that this is a chat tool with no annotations, no output schema, and 2 parameters, the description is insufficiently complete. It doesn't explain what kind of responses to expect, whether there are conversation contexts, what the AI's capabilities or limitations are, or any behavioral characteristics. For a tool that presumably involves AI interaction, more context about the nature of the chat would be expected.

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%, so both parameters are well-documented in the schema itself. The description adds no additional parameter information beyond what's already in the schema (keywords for the message, model selection from specific AI models). This meets the baseline expectation when the schema does the heavy lifting, but doesn't provide extra context about parameter usage 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 'Chat with DuckDuckGo AI' clearly states the verb ('Chat') and resource ('DuckDuckGo AI'), making the purpose immediately understandable. It distinguishes this tool from its siblings (image-search, news-search, text-search, video-search) by specifying it's for AI chat rather than search operations. However, it doesn't specify what kind of chat (e.g., conversational, Q&A) or the scope of the AI's capabilities.

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 its sibling tools. It doesn't mention that this is for AI-powered conversations rather than traditional search operations, nor does it suggest alternatives like using text-search for factual queries. There's no context about appropriate use cases or limitations.

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. 5 tool updates
    • First observedddg-ai-chat
    • First observedddg-image-search
    • First observedddg-news-search
    • First observedddg-text-search
    • First observedddg-video-search

TDQS

B3.4/5.0

Scored across 5 tools

Disambiguation5/5

Every tool has a clearly distinct purpose based on media type: chat, images, news, text, and videos. There is no overlap in functionality, making it easy for an agent to select the appropriate tool for each search need.

Naming Consistency5/5

All tools follow a consistent 'ddg-[media_type]-search' pattern, with the exception of 'ddg-ai-chat' which still fits the 'ddg-[function]' convention. This uniformity makes the tool set predictable and easy to understand.

Tool Count5/5

Five tools is well-scoped for a DuckDuckGo search server, covering key search types (text, image, video, news) plus an AI chat feature. Each tool earns its place without being overwhelming or insufficient.

Completeness4/5

The tool set covers major search categories effectively, but there is a minor gap in specialized searches like maps or shopping, which are common in search engines. However, core workflows are well-supported, and agents can work around this limitation.

Maintenance

ActivityInactive
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    A
    quality
    A
    maintenance
    A Model Context Protocol (MCP) server that provides web search capabilities through DuckDuckGo, with additional features for content fetching and parsing.
    3
    15,517 PyPI
    1,510
    MIT
  • A
    license
    B
    quality
    D
    maintenance
    A Model Context Protocol server that provides DuckDuckGo search functionality for Claude, enabling web search capabilities through a clean tool interface with rate limiting support.
    1
    1,589 npm
    87
    MIT