akuttruff/minimal-mcp-web-search
Minimal MCP web search server in TypeScript, built with OWASP LLM security as a first priority
Platform-specific configuration:
{
"mcpServers": {
"minimal-mcp-web-search": {
"command": "npx",
"args": [
"-y",
"minimal-mcp-web-search"
]
}
}
}Add the config above to .claude/settings.json under the mcpServers key.
An exercise in building an MCP (Model Context Protocol) web search server in TypeScript with OWASP security for LLM applications as a first priority. Gives local LLMs web access through two tools — web_search and fetch_page — using DuckDuckGo for search. Built for LM Studio, no API keys required.
`web_search` — Searches the web via DuckDuckGo HTML and returns the top 5 results with titles, URLs, and snippets.
`fetch_page` — Fetches a URL and returns its content as sanitized plain text. Supports HTTP/HTTPS, enforces a 10-second timeout, and caps responses at 10,000 characters.
One runtime dependency: @modelcontextprotocol/sdk. No API keys, no zod, no heavyweight frameworks.
npm install
npm run build{
"mcpServers": {
"web-search": {
"command": "node",
"args": ["/absolute/path/to/dist/index.js"]
}
}
}mcp/web-search in the Integrations panel.echo '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"test","version":"1.0.0"}}}
{"jsonrpc":"2.0","method":"notifications/initialized"}
{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"web_search","arguments":{"query":"hello world"}}}' | node dist/index.jsThis server was built with the [OWASP Top 1
Loading reviews...