Skip to main content
Glama
websearch-custom-serve

websearch-custom-serve

websearch-custom

A DuckDuckGo search provider for web-search-plus-mcp 5.1.6, and the websearch-custom-serve command that runs the server with that provider registered.

The provider has the id ddg. It needs no key and searches through ddgs text search. Everything else — the MCP tools web_search and web_extract, the keyed providers, routing, caching and cooldowns — is the server's own.

Install

The package is websearch-custom-provider. It pins web-search-plus-mcp==5.1.6 and ddgs==9.16.1. Install it from a tag of this repository:

uv tool install git+https://github.com/eoc-llm-tooling/websearch-custom@v0.1.1

or depend on it from a project, pinned to the tag:

[project]
dependencies = ["websearch-custom-provider==0.1.1"]

[tool.uv.sources]
websearch-custom-provider = { git = "https://github.com/eoc-llm-tooling/websearch-custom", tag = "v0.1.1" }

The repository carries a uv.lock; uv export --frozen --no-dev gives the locked requirements of a deployment.

Related MCP server: web-mcp-server

Run

websearch-custom-serve            # stdio MCP server, the server's default
websearch-custom-serve --help     # the server's own options

websearch-custom-serve takes the same arguments and reads the same environment as the server's web-search-plus-mcp serve. It speaks MCP over stdio and is meant to run behind a client or a proxy that starts it.

Variable

Value

Why

DDG_ALLOW_PUBLIC

1

the server enables a keyless provider only when its opt-in variable is set; ddg takes DDG_ALLOW_PUBLIC

TAVILY_API_KEY, EXA_API_KEY, SERPER_API_KEY

optional

the server's keyed providers, for web_extract and as further web_search providers

WEB_SEARCH_PLUS_CONFIG

path to a config.json

the server's configuration, including the routing order

ddg first, then the keyed providers, is the routing file

{"auto_routing": {"order": "custom", "provider_priority": ["ddg", "tavily", "exa", "serper"], "fallback_provider": "serper"}}

Behaviour

ddgs outcome

Provider result

results

one source per result with a URL: url, title, snippet

DDGSException("No results found.")

an empty result list; the server moves to the next provider

TimeoutException, RatelimitException, ConnectionError, TimeoutError

ProviderRequestError, transient set

any other exception

ProviderRequestError, transient unset

Every failure raised to the server is also written to stderr as one line, ddg: ddgs <exception type>: <message>; No results found. writes nothing. Searches use safesearch moderate. The design is in ARCHITECTURE.md.

Development

uv sync
uv run poe gate      # lint, format check, type check, offline tests, leak check

The tests run offline: ddgs is replaced by a double.

License

MIT, see LICENSE.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      A minimal, production-ready MCP server enabling LLMs to perform web searches via DuckDuckGo without API keys, supporting SSE streaming and LM Studio compatibility.
      1
      BSD 3-Clause
    • F
      license
      Not graded
      quality
      C
      maintenance
      MCP server that exposes web_search and web_fetch tools, allowing LLM applications to search the web via DuckDuckGo and fetch page content as cleaned markdown.
      1
      -
    • A
      license
      A
      quality
      D
      maintenance
      MCP server for DuckDuckGo web search, enabling AI agents to perform real-time text, news, and image searches without an API key.
      3
      MIT
    • F
      license
      Not graded
      quality
      D
      maintenance
      Enables an LLM to perform web searches through DuckDuckGo via a local MCP-style server and tool calls.
      1
      -