# pyproject.toml - Modern Python packaging configuration
# Production-ready MCP server for Vertica
[build-system]
requires = ["setuptools>=61.0", "wheel"]
build-backend = "setuptools.build_meta"
[project]
name = "vertica-mcp"
dynamic = ["version"]
description = "Production-ready MCP server for Vertica—secure tools, row streaming, pagination, and system metrics for LLM agents (Claude, Cursor, VS Code)."
readme = "README.md"
requires-python = ">=3.11"
license = "Apache-2.0"
authors = [{ name = "Abdelhak Zabour", email = "abdelhakzabour@gmail.com" }]
maintainers = [{ name = "Abdelhak Zabour" }]
keywords = [
"vertica", "database", "mcp", "model-context-protocol",
"llm", "agent", "ai", "data", "analytics", "cli",
"claude", "cursor", "anthropic", "data-science"
]
dependencies = [
"click>=8.1,<9",
"mcp[cli]>=1.8,<2",
"python-dotenv>=1.0,<2",
"vertica-python>=1.4,<2",
"starlette>=0.46,<0.47",
"uvicorn>=0.34,<0.35",
"fastmcp>=2.11,<3",
]
[project.optional-dependencies]
# Development tools (formatter, linter, typing) + tests
dev = [
"black>=23.0.0",
"isort>=5.12.0",
"mypy>=1.5.0",
"ruff>=0.1.0",
"pytest>=7.4.0",
"pytest-asyncio>=0.23",
"pytest-cov>=5.0",
"pytest-mock>=3.11.0",
"requests>=2.32",
"build>=1.0.0",
"twine>=4.0.0",
]
# Minimal test extras for CI
test = [
"pytest>=7.4.0",
"pytest-asyncio>=0.23",
"pytest-cov>=5.0",
"pytest-mock>=3.11.0",
"requests>=2.32",
]
# Documentation
docs = [
"mkdocs>=1.5.0",
"mkdocs-material>=9.0.0",
"mkdocstrings[python]>=0.22.0",
]
# Performance testing (new)
perf = [
"pytest-benchmark>=4.0.0",
"memory-profiler>=0.61.0",
]
[project.scripts]
vertica-mcp = "vertica_mcp.cli:cli"
[project.urls]
Homepage = "https://github.com/zaboura/vertica-mcp"
Repository = "https://github.com/zaboura/vertica-mcp"
Documentation = "https://github.com/zaboura/vertica-mcp#readme"
Issues = "https://github.com/zaboura/vertica-mcp/issues"
Changelog = "https://github.com/zaboura/vertica-mcp/blob/master/CHANGELOG.md"
# ---- Build configuration ----
[tool.setuptools.packages.find]
include = ["vertica_mcp*"]
exclude = ["tests*", "docs*"]
[tool.setuptools.package-data]
vertica_mcp = ["py.typed"]
# [tool.setuptools.dynamic]
# version = {attr = "vertica_mcp.__version__"}
# ---- Development tools configuration ----
[dependency-groups]
dev = [
"black>=23.0.0",
"isort>=5.12.0",
"mypy>=1.5.0",
"ruff>=0.1.0",
"pytest>=7.4.0",
"pytest-asyncio>=0.23",
"pytest-cov>=5.0",
"pytest-mock>=3.11.0",
"build>=1.3.0",
"twine>=6.1.0",
]
[tool.black]
line-length = 88
target-version = ['py311']
include = '\.pyi?$'
extend-exclude = '''
/(
migrations
| .venv
| build
| dist
)/
'''
[tool.isort]
profile = "black"
line_length = 88
multi_line_output = 3
include_trailing_comma = true
force_grid_wrap = 0
use_parentheses = true
ensure_newline_before_comments = true
[tool.mypy]
python_version = "3.11"
warn_return_any = true
warn_unused_configs = true
warn_redundant_casts = true
warn_unused_ignores = true
disallow_untyped_defs = false
ignore_missing_imports = true
strict_optional = true
show_error_codes = true
check_untyped_defs = true
# Per-module options
[[tool.mypy.overrides]]
module = "vertica_python.*"
ignore_missing_imports = true
[[tool.mypy.overrides]]
module = "tests.*"
disallow_untyped_defs = false
[tool.ruff]
line-length = 88
target-version = "py311"
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"N", # pep8-naming
"UP", # pyupgrade
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"SIM", # flake8-simplify
]
ignore = [
"E501", # line too long (handled by black)
"B008", # do not perform function calls in argument defaults
]
[tool.ruff.per-file-ignores]
"tests/**/*.py" = ["S101"] # Allow assert in tests
# ---- Testing configuration ----
[tool.pytest.ini_options]
testpaths = ["tests"]
pythonpath = ["."]
asyncio_mode = "auto"
# Enhanced default: run fast unit tests with coverage; skip slow/integration unless requested
addopts = [
"-ra", # show short test summary for all
"-q", # quiet mode
"--strict-markers", # strict marker checking
"--strict-config", # strict config checking
"--cov=vertica_mcp", # coverage for main package
"--cov-report=term-missing", # show missing lines
"--cov-report=html", # generate HTML coverage report
"--cov-fail-under=80", # fail if coverage below 80%
"-m", "not slow and not integration", # skip slow tests by default
]
markers = [
"unit: Unit tests (isolated, no external dependencies)",
"integration: Integration tests (require external services)",
"slow: Slow-running tests",
"mcp: MCP-specific tests",
"database: Tests requiring database connection",
"stress: Stress/performance tests",
]
filterwarnings = [
"ignore::DeprecationWarning",
"ignore::ResourceWarning",
"ignore::pytest.PytestUnraisableExceptionWarning",
"ignore::UserWarning:vertica_python.*",
]
# Test discovery
python_files = ["test_*.py", "*_test.py"]
python_classes = ["Test*"]
python_functions = ["test_*"]
[tool.coverage.run]
source = ["vertica_mcp"]
omit = [
"*/tests/*",
"*/test_*.py",
"*/__pycache__/*",
"*/migrations/*",
"setup.py",
]
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__.:",
"class .*\\bProtocol\\):",
"@(abc\\.)?abstractmethod",
]
ignore_errors = true
show_missing = true
[tool.coverage.html]
directory = "htmlcov"