DuckDuckGo Search MCP Server (SSL-Fix Edition)
A Model Context Protocol (MCP) server that provides web search capabilities through DuckDuckGo, with additional features for content fetching and parsing. This fork includes configurable SSL verification for corporate proxy environments.
Features
- Web Search: Search DuckDuckGo with advanced rate limiting and result formatting
- Content Fetching: Retrieve and parse webpage content with intelligent text extraction
- Rate Limiting: Built-in protection against rate limits for both search and content fetching
- Error Handling: Comprehensive error handling and logging
- LLM-Friendly Output: Results formatted specifically for large language model consumption
- 🆕 Configurable SSL Verification: Works in corporate environments with SSL inspection/proxies
Installation
Installing via uv
Install directly from PyPI using uv:
uv pip install duckduckgo-mcp-server-ssl-fix
Installing via pip
pip install duckduckgo-mcp-server-ssl-fix
Configuration
SSL Verification Settings
This package supports configurable SSL verification through environment variables:
Option 1: Disable SSL Verification (for corporate proxies)
export DDG_DISABLE_SSL_VERIFY=true
⚠️ Security Note: Only disable SSL verification in trusted corporate environments with SSL inspection.
Option 2: Use Custom Certificate
export DDG_SSL_CERT_PATH=/path/to/your/corporate/cert.pem
Option 3: Default (Secure)
If neither environment variable is set, standard SSL verification is used.
Usage
Running with Claude Code
Add to your Claude Code MCP configuration:
macOS/Linux: ~/.config/claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"ddg-search": {
"command": "uvx",
"args": ["duckduckgo-mcp-server-ssl-fix"],
"env": {
"DDG_DISABLE_SSL_VERIFY": "true"
}
}
}
}
For Claude Code CLI configuration, create/edit ~/.config/claude-code/settings.json:
{
"mcpServers": {
"duckduckgo": {
"command": "uvx",
"args": ["duckduckgo-mcp-server-ssl-fix"],
"env": {
"DDG_DISABLE_SSL_VERIFY": "true"
}
}
}
}
Running with Claude Desktop
- Download Claude Desktop
- Create or edit your Claude Desktop configuration:
- On macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - On Windows:
%APPDATA%\Claude\claude_desktop_config.json
- On macOS:
Add the following configuration:
{
"mcpServers": {
"ddg-search": {
"command": "uvx",
"args": ["duckduckgo-mcp-server-ssl-fix"],
"env": {
"DDG_DISABLE_SSL_VERIFY": "true"
}
}
}
}
- Restart Claude Desktop
Testing the Package
You can test the package directly:
# Test with SSL verification disabled
DDG_DISABLE_SSL_VERIFY=true uvx duckduckgo-mcp-server-ssl-fix
# Test with custom certificate
DDG_SSL_CERT_PATH=/path/to/cert.pem uvx duckduckgo-mcp-server-ssl-fix
# Test with default SSL verification
uvx duckduckgo-mcp-server-ssl-fix
Available Tools
1. Search Tool
async def search(query: str, max_results: int = 10) -> str
Performs a web search on DuckDuckGo and returns formatted results.
Parameters:
query: Search query stringmax_results: Maximum number of results to return (default: 10)
Returns: Formatted string containing search results with titles, URLs, and snippets.
2. Content Fetching Tool
async def fetch_content(url: str) -> str
Fetches and parses content from a webpage.
Parameters:
url: The webpage URL to fetch content from
Returns: Cleaned and formatted text content from the webpage.
Features in Detail
Rate Limiting
- Search: Limited to 30 requests per minute
- Content Fetching: Limited to 20 requests per minute
- Automatic queue management and wait times
Result Processing
- Removes ads and irrelevant content
- Cleans up DuckDuckGo redirect URLs
- Formats results for optimal LLM consumption
- Truncates long content appropriately
Error Handling
- Comprehensive error catching and reporting
- Detailed logging through MCP context
- Graceful degradation on rate limits or timeouts
SSL Configuration
Three modes of operation:
- Secure (Default): Full SSL verification using system certificates
- Custom Certificate: Specify your organization's root certificate
- Disabled Verification: For corporate proxies with SSL inspection (less secure)
Troubleshooting
SSL Certificate Errors
If you see errors like:
[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed
This typically means you're behind a corporate proxy with SSL inspection. Solutions:
-
Disable SSL Verification (quick fix):
export DDG_DISABLE_SSL_VERIFY=true
-
Use Corporate Certificate (more secure):
export DDG_SSL_CERT_PATH=/path/to/corporate/cert.pem
-
Export Certificate from Browser:
- Open your browser's certificate manager
- Find your organization's root certificate
- Export as PEM format
- Use the path with
DDG_SSL_CERT_PATH
Differences from Original
This fork adds:
- Configurable SSL verification via environment variables
- Support for custom SSL certificates
- Corporate proxy-friendly defaults
- Enhanced documentation for SSL issues
Contributing
Issues and pull requests are welcome! Some areas for potential improvement:
- Additional search parameters (region, language, etc.)
- Enhanced content parsing options
- Caching layer for frequently accessed content
- Additional rate limiting strategies
License
This project is licensed under the MIT License.
Credits
Based on the original duckduckgo-mcp-server by Nick Clyde.
Metadata
Release files for duckduckgo-mcp-server-ssl-fix 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| duckduckgo_mcp_server_ssl_fix-0.2.0.tar.gz | 26.9 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| duckduckgo_mcp_server_ssl_fix-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 34.8 kB
Release files / duckduckgo_mcp_server_ssl_fix-0.2.0.tar.gz
| Download URL | duckduckgo_mcp_server_ssl_fix-0.2.0.tar.gz |
|---|---|
| Size | 26.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7ea7cee25bbf58d8f519bf45444aa097602fb15580a9abd15afd9c5c0c122e75
|
|
BLAKE2b-256 checksum How to use checksums |
befeee036183886a22fdf658c7c28681009d161352d53ca61355fc71e6a62bca
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.2
|
Release files / duckduckgo_mcp_server_ssl_fix-0.2.0-py3-none-any.whl
| Download URL | duckduckgo_mcp_server_ssl_fix-0.2.0-py3-none-any.whl |
|---|---|
| Size | 7.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
613781992d5f1c18bceb0bfde4db1d19a5fc3b9675865deabcdd5d36785134cc
|
|
BLAKE2b-256 checksum How to use checksums |
c71377616b1f61965b70c9875c1bad10b558d82dc4f8ac992ebf109ef589e819
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.2
|
Security for duckduckgo-mcp-server-ssl-fix 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.