Skip to main content
Glama

MCP DuckDuckGo Search Server

mcp-duckduckgo-搜索


⚠️ 通知

此存储库不再维护。

该工具的功能现已在mcp-omnisearch中提供,它将多个 MCP 工具组合在一个统一的包中。

请改用mcp-omnisearch


一个模型上下文协议 (MCP) 服务器,用于将 DuckDuckGo 搜索功能与 LLM 集成。该服务器提供全面的 Web 搜索功能,支持各种结果类型和过滤选项。

特征

  • 🔍 使用 DuckDuckGo 的搜索引擎进行全面的网络搜索
  • 📊 丰富的结果类型包括:
    • 知识图谱信息
    • 自然搜索结果
    • 新闻文章
    • 视频内容
    • 图像结果
    • 相关搜索
  • 🌍 特定区域搜索支持
  • 🛡️可配置的安全搜索级别
  • 📅 基于日期的过滤选项
  • 📄 分页支持
  • 💾 内置结果缓存
  • 🔒 安全搜索选项(关闭、中等、严格)

配置

此服务器需要通过您的 MCP 客户端进行配置。以下是不同环境的示例:

克莱恩配置

将其添加到您的 Cline MCP 设置中:

{ "mcpServers": { "mcp-duckduckgo-search": { "command": "npx", "args": ["-y", "mcp-duckduckgo-search"], "env": { "SERPAPI_KEY": "your-serpapi-api-key" } } } }

带有 WSL 配置的 Claude 桌面

对于 WSL 环境,将其添加到您的 Claude Desktop 配置中:

{ "mcpServers": { "mcp-duckduckgo-search": { "command": "wsl.exe", "args": [ "bash", "-c", "source ~/.nvm/nvm.sh && SERPAPI_KEY=your-serpapi-api-key /home/username/.nvm/versions/node/v20.12.1/bin/npx mcp-duckduckgo-search" ] } } }

环境变量

服务器需要以下环境变量:

  • SERPAPI_KEY :您的 SerpAPI 密钥(必需)

API

服务器实现了具有可配置参数的单个 MCP 工具:

ddg_搜索

使用 DuckDuckGo 搜索引擎执行网络搜索。

参数:

  • query (字符串,必需):搜索查询
  • region (字符串,可选):区域代码(例如,us-en,uk-en)(默认值:us-en)
  • safe_search (字符串,可选):安全搜索级别(关闭,中等,严格)(默认值:中等)
  • date_filter (字符串,可选):按日期过滤结果:
    • ‘d’:过去一天
    • 'w':过去一周
    • ‘m’:上个月
    • ‘y’:去年
    • 自定义范围:'2023-01-01..2023-12-31'
  • start (数字,可选):分页的结果偏移量
  • no_cache (布尔值,可选):绕过缓存获取新结果(默认值:false)

响应包括:

  • 知识图谱数据(可用时)
  • 自然搜索结果
  • 新闻文章
  • 视频内容
  • 图像结果
  • 相关搜索
  • 搜索元数据

发展

设置

  1. 克隆存储库
  2. 安装依赖项:
pnpm install
  1. 构建项目:
pnpm build
  1. 以开发模式运行:
pnpm dev

出版

该项目使用变更集进行版本管理。要发布:

  1. 创建变更集:
pnpm changeset
  1. 对包进行版本控制:
pnpm changeset version
  1. 发布到 npm:
pnpm release

贡献

欢迎贡献代码!欢迎提交 Pull 请求。

执照

MIT 许可证 - 有关详细信息,请参阅LICENSE文件。

致谢

-
security - not tested
A
license - permissive license
-
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.

支持与 LLM 的 DuckDuckGo 搜索功能集成,支持全面的网络搜索、区域过滤、结果类型以及具有缓存和可自定义搜索参数的安全浏览。

  1. ⚠️ 通知
    1. 特征
      1. 配置
        1. 克莱恩配置
        2. 带有 WSL 配置的 Claude 桌面
        3. 环境变量
      2. API
        1. ddg\_搜索
      3. 发展
        1. 设置
        2. 出版
      4. 贡献
        1. 执照
          1. 致谢

            Related MCP Servers

            • -
              security
              A
              license
              -
              quality
              This MCP server utilizes DuckDuckGo for web searches, providing structured search results with metadata and features like smart content classification and language detection, facilitating easy integration with AI clients supporting the MCP protocol.
              Last updated -
              1
              25
              1
              JavaScript
              MIT License
            • A
              security
              A
              license
              A
              quality
              Integrates Tavily's search API with LLMs to provide advanced web search capabilities, including intelligent result summaries, domain filtering for quality control, and configurable search parameters.
              Last updated -
              3
              64
              9
              JavaScript
              MIT License
              • Linux
            • -
              security
              A
              license
              -
              quality
              Provides web search functionality via DuckDuckGo for Claude Code and MCP-compatible clients, featuring advanced content exploration, navigation across search results, and detailed webpage analysis.
              Last updated -
              1
              Python
              MIT License
            • A
              security
              A
              license
              A
              quality
              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.
              Last updated -
              1
              60
              15
              TypeScript
              MIT License
              • Apple

            View all related MCP servers

            MCP directory API

            We provide all the information about MCP servers via our MCP API.

            curl -X GET 'https://glama.ai/api/mcp/v1/servers/spences10/mcp-duckduckgo-search'

            If you have feedback or need assistance with the MCP directory API, please join our Discord server