DDGS MCP Server
Enables web search through the Brave search backend, with support for regional search, safesearch, time limits, result limits, and automatic backend fallback.
Enables text and news search through the DuckDuckGo backend, including regional, safesearch, time-limit, and result-count filtering.
Enables web search through the Google search backend as part of the server's multi-engine search capabilities.
Enables web search through the Mojeek search backend, including standard search filters and fallback support.
Allows routing search requests through Tor Browser's SOCKS proxy using the 'tb' proxy option or DDGS_PROXY environment variable, useful for blocked or rate-limited regions.
Enables web search through the Wikipedia backend for finding Wikipedia content via the DDGS search wrapper.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
DDGS MCP Server
A Model Context Protocol (MCP) server that wraps the DDGS (Dux Distributed Global Search) library, providing AI agents with powerful web search capabilities across multiple search engines.
Note: This entire codebase was generated by Claude Sonnet 4.5. The repository owner does not take any responsibility for any issues, bugs, or problems that may arise from using this software. Use at your own risk.
Features
Search Types
Text Search: Web search across Bing, Brave, DuckDuckGo, Google, Mojeek, Yahoo, Wikipedia, and more
Image Search: Search images with filters for size, color, type, layout, and license
Video Search: Find videos with resolution, duration, and license filters
News Search: Search news articles from multiple sources
Book Search: Search books across Anna's Archive
Advanced Capabilities
Multiple Search Engines: Automatic fallback between backends for reliability
Search Operators: Support for filetype:, site:, intitle:, inurl:, and boolean operators
Regional Search: Support for country-language combinations (us-en, uk-en, cn-zh, etc.)
Proxy Support: HTTP/HTTPS/SOCKS5 proxies, including Tor browser integration
Flexible Filtering: Safesearch, time limits, and content-specific filters
Related MCP server: SerpApi MCP Server
Installation
Prerequisites
Python 3.9 or higher
pip
Setup
Clone or navigate to the repository:
cd "d:\MCP Servers\ddgs-mcp-wrapper"Create a virtual environment (recommended):
python -m venv venv .\venv\Scripts\Activate.ps1Install dependencies:
pip install -r requirements.txtOr install directly:
pip install mcp ddgs pydantic
Usage
Running the Server
Standalone
python server.pyWith MCP Client Configuration
Add to your MCP client configuration (e.g., Claude Desktop, Cline, etc.):
For Claude Desktop (%APPDATA%\Claude\claude_desktop_config.json):
{
"mcpServers": {
"ddgs-search": {
"command": "python",
"args": ["d:\\MCP Servers\\ddgs-mcp-wrapper\\server.py"],
"env": {
"DDGS_PROXY": ""
}
}
}
}For Cline (.vscode/settings.json):
{
"mcp.servers": {
"ddgs-search": {
"command": "python",
"args": ["d:\\MCP Servers\\ddgs-mcp-wrapper\\server.py"]
}
}
}Using with UV (Alternative)
If you prefer using uv:
uvx --from mcp ddgs-mcp-serverAvailable Tools
1. ddgs_text_search
Search the web for text content.
Parameters:
query(required): Search query with optional operatorsregion: Region code (default: "us-en")safesearch: "on", "moderate", or "off" (default: "moderate")timelimit: "d" (day), "w" (week), "m" (month), "y" (year)max_results: Maximum results (1-100, default: 10)backend: "auto" or comma-separated backends (default: "auto")proxy: Proxy URL or "tb" for Tor browser
Example:
{
"query": "python machine learning filetype:pdf",
"region": "us-en",
"max_results": 20,
"timelimit": "y"
}2. ddgs_image_search
Search for images with filters.
Parameters:
query(required): Image search queryregion,safesearch,timelimit,max_results: Same as text searchsize: "Small", "Medium", "Large", "Wallpaper"color: "color", "Monochrome", "Red", "Orange", "Yellow", "Green", "Blue", etc.type_image: "photo", "clipart", "gif", "transparent", "line"layout: "Square", "Tall", "Wide"license_image: "any", "Public", "Share", "ShareCommercially", "Modify", "ModifyCommercially"
3. ddgs_video_search
Search for videos.
Parameters:
query(required): Video search queryregion,safesearch,timelimit,max_results: Same as text searchresolution: "high" or "standard"duration: "short", "medium", "long"license_videos: "creativeCommon", "youtube"
4. ddgs_news_search
Search news articles.
Parameters:
query(required): News search queryregion,safesearch,timelimit,max_results: Same as text searchbackend: "auto", "bing", "duckduckgo", "yahoo"
5. ddgs_book_search
Search for books.
Parameters:
query(required): Book search query (title, author, ISBN)max_results: Maximum results (1-100, default: 10)
Search Operators
The text search supports advanced operators:
Operator | Description |
| Results about cats OR dogs |
| Exact match for phrase |
| Fewer dogs in results |
| More dogs in results |
| Specific file type (pdf, doc, xls, ppt, html) |
| Results from specific domain |
| Exclude specific domain |
| Keyword in page title |
| Keyword in URL |
Proxy Configuration
Using Tor Browser
{
"proxy": "tb"
}Or set the environment variable:
$env:DDGS_PROXY = "socks5h://127.0.0.1:9150"Using Custom Proxy
{
"proxy": "http://user:pass@proxy.example.com:8080"
}Supported protocols: http://, https://, socks5://, socks5h://
Development
Project Structure
ddgs-mcp-wrapper/
├── server.py # Main MCP server implementation
├── pyproject.toml # Project configuration
├── requirements.txt # Python dependencies
├── README.md # This file
└── .gitignore # Git ignore rulesTesting the Server
Test with an MCP client or using the MCP Inspector:
npm install -g @modelcontextprotocol/inspector
mcp-inspector python server.pyDebugging
Enable debug logging by modifying server.py:
logging.basicConfig(level=logging.DEBUG)Tips for AI Agents
Use
backend='auto': Automatically handles temporary backend unavailabilitySpecify regions: Better search quality with region codes like
ar-es,pl-pl,cn-zhIterate through pages: Single queries return results from page 1; iterate for more
Use search operators: Combine operators for precise results (e.g.,
"machine learning" filetype:pdf site:.edu)Proxy for blocked regions: Use proxy if backends are rate-limited or blocked in your country
Troubleshooting
Common Issues
"Module not found" errors:
pip install --upgrade mcp ddgs pydanticRate limiting:
Use
backend='auto'to cycle through enginesAdd delays between requests
Use a proxy or Tor browser
Import errors:
# Verify installation
pip list | Select-String -Pattern "mcp|ddgs|pydantic"Connection timeout:
Increase timeout in
get_ddgs_instance()callCheck proxy configuration
Try different backends
License
MIT License - feel free to use in your projects.
Contributing
Contributions welcome! Please:
Fork the repository
Create a feature branch
Submit a pull request
Resources
Disclaimer
Code Generation: This entire project was generated by Claude Sonnet 4.5 AI. The repository owner takes no responsibility for any issues, errors, or consequences arising from the use of this software.
Usage: This server is for educational and research purposes only. Respect search engine terms of service and rate limits. Use at your own risk.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Search Google straight from your AI agent. Web results, images, videos, news, products, scholarly ar
The best web search for your AI Agent
Web search, browser automation, scraping, crawling and CAPTCHA solving for AI agents.
Web search for AI agents — one tool across 6 engines, routed to the cheapest + cached.
Related MCP Servers
- AlicenseBqualityDmaintenanceEnables AI agents to perform comprehensive search across 27 search engines including web, academic, code, community, package managers, video, images, podcasts, and maps, with multi-modal support, caching, and security features.14MIT
- FlicenseNot gradedqualityAmaintenanceEnables agents to query Google, Bing, Yahoo, DuckDuckGo, YouTube, eBay, and other search engines for real-time results such as weather, stock data, news, images, and shopping listings. Supports flexible JSON or Markdown responses with complete or compact modes.-
- FlicenseNot gradedqualityNot gradedmaintenanceEnables AI assistants to run real-time searches across Google, Bing, Yahoo, DuckDuckGo, YouTube, eBay and other engines, returning results such as answer boxes, news, images, shopping, weather and stock data. Responses are automatically detected and formatted as structured JSON or token-saving Markdown, with optional interactive UI tools for tabular and dashboard views.-
- FlicenseNot gradedqualityAmaintenanceEnables agents to run multi-engine web searches across Google, Bing, Yahoo, DuckDuckGo, YouTube, eBay and more, along with related live data such as weather, stocks, and news. Results are automatically detected and formatted, and can be returned as structured JSON (complete or compact) or token-efficient Markdown, optionally rendered through interactive UI tools.-