mcp-ddg-research
Prism Search is a self-hosted MCP server for multi-provider web search, optional provider-native AI answers/research, webpage extraction, vertical search, and cache management.
Search one provider, selected providers, all configured engines, auto fallback, or keyless fallback with
web_search.Control searches with domain allow/block/preference lists, result limits, search windows, SafeSearch, and time filters.
Optionally request provider-generated answers or multi-step research with
web_answerandweb_researchusing explicit cost consent.Search Wikipedia or Hacker News with
vertical_search.Fetch and extract text from one public HTTP(S) page with SSRF protections using
web_fetch.Use legacy DuckDuckGo search or DuckDuckGo deep search with concurrent page extraction.
Inspect, prune, or clear search/fetch caches with
cache_stats,cache_prune, andcache_clear.Return structured results with sources, provider attempts, cache status, and errors.
Provides tools to search DuckDuckGo and fetch webpages, with HTML fallback, caching, and text extraction.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mcp-ddg-research search for latest AI research papers"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Prism Search
One query. Multiple search engines. One MCP interface.
Prism Search is a self-hosted Model Context Protocol (MCP) server for web search, focused research and webpage extraction. It combines independent search engines behind a single interface, with no search API key required to get started. Use one engine, a selected group, every configured engine in parallel, or automatic fallback.
The server returns source data rather than generated answers. Search results include titles, URLs and snippets; webpage fetching returns extracted text. No model provider or LLM subscription is required.
Quick start · Search modes · Providers · Tools · Server defaults · Web dashboard · Agent setup prompt · Benchmarks · Documentation
Why Prism Search?
Keyless first: search immediately using public endpoints, independent indexes and specialized sources.
One interface, five modes: automatic fallback, keyless-only fallback, single-provider search, full parallel search and explicit multi-provider selection.
Optional APIs: enable authenticated search providers or a self-hosted SearXNG instance only when needed.
Predictable results: deterministic ranking, URL deduplication, domain controls, provider diagnostics and structured MCP responses.
Efficient requests: TTL caching, provider timeouts and process-local health tracking.
Self-hosted by design: Python, Docker, stdio or Streamable HTTP; authenticated HTTP and SSRF-protected webpage fetching.
flowchart LR
C["MCP client"] --> P["Prism Search"]
P --> S["Search orchestrator"]
S --> K["Keyless engines"]
S --> A["Optional authenticated APIs"]
S --> X["Self-hosted SearXNG"]
P --> V["Vertical sources"]
P --> F["Safe webpage fetch"]
S <--> T["TTL cache"]
F <--> TRelated MCP server: local-websearch-mcp
Quick start
1. Get the repository
git clone https://github.com/isyuricunha/mcp-prism-search.git
cd mcp-prism-searchChoose stdio for a local MCP client or Streamable HTTP for a shared, long-running service. Both need outbound internet access to query public search providers.
2. Local MCP over stdio (recommended)
Requires Python 3.12 or newer. On Linux/macOS:
python3 -m venv .venv
.venv/bin/python -m pip install -r requirements-lock.txt
.venv/bin/python -m pip install --no-deps -e .Use a compatible MCP client's local server configuration:
{
"mcpServers": {
"prism-search": {
"command": "/absolute/path/to/mcp-prism-search/.venv/bin/python",
"args": ["-m", "mcp_prism_search.server"],
"env": {
"MCP_TRANSPORT": "stdio"
}
}
}
}Replace the path with the real absolute path. On Windows use the virtual
environment's Scripts/python.exe. The config format varies by client:
consult its local MCP documentation. The client starts the subprocess;
do not launch an additional copy manually.
3. Docker Compose over Streamable HTTP
Requires Docker Engine and the Compose plugin. Prepare the persistent cache directory and a private token file outside the repository:
mkdir -p "$HOME/docker/docker-data/mcp-prism-search"
sudo chown 10001:10001 "$HOME/docker/docker-data/mcp-prism-search"
mkdir -p "$HOME/.config/mcp-prism-search"
(
umask 077
set -o noclobber
printf 'MCP_AUTH_TOKEN=%s\n' "$(openssl rand -hex 32)" \
> "$HOME/.config/mcp-prism-search/server.env"
)Generate the token file only once. If it already exists, reuse it. The image runs as UID/GID 10001; adjust ownership only on the intended data directory (use the appropriate UID mapping for rootless Docker).
The checked-in Compose file publishes the service on loopback port 49317 and supplies matching Host allowlist entries, including the port. Keep the default Origin restrictions unless your client needs an additional specific Origin. Then start and check liveness:
docker compose --env-file "$HOME/.config/mcp-prism-search/server.env" up -d --build
curl --fail --silent --show-error http://127.0.0.1:49317/healthExpected liveness response: {"ok":true}. It does not prove the MCP
handshake or provider connectivity.
Connect a Streamable HTTP client to:
Endpoint:
http://127.0.0.1:49317/mcpHeader:
Authorization: Bearer <your-private-token>
For example, OpenCode uses a remote MCP entry:
{
"mcp": {
"prism-search": {
"type": "remote",
"url": "http://127.0.0.1:49317/mcp",
"enabled": true,
"oauth": false,
"headers": {
"Authorization": "Bearer <your-private-token>"
}
}
}
}Replace the placeholder privately with your saved token or use your client's secret reference mechanism. Do not commit credentials. Keep HTTP bound to loopback by default; for remote access, use TLS and explicit Host/Origin allowlists. See deployment and operations.
Configure once, search simply
The smallest MCP call is web_search({"query":"your question"}).
All clients inherit server defaults unless they explicitly override them.
Set MCP_DEFAULT_SEARCH_MODE=keyless for keyless fallback, or enable
provider-generated answers using MCP_AI_SEARCH_ENABLED=true and
MCP_AI_SEARCH_PROVIDERS=tavily,exa after configuring those API keys and
accepting potential charges. See server defaults for
the full reference. Existing persisted settings also work without WebUI.
Optional web dashboard
A lightweight Astro dashboard using YuTheme (Dark (charcoal/teal) by default, White optional). It is disabled by default and is never required by an MCP client. The production container serves static assets with Python; Node.js is used only during the image build.
Enable it with the optional Compose overlay. Add a private
MCP_WEBUI_PASSWORD (at least 12 characters) to your existing protected
server environment file, alongside the existing MCP token. Then run:
docker compose --env-file "$HOME/.config/mcp-prism-search/server.env" \
-f docker-compose.yml -f docker-compose.webui.yml up -d --buildOpen http://127.0.0.1:49318 and sign in with the dashboard password.
The overlay sets MCP_WEBUI_ENABLED=true; bare Python HTTP deployments
can set that variable directly after building the static frontend.
Manage providers and API keys with official provider links, test single or parallel searches and automatic fallback, inspect activity and cache usage, configure inherited server defaults, and copy client connection examples. The dashboard reports the installed server, SDK and protocol versions from the live backend. Panel credentials and settings are shared with the running HTTP MCP process. Environment values take precedence. The dashboard password is separate from the MCP bearer token.
Read the dashboard guide for configuration, local builds, backup, remote access and security details.
Search modes
Call web_search with JSON tool arguments, not a raw HTTP POST to an
arbitrary endpoint.
Mode | Arguments | Best for |
Inherit | Omit provider and providers | Use server defaults (built-in: auto) |
Auto |
| First usable results; authorized AI engines prioritized when eligible |
Keyless |
| Automatic fallback across keyless general engines only |
Single |
| One exact engine; no fallback |
Selected |
| Parallel search across a specific set |
All |
| Parallel search across all enabled general engines |
{
"query": "Python asyncio TaskGroup documentation",
"provider": "auto",
"max_results": 5
}{
"query": "Docker Compose startup order",
"provider": "keenable",
"max_results": 5
}{
"query": "Model Context Protocol transport specification",
"providers": ["keenable", "freeserp", "youcom_keyless"],
"max_results": 10
}{
"query": "Linux kernel release notes",
"provider": "all",
"max_results": 10
}Use explicit selection when you want control over sources or spending.
Both auto and all may use authenticated APIs if configured.
all searches general engines, not Wikipedia or Hacker News. Unknown
or unavailable provider names return errors rather than silently falling back.
Filters and output
{
"query": "Python asyncio TaskGroup documentation",
"providers": ["keenable", "freeserp"],
"allowed_domains": ["python.org"],
"preferred_domains": ["docs.python.org"],
"max_results": 5,
"search_window": 20
}Argument | Meaning |
| Final result limit, 1–30 |
| Requested candidate window, 1–100; upstream limits still apply |
| Keep only matching domains and subdomains |
| Exclude matching domains and subdomains |
| Move preferred sources earlier |
| day, week, month or year, where supported upstream |
| off, moderate or strict, where supported upstream |
Results contain query, provider, results (title, URL, snippet),
cached, error, provider_attempts, and optional answers / answer_attempts. Auto reports the successful
provider; combined searches report selected or all. Individual
provider failures can coexist with successful combined results. Total
failure surfaces as an MCP tool error. Recency and SafeSearch support varies
by engine; these are not guaranteed filters on unsupported engines.
Providers
Keyless web search
No provider credentials are required. Public endpoints may impose quotas, throttle or block requests, especially on shared IPs.
Engine | Provider ID | Role |
| Preferred general search with extracted snippets | |
| Independent page-level index | |
| Lightweight XML search with direct links | |
| Complementary web search through DDGS | |
| Independent community index, v2 API | |
| Official public MCP search | |
| Last-resort HTML search; IP-dependent |
Optional authenticated providers
Enable only the services you want by configuring their environment variables. Free allowances and billing terms are controlled by the upstream providers and can change; a free API key is not a guarantee of unlimited free usage.
Engine | Provider ID | Environment variable |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
For stdio, inject variables into the subprocess environment through your client. For Compose, TinyFish is already forwarded from the host or interpolation file; explicitly add any other desired variables to the service environment. Never put actual keys into tracked YAML or JSON. TinySearch supports free allowances, but Wallet spending may be enabled upstream. Review and disable paid consumption if required.
Self-hosted and specialized search
Source | Provider ID | Activation |
| Set | |
| Keyless, via | |
| Keyless, via |
See the provider policy for upstream contracts, quotas, fallback ordering and migration notes.
Tools
Tool | Purpose |
| General search across one, selected or all engines; optional authorized native AI answers |
| Optional native AI answer with sources (configured key + explicit cost consent) |
| Optional provider-native multi-step synthesis (configured key + explicit cost consent) |
| Wikipedia or Hacker News |
| Fetch and extract a single public HTTP(S) page |
| Legacy DuckDuckGo search |
| Legacy DuckDuckGo search and concurrent page extraction |
| Inspect search/fetch cache usage |
| Prune cache; supports dry-run |
| Clear cache namespaces with explicit confirmation |
Tools expose MCP schemas and structured responses. For deeper research,
prefer web_search with selected engines, then use web_fetch on
relevant source URLs. The legacy deep-search tool does not use the
multi-provider aggregator.
Agent setup prompt
Copy the entire block below into a coding agent or an MCP-capable client with access to the target installation environment.
Install, connect and validate Prism Search from:
https://github.com/isyuricunha/mcp-prism-search
Goal: configure a working MCP search server using only keyless providers.
Do not request, register or configure provider API keys, paid services,
or third-party accounts. Do not expose services publicly.
1. Inspect the target environment and existing installations first.
Read the repository README, docs/providers.md, docs/deployment.md and
docs/development.md. Check the official documentation of the current
MCP client and installed Python/Docker versions. Reuse an existing
checkout when safe; do not overwrite unrelated files or settings.
2. Install from the default branch, using Python 3.12+ and the committed
dependency lock. For a local client, prefer stdio with the absolute
virtualenv Python path and module mcp_prism_search.server.
For a shared service, use Compose with loopback binding, a private
random bearer token, explicit permitted Host/Origin values and the
documented writable cache directory. Resolve PRISM_VERSION from Git
using Hatch VCS as documented before building. Store credentials outside Git.
Preserve existing credentials, services and client configurations.
3. Register the server as prism-search using the client's supported MCP
format. Do not inject any optional provider credentials or SearXNG URL.
Inspect existing variables privately; if a paid provider is already
configured, do not remove it or use it. Connect using the actual MCP
client, negotiate the protocol and verify the tool list contains
web_search, vertical_search, web_fetch and cache_stats.
4. Run exactly three web_search calls through MCP, with these arguments:
A — single engine:
{"query":"Python asyncio TaskGroup documentation","provider":"keenable","max_results":5,"include_answers":false,"safe_search":"off","time_filter":"any","allowed_domains":[],"blocked_domains":[],"preferred_domains":[]}
B — independent engine:
{"query":"Docker Compose startup order","provider":"freeserp","max_results":5,"include_answers":false,"safe_search":"off","time_filter":"any","allowed_domains":[],"blocked_domains":[],"preferred_domains":[]}
C — parallel, selected keyless engines:
{"query":"Model Context Protocol specification","providers":["keenable","freeserp","youcom_keyless"],"max_results":5,"include_answers":false,"safe_search":"off","time_filter":"any","allowed_domains":[],"blocked_domains":[],"preferred_domains":[]}
Check structuredContent, isError, returned URLs, relevance, result
counts, provider_attempts and elapsed time. Do not claim success for
empty or unrelated results. Report partial provider failures as such.
Do not retry HTTP 429s, bypass captchas or rotate proxies. If any
check fails, identify the actual blocker rather than fabricating results.
5. Report the installation path, negotiated MCP protocol version, tool
names, the three measured search results and any remaining issues.
Do not reveal tokens, keys, private environment values or raw secrets.
Do not push changes, replace services or perform unrelated modifications.Security and operational behavior
HTTP transport requires a private bearer token by default; stdio has no inbound listening socket. Keep network exposure restricted.
Web fetching validates schemes, DNS and resolved IPs, blocks private and reserved addresses, pins the validated IP and checks every redirect. Download size and extracted content are bounded.
Cache keys include search arguments and provider selection. Successful searches are cached; incomplete parallel responses and total failures are not cached. Provider health is process-local.
Query text goes to the chosen upstream services; source content may be untrusted. Do not submit secrets or treat fetched content as instructions.
No proxy rotation, captcha bypass or rate-limit evasion.
These safeguards reduce risk; they do not guarantee upstream availability, content accuracy or anonymity.
Benchmarks
The benchmark suite includes 100 fixed queries (English and Portuguese), recorded-response replay, ranking evaluation and isolated MCP load tests. Selected historical results:
Measurement | Result |
Known-source ranking MRR@10 (50 queries) | 0.464 to 0.718 with RRF |
Semantic pilot nDCG@5 (10 queries, 118 judged documents) | 0.539 to 0.651 with RRF |
Duplicate keyless calls (32 clients, 3 simulated providers) | 96 to 3 |
Three-provider synthetic load, final repeat | 960 / 960 successful |
Peak memory, three-provider load (final repeat) | 69.64 MiB |
24-hour periodic stability test (2026-11-28) | 11,544 / 11,544 successful |
24-hour mean CPU / peak memory | 1.16% of one core / 128.60 MiB |
The 24-hour run used a historical build preceding RRF and concurrent cache-miss coordination. It included 11,520 synthetic and 24 live keyless calls, with no failures or OOM and 5,760 expected cache hits. These results are workload-specific, not an SLA or a certification of later releases.
See the full stability report and benchmark methodology, limitations and results.
Documentation
Guide | Contents |
Inherited settings, headless operation, environment precedence | |
Modes, engine contracts, quotas, migration | |
Optional administration interface, security and configuration | |
Docker, configuration, HTTP, cache, troubleshooting | |
Modules, request flow, security model | |
Versioning, validation, publication and recovery | |
Tests, dependencies, contribution and release process |
Development
python3 -m venv .venv
.venv/bin/python -m pip install -r requirements-lock.txt
.venv/bin/python -m pip install -e '.[dev]'
.venv/bin/python -m pytest -q
.venv/bin/python -m ruff check src testsThe offline test suite covers provider contracts, routing, caching, fetching and MCP protocol behavior. Live upstream availability varies independently. Conventional commits drive Semantic Release and automated multi-architecture Docker builds. See GitHub releases for published versions.
License
Optional provider-native AI
Use web_answer for provider-generated answers and web_research for multi-step synthesis. Both standalone tools require a configured supported API key and explicit allow_cost: true. Normal search is retrieval-only by default; enable AI-enhanced search globally and authorize individual providers through the panel or environment to include provider-generated answers in web_search. Set include_answers: false for retrieval only. See native AI tools and pricing.
Release versioning
Releases are derived from Git tags using Hatch VCS. GitHub Actions calculates the next version with Python Semantic Release, validates the exact commit, creates a version tag without a release commit, publishes both architecture images, and promotes the verified digest. Python package metadata is the runtime version source, including in the WebUI. See CI/CD and release recovery.
For a local Git-based Docker build, resolve the source version explicitly:
python -m pip install hatchling hatch-vcs
PRISM_VERSION="$(python -m hatchling version)"
docker build --build-arg "PRISM_VERSION=$PRISM_VERSION" -t mcp-prism-search:local .
# Or export PRISM_VERSION before docker compose build.A Docker source build without Git metadata or a supplied version reports
0.0.0+unknown rather than pretending to be a published release.
Release notes and the full generated changelog are available in GitHub Releases.
TinyFish TinyAnswer and TinyResearch are available through the explicit native tools; they are not part of automatic AI-enhanced search. Search is free within published limits; verify synthesis entitlement and charges before use. See native capabilities.
Operational logs
Structured stderr events and the optional dashboard Logs page provide sanitized operational history, correlation, filters and JSON export. See observability and optional OpenTelemetry.
Cache entries are bounded to 8 MiB each; oversized replacements are not published. Direct HTTP provider responses are capped at 8 MiB before decoding; native SSE streams are capped at 32 MiB total and 1,000,000 characters per event. Fixed provider endpoints do not follow redirects or accept compressed bodies. Search results return at most 500 title characters and 4,000 snippet characters per document. These limits do not replace provider quotas or billing policies. If an authorized combined search/synthesis fails, Prism does not retry the same paid request as ordinary retrieval; automatic mode can try another available provider. Check provider usage before retrying paid operations.
Offline ranking quality regressions: run python -m pytest tests/test_retrieval_quality.py. These deterministic fixtures complement, but do not replace, live provider relevance evaluation.
Available Tools
10 toolscache_clearADestructiveIdempotent
Clear one cache namespace, or all namespaces, when confirm is true.
Inputs: confirm (required), namespace (required). Returns: object
cache_pruneADestructiveIdempotent
Prune expired entries, stale temporary files and oversized entries.
Full pruning also enforces configured age and size limits. Expired-only pruning preserves fresh entries. Dry-run never deletes files.
Inputs: dry_run, expired_only. Returns: object
cache_statsARead-only
Return cache file counts and byte totals for each cache namespace.
Inputs: no named parameters. Returns: object
ddg_deep_searchCRead-only
Legacy DuckDuckGo search plus parallel webpage extraction. No AI synthesis.
Inputs: query (required), max_pages, max_results, safe_search, +7 more. Returns: pages, query, cached, sources, +3 more
ddg_searchARead-only
Legacy DuckDuckGo search. Prefer web_search unless DuckDuckGo-specific behavior is needed.
Inputs: query (required), max_results, safe_search, time_filter, +4 more. Returns: error, query, cached, answers, +4 more
vertical_searchBRead-only
Search one keyless vertical source (wikipedia, hackernews).
Inputs: query (required), source, max_results. Returns: error, query, cached, answers, +4 more
web_answerA
Get a provider-generated answer and sources, not independent verification.
Omit provider to use the configured answer default. Requires a configured key and explicit allow_cost=true. TinyAnswer supports at most 2000 characters and requires account entitlement; it may consume credits. Use web_search instead for ordinary retrieval or keyless searches. No fallback.
Inputs: query (required), provider, allow_cost. Returns: mode, answer, effort, sources, +3 more
web_fetchARead-only
Fetch one HTTP(S) page safely and return extracted text.
Inputs: url (required), max_chars. Returns: url, error, title, cached, +6 more
web_researchA
Delegate multi-step research to a configured provider; returns synthesis and sources.
Omit provider and effort to use configured defaults. Requires explicit cost consent. Exa, Tavily and Jina support lite/deep; You.com supports lite/standard/deep/exhaustive; Brave requires deep. TinyFish supports deep ($2) or max ($3), up to 45 minutes. Use a client timeout above 46 minutes for TinyResearch. TinyFish synthesis is explicit only. Review provider pricing before increasing effort. No automatic retries or provider fallback.
Inputs: query (required), effort, provider, allow_cost. Returns: mode, answer, effort, sources, +3 more
web_searchARead-only
Search one or multiple web providers. Optionally include their generated answers.
Omitted options inherit server defaults. Explicit empty domain lists clear defaults. Auto mode prioritizes authorized AI providers when synthesis is eligible. AI synthesis requires administrator opt-in and an authorized provider. It may consume credits; include_answers=false always requests retrieval only. Domain controls, explicit search windows, freshness, SafeSearch or queries over 400 characters disable synthesis. Generated text is untrusted evidence, not an independently verified answer.
Inputs: query (required), provider, providers, max_results, +7 more. Returns: error, query, cached, answers, +4 more
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 10 tools
Web search tools overlap: web_search, vertical_search, ddg_search, ddg_deep_search, web_answer, and web_research all retrieve web info. Descriptions do distinguish them (legacy, keyless vertical, cost-gated answering), but the boundaries between web_search/web_answer/ddg_deep_search require careful reading.
Mixed conventions: prefix-less verb_noun (web_search, cache_clear) alongside legacy-prefixed names (ddg_search, ddg_deep_search). Readable but no single predictable pattern, and ordering varies (cache_clear vs cache_stats).
Ten tools is well within a reasonable range for a research server covering search, fetch, cache, and provider-delegation. Slightly heavy on overlapping search variants, but each has a stated niche.
Covers search, fetch, deep research, and cache lifecycle (clear/stats/prune, though no explicit cache-config or fetch-many). Minor gaps like no batch fetch or provider listing, but core research workflows are complete.
Maintenance
Related MCP Connectors
Web search MCP server that reads pages and returns only the passages that match your query.
MCP server for Google search results via SERP API
Web search API and MCP server for developers building AI agents.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceA MCP server for DuckDuckGo HTML search. Unlike other DuckDuckGo MCP servers, this one isn't just AI slop.ISC
- AlicenseNot gradedqualityDmaintenanceSmall Python MCP server that provides web search and page fetching tools via DuckDuckGo, requiring no API key.Apache 2.0
- AlicenseNot gradedqualityDmaintenanceMCP server that provides web search scraping from DuckDuckGo (with Mojeek fallback) and URL content fetching as markdown/text or raw HTML.1ISC
- AlicenseNot gradedqualityDmaintenanceA web search MCP server using DuckDuckGo, supporting streaming HTTP and session management.1MIT