[project] name = "mcp-server-analyzer" version = "0.4.1" description = "MCP server for Python, JavaScript, and TypeScript code analysis with Ruff, ty, Vulture, and Biome" readme = "README.md" license = { text = "MIT" } requires-python = ">=3.13" authors = [{ name = "Anselm Hahn", email = "anselm.hahn@gmail.com" }] maintainers = [{ name = "Anselm Hahn", email = "anselm.hahn@gmail.com" }] keywords = [ "mcp", "ruff", "vulture", "python", "ty", "biome", "javascript", "typescript", "code-analysis", "linting", "type-checking", "static-analysis", ] classifiers = [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.13", "Programming Language :: Python :: 3.14", "Topic :: Software Development :: Quality Assurance", "Topic :: Software Development :: Libraries :: Python Modules", ] dependencies = [ "fastmcp>=2.0.0", "ruff>=0.8.0", "ty>=0.0.33", "vulture>=2.11", "pydantic>=2.0.0", ] [project.optional-dependencies] dev = [ "pytest>=8.4.1", "pytest-asyncio>=0.21.0", "pytest-cov>=4.0.0", "ty>=0.0.33", "bandit>=1.7.0", "safety>=2.0.0", "pre-commit>=3.0.0", "poethepoet>=0.25.0", "repo-release-tools>=1.6.2", ] test = ["pytest>=8.4.1", "pytest-asyncio>=0.21.0", "pytest-cov>=4.0.0"] docs = ["zensical==0.0.33"] [project.scripts] mcp-server-analyzer = "mcp_server_analyzer.server:main" [project.urls] Homepage = "https://github.com/anselmoo/mcp-server-analyzer" Documentation = "https://github.com/anselmoo/mcp-server-analyzer" Repository = "https://github.com/anselmoo/mcp-server-analyzer" Issues = "https://github.com/anselmoo/mcp-server-analyzer/issues" Changelog = "https://github.com/anselmoo/mcp-server-analyzer/blob/main/CHANGELOG.md" [build-system] requires = ["uv_build>=0.9.26,<0.12.0"] build-backend = "uv_build" [tool.poe.tasks] test = "pytest" test-cov = "pytest --cov=src/mcp_server_analyzer --cov-report=xml --cov-report=html" type-check = "ty check src tests" lint = "ruff check src tests" format = "ruff format src tests" format-check = "ruff format --check src tests" build_mcpb = { cmd = "python scripts/build_mcpb.py", help = "Build .mcpb release bundle into dist/ (gitignored)" } [tool.rrt] pin_target_missing = "warn" [[tool.rrt.version_targets]] path = "pyproject.toml" kind = "pep621" [[tool.rrt.version_targets]] path = "src/mcp_server_analyzer/__init__.py" kind = "python_version" [tool.rrt.eol] languages = ["python"] warn_days = 180 error_days = 0 [tool.ruff] target-version = "py313" line-length = 88 [tool.ruff.lint] select = ["ALL"] ignore = [ # Formatter handles these "COM812", # Missing trailing comma "ISC001", # Implicit string concat (single-line) — conflicts with formatter "ISC002", # Implicit string concat (multiline) — conflicts with formatter "E501", # Line too long — handled by formatter # Docstrings — not enforced project-wide "D100", "D101", "D102", "D103", "D104", "D107", "D203", # Blank line before class docstring (conflicts with D211) "D212", # Multi-line summary first line (conflicts with D213) "D213", # Multi-line summary second line (conflicts with D212) # Type annotations "ANN401", # Disallow Any — FastMCP uses Any as a generic type parameter # Boolean arguments — acceptable in existing API surface "FBT001", "FBT002", # Subprocess — legitimate for invoking ruff/ty/vulture "S603", # subprocess with known executables "S607", # Partial executable path # Exception messages — short messages acceptable in tool handlers "EM101", "EM102", # Exception design — short RuntimeError messages are fine here "TRY003", # Copyright / metadata noise "CPY001", # TODO/FIXME markers — not enforced in this project "TD002", "TD003", "FIX001", "FIX002", # Docstring completeness — not required "DOC201", "DOC402", "DOC501", ] [tool.ruff.format] quote-style = "double" indent-style = "space" [tool.ruff.lint.per-file-ignores] "test_*.py" = ["PLR2004", "PLC0415", "S101", "D", "ARG", "ANN", "SLF001"] "tests/**" = ["PLR2004", "PLC0415", "S101", "D", "ARG", "ANN", "SLF001"] "scripts/**" = ["INP001", "T201", "D", "ANN", "S"] "*/__main__.py" = [ "EXE001", ] # shebang present but not executable is fine for installed scripts "*/server.py" = [ "BLE001", ] # broad exception catch at main() entry point is intentional [tool.ty.environment] python-version = "3.13" root = ["./src"] [tool.ty.src] include = ["src", "tests"] [tool.ty.terminal] output-format = "concise" [tool.vulture] min_confidence = 80 sort_by_size = true paths = ["src/"] exclude = ["tests/", ".venv/", "__pycache__/"] ignore_names = ["_*", "test_*"] ignore_decorators = ["@pytest.fixture", "@mcp.tool", "@mcp.resource"] [tool.pytest.ini_options] testpaths = ["tests"] addopts = "--strict-markers --strict-config --verbose --cov=src/mcp_server_analyzer --cov-report=xml --cov-report=html --cov-fail-under=100" markers = [ "slow: marks tests as slow (deselect with '-m \"not slow\"')", "integration: marks tests as integration tests", "asyncio: marks tests as async tests", ] [tool.bandit] exclude_dirs = ["tests", ".venv", "build", "dist"] skips = ["B101", "B601"] [tool.bandit.assert_used] skips = ["*/*test*.py", "*/test_*.py"] [dependency-groups] dev = [ "pytest>=8.4.1", "pytest-asyncio>=0.21.0", "pytest-cov>=6.2.1", "ty>=0.0.33", "bandit>=1.7.0", "safety>=2.0.0", "pre-commit>=3.0.0", "poethepoet>=0.25.0", "repo-release-tools>=1.6.2", ]