Provides AI access to documentation projects built with MkDocs Material, offering tools for full-text search, page discovery, structural outline generation, and code block extraction.
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., "@MkDocs MCP Serversearch the documentation for how to set up the devcontainer"
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.
MkDocs MCP Example
A comprehensive example project demonstrating the integration of MkDocs Material documentation with a Model Context Protocol (MCP) server, showcasing modern Python development practices with uv, devcontainers, and VSCode.
π Features
π Beautiful Documentation
MkDocs Material theme with modern design
Responsive layout for all devices
Advanced search with full-text indexing
Dark/light mode with system preference detection
Mermaid diagrams and syntax highlighting
Auto-generated API documentation with mkdocstrings
π€ AI-Powered Documentation Access
MCP Server providing AI access to documentation
Resource serving for direct content access
Advanced search tools for content discovery
Code block extraction and analysis
Page outline generation and navigation
π οΈ Modern Development Stack
Python 3.11+ with type hints and modern practices
uv for lightning-fast dependency management
DevContainers for consistent development environments
VSCode integration with comprehensive tooling
Rootless Podman support for secure containerization
π§ͺ Quality Assurance
Comprehensive testing with pytest and coverage
Code formatting with Ruff
Type checking with MyPy
Pre-commit hooks for automated quality checks
CI/CD ready configuration
π Quick Start
Prerequisites
Podman (rootless preferred)
VSCode with Dev Containers extension
Git
1. Clone & Open
2. Start DevContainer
Press
Ctrl+Shift+P(Windows/Linux) orCmd+Shift+P(macOS)Select "Dev Containers: Reopen in Container"
Wait for container setup (~5-10 minutes on first run)
3. Start Development
Visit http://localhost:8000 to see your documentation!
π Project Structure
π§ Development Commands
The project includes a comprehensive Makefile with common development tasks:
π¦ Setup & Installation
π§Ή Code Quality
π§ͺ Testing
π Documentation
π€ MCP Server
π Development Workflow
ποΈ Architecture
π€ MCP Server Usage
The MCP server provides AI assistants with direct access to your documentation:
Available Resources
Documentation pages as readable resources
Automatic metadata extraction from frontmatter
Hierarchical navigation support
Available Tools
search_docs- Full-text search across documentationfind_by_title- Find pages by title or headinglist_pages- List all available documentation pagesget_page_outline- Extract page structure and headingssearch_code_blocks- Find and filter code examples
Example Usage
πββοΈ Getting Started Guide
For Documentation Writers
Edit content in the
docs/directoryAdd new pages and update navigation in
mkdocs.ymlPreview changes at http://localhost:8000
Use Markdown features like admonitions, code blocks, and diagrams
For Python Developers
Modify MCP server in
mcp-server/src/mkdocs_mcp/Add new tools or resources for AI access
Run tests with
make testFollow type hints and modern Python practices
For DevOps Engineers
Customize DevContainer in
.devcontainer/Configure CI/CD pipelines using the Makefile targets
Deploy documentation using MkDocs build outputs
Monitor MCP server performance and usage
π Security & Best Practices
Rootless containers for enhanced security
No secrets in code - use environment variables
Input validation in MCP server endpoints
Type safety with comprehensive type hints
Dependency scanning with automated security checks
π Documentation
Complete documentation is available at:
π€ Contributing
We welcome contributions! Please see our Contributing Guide for details.
Development Setup
Fork the repository
Clone your fork
Open in DevContainer
Run
make setupMake your changes
Run
make ci-checkSubmit a pull request
π Requirements
System Requirements
OS: Linux, macOS, or Windows with WSL2
RAM: 4GB minimum, 8GB recommended
Storage: 2GB free space
Software Requirements
Python: 3.11 or higher
Podman: Latest stable version
VSCode: With Dev Containers extension
Git: For version control
π Troubleshooting
Common Issues
Container build fails
Port conflicts
Dependency issues
See the Troubleshooting Guide for more solutions.
π License
This project is licensed under the MIT License - see the LICENSE file for details.
π Acknowledgments
MkDocs - Static site generator
Material for MkDocs - Beautiful theme
Model Context Protocol - AI integration standard
uv - Fast Python package manager
Ruff - Python linting and formatting
Podman - Container runtime
π Support
Documentation: Project Documentation
Issues: GitHub Issues
Discussions: GitHub Discussions
β Star this repo if you find it helpful!
Built with β€οΈ using modern Python development practices.