[project]
name = "mkdocs-mcp"
description = "MCP server for MkDocs documentation"
authors = [{name = "Rob Matesick", email = "robmatesick@example.com"}]
readme = "README.md"
requires-python = ">=3.11"
dynamic = ["version"]
dependencies = [
"mcp>=1.0.0",
"pydantic>=2.5.0",
"anyio>=4.0.0",
"aiofiles>=23.0.0",
"python-frontmatter>=1.1.0",
"markdown>=3.5.0",
"watchfiles>=0.21.0",
]
[project.optional-dependencies]
dev = [
"pytest>=7.4.0",
"pytest-asyncio>=0.23.0",
"pytest-cov>=4.1.0",
"pytest-mock>=3.12.0",
"ruff>=0.1.0",
"mypy>=1.7.0",
"types-markdown>=3.5.0",
]
[project.scripts]
mkdocs-mcp-server = "mkdocs_mcp.server:main"
[tool.hatch.version]
path = "src/mkdocs_mcp/__init__.py"
[tool.ruff]
target-version = "py311"
line-length = 88
extend-exclude = ["build", "dist"]
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"UP", # pyupgrade
"RUF", # ruff-specific rules
]
ignore = [
"E501", # line too long, handled by formatter
"B008", # do not perform function calls in argument defaults
]
[tool.ruff.lint.per-file-ignores]
"__init__.py" = ["F401"]
"tests/**/*" = ["B011", "S101"]
[tool.mypy]
python_version = "3.11"
check_untyped_defs = true
disallow_any_generics = true
disallow_incomplete_defs = true
disallow_untyped_defs = true
no_implicit_optional = true
warn_redundant_casts = true
warn_unused_ignores = true
warn_unreachable = true
strict_equality = true
show_error_codes = true
[[tool.mypy.overrides]]
module = ["frontmatter.*", "watchfiles.*"]
ignore_missing_imports = true
[tool.pytest.ini_options]
minversion = "7.0"
addopts = "-ra -q --strict-markers --strict-config"
testpaths = ["tests"]
markers = [
"slow: marks tests as slow (deselect with '-m \"not slow\"')",
"integration: marks tests as integration tests",
]
asyncio_mode = "auto"
[tool.coverage.run]
source = ["src"]
branch = true
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"def __repr__",
"if self.debug:",
"if settings.DEBUG",
"raise AssertionError",
"raise NotImplementedError",
"if 0:",
"if __name__ __ == .__main__.:",
"if TYPE_CHECKING:",
]