DuckDuckGo MCP Server

Integrations

  • Provides search capabilities through tools for text, image, news, and video searches using DuckDuckGo's API, plus access to DuckDuckGo's AI chat with multiple model options.

  • Provides access to Meta's Llama 3.3 70B model through the DuckDuckGo AI chat tool.

  • Enables interaction with OpenAI's models (GPT-4o-mini and O3-mini) through the DuckDuckGo AI chat tool.

ddg-mcp MCP 서버

DuckDuckGo 검색 API MCP - Model Context Protocol을 통해 DuckDuckGo 검색 기능을 제공하는 서버입니다.

구성 요소

프롬프트

서버는 다음과 같은 프롬프트를 제공합니다.

  • search-results-summary : DuckDuckGo 검색 결과 요약을 생성합니다.
    • 검색어에 대한 필수 "쿼리" 인수
    • 세부 수준(간략/상세)을 제어하기 위한 선택적 "스타일" 인수

도구

서버는 다음의 DuckDuckGo 검색 도구를 구현합니다.

  • ddg-text-search : DuckDuckGo를 사용하여 웹에서 텍스트 결과를 검색합니다.
    • 필수: "키워드" - 검색어 키워드
    • 선택 사항: "지역", "안전 검색", "시간 제한", "최대 결과"
  • ddg-image-search : DuckDuckGo를 사용하여 웹에서 이미지 검색
    • 필수: "키워드" - 검색어 키워드
    • 선택 사항: "지역", "안전 검색", "시간 제한", "크기", "색상", "유형 이미지", "레이아웃", "라이선스 이미지", "최대 결과"
  • ddg-news-search : DuckDuckGo를 사용하여 뉴스 기사 검색
    • 필수: "키워드" - 검색어 키워드
    • 선택 사항: "지역", "안전 검색", "시간 제한", "최대 결과"
  • ddg-video-search : DuckDuckGo를 사용하여 비디오 검색
    • 필수: "키워드" - 검색어 키워드
    • 선택 사항: "지역", "안전 검색", "시간 제한", "해상도", "기간", "라이선스_비디오", "최대_결과"
  • ddg-ai-chat : DuckDuckGo AI와 채팅
    • 필수: "키워드" - AI에 보낼 메시지 또는 질문
    • 선택 사항: "model" - 사용할 AI 모델(옵션: "gpt-4o-mini", "llama-3.3-70b", "claude-3-haiku", "o3-mini", "mistral-small-3")

설치

필수 조건

  • 파이썬 3.9 이상
  • uv (권장) 또는 pip

PyPI에서 설치

지엑스피1

소스에서 설치

  1. 저장소를 복제합니다.
git clone https://github.com/misanthropic-ai/ddg-mcp.git cd ddg-mcp
  1. 패키지를 설치하세요:
# Using uv uv install -e . # Using pip pip install -e .

구성

필수 종속성

서버에는 duckduckgo-search 패키지가 필요한데, 이 패키지는 ddg-mcp 설치하면 자동으로 설치됩니다.

수동으로 설치해야 하는 경우:

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

DuckDuckGo 검색 매개변수

공통 매개변수

다음 매개변수는 대부분의 검색 유형에 사용할 수 있습니다.

  • 지역 : 지역화된 결과에 대한 지역 코드(기본값: "wt-wt")
    • 예: "us-en"(미국 영어), "uk-en"(영국 영어), "ru-ru"(러시아어)
    • 더 많은 옵션은 DuckDuckGo 지역을 참조하세요.
  • safesearch : 콘텐츠 필터링 수준(기본값: "보통")
    • "on": 엄격한 필터링
    • "moderate": 중간 필터링
    • "off": 필터링 안 함
  • timelimit : 결과에 대한 시간 범위
    • "d": 마지막 날
    • "w": 지난주
    • "m": 지난달
    • "y": 작년(뉴스/영상 제공 불가)
  • max_results : 반환할 최대 결과 수(기본값: 10)

검색 연산자

검색 키워드에 다음 연산자를 사용할 수 있습니다.

  • cats dogs : 고양이 또는 개에 대한 검색 결과
  • "cats and dogs" : "고양이와 개"라는 정확한 용어에 대한 검색 결과
  • cats -dogs : 검색 결과에서 개가 더 적음
  • cats +dogs : 검색 결과에 더 많은 개가 표시됩니다.
  • cats filetype:pdf : 고양이에 대한 PDF(지원: pdf, doc(x), xls(x), ppt(x), html)
  • dogs site:example.com : example.com의 개 관련 페이지
  • cats -site:example.com : example.com을 제외한 고양이 관련 페이지
  • intitle:dogs : 페이지 제목에 "dogs"라는 단어가 포함되어 있습니다.
  • inurl:cats : 페이지 URL에 "cats"라는 단어가 포함되어 있습니다.

이미지 검색 특정 매개변수

  • 크기 : "소형", "중형", "대형", "벽지"
  • 색상 : "색상", "단색", "빨간색", "주황색", "노란색", "녹색", "파란색", "보라색", "분홍색", "갈색", "검정색", "회색", "청록색", "흰색"
  • type_image : "사진", "클립아트", "gif", "투명", "선"
  • 레이아웃 : "정사각형", "높음", "넓음"
  • license_image : "모든", "공개", "공유", "상업적으로 공유", "수정", "상업적으로 수정"

비디오 검색 특정 매개변수

  • 해상도 : "높음", "표준"
  • 지속 시간 : "짧음", "중간", "길음"
  • license_videos : "creativeCommon", "youtube"

AI 채팅 모델

  • gpt-4o-mini : OpenAI의 GPT-4o 미니 모델
  • llama-3.3-70b : 메타의 Llama 3.3 70B 모델
  • claude-3-haiku : Anthropic의 Claude 3 Haiku 모델
  • o3-mini : OpenAI의 O3 미니 모델
  • mistral-small-3 : Mistral AI의 소형 모델

빠른 시작

설치하다

클로드 데스크탑

MacOS의 경우: ~/Library/Application\ Support/Claude/claude_desktop_config.json Windows의 경우: %APPDATA%/Claude/claude_desktop_config.json

사용 예

텍스트 검색

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

고급 예제:

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

이미지 검색

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

고급 예제:

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"

뉴스 검색

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

고급 예제:

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

비디오 검색

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

고급 예제:

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

AI 채팅

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

검색 결과 요약

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

클로드 구성

"ddg-mcp": { "명령": "uv", "인수": [ "--디렉토리", "설치 경로/ddg-mcp", "실행", "ddg-mcp" ] },

개발

건축 및 출판

배포를 위해 패키지를 준비하려면:

  1. 종속성 동기화 및 잠금 파일 업데이트:
uv sync
  1. 패키지 배포 빌드:
uv build

이렇게 하면 dist/ 디렉토리에 소스와 휠 배포판이 생성됩니다.

  1. PyPI에 게시:
uv publish

참고: 환경 변수나 명령 플래그를 통해 PyPI 자격 증명을 설정해야 합니다.

  • 토큰: --token 또는 UV_PUBLISH_TOKEN
  • 또는 사용자 이름/비밀번호: --username / UV_PUBLISH_USERNAME--password / UV_PUBLISH_PASSWORD

GitHub Actions를 사용한 자동 게시

이 저장소에는 PyPI에 자동으로 게시하기 위한 GitHub Actions 워크플로가 포함되어 있습니다. 이 워크플로는 다음과 같은 경우에 트리거됩니다.

  1. 새로운 GitHub 릴리스가 생성되었습니다.
  2. 워크플로는 GitHub Actions 인터페이스를 통해 수동으로 트리거됩니다.

자동 게시를 설정하려면:

  1. PyPI API 토큰을 생성합니다.
    • https://pypi.org/manage/account/token/ 으로 이동하세요
    • ddg-mcp 프로젝트로 범위가 제한된 새 토큰을 만듭니다.
    • 토큰 값을 복사하세요(한 번만 볼 수 있습니다)
  2. GitHub 저장소 비밀에 토큰을 추가합니다.
    • GitHub의 저장소로 이동하세요
    • 설정 > 비밀 및 변수 > 작업으로 이동합니다.
    • "새로운 저장소 비밀"을 클릭하세요
    • 이름: PYPI_API_TOKEN
    • 값: PyPI 토큰을 붙여넣으세요
    • "비밀 추가"를 클릭하세요
  3. 새 버전을 게시하려면:
    • pyproject.toml 에서 버전 번호를 업데이트합니다.
    • GitHub에서 새 릴리스를 만들거나 워크플로를 수동으로 트리거합니다.

디버깅

MCP 서버는 stdio를 통해 실행되므로 디버깅이 어려울 수 있습니다. 최상의 디버깅 환경을 위해서는 MCP Inspector 사용을 강력히 권장합니다.

다음 명령을 사용하여 npm 통해 MCP Inspector를 시작할 수 있습니다.

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

Inspector를 실행하면 브라우저에서 접근하여 디버깅을 시작할 수 있는 URL이 표시됩니다.

-
security - not tested
F
license - not found
-
quality - not tested

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

모델 컨텍스트 프로토콜을 통해 DuckDuckGo 검색 기능(텍스트, 이미지, 뉴스, 비디오 검색 및 AI 채팅)을 제공하는 서버입니다.

  1. Components
    1. Prompts
    2. Tools
  2. Installation
    1. Prerequisites
    2. Install from PyPI
    3. Install from Source
  3. Configuration
    1. Required Dependencies
  4. DuckDuckGo Search Parameters
    1. Common Parameters
    2. Search Operators
    3. Image Search Specific Parameters
    4. Video Search Specific Parameters
    5. AI Chat Models
  5. Quickstart
    1. Install
  6. Usage Examples
    1. Text Search
    2. Image Search
    3. News Search
    4. Video Search
    5. AI Chat
    6. Search Results Summary
  7. Claude config
    1. Development
      1. Building and Publishing
      2. Automated Publishing with GitHub Actions
      3. Debugging
    ID: 6u224dm69g