DuckDuckGo search as JSON. Ranked results, ads in their own array, 37 regions.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
We haven't yet run this listing's install command through our automated sandbox check. This isn't a red flag β we're steadily working through the catalog.
π‘ Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
A hosted Model Context Protocol (MCP) server that gives Claude, Cursor, Windsurf and any other MCP client DuckDuckGo search results as structured JSON. Ranked organic results with positions, ads in their own array, DuckDuckGo's own AI answer, and 37 regions to target. Built for volume and for parsing, with no local browser and no fallback chain to configure.
An MCP client that speaks streamable HTTP with custom headers. A HasData API key from the dashboard, free to create. Nothing else. This is a remote server, so the simplest path is a URL and a header, with no browser package to add and no local process to keep up. A stdio-only client can use the @hasdata/duckduckgo-mcp (npm) or hasdata-duckduckgo-mcp (PyPI) launcher instead.
The server URL is the same for every client. We run it hands-on in Claude Code and Claude Desktop. The other blocks follow each client's own documented format for a remote server.
| Field | Value |
|---|---|
| URL | https://mcp.hasdata.com/api/mcp?apis=duckduckgo |
| Transport | HTTP, streamable |
| Auth header | x-api-key: HASDATA_API_KEY |
Clients with OAuth support can add the same URL as a connector and sign in without putting a key in a config file.
Settings, then Connectors, then Add custom connector, then paste https://mcp.hasdata.com/api/mcp?apis=duckduckgo and sign in.
For the config-file route, Claude Desktop loads only local (stdio) servers, so it reaches a remote server through a stdio launcher. The @hasdata/duckduckgo-mcp package is that launcher, and it reads the key from the environment. Add this to claude_desktop_config.json:
Python instead of Node? Swap the launcher for the PyPI package, which uvx runs without a manual install:
~/.cursor/mcp.json for every project, or .cursor/mcp.json for one:
~/.codeium/windsurf/mcp_config.json. Windsurf calls the field serverUrl, not url:
.vscode/mcp.json in the workspace:
~/.codex/config.toml:
~/.gemini/settings.json:
Prompts, not code. Paste one in and the agent calls the tool itself. Each is annotated with the calls it takes, because in MCP the model decides how many calls to make and every successful call costs 10 credits.
Search DuckDuckGo for "model context protocol" and give me the top ten results with their positions and domains.
One call, 10 credits.
Run the query "vpn review" in the German region and again in the US region, then tell me which domains appear in one and not the other.
Two calls, 20 credits. Region is a parameter. The same query in two markets is two calls.
Search for "best crm software" and list only the paid placements, with the advertiser domain for each.
One call, 10 credits. Ads arrive in their own array and need no filtering heuristics.
Take the query "model context protocol" and walk the first three pages, then tell me which domains hold more than one position.
Three calls, 30 credits. Each page after the first is a fresh call with the cursor, and drop q from the arguments once you have one.
Search "who invented the transistor" and show me DuckDuckGo's own AI answer next to the organic results it drew on.
One call, 10 credits.
Two of those are the reason this server exists. Region targeting is a first-class parameter across 37 markets. Comparing one query across countries is a loop and not a proxy setup. And paid placements come back separately from organic, which keeps rank tracking from depending on guessing which result was an ad.
Paging costs a call each time. A prompt that walks ten pages is ten calls and 100 credits.
One tool. Samples below are trimmed from real calls, and the results in them change as the web changes. Read them as shapes.
The samples are the payload, not the whole response. A tools/call result carries one text block, and that text is itself JSON holding url, status, text and json, with the scraped data under json. From a raw JSON-RPC response the path is result.content[0].text, parsed, then .json. A chat client unwraps that for you and code talking to the endpoint directly does not.
hasdata_duckduckgo_serp_getSearchResults
Fetches a DuckDuckGo results page and returns it parsed.
| Parameter | Type | Notes |
|---|---|---|
q | string | The search term. Either q or nextPageToken has to be present |
nextPageToken | string | Cursor from pagination.nextPageToken in the previous response. Wins if you send both, and the q you sent alongside it is ignored without a warning |
kl | string | Region as <country>-<language>, 37 values from us-en and de-de to jp-jp and wt-wt for no region |
cc | string | Two-letter country, 36 values. An alternative to kl when paired with setLang |
setLang | string | Interface and result language, 33 values |
safeSearch | string | off, moderate or strict |
deviceType | string | desktop, mobile or tablet |
Send either
qornextPageToken. Sending neither returns 422 naming both fields, because the requirement is conditional and the schema cannot express it as a plain required list. Sending both is not an error either, the cursor wins and the query goes nowhere, so an agent that keepsqin the arguments while paging silently reads the wrong result set.
positioncounts inside the page it came from, not across the whole result set. Page two comes back with positions starting at 1 again, and page size is not fixed either, so pages of 10, 15 and 14 results all turn up. Absolute rank is therefore the number of organic results you have already collected plusposition, not anything you can derive from the page number. Build a rank dataset without that and every page contributes its own number one.
No reviews yet β be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/hasdata-duckduckgo)<a href="https://allmcps.com/mcp/hasdata-duckduckgo"><img src="https://allmcps.com/api/badge/hasdata-duckduckgo?style=directory" alt="HasData DuckDuckGo on AllMCPs" /></a>