[project]
name = "mcp-tools-py"
dynamic = ["version"]
authors = [
    {name = "Marcus Jellinghaus"},
]
description = "An MCP server for running python code checks (pylint, pytest and mypy)"
readme = "README.md"
requires-python = ">=3.11"
license = {text = "MIT"}
keywords = ["mcp", "code-quality", "llm", "pylint", "pytest", "mypy", "claude", "ai"]
classifiers = [
    "Programming Language :: Python :: 3",
    "Operating System :: OS Independent",
    "License :: OSI Approved :: MIT License",
    "Development Status :: 3 - Alpha",
    "Intended Audience :: Developers",
    "Topic :: Software Development :: Libraries :: Python Modules",
]
dependencies = [
    "pathspec>=0.12.1",
    "mcp>=1.3.0",
    "mcp[server]>=1.3.0",
    "mcp[cli]>=1.3.0",
    "pylint>=3.3.3",
    "pytest>=8.3.5",
    "pytest-json-report>=1.5.0",
    "pytest-asyncio>=0.25.3",
    "pytest-xdist>=3.5.0",
    "mypy>=1.9.0",
    "structlog>=24.5.0",
    "python-json-logger>=3.2.1",
    "mcp-config",
    "rope>=1.13.0",
    "jedi>=0.19.0",
    "igittigitt>=2.1.0",
    "import-linter>=2.0",
    "vulture>=2.13",
    "black>=24.10.0",
    "isort>=5.13.2",
]

[project.optional-dependencies]
dev = [
    "mcp-workspace",
    # Architecture and code quality tools
    "tach>=0.15.0",
    "pycycle>=0.0.8",
    "pydeps>=1.12.0",
    ]

[project.scripts]
mcp-tools-py = "mcp_tools_py.main:main"

[project.urls]
"Homepage" = "https://github.com/MarcusJellinghaus/mcp-tools-py"
"Bug Tracker" = "https://github.com/MarcusJellinghaus/mcp-tools-py/issues"
"Documentation" = "https://github.com/MarcusJellinghaus/mcp-tools-py#readme"

[tool.pytest.ini_options]
testpaths = ["tests"]
asyncio_default_fixture_loop_scope = "function"
pythonpath = ["src"]
addopts = "-n auto"
markers = [
    "integration: Integration tests requiring external resources",
]


[tool.black]
line-length = 88
target-version = ["py311"]

[tool.isort]
profile = "black"
line_length = 88
float_to_top = true

[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  # can create issues with pytest fixtures
no_implicit_optional = true
strict_optional = true
mypy_path = "src"
namespace_packages = true
explicit_package_bases = true

[[tool.mypy.overrides]]
module = ["mcp_tools_py.utils.subprocess_runner"]
# Disable unused ignore warnings for platform-specific Unix attributes
warn_unused_ignores = false

[[tool.mypy.overrides]]
module = ["pytest.*"]
ignore_missing_imports = true

[[tool.mypy.overrides]]
module = ["mcp.server.fastmcp"]
ignore_missing_imports = true

[[tool.mypy.overrides]]
module = ["jedi", "jedi.*"]
ignore_missing_imports = true

[[tool.mypy.overrides]]
module = ["rope", "rope.*"]
ignore_missing_imports = true

[[tool.mypy.overrides]]
module = ["igittigitt", "igittigitt.*"]
ignore_missing_imports = true

[tool.pylint.messages_control]
# W, C, R: disabled by design (warnings, conventions, refactoring)
# W1203: logging-fstring-interpolation — redundant while W is disabled, but kept
#        as documentation: f-strings in logging calls are acceptable for readability
disable = ["W", "C", "R", "W1203"]

[tool.mcp-coder.from-github]
# Installed WITH deps (leaves — picks up new external deps)
packages = [
    "mcp-config-tool @ git+https://github.com/MarcusJellinghaus/mcp-config.git",
    "mcp-workspace @ git+https://github.com/MarcusJellinghaus/mcp-workspace.git",
]
# Installed WITHOUT deps (depend on siblings — avoid downgrading)
packages-no-deps = [
    "mcp-coder @ git+https://github.com/MarcusJellinghaus/mcp_coder.git",
]

# Include tools directory in the distribution
[tool.setuptools]
include-package-data = true

[tool.setuptools.packages.find]
where = ["src"]

[tool.setuptools.package-data]
"*" = ["py.typed"]

[build-system]
requires = ["setuptools>=61.0", "setuptools-scm>=8.0"]
build-backend = "setuptools.build_meta"

[tool.setuptools_scm]
tag_regex = '^(?P<version>\d+\.\d+\.\d+)$'
# Version is automatically determined from git tags
# Tag format: 0.1.0 -> version 0.1.0
# Between releases: 0.1.0.devN+gHASH (includes commit count and hash)
