web-docs-mcp
Provides free web search via DuckDuckGo, returning titles, URLs, and snippets.
Fetches README and documentation files from GitHub repositories.
Automatically fetches README and documentation for npm packages.
Automatically fetches README and documentation for PyPI packages.
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., "@web-docs-mcp Fetch the README for the 'requests' Python library"
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.
web-docs-mcp
Local MCP server for Kilo Code / Cline / Claude Desktop β free web search + library docs fetcher with local-first caching.
Features
π web_search β Free DuckDuckGo HTML search (no API key required)
π fetch_url β Fetch any URL and convert to clean markdown (cached locally)
π lib_docs β Auto-fetch README/docs from npm, PyPI, crates.io, Go, or GitHub
π search_docs β Language & API documentation search biased to official docs (MDN, docs.python.org, etc.)
π list_docs β Browse and search your local
docs/folder first (local-first approach)
Related MCP server: Basic MCP Tools
Installation
npm install
npm run buildUsage
As MCP Server
Add to your MCP client configuration (e.g., claude_desktop_config.json):
{
"mcpServers": {
"web-docs-mcp": {
"command": "node",
"args": ["/path/to/web-docs-mcp/build/index.js"],
"env": {
"DOCS_DIR": "/path/to/your/docs",
"CACHE_TTL_HOURS": "168",
"DEFAULT_SAVE_TO_DOCS": "true"
}
}
}
}Direct Execution
# Development mode
npm run dev
# Production mode
npm run start
# Build
npm run build
# Clean build artifacts
npm run cleanConfiguration
All settings are configurable via environment variables:
Variable | Default | Description |
|
| Directory where fetched markdown docs are saved |
|
| Directory for TTL cache (raw HTML + fetched markdown) |
|
| Cache time-to-live in hours |
|
| HTTP timeout per request in milliseconds |
| Chrome-like UA | User-Agent sent to upstream servers |
|
| Default behavior for saving docs to |
|
| Disable caching (useful for debugging) |
| none | Optional GitHub token to lift rate limits |
Tools
web_search
Free web search via DuckDuckGo HTML. Returns a list of {title, url, snippet}.
{
query: string, // Search query
limit?: number // Number of results (default: 8, max: 20)
}fetch_url
Fetch a single URL and return clean markdown. Handles HTML (via turndown+GFM), JSON (pretty-printed), and plain text.
{
url: string, // URL to fetch
save?: boolean, // Save to docs/ folder (default: true)
subdir?: string // Subdirectory under docs/ (optional)
}lib_docs
Fetch README/docs for a library by name. Tries npm β PyPI β crates.io β Go β GitHub automatically.
{
name: string, // Library name (e.g., "react", "numpy", "serde", "owner/repo")
save?: boolean, // Save to docs/libraries/ (default: true)
subdir?: string // Custom subdirectory (optional)
}search_docs
Language & API documentation search. Biases results to official docs sites. LOCAL-FIRST: searches your docs/ folder first.
{
query: string, // Search query
language?: string, // Programming language (e.g., "python", "rust", "go")
fetch_top?: boolean, // Fetch full markdown of top result (default: false)
save?: boolean, // Save fetched content (default: true)
subdir?: string // Subdirectory under docs/api/ (optional)
}list_docs
Browse and search the local docs/ folder. Three modes:
No args = list all saved docs
{ query }= keyword search across docs/{ path }= read full body of a specific doc by relative path or slug
{
query?: string, // Keyword search (optional)
path?: string // Relative path to specific doc (optional)
}Directory Structure
web-docs-mcp/
βββ src/
β βββ index.ts # Main entry point
β βββ config.ts # Configuration & env vars
β βββ lib/ # Core utilities
β β βββ anubis.ts # Anubis PoW solver (anti-bot bypass)
β β βββ cache.ts # Local caching logic
β β βββ ddg.ts # DuckDuckGo search
β β βββ fetcher.ts # HTTP fetching
β β βββ html-to-md.ts # HTML to markdown conversion
β β βββ ...
β βββ tools/ # MCP tool implementations
β βββ web_search.ts
β βββ fetch_url.ts
β βββ lib_docs.ts
β βββ search_docs.ts
β βββ list_docs.ts
βββ docs/ # Saved documentation (created on demand)
β βββ libraries/ # Library READMEs
β βββ api/ # API documentation
β βββ guides/ # Tutorials & how-tos
β βββ ...
βββ .cache/ # TTL cache (auto-managed)
βββ build/ # Compiled JavaScript
βββ package.jsonSupported Ecosystems
npm β JavaScript/TypeScript packages
PyPI β Python packages
crates.io β Rust crates
pkg.go.dev β Go modules
GitHub β Any repository (owner/repo format)
Local-First Approach
This server implements a local-first strategy:
All fetched content is cached with configurable TTL
search_docschecks your localdocs/folder before going to the webSubsequent calls return cached results in <5ms instead of re-fetching
Perfect for offline work or rate-limited environments
Requirements
Node.js >= 18.17
npm or yarn
License
MIT
Contributing
Fork the repository
Create a feature branch (
git checkout -b feature/amazing-feature)Commit your changes (
git commit -m 'Add amazing feature')Push to the branch (
git push origin feature/amazing-feature)Open a Pull Request
Troubleshooting
Empty search results from DuckDuckGo
The User-Agent might be blocked. Try setting a custom one:
export USER_AGENT="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36"Rate limiting on GitHub
Add a GitHub token to lift the 60 req/hour anonymous limit:
export GITHUB_TOKEN=your_token_hereCache issues
To disable cache temporarily:
export DISABLE_CACHE=trueOr clean the cache:
npm run cleanAvailable Tools
5 toolsfetch_urlA
Fetch a single URL and return clean markdown. Handles HTML (via turndown+GFM), JSON (pretty-printed), and plain text. Cached locally. Optionally saves to docs/.md with YAML frontmatter (source URL, fetch date, content type).
Inputs: url (required), name, save, subdir, +2 more.
lib_docsA
Fetch README/docs for a library by name. Tries npm β PyPI β crates.io β Go β GitHub automatically. Accepts react, numpy, serde, owner/repo, etc. Optionally saves to docs/libraries/.md.
Inputs: name (required), save, refresh, version, +1 more.
list_docsA
Browse and search the local docs/ folder. Three modes: (1) no args = list all saved docs, (2) { query } = keyword search across docs/, (3) { path } = read the full body of a specific doc by relative path or slug. Use this BEFORE going to the web β your project may already have the docs you need.
Inputs: path, limit, query, subdir.
search_docsA
Language & API documentation search. Biases DuckDuckGo results to official docs sites (MDN, docs.python.org, pkg.go.dev, doc.rust-lang.org, etc.). Set fetch_top=true to retrieve the full markdown of the top hit instead of just the result list. LOCAL-FIRST: searches your docs/ folder first; only falls back to the web if no local match.
Inputs: query (required), save, target, fetch_top, +2 more.
web_searchA
Free web search via DuckDuckGo HTML (no API key, no per-query cost). Returns a list of {title, url, snippet}. Pass any URL to fetch_url for full content.
Inputs: query (required), limit.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogβ¦
TDQS
Scored across 5 tools
Most tools have clear boundaries: fetch_url retrieves a specific URL, lib_docs fetches library docs by name, list_docs works with local files. The main overlap is between web_search and search_docs, both performing web searches, though search_docs is specifically biased to official documentation and is local-first, which distinguishes it. Descriptions are detailed enough to disambiguate in practice.
All names use lowercase snake_case with an underscore, and most follow a verb_noun pattern (fetch_url, search_docs, list_docs). However, web_search is noun_verb order and lib_docs is noun_noun, which are minor deviations from the dominant pattern. Overall the style is consistent and readable.
Five tools is a well-scoped size for a documentation reference server. Each tool serves a clear function: web search, URL fetching, library-specific fetching, docs search, and local docs browsing. This is within the ideal 3-15 range and there is no bloat.
The tool set covers the full workflow for web documentation research: searching the web, fetching pages, retrieving library docs, searching with docs bias, and managing local saved docs. The optional saving via fetch_url and lib_docs, plus list_docs for browsing, avoids dead ends. No critical gaps are evident for the documented purpose.
Related MCP Connectors
Web search API and MCP server for developers building AI agents.
Docs: https://docs.keenable.ai/mcp-server Keenable is a free, remote MCP server that gives agents access to the web index. Search the web with ranked results and date/site filters, then fetch any indexed page as clean markdown. Works out of the box with no account or API key.
One MCP server for all web data. Scrape, search, crawl, and AI research in one install.
Free web search for AI agents. No API key required. Hosted MCP in active development.
Related MCP Servers
- AlicenseAqualityAmaintenanceA local-first, no-API-key MCP server that enables LLMs to search the web, fetch pages, and read documents using multiple engines and smart fallbacks.611186MIT
- FlicenseNot gradedqualityBmaintenanceA self-hosted MCP server providing private web search, web page fetching, and current date/time tools, powered by a bundled SearXNG instance for API-key-free local search.2-
- AlicenseNot gradedqualityDmaintenanceA fully local MCP server that provides web search via self-hosted SearXNG and page-to-markdown conversion (static and JS-rendered), all aggregated behind a single endpoint for use with AI assistants.MIT
- AlicenseNot gradedqualityFmaintenanceMCP server enabling local-first web search, fetch, extract, and caching with citeable excerpts, no API key required. Supports research workflows for agents and apps.67 npm1MIT