MkDocs MCP Search Server

MkDocs MCP Search Server

mkdocs-search•byserverless-dna

An MCP server that provides search and documentation-fetching tools for MkDocs-powered sites, using lunr.js indexes and converting MkDocs Material HTML to markdown.

License: MIT•Runtime: Awaiting documentation review•Category: search web

WHAT IT DOES

  • •Provides a searchMkDoc tool that queries MkDocs site content using pre-built lunr.js indexes, with optional version targeting.
  • •Provides a fetchMkDoc tool that retrieves documentation pages and converts MkDocs Material HTML into structured JSON with markdown and extracted code examples.
  • •Extracts code examples with language detection and preserves Mermaid diagrams, resolving relative URLs to absolute.
  • •Caches search indexes and converted documentation locally for performance.

BEST FOR

  • •Enabling an LLM assistant to search a published MkDocs documentation site.
  • •Retrieving and summarizing documentation pages as markdown with code examples.
  • •Searching version-specific documentation on versioned MkDocs sites.

ABOUT MKDOCS-SEARCH

MkDocs MCP Search Server is cataloged as an MCP server attributed to serverless-dna. An MCP server that provides search and documentation-fetching tools for MkDocs-powered sites, using lunr.js indexes and converting MkDocs Material HTML to markdown. It is categorized under search web. See the capability inspector for recorded interfaces and their independent review status; consult upstream documentation for the current interface.

HOW TO INSTALL

Installation configuration is not reviewed. No executable setup is offered for this entry; inspect the source repository before proceeding.

LICENSE

Catalog license label: MIT. Check the source repository's current license and terms before using, modifying or distributing this software.

能力检查器

能力定义尚未审核。未核验的采集内容不会作为可信接口展示。

Tools (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

Resources (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

Prompts (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

NEWSLETTER - COMING LATER

Newsletter subscriptions are not open yet

Email delivery is not connected. This page does not collect email addresses or create subscriptions.

Browse the registry for current listings instead.

Community Reviews

Coming later

Reviews for MkDocs MCP Search Server are not available yet

Review publishing and storage are not connected. This page does not collect or publish ratings or comments, including after sign-in.

FREQUENTLY ASKED QUESTIONS

How does the server perform searches?

It relies on the existing MkDocs search implementation using the lunr.js search engine and loads pre-built lunr.js indexes.

Can the number of search results be limited?

Yes; SEARCH_MAX_RESULTS controls the maximum number of results (default 10), and SEARCH_CONFIDENCE_THRESHOLD sets a minimum confidence score.

上游原版 README

在 GitHub 查看同一版本原文

README.md · db5d5f92dba0 · 采集于 2026-11-13 08:45:04 UTC

保留上游原文,不做 AI 改写。为安全起见过滤脚本、表单和不安全链接。

当前显示最后一次成功采集的文档快照,请以来源页面为准。

MkDocs MCP Search Server

A Model Context Protocol (MCP) server that provides search functionality for any MkDocs powered site. This server relies on the existing MkDocs search implementation using the Lunr.Js search engine.

Claude Desktop Quickstart

Follow the installation instructions please follow the Model Context Protocol Quickstart For Claude Desktop users. You will need to add a section tothe MCP configuration file as follows:

{
  "mcpServers": {
    "my-docs": {
      "command": "npx",
      "args": [
        "-y",
        "@serverless-dna/mkdocs-mcp",
        "https://your-doc-site",
        "Describe what you are enabling search for to help your AI Agent"
      ]
    }
  }
}

Overview

This project implements an MCP server that enables Large Language Models (LLMs) to search through any published mkdocs documentation site. It uses lunr.js for efficient local search capabilities and provides results that can be summarized and presented to users.

Features

  • MCP-compliant server for integration with LLMs
  • Local search using lunr.js indexes
  • Version-specific documentation search capability
  • MkDocs Material HTML to Markdown conversion with structured JSON responses
  • Code example extraction with language detection and context
  • Tab view support for multi-language documentation
  • Mermaid diagram preservation
  • Automatic URL resolution (relative to absolute)
  • Intelligent caching for both search indexes and converted documentation

Installation

# Install dependencies
pnpm install

# Build the project
pnpm build

Usage

The server can be run as an MCP server that communicates over stdio:

npx -y @serverless-dna/mkdocs-mcp https://your-doc-site.com

Available Tools

Search Tool

The server provides a searchMkDoc tool with the following parameters:

  • search: The search query string
  • version: Optional version string (only for versioned sites)

Sample Response:

{
  "query": "logger",
  "version": "latest",
  "total": 3,
  "results": [
    {
      "title": "Logger",
      "url": "https://docs.example.com/latest/core/logger/",
      "score": 1.2,
      "preview": "Logger utility for structured logging...",
      "location": "core/logger/"
    },
    {
      "title": "Configuration",
      "url": "https://docs.example.com/latest/core/logger/#config",
      "score": 0.8,
      "preview": "Configure the logger with custom settings...",
      "location": "core/logger/#config",
      "parentArticle": {
        "title": "Logger",
        "location": "core/logger/",
        "url": "https://docs.example.com/latest/core/logger/"
      }
    }
  ]
}

Features:

  • Confidence-based filtering (configurable threshold)
  • Advanced scoring with title matching and boosting
  • Parent article context for section results
  • Limited to top results (configurable, default: 10)

Fetch Documentation Tool

The server provides a fetchMkDoc tool that retrieves and converts documentation pages:

  • url: The URL of the documentation page to fetch

Sample Response:

{
  "title": "Getting Started",
  "markdown": "# Getting Started\n\nThis guide will help you...\n\n## Installation\n\n```bash\nnpm install example\n```",
  "code_examples": [
    {
      "title": "Installation",
      "description": "Install the package using npm",
      "code": "```bash\nnpm install example\n```"
    },
    {
      "title": "Basic Usage",
      "description": "Import and initialize the library",
      "code": "```python\nfrom example import Client\nclient = Client()\n```"
    }
  ],
  "url": "https://docs.example.com/getting-started/"
}

Configuration

The server can be configured using environment variables:

  • SEARCH_CONFIDENCE_THRESHOLD: Minimum confidence score for search results (default: 0.1)
  • SEARCH_MAX_RESULTS: Maximum number of search results to return (default: 10)
  • CACHE_BASE_PATH: Base directory for cache storage (default: <system-tmp>/mkdocs-mcp-cache)

Example:

SEARCH_MAX_RESULTS=20 SEARCH_CONFIDENCE_THRESHOLD=0.2 npx @serverless-dna/mkdocs-mcp https://your-doc-site.com

Cache Location: By default, the server caches search indexes and converted documentation in the system's temporary directory:

  • macOS/Linux: /tmp/mkdocs-mcp-cache (or $TMPDIR)
  • Windows: %TEMP%\mkdocs-mcp-cache

You can override this with the CACHE_BASE_PATH environment variable.

Development

Building

pnpm build

Testing

pnpm test

Claude Desktop MCP Configuration

During development you can run the MCP Server with Claude Desktop using the following configuration.

The configuration below shows running in windows claude desktop while developing using the Windows Subsystem for Linux (WSL). Mac or Linux environments you can run in a similar way.

The output is a bundled file which enables Node installed in windows to run the MCP server since all dependencies are bundled.

{
  "mcpServers": {
    "powertools": {
	"command": "node",
	"args": [
	  "\\\\wsl$\\Ubuntu\\home\\walmsles\\dev\\serverless-dna\\mkdocs-mcp\\dist\\index.js",
    "Search online documentation"
	]
    }
  }
}

How It Works

Search Functionality

  1. The server loads pre-built lunr.js indexes for each supported runtime
  2. When a search request is received, it:
    • Loads the appropriate index based on version (currently fixed to latest)
    • Performs the search using lunr.js
    • Returns the search results as JSON
  3. The LLM can then use these results to find relevant documentation pages

Documentation Fetching

  1. When a fetch request is received with a URL:
    • Fetches the HTML content (with caching)
    • Parses the MkDocs Material HTML structure using Cheerio
    • Removes navigation, headers, footers, and other UI elements
    • Processes tab views into sequential sections
    • Extracts code blocks with language detection and context
    • Resolves all relative URLs to absolute URLs
    • Converts the cleaned HTML to markdown
    • Returns a structured JSON response with title, markdown, and code examples
  2. Results are cached to improve performance on subsequent requests

License

MIT

Install configuration

Are you the maintainer?

Claim this server with your GitHub account to request manual ownership verification.

README Embed Badge
Markdown

Link to the catalog listing for MkDocs MCP Search Server from your README. This badge does not certify ownership, compatibility or security.

[![MCP catalog listing](https://img.shields.io/badge/MCP-awesome--mcp-orange?style=flat-square)](https://awesome-mcp.com/servers/mkdocs-search)

REPOSITORY STATS

GitHub StarsUnavailable
ForksUnavailable

Public repository statistics could not be verified. Check the configured source address; unavailable counts are not zero.

下载与拉取统计

来源、范围和时段分别列出;不相加,不代表安装人数、活跃用户或安全审核。

尚无已审核的包 / 镜像标识,暂不展示下载统计。

Related search web MCP Servers

Alternative and complementary servers in the same category

View all in search web →

An MCP server that merges Google Search Console history with a live first-party crawl of your site to produce a prioritised, evidence-backed technical SEO audit inside Claude, complete with paste-ready fixes.

Repository stats unavailable
Search & Web Research

An MCP server that offers intelligent web search using OpenAI reasoning models, with support for fast iterations and deep research.

94
Search & Web Research