HasData DuckDuckGo — Claude Code MCP server: setup guide
Supplies structured DuckDuckGo search output in JSON. Ideal for scraping organic rankings, inspecting ad blocks, and checking 37 regional markets.
claude mcp add duckduckgo -e HASDATA_API_KEY=<HASDATA_API_KEY> -- npx -y @hasdata/duckduckgo-mcpWhat HasData DuckDuckGo does
This hosted endpoint delivers parsed search data with rankings, domain positions, separate ad entries, and DuckDuckGo artificial intelligence summaries. All processing happens on the remote infrastructure. You do not need to install local headless browsers or configure scraping fallback chains.
Setup requires a HasData API token passed in the x-api-key header. If a client lacks streamable HTTP capabilities, you can use the npm wrapper @hasdata/duckduckgo-mcp or the PyPI package hasdata-duckduckgo-mcp. Without an active API key in headers or environment variables, requests fail immediately. The free tier grants 1,000 monthly credits with no card required, deducting 10 credits per successful call.
What it helps with
- retrieve ranked DuckDuckGo search entries in JSON format
- extract search ads into a dedicated array without custom filters
- compare search visibility across 37 regional markets
- read direct search AI answers without fetching external websites
Example prompts for the agent
- Look up "model context protocol" on DuckDuckGo and return the top ten ranked domains.
- Search for "vpn review" in the US and Germany regions to compare ranking domains.
- Find ads for "best crm software" and show each advertiser domain.
How to install HasData DuckDuckGo
1Platform CLI
claude mcp add duckduckgo -e HASDATA_API_KEY=<HASDATA_API_KEY> -- npx -y @hasdata/duckduckgo-mcpReplace <…> with your own values
2Platform CLI: remote server
claude mcp add --transport http hasdata-duckduckgo 'https://mcp.hasdata.com/mcp?apis=duckduckgo'1Platform CLI: remote server
codex mcp add hasdata-duckduckgo --url 'https://mcp.hasdata.com/mcp?apis=duckduckgo'2Platform CLI
codex mcp add hasdata-duckduckgo --env HASDATA_API_KEY=<HASDATA_API_KEY> -- npx -y @hasdata/duckduckgo-mcpReplace <…> with your own values
Config file
{
"mcpServers": {
"hasdata-duckduckgo": {
"url": "https://mcp.hasdata.com/mcp?apis=duckduckgo"
}
}
}{
"mcpServers": {
"hasdata-duckduckgo": {
"command": "npx",
"args": [
"-y",
"@hasdata/duckduckgo-mcp"
],
"env": {
"HASDATA_API_KEY": "<HASDATA_API_KEY>"
}
}
}
}Replace <…> with your own values
Config file
{
"servers": {
"hasdata-duckduckgo": {
"type": "http",
"url": "https://mcp.hasdata.com/mcp?apis=duckduckgo"
}
}
}{
"servers": {
"hasdata-duckduckgo": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@hasdata/duckduckgo-mcp"
],
"env": {
"HASDATA_API_KEY": "<HASDATA_API_KEY>"
}
}
}
}Replace <…> with your own values
1Platform CLI: remote server
gemini mcp add -t http hasdata-duckduckgo 'https://mcp.hasdata.com/mcp?apis=duckduckgo'2Platform CLI
gemini mcp add -e HASDATA_API_KEY=<HASDATA_API_KEY> hasdata-duckduckgo npx -y @hasdata/duckduckgo-mcpReplace <…> with your own values
Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about HasData DuckDuckGo
How to install HasData DuckDuckGo in Claude Code?
Run claude mcp add duckduckgo -e HASDATA_API_KEY=<HASDATA_API_KEY> -- npx -y @hasdata/duckduckgo-mcp in your terminal.
What does HasData DuckDuckGo do?
The server queries DuckDuckGo and delivers ranked organic links, ad lists, and instant AI summaries as structured JSON across 37 regional markets.
What are the free tier limits?
HasData grants 1,000 free credits every month without requesting card information. Each search call takes 10 credits, providing 100 searches monthly.