web-docs-mcp
Click on "Install 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-mcpsearch for authentication configuration steps"
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
MCP server for searching web documentation via sitemap.xml
Index and search multiple web documentation sites using Model Context Protocol (MCP). Works with Claude Code, Cursor, Windsurf, Continue.dev, and Zed.
Features
πΊοΈ Sitemap-based indexing - Automatically discover pages via sitemap.xml
π Basic authentication support - Access password-protected documentation sites
π Vector search - Semantic search powered by Ollama embeddings
π Incremental sync - Only re-scrape changed pages based on lastmod dates
π― Smart content extraction - Automatically identifies main content area
π Fast setup - Auto-configure Claude Code with one command
Related MCP server: searxng-mcp
Quick Start
# Install globally
npm install -g @vdpeijl/web-docs-mcp
# Run interactive setup
web-docs-mcp init
# Sync documentation
web-docs-mcp sync
# Configure your MCP client
web-docs-mcp setup claude-codeHow It Works
Sitemap.xml β Web Scraper β Content Extraction β Text Chunking β Ollama Embeddings β SQLite + sqlite-vec
β
MCP Clients ββ MCP Server (stdio) ββ Vector Search ββ Ranked ResultsDiscovery: Fetches URLs from sitemap.xml (supports sitemap indexes)
Scraping: Downloads HTML pages (with optional basic auth)
Extraction: Identifies main content using common selectors (
<main>,<article>, etc.)Chunking: Splits text into ~500 token chunks with 50 token overlap
Embedding: Generates vector embeddings via Ollama (
nomic-embed-text)Indexing: Stores in SQLite with vector search (sqlite-vec)
Search: Semantic search across all indexed documentation
Requirements
Node.js 20+
Ollama with
nomic-embed-textmodel
Install Ollama from ollama.com, then:
ollama pull nomic-embed-textConfiguration
Configuration is stored in ~/.config/web-docs-mcp/config.json:
{
"ollama": {
"baseUrl": "http://localhost:11434",
"model": "nomic-embed-text"
},
"sync": {
"chunkSize": 500,
"chunkOverlap": 50
},
"requests": {
"delayMs": 100,
"timeout": 30000,
"userAgent": "web-docs-mcp/1.0"
},
"sources": [
{
"id": "myco-docs",
"name": "My Company Docs",
"baseUrl": "https://docs.myco.com",
"sitemapUrl": "https://docs.myco.com/sitemap.xml",
"enabled": true
}
]
}Adding Sources with Authentication
For password-protected documentation:
# Add source interactively
web-docs-mcp sources add
# Or via command line
web-docs-mcp sources add \
--id myco-internal \
--name "Internal Docs" \
--url https://internal.myco.com \
--sitemapUrl https://internal.myco.com/sitemap.xmlSet credentials via environment variables:
export DOCS_USERNAME="your-username"
export DOCS_PASSWORD="your-password"Or create a .env file in your working directory:
DOCS_USER=your-username
DOCS_PASSWORD=your-passwordAutomated Setup with .env
You can configure your entire source in a .env file for automated setup:
# Source configuration
DOCS_SOURCE_ID=myco-docs
DOCS_SOURCE_NAME=My Company Docs
DOCS_BASE_URL=https://docs.myco.com
DOCS_SITEMAP_URL=https://docs.myco.com/sitemap.xml
# Authentication (optional)
DOCS_USER=your-username
DOCS_PASSWORD=your-passwordWhen running web-docs-mcp init, it will automatically detect and use these values if present.
Configure in config.json:
{
"auth": {
"usernameEnvVar": "DOCS_USERNAME",
"passwordEnvVar": "DOCS_PASSWORD"
}
}CLI Commands
# Interactive setup wizard
web-docs-mcp init
# Sync all enabled sources
web-docs-mcp sync
# Manage sources
web-docs-mcp sources list
web-docs-mcp sources add
web-docs-mcp sources remove <id>
web-docs-mcp sources enable <id>
web-docs-mcp sources disable <id>
# Auto-configure MCP client
web-docs-mcp setup claude-code
# View statistics
web-docs-mcp stats
# Run diagnostics
web-docs-mcp doctor
# Start MCP server (for manual setup)
web-docs-mcp serve
# Uninstall
web-docs-mcp uninstall # Remove data and configs
web-docs-mcp uninstall --keep-data # Remove configs onlyMCP Tools
search_knowledge_base
Search web documentation with semantic similarity.
Parameters:
query(string, required) - Natural language search querysources(array, optional) - Filter by source IDslimit(number, optional) - Max results (default: 5, max: 20)
Example:
Search: "How do I configure authentication?"list_sources
List all configured documentation sources and sync status.
Returns: Source name, URL, sitemap, page count, chunk count, last synced date
Incremental Sync
The sync process is optimized for efficiency:
Sitemap Fetch: Downloads and parses sitemap.xml
Change Detection: Compares
<lastmod>dates with databaseSelective Scraping: Only fetches new or updated pages
Cleanup: Removes pages no longer in sitemap
If a page has no <lastmod> in the sitemap, it will be re-scraped on every sync (safer default when change detection isn't possible).
Smart Content Extraction
The scraper attempts to identify the main content area using these selectors (in order):
<main><article>[role="main"].content,.main-content,#content.documentation,.doc-content
Fallback: Removes <nav>, <header>, <footer>, <aside> and processes remaining content.
Data Storage
Config:
~/.config/web-docs-mcp/config.jsonDatabase:
~/.local/share/web-docs-mcp/kb.sqliteLogs:
~/.local/share/web-docs-mcp/logs/
MCP Client Setup
Claude Code (Automatic)
web-docs-mcp setup claude-codeThis runs:
claude mcp add --transport stdio web-docs -- bash -l -c "web-docs-mcp serve"The shell wrapper (bash -l -c) ensures compatibility with node version managers (fnm, nvm, volta, asdf).
Manual Setup
Add to your MCP client config:
{
"mcpServers": {
"web-docs": {
"command": "bash",
"args": ["-l", "-c", "web-docs-mcp serve"]
}
}
}Debugging
Enable debug logs:
DEBUG=web-docs-mcp:* web-docs-mcp syncAdvanced Usage
Multiple Documentation Sources
Index different sites independently:
web-docs-mcp sources add --id react --name "React Docs" \
--url https://react.dev --sitemapUrl https://react.dev/sitemap.xml
web-docs-mcp sources add --id vue --name "Vue Docs" \
--url https://vuejs.org --sitemapUrl https://vuejs.org/sitemap.xmlSearch specific sources:
Search React docs: How do I use hooks?
(MCP tool will filter by source: ["react"])Custom Chunk Size
Adjust for your embedding model:
{
"sync": {
"chunkSize": 750,
"chunkOverlap": 100
}
}Rate Limiting
Control request delays:
{
"requests": {
"delayMs": 500, // 500ms between requests
"timeout": 60000 // 60 second timeout
}
}Limitations
Requires sites to have sitemap.xml
Basic authentication only (no OAuth/SSO)
Single-threaded scraping (respects rate limits)
JavaScript-rendered content not supported (static HTML only)
Troubleshooting
"Ollama not found"
# Install Ollama from ollama.com, then:
ollama serve
ollama pull nomic-embed-text"Authentication failed"
Verify environment variables are set correctly
Check credentials work in browser
Ensure basic auth is used (not OAuth/SSO)
"No results found"
Run
web-docs-mcp statsto verify pages are indexedCheck if sync completed successfully
Try more specific search queries
"Sitemap not found"
Verify sitemap URL is correct (usually
/sitemap.xml)Check if site uses sitemap index (
sitemap_index.xml)Some sites use
/robots.txtto specify sitemap location
License
MIT
Contributing
Issues and PRs welcome at https://github.com/vdpeijl/web-docs-mcp
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/vdpeijl/web-docs-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server