[build-system]
requires = ["setuptools>=75.0.0", "wheel"]
build-backend = "setuptools.build_meta"
[project]
name = "kolada-mcp"
version = "1.0.0"
description = "A clean MCP server for Sweden's Kolada municipal statistics API"
readme = "README.md"
license = { text = "Apache-2.0" }
requires-python = ">=3.11"
authors = [{ name = "Staten Platform" }]
keywords = ["mcp", "kolada", "sweden", "statistics", "municipalities"]
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"License :: OSI Approved :: Apache Software License",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Scientific/Engineering :: Information Analysis",
]
dependencies = [
"fastmcp>=2.8.0",
"mcp[cli]>=1.9.3",
"httpx>=0.28.1",
"polars-lts-cpu>=1.26.0",
"numpy>=1.26.0",
"sentence-transformers>=4.0.1",
"pydantic-settings>=2.9.1",
"python-dotenv>=1.1.0",
"uvicorn>=0.34.0",
]
[project.optional-dependencies]
dev = [
"pytest>=8.3.0",
"pytest-asyncio>=0.25.0",
"pytest-cov>=6.0.0",
"pytest-mock>=3.14.0",
"respx>=0.22.0",
"ruff>=0.8.0",
"mypy>=1.13.0",
]
[project.scripts]
kolada-mcp = "kolada_mcp.__main__:main"
[tool.setuptools.packages.find]
where = ["src"]
[tool.setuptools.package-data]
kolada_mcp = ["*.npz"]
[tool.pytest.ini_options]
testpaths = ["tests"]
asyncio_mode = "auto"
asyncio_default_fixture_loop_scope = "function"
addopts = "-v --tb=short"
markers = [
"unit: Unit tests",
"integration: Integration tests",
"slow: Slow tests",
]
[tool.ruff]
target-version = "py311"
line-length = 100
src = ["src", "tests"]
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"UP", # pyupgrade
"ARG", # flake8-unused-arguments
"SIM", # flake8-simplify
"TCH", # flake8-type-checking
"PTH", # flake8-use-pathlib
"RUF", # Ruff-specific rules
"ASYNC", # flake8-async
]
ignore = [
"E501", # line too long (handled by formatter)
]
[tool.ruff.lint.isort]
known-first-party = ["kolada_mcp"]
[tool.mypy]
python_version = "3.11"
strict = true
warn_return_any = true
warn_unused_configs = true
disallow_untyped_defs = true
disallow_incomplete_defs = true
check_untyped_defs = true
packages = ["kolada_mcp"]
mypy_path = "src"
[[tool.mypy.overrides]]
module = [
"sentence_transformers.*",
"polars.*",
"fastmcp.*",
"mcp.*",
]
ignore_missing_imports = true
[tool.coverage.run]
source = ["src/kolada_mcp"]
branch = true
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"if TYPE_CHECKING:",
"raise NotImplementedError",
]