docs-scraper

docs-scraper

Enables scraping and searching documentation websites using semantic or keyword search, with support for multiple deployment modes.

Category
Visit Server

README

MCP Documentation Scraper Template

A complete Python template for building Model Context Protocol (MCP) servers with documentation scraping, vector search, and flexible deployment options.

Features

  • πŸ” Dual Search Modes: Semantic search (ML-powered) or keyword search (lightweight)
  • πŸ€– Multi-Provider Embeddings: HuggingFace (local), OpenAI, or Azure OpenAI
  • πŸ“š Web Scraping: Configurable documentation crawler with depth control
  • πŸ’Ύ Vector Storage: ChromaDB with persistent storage
  • ⏰ Auto-Updates: Scheduled documentation refresh
  • πŸ”Œ Dual Transport: stdio (local MCP) or HTTP/SSE (remote access)
  • 🐳 Docker Ready: Containerized deployment with profiles
  • ☸️ Kubernetes Ready: Production deployment with autoscaling

Quick Start

Option 1: stdio Mode (Local MCP - Default)

For: VS Code, Claude Desktop integration on your local machine

  1. Configure environment:

    cp .env.example .env
    # Edit .env and set your DOCS_URLS
    # Keep TRANSPORT=stdio (or leave it out, stdio is default)
    
  2. Start container:

    docker-compose up -d
    

    This starts mcp-server-template container (no ports exposed).

  3. Configure MCP client (VS Code or Claude Desktop):

    {
      "mcpServers": {
        "docs-scraper": {
          "command": "docker",
          "args": ["exec", "-i", "mcp-server-template", "python", "-m", "mcp_server_template.server"]
        }
      }
    }
    

Option 2: HTTP Mode (Remote Access)

For: Testing API, remote access, or preparing for Kubernetes deployment

  1. Configure environment for HTTP:

    cp .env.example .env
    # Edit .env and set:
    # TRANSPORT=http
    # DOCS_URLS=https://your-docs-site.com/
    
  2. Start container with HTTP profile:

    docker-compose --profile http up -d
    

    This starts mcp-server-template-http container on port 3003.

  3. Test the server:

    # Check health
    curl http://localhost:3003/health
    
    # MCP clients connect to:
    # http://localhost:3003/sse
    

Switching Between Modes

Stop current mode:

docker-compose down

Start stdio mode:

docker-compose up -d

Start HTTP mode:

docker-compose --profile http up -d

View logs:

# stdio mode
docker logs mcp-server-template -f

# HTTP mode
docker logs mcp-server-template-http -f

Configuration

Key environment variables (see .env.example for full list):

  • TRANSPORT: Transport mode - stdio (local MCP) or http (remote/Kubernetes)
  • DOCS_URLS: Documentation URLs to scrape (comma-separated for multiple sites)
    • Single: DOCS_URLS=https://docs.example.com/
    • Multiple: DOCS_URLS=https://docs.example.com/,https://api.example.com/docs/,https://guides.example.com/
  • SWAGGER_URLS: Swagger/OpenAPI JSON URLs (comma-separated, optional)
  • USE_EMBEDDINGS: Enable semantic search (true) or keyword search (false)
  • EMBEDDING_PROVIDER: huggingface, openai, or azure
  • CRAWL_MAX_DEPTH: Maximum crawl depth (0-3, recommended 2)
  • AUTO_UPDATE_ENABLED: Enable scheduled documentation updates (true/false)
  • HTTP_PORT: Port for HTTP mode (default: 3000, mapped to 3003 on host)

Transport Modes

stdio Mode (Local MCP)

Best for: Local development, VS Code, Claude Desktop

This server uses stdio transport for direct MCP client communication via stdin/stdout pipes.

VS Code (settings.json):

{
  "mcp.servers": {
    "docs-scraper": {
      "command": "docker",
      "args": ["exec", "-i", "mcp-server-template", "python", "-m", "mcp_server_template.server"]
    }
  }
}

Claude Desktop (claude_desktop_config.json):

{
  "mcpServers": {
    "docs-scraper": {
      "command": "docker",
      "args": ["exec", "-i", "mcp-server-template", "python", "-m", "mcp_server_template.server"]
    }
  }
}

HTTP Mode (Remote Access)

Best for: Remote access, multi-user, Kubernetes deployments

Set TRANSPORT=http in .env and use the HTTP profile:

docker-compose --profile http up -d

Endpoints:

  • GET /health - Health check
  • GET /sse - MCP Server-Sent Events endpoint

MCP Client Configuration (for remote HTTP clients):

{
  "mcpServers": {
    "docs-scraper": {
      "url": "http://localhost:3003/sse",
      "transport": "sse"
    }
  }
}

Kubernetes Deployment

See k8s-deployment.yaml for production Kubernetes deployment with:

  • Horizontal Pod Autoscaling
  • Persistent Volume Claims for ChromaDB
  • Ingress configuration
  • Health checks and readiness probes

Customization

This is a template - fork and customize for your documentation sources:

  1. Update DOCS_URLS in .env
  2. Customize scraping in src/mcp_server_template/documentation_scraper.py
  3. Add custom tools in src/mcp_server_template/server.py
  4. Adjust chunking and search parameters as needed

Requirements

  • Python 3.12+
  • Docker & Docker Compose (recommended)
  • 500MB+ memory for semantic search (50MB for keyword-only)

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured