The MkDocs MCP Server provides 8 specialized tools for managing your documentation.
List all markdown documentation files in your project.
Parameters:
pattern (optional): Glob pattern to filter files (default: **/*.md)Example:
{
"pattern": "api/**/*.md"
}
Returns:
{
"count": 3,
"files": [
{
"path": "api/users.md",
"size": 1234,
"modified": 1708123456.0,
"title": "Users API",
"has_metadata": true
}
]
}
Read the content of a specific documentation file.
Parameters:
file_path (required): Relative path to the fileExample:
{
"file_path": "getting-started/installation.md"
}
Returns:
{
"path": "getting-started/installation.md",
"frontmatter": {
"title": "Installation Guide",
"description": "How to install"
},
"content": "# Installation\n\n..."
}
Create a new documentation file.
Parameters:
file_path (required): Relative path for the new filecontent (required): Markdown contentfrontmatter (optional): YAML frontmatter metadataExample:
{
"file_path": "api/new-endpoint.md",
"content": "# New Endpoint\n\nDocumentation...",
"frontmatter": {
"title": "New API Endpoint",
"tags": ["api", "v2"]
}
}
Update an existing documentation file.
Parameters:
file_path (required): Relative path to the filecontent (required): New markdown contentfrontmatter (optional): New/updated YAML frontmatterExample:
{
"file_path": "api/users.md",
"content": "# Users API (Updated)\n\n...",
"frontmatter": {
"title": "Users API",
"updated": "2026-02-16"
}
}
Delete a documentation file.
Parameters:
file_path (required): Relative path to the fileExample:
{
"file_path": "api/deprecated.md"
}
Search across all documentation files with regex support.
Parameters:
query (required): Search query (supports regex)case_sensitive (optional): Whether search is case-sensitive (default: false)Example:
{
"query": "authentication|auth",
"case_sensitive": false
}
Returns:
{
"query": "authentication|auth",
"total_files": 2,
"results": [
{
"file": "api/auth.md",
"match_count": 5,
"matches": [
{
"line": 10,
"content": "Authentication is handled via JWT tokens"
}
]
}
]
}
Get the current navigation structure from mkdocs.yml.
Parameters: None
Returns:
{
"site_name": "My Documentation",
"nav": [
{ "Home": "index.md" },
{
"API": [
{ "Auth": "api/auth.md" },
{ "Users": "api/users.md" }
]
}
],
"theme": "material"
}
Update the navigation structure in mkdocs.yml.
Parameters:
navigation (required): New navigation structureExample:
{
"navigation": [
{ "Home": "index.md" },
{
"Getting Started": [
{ "Installation": "getting-started/installation.md" },
{ "Quick Start": "getting-started/quick-start.md" }
]
},
{
"API": [
{ "Auth": "api/auth.md" },
{ "Users": "api/users.md" }
]
}
]
}
api/**/*.md