mcpField
D
DuckDuckGo Search MCP 🔍

DuckDuckGo Search MCP 🔍

Local
npmjs.comSearch43Updated 16w ago

About DuckDuckGo Search MCP 🔍

DDG Search is an open source web search tool usable from the command line or through MCP. It returns DuckDuckGo web results and can also request AI-generated answers from IAsk or Monica, without requiring API keys.

Key features

  1. 01DuckDuckGo web result retrieval
  2. 02AI answer mode via IAsk or Monica
  3. 03Command line and MCP server usage
  4. 04Adjustable result count and IAsk mode
  5. 05Proxy support through environment variables

Use cases

  1. 01Running quick web searches from the command line
  2. 02Adding current web information to MCP client workflows
  3. 03Giving an agent web search through its system prompt

MCP support

The project can run as an MCP server, exposing a single unified web-search tool to MCP clients such as Claude Desktop and OpenCode.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

mcp.json · Universal config
{
"mcpServers": {
"ddg_search": {
"command": "npx",
"args": [
"-y",
"@oevortex/ddg_search"
]
}
}
}
Run commandnpx -y @oevortex/ddg_search

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
npm@oevortex/ddg_search

Tools

No tool list yet

Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.

Details

From the project README
npm version License: Apache 2.0 YouTube Channel

DDG Search

Web search and AI-powered answers from the command line or MCP.
DuckDuckGo, IAsk AI, and Monica AI. No API keys required.


Quick Start

# Search from the command line
npx -y @oevortex/ddg_search@latest "your search query"

# Or install globally
npm install -g @oevortex/ddg_search
ddg "your search query"

Usage

CLI
# Basic web search (DuckDuckGo)
ddg "quantum computing"

# Get more results
ddg "latest news" -n 10

# AI-generated answer (IAsk)
ddg "explain recursion" -m ai

# AI-generated answer (Monica)
ddg "hello world" -m ai -b monica

# IAsk with options
ddg "gravity" -m ai --iask-mode academic --detail-level comprehensive
Flags
FlagDescriptionDefault
-m, --modeweb or aiweb
-b, --backendiask or monica (AI mode only)iask
-n, --num-resultsNumber of results (1-20, web mode)3
--iask-modequestion, academic, forums, wiki, thinkingthinking
--detail-levelconcise, detailed, comprehensive—
-h, --helpShow help
-v, --versionShow version
MCP Server

Start the MCP server for use with Claude Desktop, OpenCode, or other MCP clients:

ddg --server

Claude Desktop config:

{
  "mcpServers": {
    "ddg-search": {
      "command": "npx",
      "args": ["-y", "@oevortex/ddg_search@latest"]
    }
  }
}

Global install config:

{
  "mcpServers": {
    "ddg-search": {
      "command": "ddg"
    }
  }
}
Programmatic API
import { searchDuckDuckGo } from '@oevortex/ddg_search/src/utils/search.js';
import { searchIAsk } from '@oevortex/ddg_search/src/utils/search_iask.js';
import { searchMonica } from '@oevortex/ddg_search/src/utils/search_monica.js';

// DuckDuckGo
const results = await searchDuckDuckGo("query", 5);

// IAsk AI
const answer = await searchIAsk("query", "thinking", null);

// Monica AI
const answer = await searchMonica("query");
MCP Tool Schema

Single unified tool web-search:

ParameterTypeDefaultDescription
querystringrequiredSearch query
mode"web" | "ai""web"DuckDuckGo results or AI answer
backend"iask" | "monica""iask"AI backend (mode=ai only)
numResultsinteger3Results count (web mode, 1-20)
iaskModestring"thinking"IAsk mode (backend=iask only)
detailLevelstring—IAsk detail level (backend=iask only)

Agent Prompt

Add this to your agent's system prompt to enable web search:

When you need to search the web or find current information, use the DDG Search CLI:

  npx -y @oevortex/ddg_search@latest "<query>" -m ai

This runs an AI-powered web search via IAsk. For standard DuckDuckGo results (titles + URLs + snippets), use mode "web" instead:

  npx -y @oevortex/ddg_search@latest "<query>" -m web -n 5

For a different AI backend (Monica), add -b monica. Use this for any research, fact-checking, or current events task.

Proxy Support

Respects HTTP_PROXY, HTTPS_PROXY, and NO_PROXY environment variables automatically.

HTTPS_PROXY=http://proxy:8080 ddg "search query"

Install

npm install -g @oevortex/ddg_search

Or use npx without installing.

Project Structure

bin/cli.js              CLI entry point
src/
  index.ts              MCP server
  tools/
    searchTool.js       Unified search tool
  utils/
    search.js           DuckDuckGo scraper
    search_iask.js      IAsk AI client
    search_monica.js    Monica AI client
    user_agents.js      User agent rotation
skills/
  ddg-search/           Agent skill for marketplace

Contributing

Pull requests welcome. Open an issue for bugs or feature requests.

License

Apache 2.0


Made by @OEvortex

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.