# MkDocs MCP Example
Welcome to the MkDocs MCP Example project! This demonstration showcases the integration of **MkDocs Material** documentation with a **Model Context Protocol (MCP) server**, creating a powerful combination for documentation and AI-driven content access.
## π Project Overview
This project demonstrates:
- **Beautiful Documentation**: Built with MkDocs Material theme
- **AI Integration**: MCP server providing AI access to documentation
- **Modern Development**: Python best practices with uv and devcontainers
- **Professional Workflow**: Complete CI/CD and development environment setup
## β¨ Key Features
### Documentation Features
- π **Modern Theme**: Beautiful, responsive Material Design
- π **Advanced Search**: Full-text search with highlighting
- π± **Mobile Friendly**: Responsive design for all devices
- π **Dark Mode**: Automatic theme switching
- π **Diagrams**: Mermaid diagram support
- π **Navigation**: Intuitive navigation with breadcrumbs
### MCP Server Features
- π€ **AI Access**: Direct AI access to documentation content
- π **Content Resources**: Serve documentation as MCP resources
- π§ **Search Tools**: AI-powered search and query capabilities
- β‘ **Fast Performance**: Optimized for quick response times
- π **Secure**: Following MCP security best practices
### Development Features
- π **Python Best Practices**: Modern Python development with type hints
- π¦ **uv Package Management**: Fast, reliable dependency management
- π³ **DevContainers**: Consistent development environment
- π§ͺ **Comprehensive Testing**: Unit tests for all components
- π **Code Quality**: Ruff, MyPy, and pre-commit hooks
## ποΈ Architecture
```mermaid
graph TB
A[MkDocs Site] --> B[Documentation Files]
B --> C[MCP Server]
C --> D[AI Assistant]
D --> E[Users]
F[Developer] --> G[DevContainer]
G --> H[uv Environment]
H --> A
H --> C
I[CI/CD] --> J[Tests]
I --> K[Build]
I --> L[Deploy]
```
## π Quick Start
### Prerequisites
- **Podman** (rootless preferred)
- **VSCode** with DevContainer extension
- **Git**
### Setup
1. **Clone the repository**:
```bash
git clone https://github.com/robmatesick/mkdocs-mcp-example.git
cd mkdocs-mcp-example
```
2. **Open in DevContainer**:
- Open VSCode
- Run "Dev Containers: Reopen in Container"
- Wait for container build and setup
3. **Start development servers**:
```bash
# Terminal 1: Start MkDocs
docs-serve
# Terminal 2: Start MCP Server
mcp-server
```
4. **Access the documentation**:
- Open [http://localhost:8000](http://localhost:8000)
- Documentation will auto-reload on changes
## π What's Inside
### Documentation Structure
```
docs/
βββ index.md # This page
βββ getting-started/ # Installation and setup guides
βββ mcp-server/ # MCP server documentation
βββ api/ # Auto-generated API docs
βββ examples/ # Usage examples
```
### Code Structure
```
mkdocs-mcp-example/
βββ mkdocs-site/ # MkDocs configuration
βββ mcp-server/ # MCP server implementation
βββ docs/ # Documentation source
βββ .devcontainer/ # DevContainer configuration
βββ .vscode/ # VSCode settings
```
## π§ Development
### Available Commands
- `docs-serve` - Start MkDocs development server
- `mcp-server` - Start MCP server
- `test` - Run all tests
- `lint` - Run code linting
- `format` - Format code
- `typecheck` - Run type checking
### Testing
```bash
# Run all tests
test
# Run with coverage
test-cov
# Run specific test
pytest mcp-server/tests/test_server.py
```
## π€ Contributing
We welcome contributions! Please see our [Contributing Guide](contributing.md) for details.
## π License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
## π Acknowledgments
- [MkDocs](https://www.mkdocs.org/) - Static site generator
- [Material for MkDocs](https://squidfunk.github.io/mkdocs-material/) - Beautiful theme
- [Model Context Protocol](https://modelcontextprotocol.io/) - AI integration standard
- [uv](https://docs.astral.sh/uv/) - Fast Python package manager
---
*Built with β€οΈ using modern Python development practices*