MkDocs MCP Search Server

Provides a local MCP server that enables LLMs to search MkDocs sites using Lunr.js and present results with context and code examples.
  • typescript

16

GitHub Stars

typescript

Language

6 months ago

First Indexed

2 months ago

Catalog Refreshed

Documentation & install

Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.

Installation

Add the following to your MCP client configuration file.

Configuration

View docs

You can run a dedicated MCP server that lets large language models search through your MkDocs-powered site using a Lunr.js index. This server returns structured, searchable results and can fetch and convert documentation pages into Markdown for easy presentation to users.

How to use

You use an MCP client to start and interact with the MkDocs MCP server. Start the server with your MkDocs site URL, then issue search requests to retrieve relevant pages, with optional versioning for multi-version docs. The server returns results with titles, URLs, previews, and context to help you present documentation summaries to end users.

To begin, install the project dependencies, build, and run the MCP server. The server runs as an MCP server over standard I/O, so you can connect it directly to your LLM workflow.

How to install

Prerequisites: you need Node and a package manager. You will also need an internet connection to install dependencies and fetch your MkDocs site.

pnpm install
pnpm build

Configuration and usage notes

The server supports runtime configuration via environment variables. Key options include the maximum number of results and the minimum confidence score required for a result. You can also customize where the server caches data.

You can start the server for a given MkDocs site using an explicit command, which runs the MCP server as a local process that communicates over standard input/output.

The following configuration example shows how you enable search for a MkDocs site from a client.

{
  "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"
      ]
    }
  }
}

Notes on behavior and features

The server uses lunr.js to index content locally, supports versioned documentation searches, converts MkDocs Material HTML to Markdown, and preserves diagrams and code examples. It also resolves relative URLs to absolute ones and caches results for faster subsequent requests.

Available tools

searchMkDoc

Search tool that accepts a query string and an optional version, returning matching results with titles, URLs, previews, and location data.

fetchMkDoc

Fetch documentation pages by URL and return a structured JSON with title, markdown content, and code examples, including code blocks and language detection.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational