[build-system] requires = ["setuptools>=68", "wheel"] build-backend = "setuptools.build_meta" [project] name = "mitre-mcp" version = "0.4.0" description = "MCP server for MITRE ATT&CK framework" readme = "README.md" requires-python = ">=3.11" license = {text = "MIT"} authors = [ {name = "MITRE MCP Contributors"} ] classifiers = [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", "Programming Language :: Python :: 3.14", ] dependencies = [ "mitreattack-python>=6,<7", "mcp>=2.2,<3", "httpx>=0.24.0,<1.0.0", "typing-extensions>=4.12.0", ] [project.scripts] mitre-mcp = "mitre_mcp.mitre_mcp_server:main" [project.optional-dependencies] dev = [ "pytest>=9.0.0,<10.0.0", "pytest-asyncio>=1.3.0,<2.0.0", "pytest-cov>=7,<8", "pytest-mock>=3.11.0,<4.0.0", "black>=24.10.0", "isort>=5.13.0", "flake8>=7.0.0", "mypy>=1.11.0", "ruff>=0.14.0", "bandit>=1.7.0", "safety>=3.0.0", "pip-audit>=2.7.0", "build>=1.0.0", "pre-commit>=3.5.0", ] [tool.setuptools.packages.find] include = ["mitre_mcp", "mitre_mcp.*"] [tool.black] line-length = 100 target-version = ['py311', 'py312', 'py313'] include = '\.pyi?$' extend-exclude = ''' /( # directories \.eggs | \.git | \.hg | \.mypy_cache | \.tox | \.venv | build | dist | data )/ ''' [tool.isort] profile = "black" line_length = 100 known_first_party = ["mitre_mcp"] skip_gitignore = true extend_skip = ["data"] [tool.pytest.ini_options] minversion = "7.0" addopts = [ "-v", "-ra", "--strict-markers", "--cov=mitre_mcp", "--cov-report=term-missing", "--cov-report=html", "--cov-report=xml", "--cov-fail-under=90.7", ] testpaths = ["tests"] python_files = ["test_*.py"] python_classes = ["Test*"] python_functions = ["test_*"] asyncio_mode = "auto" # pytest-asyncio 1.x warns while unset; "function" is the announced future default. asyncio_default_fixture_loop_scope = "function" markers = [ "unit: Unit tests", "integration: Integration tests", "asyncio: Asynchronous tests", "fulldata: Tests requiring the full ATT&CK dataset (skipped when absent)", ] [tool.mypy] python_version = "3.11" warn_return_any = true warn_unused_configs = true disallow_untyped_defs = true disallow_incomplete_defs = true check_untyped_defs = true disallow_untyped_decorators = false no_implicit_optional = true warn_redundant_casts = true warn_unused_ignores = true warn_no_return = true follow_imports = "normal" ignore_missing_imports = true strict_equality = true [[tool.mypy.overrides]] module = "mitreattack.*" ignore_missing_imports = true [[tool.mypy.overrides]] module = "tests.*" disallow_untyped_defs = false [tool.bandit] exclude_dirs = ["tests", "data", ".venv", "venv"] skips = ["B101"] # Skip assert_used in tests [tool.bandit.assert_used] skips = ["*/test_*.py", "*/conftest.py"] [tool.coverage.run] source = ["mitre_mcp"] omit = [ "*/tests/*", "*/__init__.py", "*/conftest.py", ] [tool.coverage.report] exclude_lines = [ "pragma: no cover", "def __repr__", "raise AssertionError", "raise NotImplementedError", "if __name__ == .__main__.:", "if TYPE_CHECKING:", "@abstractmethod", ] # Docstring linting — replaces the archived pydocstyle hook (pre-commit) and the # masked pydocstyle CI step. select = ["D"] keeps scope at docstring rules only; # flake8 stays the general linter. [tool.ruff] line-length = 100 target-version = "py311" [tool.ruff.lint] select = ["D"] ignore = ["D100", "D104", "D105", "D107"] [tool.ruff.lint.pydocstyle] convention = "google" [tool.ruff.lint.per-file-ignores] # Docstring rules apply to the package; tests, scripts and sample clients are exempt. "tests/**" = ["D"] "scripts/**" = ["D"] "clients/**" = ["D"]