{"_id":"@ericthered926/duckduckgo-mcp-server","_rev":"3-11ee7b808ca383521ecbafc575dbfebe","name":"@ericthered926/duckduckgo-mcp-server","dist-tags":{"latest":"0.6.0"},"versions":{"0.3.0":{"name":"@ericthered926/duckduckgo-mcp-server","version":"0.3.0","keywords":["mcp","model-context-protocol","duckduckgo","search","ai","llm","openwebui","mcpo"],"author":{"name":"ericthered926"},"license":"MIT","_id":"@ericthered926/duckduckgo-mcp-server@0.3.0","maintainers":[{"name":"ericthered926","email":"larsenj.eric@gmail.com"}],"contributors":[{"url":"https://github.com/zhsama","name":"zhsama"}],"homepage":"https://github.com/ericthered926/duckduckgo-mcp-server#readme","bugs":{"url":"https://github.com/ericthered926/duckduckgo-mcp-server/issues"},"bin":{"duckduckgo-mcp-server":"build/index.js"},"dist":{"shasum":"93b22fddcb993f46184b1887a35006c27e81a92f","tarball":"https://registry.npmjs.org/@ericthered926/duckduckgo-mcp-server/-/duckduckgo-mcp-server-0.3.0.tgz","fileCount":7,"integrity":"sha512-QDR3VCFirLYoo/mxMnUQ7RQ5gA+K4o7yUU8HRChYfm+JoCGWDeIgs7COpLgWm7c7hSJYC91J1YovSZ+vMnXMUA==","signatures":[{"sig":"MEUCIFXJW977GUE249rW48PfqV+TM7mwcfTNvrtmcJ12a+OVAiEA/x9kulV/GzyFJgDBuzLvLDu0MFSgCkc05SVvlYkh2aA=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":40055},"main":"build/index.js","type":"module","types":"build/index.d.ts","engines":{"node":">=18.0.0"},"gitHead":"1fd3abf1e4541f82e0102a2b48f82e8888611d22","scripts":{"dev":"tsc --watch","lint":"eslint . && prettier --check .","test":"node --test","build":"tsc && chmod +x build/index.js","start":"node build/index.js","format":"prettier --write .","prepare":"husky","lint:fix":"eslint . --fix && prettier --write .","typecheck":"tsc --noEmit","prepublishOnly":"npm run lint && npm run build"},"_npmUser":{"name":"ericthered926","email":"larsenj.eric@gmail.com"},"repository":{"url":"git+https://github.com/ericthered926/duckduckgo-mcp-server.git","type":"git"},"_npmVersion":"11.6.2","description":"A Model Context Protocol (MCP) server for DuckDuckGo web and news search","directories":{},"lint-staged":{"*.{ts,js}":["eslint --fix","prettier --write"],"*.{json,md,yml,yaml}":["prettier --write"]},"_nodeVersion":"24.12.0","dependencies":{"duck-duck-scrape":"^2.2.7","@modelcontextprotocol/sdk":"^1.0.0"},"_hasShrinkwrap":false,"devDependencies":{"husky":"^9.1.7","eslint":"^9.17.0","globals":"^16.5.0","prettier":"^3.4.2","@eslint/js":"^9.17.0","typescript":"^5.7.2","@types/node":"^22.10.2","lint-staged":"^15.2.11","typescript-eslint":"^8.18.1"},"_npmOperationalInternal":{"tmp":"tmp/duckduckgo-mcp-server_0.3.0_1766028883253_0.5874259512967195","host":"s3://npm-registry-packages-npm-production"}},"0.5.0":{"name":"@ericthered926/duckduckgo-mcp-server","version":"0.5.0","keywords":["mcp","model-context-protocol","duckduckgo","search","ai","llm","openwebui","mcpo"],"author":{"name":"ericthered926"},"license":"MIT","_id":"@ericthered926/duckduckgo-mcp-server@0.5.0","maintainers":[{"name":"ericthered926","email":"larsenj.eric@gmail.com"}],"contributors":[{"url":"https://github.com/zhsama","name":"zhsama"}],"homepage":"https://github.com/ericthered926/duckduckgo-mcp-server#readme","bugs":{"url":"https://github.com/ericthered926/duckduckgo-mcp-server/issues"},"bin":{"duckduckgo-mcp-server":"build/index.js"},"dist":{"shasum":"62a6c916f1c4eba2c761a5d85d42fff1fa8b772a","tarball":"https://registry.npmjs.org/@ericthered926/duckduckgo-mcp-server/-/duckduckgo-mcp-server-0.5.0.tgz","fileCount":7,"integrity":"sha512-UR7hRen/IBi9bucNFx1ZlOHAyMHKr48cXFLRW7E80+ObFrGY296vr3bylMqbWHkMnfpVB8Y/Ta30Zm1R4zN6Aw==","signatures":[{"sig":"MEUCIQDXIubDwwAazsExgXEHdVk3A5k1oOW03ZM/8mFdrPTLOAIgbjc0E77DrBDf1QWLCXLTNQraFZH0ggsSxb4dbnVf+Rk=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":46685},"main":"build/index.js","type":"module","types":"build/index.d.ts","engines":{"node":">=18.0.0"},"gitHead":"4edd8d4a62e3ca40de90f552d963900bcab1314c","scripts":{"dev":"tsc --watch","lint":"eslint . && prettier --check .","test":"node --test","build":"tsc && chmod +x build/index.js","start":"node build/index.js","format":"prettier --write .","prepare":"husky","lint:fix":"eslint . --fix && prettier --write .","typecheck":"tsc --noEmit","prepublishOnly":"npm run lint && npm run build"},"_npmUser":{"name":"ericthered926","email":"larsenj.eric@gmail.com"},"repository":{"url":"git+https://github.com/ericthered926/duckduckgo-mcp-server.git","type":"git"},"_npmVersion":"11.6.2","description":"A Model Context Protocol (MCP) server for DuckDuckGo web and news search","directories":{},"lint-staged":{"*.{ts,js}":["eslint --fix","prettier --write"],"*.{json,md,yml,yaml}":["prettier --write"]},"_nodeVersion":"24.12.0","dependencies":{"zod":"^3.24.1","duck-duck-scrape":"^2.2.7","@modelcontextprotocol/sdk":"^1.0.0"},"_hasShrinkwrap":false,"devDependencies":{"husky":"^9.1.7","eslint":"^9.17.0","globals":"^16.5.0","prettier":"^3.4.2","@eslint/js":"^9.17.0","typescript":"^5.7.2","@types/node":"^22.10.2","lint-staged":"^15.2.11","typescript-eslint":"^8.18.1"},"_npmOperationalInternal":{"tmp":"tmp/duckduckgo-mcp-server_0.5.0_1766037648813_0.22205944887279028","host":"s3://npm-registry-packages-npm-production"}},"0.6.0":{"name":"@ericthered926/duckduckgo-mcp-server","version":"0.6.0","description":"A Model Context Protocol (MCP) server for DuckDuckGo web and news search","type":"module","main":"build/index.js","types":"build/index.d.ts","bin":{"duckduckgo-mcp-server":"build/index.js"},"scripts":{"build":"tsc && chmod +x build/index.js","start":"node build/index.js","dev":"tsc --watch","lint":"eslint . && prettier --check .","lint:fix":"eslint . --fix && prettier --write .","format":"prettier --write .","test":"node --test","typecheck":"tsc --noEmit","prepare":"husky","prepublishOnly":"npm run lint && npm run build"},"keywords":["mcp","model-context-protocol","duckduckgo","search","ai","llm","openwebui","mcpo"],"author":{"name":"ericthered926"},"contributors":[{"name":"zhsama","url":"https://github.com/zhsama"}],"license":"MIT","repository":{"type":"git","url":"git+https://github.com/ericthered926/duckduckgo-mcp-server.git"},"bugs":{"url":"https://github.com/ericthered926/duckduckgo-mcp-server/issues"},"homepage":"https://github.com/ericthered926/duckduckgo-mcp-server#readme","engines":{"node":">=18.0.0"},"dependencies":{"@modelcontextprotocol/sdk":"^1.0.0","duck-duck-scrape":"^2.2.7","zod":"^3.24.1"},"devDependencies":{"@eslint/js":"^9.17.0","@types/node":"^22.10.2","eslint":"^9.17.0","globals":"^16.5.0","husky":"^9.1.7","lint-staged":"^15.2.11","prettier":"^3.4.2","typescript":"^5.7.2","typescript-eslint":"^8.18.1"},"lint-staged":{"*.{ts,js}":["eslint --fix","prettier --write"],"*.{json,md,yml,yaml}":["prettier --write"]},"gitHead":"4d18042af4e6d1ab890d3549e0eb34d5d77e099f","_id":"@ericthered926/duckduckgo-mcp-server@0.6.0","_nodeVersion":"24.12.0","_npmVersion":"11.6.2","dist":{"integrity":"sha512-KIF3h+WXncB5+H93YWp9YSRzWY9C1qsF2J+SG2F2XXm7SoWKffvtVzQ4P+0D4cgmgCKjoPiVH5HirCc2bWTPEg==","shasum":"e32460975ca8b3ffbf842ff55fc5fa6710923014","tarball":"https://registry.npmjs.org/@ericthered926/duckduckgo-mcp-server/-/duckduckgo-mcp-server-0.6.0.tgz","fileCount":7,"unpackedSize":49983,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCr2Is6bbciaaytfe2UHzUMZgYgCUxSF0eu6i+k1JcyawIgAoHsoqrhwMlAxQF1dPnpyawZmDwQv6O5ndN0R8Zuf1A="}]},"_npmUser":{"name":"ericthered926","email":"larsenj.eric@gmail.com"},"directories":{},"maintainers":[{"name":"ericthered926","email":"larsenj.eric@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/duckduckgo-mcp-server_0.6.0_1766038105448_0.948992505332164"},"_hasShrinkwrap":false}},"time":{"created":"2025-12-18T03:34:43.187Z","modified":"2025-12-18T06:08:25.806Z","0.3.0":"2025-12-18T03:34:43.415Z","0.5.0":"2025-12-18T06:00:48.947Z","0.6.0":"2025-12-18T06:08:25.603Z"},"bugs":{"url":"https://github.com/ericthered926/duckduckgo-mcp-server/issues"},"author":{"name":"ericthered926"},"license":"MIT","homepage":"https://github.com/ericthered926/duckduckgo-mcp-server#readme","keywords":["mcp","model-context-protocol","duckduckgo","search","ai","llm","openwebui","mcpo"],"repository":{"type":"git","url":"git+https://github.com/ericthered926/duckduckgo-mcp-server.git"},"description":"A Model Context Protocol (MCP) server for DuckDuckGo web and news search","contributors":[{"name":"zhsama","url":"https://github.com/zhsama"}],"maintainers":[{"name":"ericthered926","email":"larsenj.eric@gmail.com"}],"readme":"# DuckDuckGo MCP Server\n\nA [Model Context Protocol (MCP)](https://modelcontextprotocol.io/) server that provides DuckDuckGo search functionality for AI assistants.\n\n[![npm version](https://img.shields.io/npm/v/@ericthered926/duckduckgo-mcp-server.svg)](https://www.npmjs.com/package/@ericthered926/duckduckgo-mcp-server)\n\n> **Attribution**: This project is a fork of [zhsama/duckduckgo-mcp-server](https://github.com/zhsama/duckduckgo-mcp-server), originally created by [zhsama](https://github.com/zhsama). This fork adds English localization, news search, region support, time filtering, and modern tooling.\n\n## Features\n\n- **Web Search** - Search the web with region-specific and time-filtered results\n- **News Search** - Search recent news articles with source and date information\n- **Token Optimization** - Configurable result limits, snippet truncation, and formatting for low-VRAM LLMs\n- **SafeSearch** - Content filtering (strict, moderate, off)\n- **Region Support** - Localized results for different countries\n- **Time Filtering** - Filter results by day, week, month, year\n- **Rate Limiting** - Configurable rate limits to prevent abuse\n- **Configurable Logging** - Debug, info, warn, error, or none\n\n## Installation\n\n### Prerequisites\n\n- Node.js >= 18.0.0 (tested with Node 24)\n- npm\n\n### Install & Build\n\n```bash\nnpm install\nnpm run build\n```\n\n## Available Tools\n\n### `duckduckgo_web_search`\n\nPerforms a web search using DuckDuckGo.\n\n| Parameter    | Type   | Required | Default         | Description                                       |\n| ------------ | ------ | -------- | --------------- | ------------------------------------------------- |\n| `query`      | string | Yes      | -               | Search query (max 400 characters)                 |\n| `limit`      | number | No       | DDG_MAX_RESULTS | Override default result limit (1-20)              |\n| `count`      | number | No       | DDG_MAX_RESULTS | [Deprecated: use `limit`] Number of results       |\n| `safeSearch` | string | No       | \"moderate\"      | Filter: \"strict\", \"moderate\", or \"off\"            |\n| `region`     | string | No       | \"wt-wt\"         | Region code (e.g., \"us-en\", \"uk-en\", \"de-de\")     |\n| `time`       | string | No       | \"all\"           | Time range: \"day\", \"week\", \"month\", \"year\", \"all\" |\n\n**Example:**\n\n```json\n{\n  \"query\": \"TypeScript best practices\",\n  \"count\": 5,\n  \"region\": \"us-en\",\n  \"time\": \"month\"\n}\n```\n\n### `duckduckgo_news_search`\n\nSearch for recent news articles.\n\n| Parameter    | Type   | Required | Default         | Description                                       |\n| ------------ | ------ | -------- | --------------- | ------------------------------------------------- |\n| `query`      | string | Yes      | -               | News search query (max 400 characters)            |\n| `limit`      | number | No       | DDG_MAX_RESULTS | Override default result limit (1-20)              |\n| `count`      | number | No       | DDG_MAX_RESULTS | [Deprecated: use `limit`] Number of results       |\n| `safeSearch` | string | No       | \"moderate\"      | Filter: \"strict\", \"moderate\", or \"off\"            |\n| `time`       | string | No       | \"all\"           | Time range: \"day\", \"week\", \"month\", \"year\", \"all\" |\n\n**Example:**\n\n```json\n{\n  \"query\": \"artificial intelligence\",\n  \"count\": 10,\n  \"time\": \"week\"\n}\n```\n\n## Supported Regions\n\n| Code    | Region           |\n| ------- | ---------------- |\n| `wt-wt` | Worldwide        |\n| `us-en` | United States    |\n| `uk-en` | United Kingdom   |\n| `ca-en` | Canada (English) |\n| `au-en` | Australia        |\n| `de-de` | Germany          |\n| `fr-fr` | France           |\n| `es-es` | Spain            |\n| `it-it` | Italy            |\n| `jp-jp` | Japan            |\n| `br-pt` | Brazil           |\n| `mx-es` | Mexico           |\n| `in-en` | India            |\n\nOther region codes following the `xx-xx` format may also work.\n\n## Configuration\n\n### Environment Variables\n\n#### Token Optimization (for low-VRAM LLMs)\n\n| Variable                  | Default | Description                                     |\n| ------------------------- | ------- | ----------------------------------------------- |\n| `DDG_MAX_RESULTS`         | 3       | Default number of results returned              |\n| `DDG_MAX_SNIPPET_LENGTH`  | 150     | Max characters per snippet (truncated with ...) |\n| `DDG_ENABLE_FULL_CONTENT` | false   | Set to \"true\" to disable truncation             |\n| `DDG_STRIP_EMOJI`         | false   | Set to \"true\" to remove emojis from titles/text |\n| `DDG_OUTPUT_FORMAT`       | \"dense\" | options: \"dense\", \"json\", \"minimal\"             |\n\n#### Rate Limiting\n\n| Variable                | Default | Description                 |\n| ----------------------- | ------- | --------------------------- |\n| `RATE_LIMIT_PER_SECOND` | 1       | Maximum requests per second |\n| `RATE_LIMIT_PER_MONTH`  | 15000   | Maximum requests per month  |\n\n#### Logging\n\n| Variable    | Default | Description                                   |\n| ----------- | ------- | --------------------------------------------- |\n| `LOG_LEVEL` | \"info\"  | Logging level: debug, info, warn, error, none |\n\n### Examples\n\n```bash\n# Token-optimized for low VRAM (12GB RTX 5070)\nDDG_MAX_RESULTS=3 DDG_MAX_SNIPPET_LENGTH=150 npm run start\n\n# Full content for high-VRAM systems\nDDG_MAX_RESULTS=10 DDG_MAX_SNIPPET_LENGTH=500 DDG_ENABLE_FULL_CONTENT=true npm run start\n\n# Debug logging\nLOG_LEVEL=debug npm run start\n```\n\n## Integration\n\n### Claude Desktop\n\nAdd to your Claude Desktop config:\n\n**macOS:** `~/Library/Application Support/Claude/claude_desktop_config.json`  \n**Windows:** `%APPDATA%/Claude/claude_desktop_config.json`\n\n```json\n{\n  \"mcpServers\": {\n    \"duckduckgo\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@ericthered926/duckduckgo-mcp-server\"]\n    }\n  }\n}\n```\n\n### MCPO (Open WebUI)\n\nFor [MCPO](https://github.com/open-webui/mcpo) integration:\n\n```json\n{\n  \"mcpServers\": {\n    \"duckduckgo\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@ericthered926/duckduckgo-mcp-server\"],\n      \"env\": {\n        \"DDG_MAX_RESULTS\": \"3\",\n        \"DDG_MAX_SNIPPET_LENGTH\": \"150\",\n        \"DDG_ENABLE_FULL_CONTENT\": \"false\"\n      }\n    }\n  }\n}\n```\n\n### Local Development\n\n```json\n{\n  \"mcpServers\": {\n    \"duckduckgo\": {\n      \"command\": \"node\",\n      \"args\": [\"/path/to/duckduckgo-mcp-server/build/index.js\"],\n      \"env\": {\n        \"LOG_LEVEL\": \"debug\"\n      }\n    }\n  }\n}\n```\n\n## Development\n\n### Scripts\n\n| Command             | Description                   |\n| ------------------- | ----------------------------- |\n| `npm run build`     | Compile TypeScript            |\n| `npm run start`     | Run the server                |\n| `npm run dev`       | Watch mode for development    |\n| `npm run lint`      | Run ESLint + Prettier check   |\n| `npm run lint:fix`  | Auto-fix lint issues          |\n| `npm run format`    | Format code with Prettier     |\n| `npm run test`      | Run tests                     |\n| `npm run typecheck` | TypeScript type checking only |\n\n### Debugging\n\nUse the [MCP Inspector](https://github.com/modelcontextprotocol/inspector):\n\n```bash\nnpx @modelcontextprotocol/inspector node build/index.js\n```\n\n### Project Structure\n\n```\nduckduckgo-mcp-server/\n├── src/\n│   └── index.ts          # Main server (web + news search)\n├── test/\n│   └── server.test.js    # Smoke tests\n├── build/                 # Compiled output\n├── .husky/               # Pre-commit hooks\n├── eslint.config.js      # ESLint 9.x flat config\n├── tsconfig.json         # Strict TypeScript config\n├── .prettierrc           # Prettier formatting\n├── .editorconfig         # Editor settings\n└── .nvmrc                # Node version (24)\n```\n\n## Rate Limits\n\nDefault rate limits are conservative to avoid being blocked by DuckDuckGo:\n\n- **1 request per second** - Prevents rate limiting\n- **15,000 requests per month** - Reasonable monthly cap\n\nAdjust via environment variables if needed for your use case.\n\n## Troubleshooting\n\n### Server won't start\n\n1. Check Node.js version: `node --version` (should be >= 18)\n2. Rebuild: `npm run build`\n3. Check for TypeScript errors in build output\n\n### Rate limit errors\n\n- Wait for the limit window to reset (1 second for per-second, or adjust limits)\n- Check if multiple instances are sharing the same counter\n\n### No results returned\n\n- Try a different query or remove time filters\n- Check if SafeSearch is blocking results\n- DuckDuckGo may return no results for very specific queries\n\n### Debug logging\n\nEnable debug logs to see detailed request information:\n\n```bash\nLOG_LEVEL=debug npm run start\n```\n\n## Credits\n\nThis project is a fork of [zhsama/duckduckgo-mcp-server](https://github.com/zhsama/duckduckgo-mcp-server), originally created by [zhsama](https://github.com/zhsama).\n\n### What's New in This Fork\n\n- **Token optimization** - Configurable result limits & snippet truncation for low-VRAM LLMs\n- **Dense output format** - Single-line results to minimize token usage\n- **URL cleaning** - Strips tracking params (utm\\_\\*, fbclid, gclid, etc.)\n- **`limit` parameter** - LLM can override defaults when more context needed\n- English localization (all comments and output)\n- News search tool (`duckduckgo_news_search`)\n- Region/locale support for localized results\n- Time range filtering\n- Configurable logging via `LOG_LEVEL`\n- Modern ESLint 9.x flat config\n- Prettier formatting\n- Husky pre-commit hooks\n- Comprehensive test suite\n- Strict TypeScript configuration\n\n## License\n\nMIT - See [LICENSE](LICENSE) for details.\n","readmeFilename":"README.md"}