[build-system] requires = ["hatchling"] build-backend = "hatchling.build" [project] name = "fedlex-mcp" version = "2.0.1" description = "MCP Server for Swiss federal law via the Fedlex SPARQL endpoint" readme = "README.md" license = { file = "LICENSE" } requires-python = ">=3.11" keywords = [ "mcp", "model-context-protocol", "swiss-open-data", "fedlex", "swiss-law", "sparql", "claude", "llm", ] classifiers = [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", "Topic :: Scientific/Engineering :: Artificial Intelligence", ] dependencies = [ # Upper bound added deliberately: `mcp` 2.0.0 removed `mcp.server.fastmcp` # outright (the API moved to `mcp.server.mcpserver`), so an unbounded # `>=1.28.1` breaks every fresh install — CI and `pip install` alike. # Migrating to the 2.x API is real work and a decision to take on purpose, # not one a resolver should make silently. "mcp[cli]>=2.0.0,<3", "httpx>=0.28.1", "pydantic>=2.13.4", "pydantic-settings>=2.0.0", "structlog>=25.5.0,<27", ] [project.optional-dependencies] dev = [ "pytest>=8.0.0", "pytest-asyncio>=0.23.0", "pytest-cov>=7.1.0", "respx>=0.21.0", # Exakt gepinnt, nicht als Spanne: Eine Spanne löst bei jedem # `pip install -e ".[dev]"` auf die jeweils neuste passende Version auf, und # ein geänderter Default-Regelsatz färbt den Lauf dann rot, ohne dass sich # eine Zeile Code geändert hat. Schlimmer noch lokal — wer die Gates von Hand # fährt, lintet sonst mit einer anderen Version als die CI und jagt # Abweichungen, die niemand verursacht hat. # Der Pin steht hier und nur hier. `.github/workflows/ci.yml` hatte # zusätzlich ein `pip install ruff==...`; zwei Stellen für dieselbe Version # driften auseinander, und die CI merkt es nicht, weil der zweite Schritt # den ersten überschreibt. Beim Anheben: Version ändern, `ruff format` # einmal über src/ tests/ scripts/ laufen lassen, Ergebnis mitcommitten. "ruff==0.16.4", ] # Optional OpenTelemetry tracing (OBS-006). Enabled at runtime only when # OTEL_EXPORTER_OTLP_ENDPOINT is set; otherwise a complete no-op. otel = [ "opentelemetry-sdk>=1.25.0", "opentelemetry-exporter-otlp-proto-http>=1.25.0", "opentelemetry-instrumentation-httpx>=0.46b0", ] [project.scripts] fedlex-mcp = "fedlex_mcp.server:mcp.run" [project.urls] Homepage = "https://github.com/malkreide/fedlex-mcp" Repository = "https://github.com/malkreide/fedlex-mcp" Issues = "https://github.com/malkreide/fedlex-mcp/issues" [tool.hatch.build.targets.wheel] packages = ["src/fedlex_mcp"] [tool.pytest.ini_options] asyncio_mode = "auto" testpaths = ["tests"] addopts = "-v --tb=short" markers = [ "live: live API tests (skipped in CI by default)", ] [tool.ruff] line-length = 100 target-version = "py311" [tool.ruff.lint] select = ["E", "F", "W", "I", "UP"] ignore = ["E501"]