[project]
name = "mcp-witness"
version = "0.2.0"
description = "Security testing toolkit for MCP servers and AI agents."
readme = "README.md"
requires-python = ">=3.11"
license = { text = "Apache-2.0" }
authors = [{ name = "mcp-witness contributors" }]
keywords = ["mcp", "model-context-protocol", "security", "scanner", "agent-security"]
dependencies = [
    "mcp>=1.0",
    "aiohttp>=3.9",
    "pydantic>=2.6",
    "PyYAML>=6.0",
]

[project.urls]
Homepage = "https://github.com/desledishant10/mcp-witness"
Repository = "https://github.com/desledishant10/mcp-witness"
Documentation = "https://desledishant10.github.io/mcp-witness"
Issues = "https://github.com/desledishant10/mcp-witness/issues"
Disclosures = "https://github.com/desledishant10/mcp-witness/tree/main/disclosures"

[project.optional-dependencies]
dev = [
    "pytest>=8",
    "pytest-asyncio>=0.23",
    "pytest-cov>=5",
    "ruff>=0.4",
]
anthropic = [
    "anthropic>=0.40",
]

[tool.ruff]
line-length = 100
target-version = "py311"

[tool.ruff.lint]
select = ["E", "F", "W", "I", "B", "UP"]
ignore = [
    "E501",   # line too long — handled by formatter, allow case-by-case overrides
    "B008",   # function call in default argument — common pattern in CLI scripts (argparse, etc.)
]

[tool.ruff.lint.per-file-ignores]
# Test files use rule-grouped imports to keep each rule's tests
# self-contained. E402 (module-level import not at top of file) is
# allowed here intentionally.
"**/tests/**" = ["E402"]
# Fixture files are intentionally small + may import for documentation
# value rather than execution. Allow unused imports.
"examples/**" = ["F401"]
"**/fixtures/**" = ["F401"]

[tool.pytest.ini_options]
asyncio_mode = "strict"

[project.scripts]
mcp-witness-test = "harness.cli:main"
mcp-witness-classify = "classifier.__main__:main"
mcp-witness-analyze = "analyzer.__main__:main"
mcp-witness-lint-scenarios = "analyzer.lint_scenarios:main"
mcp-witness-eval-calibration = "calibration.eval:main"
mcp-witness-capture = "harness.capture:main"
mcp-witness-scaffold-gt = "calibration.scaffold:main"
mcp-witness-audit = "harness.audit:main"
mcp-witness-disclose = "disclose.cli:main"

[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"

[tool.hatch.build.targets.wheel]
packages = ["harness", "classifier", "analyzer", "calibration", "disclose"]
