mcpField
P
privatesearch

privatesearch

Local
github.com/CloudCorpRecordsSearch0Updated 2w ago

About privatesearch

privatesearch is a CLI and MCP server for web search and readable page fetching, aimed at agents and command-line users. It uses DuckDuckGo’s public HTML endpoint without requiring an account or API key.

Key features

  1. 01DuckDuckGo web search
  2. 02Search results with titles, URLs, and excerpts
  3. 03Readable page text extraction
  4. 04CLI and stdio MCP server

Use cases

  1. 01Find web sources without an API key
  2. 02Fetch an article as plain readable text

MCP support

Exposes `search` and `fetch_content` tools to MCP clients over stdio. Search returns result titles, destination URLs, and excerpts; fetching returns cleaned page text.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

mcp.json · Universal config
{
"mcpServers": {
"cloudcorprecords-privatesearch": {
"command": "npx",
"args": [
"-y",
"@reneturcios/privatesearch"
]
}
}
}
Run commandnpx -y @reneturcios/privatesearch

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
npm@reneturcios/privatesearch0.1.0
ocighcr.io/cloudcorprecords/privatesearch:0.1.0

Tools

2

Saved tool list · updated 2w ago

ParameterTypeRequiredDescription
querystringYesThe search query text to submit to DuckDuckGo.
regionstringNoRegion code used to localize the search results.
max_resultsintegerNoMaximum number of search results to return.

Details

From the project README

privatesearch

privatesearch looks things up on the web without an account, an API key, or a search subscription. It asks DuckDuckGo's public HTML endpoint a question and hands back the titles, addresses, and excerpts of what came up, and it can also open a page and return the words on it as plain readable text. It works from the command line or as an MCP server for agents.

Install

npx @reneturcios/privatesearch search "trail running shoes"

Or run the container image:

docker run -i ghcr.io/cloudcorprecords/privatesearch

The container defaults to the MCP server (see below). Pass CLI arguments to use it as a CLI instead.

CLI

# Search the web; results print as title / URL / snippet blocks
privatesearch search "composting basics"
privatesearch search "composting basics" --max-results 5 --region uk-en
privatesearch search "composting basics" --json

# Fetch a page as readable text (markup, scripts, and styles removed)
privatesearch fetch-content https://example.com/some/article

privatesearch --version

Exit codes: 0 on success, 1 when a search or fetch fails (the error names the problem), 2 for usage errors.

MCP server

One bin serves both faces. The mcp subcommand starts a stdio MCP server:

npx -y @reneturcios/privatesearch mcp

MCP client configuration:

{
  "mcpServers": {
    "privatesearch": {
      "command": "npx",
      "args": ["-y", "@reneturcios/privatesearch", "mcp"]
    }
  }
}
Tools
ToolInputWhat it returns
searchquery (string, required), max_results (integer, optional), region (string, optional, a DuckDuckGo region code such as us-en)The matching results: for each one a title, the destination URL (redirect wrappers are unwrapped), and a snippet excerpt.
fetch_contenturl (string, required)The page's readable text: script, style, and head material removed, tags stripped, entities decoded.

Search reads the result blocks of the HTML endpoint's response page; when the endpoint returns no blocks the result list is empty rather than an error. Fetch failures (non-2xx responses, unreachable hosts) are reported as tool errors.

Development

npm install
npm run build   # tsc -> dist/
npm test        # node test runner over test/*.test.ts, no network (fake fetch fixtures)
npm run dev     # run the CLI from source via tsx

License

MIT — see LICENSE.

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.