[build-system]
build-backend = "setuptools.build_meta"
requires = [
"setuptools>=42", # At least v42 of setuptools required.
"versioningit",
]
[project]
name = "cratedb-mcp"
description = "CrateDB MCP Server for natural-language Text-to-SQL and documentation retrieval."
readme = "README.md"
keywords = [
"cratedb",
"documentation retrieval",
"knowledge base",
"mcp",
"mcp server",
"model context protocol",
"sql",
"text-to-sql",
]
license = "Apache-2.0"
license-files = [ "LICENSE" ]
authors = [
{ name = "CrateDB engineering" },
]
requires-python = ">=3.10"
classifiers = [
"Development Status :: 4 - Beta",
"Environment :: Console",
"Intended Audience :: Customer Service",
"Intended Audience :: Developers",
"Intended Audience :: Education",
"Intended Audience :: End Users/Desktop",
"Intended Audience :: Information Technology",
"Intended Audience :: Manufacturing",
"Intended Audience :: Science/Research",
"Intended Audience :: System Administrators",
"Intended Audience :: Telecommunications Industry",
"Operating System :: MacOS :: MacOS X",
"Operating System :: Microsoft :: Windows",
"Operating System :: POSIX :: Linux",
"Operating System :: Unix",
"Programming Language :: Python",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Topic :: Adaptive Technologies",
"Topic :: Communications",
"Topic :: Database",
"Topic :: Documentation",
"Topic :: Education",
"Topic :: Internet",
"Topic :: Office/Business",
"Topic :: Scientific/Engineering",
"Topic :: Software Development :: Libraries",
"Topic :: Software Development :: Pre-processors",
"Topic :: System :: Clustering",
"Topic :: System :: Distributed Computing",
"Topic :: System :: Logging",
"Topic :: System :: Monitoring",
"Topic :: System :: Networking",
"Topic :: System :: Systems Administration",
"Topic :: Text Processing",
"Topic :: Utilities",
]
dynamic = [
"version",
]
dependencies = [
"attrs",
"cachetools<7",
"click<9",
"cratedb-about<0.1.0",
"fastmcp>=2.13,<2.15",
"hishel<0.2",
"pueblo==0.0.13",
"sqlparse<0.6",
]
optional-dependencies.develop = [
"mypy<1.20",
"poethepoet<1",
"pyproject-fmt<3",
"ruff<0.15",
"validate-pyproject<1",
]
optional-dependencies.docs = [
"furo",
"myst-parser[linkify]>=0.18,<5",
"sphinx<8",
"sphinx-autobuild==2025.8.25", # Newer versions stopped "watching" appropriately?
"sphinx-copybutton",
"sphinx-design-elements<1",
"sphinxcontrib-mermaid<2",
"sphinxext-opengraph<1",
]
optional-dependencies.test = [
"pytest<10",
"pytest-cov<8",
"pytest-mock<4",
]
urls.Changelog = "https://github.com/crate/cratedb-mcp/blob/main/CHANGES.md"
urls.Documentation = "https://cratedb-mcp.readthedocs.io/"
urls.Issues = "https://github.com/crate/cratedb-mcp/issues"
urls.Repository = "https://github.com/crate/cratedb-mcp"
scripts.cratedb-mcp = "cratedb_mcp.cli:cli"
[tool.setuptools.package-data]
cratedb_mcp = [
"**/*.md",
]
[tool.setuptools.packages.find]
namespaces = false
[tool.ruff]
line-length = 100
extend-exclude = [
]
lint.select = [
# Builtins
"A",
# Bugbear
"B",
# comprehensions
"C4",
# Pycodestyle
"E",
# eradicate
"ERA",
# Pyflakes
"F",
# isort
"I",
# pandas-vet
"PD",
# return
"RET",
# Bandit
"S",
# print
"T20",
"W",
# flake8-2020
"YTT",
]
lint.per-file-ignores."docs/conf.py" = [ "A001", "ERA001" ]
lint.per-file-ignores."tests/*" = [
"S101", # Allow use of `assert`.
]
[tool.pytest.ini_options]
addopts = """
-rfEXs -p pytester --strict-markers --verbosity=3
--cov --cov-report=term-missing --cov-report=xml
"""
minversion = "2.0"
log_level = "DEBUG"
log_cli_level = "DEBUG"
log_format = "%(asctime)-15s [%(name)-36s] %(levelname)-8s: %(message)s"
pythonpath = [
"src",
]
xfail_strict = true
markers = [
]
[tool.coverage.paths]
source = [
"src/",
]
[tool.coverage.run]
branch = false
omit = [
"tests/*",
]
[tool.coverage.report]
show_missing = true
exclude_lines = [
"# pragma: no cover",
"raise NotImplemented",
]
[tool.mypy]
packages = [
"cratedb_mcp",
]
check_untyped_defs = true
ignore_missing_imports = true
implicit_optional = true
install_types = true
non_interactive = true
[tool.versioningit.vcs]
method = "git-archive"
default-tag = "v0.0.0"
describe-subst = "$Format:%(describe:tags,match=v*)$"
# ===================
# Tasks configuration
# ===================
[tool.poe.tasks]
check = [
"lint",
"test",
]
docs-autobuild = [
{ cmd = "sphinx-autobuild --open-browser --watch cratedb_mcp docs docs/_build" },
]
docs-html = [
{ cmd = "sphinx-build -W --keep-going docs docs/_build" },
]
docs-linkcheck = [
{ cmd = "sphinx-build -W --keep-going -b linkcheck doc docs/_build" },
]
format = [
{ cmd = "ruff format ." },
# Configure Ruff not to auto-fix (remove!):
# unused imports (F401), unused variables (F841), `print` statements (T201), and commented-out code (ERA001).
{ cmd = "ruff check --fix --ignore=ERA --ignore=F401 --ignore=F841 --ignore=T20 --ignore=ERA001 ." },
{ cmd = "pyproject-fmt --keep-full-version pyproject.toml" },
]
lint = [
{ cmd = "ruff format --check ." },
{ cmd = "ruff check ." },
{ cmd = "validate-pyproject pyproject.toml" },
{ cmd = "mypy" },
]
release = [
{ cmd = "python -m build" },
{ cmd = "twine upload --skip-existing dist/*" },
]
test = { cmd = "pytest" }