[build-system]
requires = ["hatchling>=1.21.0"]
build-backend = "hatchling.build"
[project]
name = "ast-mcp-server"
version = "0.2.0"
description = "An MCP server that provides code structure and semantic analysis capabilities through Abstract Syntax Trees (AST) and Abstract Semantic Graphs (ASG)"
readme = "README.md"
license = { file = "LICENSE" }
authors = [{ name = "Your Name", email = "your.email@example.com" }]
maintainers = [{ name = "Your Name", email = "your.email@example.com" }]
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Software Development :: Code Generators",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: Text Processing :: Linguistic",
]
keywords = [
"mcp",
"ast",
"asg",
"code-analysis",
"tree-sitter",
"semantic-analysis",
]
requires-python = ">=3.12"
dependencies = [
"mcp[cli]>=0.11.1",
"tree-sitter>=0.25.2",
"tree-sitter-python>=0.25.0",
"tree-sitter-javascript>=0.25.0",
"tree-sitter-typescript>=0.23.2",
"tree-sitter-go>=0.25.0",
"tree-sitter-rust>=0.24.0",
"tree-sitter-c>=0.24.1",
"tree-sitter-cpp>=0.23.4",
"tree-sitter-java>=0.23.5",
"ast-grep-py>=0.40.1",
"typer>=0.20.0",
"rich>=14.2.0",
"chromadb>=0.4.0",
"httpx>=0.25.0",
"python-dotenv>=1.0.0",
"neo4j==6.0.3",
"ast-grep-cli>=0.40.1",
]
[project.optional-dependencies]
dev = [
"pytest>=7.0.0",
"pytest-cov>=4.0.0",
"black>=23.0.0",
"isort>=5.12.0",
"flake8>=6.0.0",
"mypy>=1.0.0",
"pre-commit>=3.0.0",
]
testing = ["pytest>=7.0.0", "pytest-cov>=4.0.0", "pytest-asyncio>=0.21.0"]
docs = ["sphinx>=7.0.0", "sphinx-rtd-theme>=1.3.0", "myst-parser>=2.0.0"]
[project.urls]
Homepage = "https://github.com/angrysky56/ast-mcp-server"
Repository = "https://github.com/angrysky56/ast-mcp-server"
Issues = "https://github.com/angrysky56/ast-mcp-server/issues"
Changelog = "https://github.com/angrysky56/ast-mcp-server/blob/main/CHANGELOG.md"
[project.scripts]
ast-mcp-server = "server:main"
build-parsers = "ast_mcp_server.build_parsers:main"
[tool.hatch.build.targets.wheel]
packages = ["ast_mcp_server"]
[tool.hatch.build.targets.sdist]
include = [
"/ast_mcp_server",
"/server.py",
"/README.md",
"/LICENSE",
"/pyproject.toml",
]
[tool.black]
line-length = 88
target-version = ['py310', 'py311', 'py312']
include = '\.pyi?$'
extend-exclude = '''
/(
# directories
\.eggs
| \.git
| \.venv
| \.env
| venv
| env
| __pycache__
| build
| dist
| vendor
)/
'''
[tool.isort]
profile = "black"
multi_line_output = 3
line_length = 88
known_first_party = ["ast_mcp_server"]
[tool.mypy]
python_version = "3.10"
warn_return_any = true
warn_unused_configs = true
disallow_untyped_defs = true
disallow_incomplete_defs = true
check_untyped_defs = true
no_implicit_optional = true
warn_redundant_casts = true
warn_unused_ignores = true
show_error_codes = true
namespace_packages = true
explicit_package_bases = true
[[tool.mypy.overrides]]
module = ["tree_sitter.*", "mcp.*"]
ignore_missing_imports = true
[tool.pytest.ini_options]
minversion = "7.0"
addopts = "-ra -q --strict-markers"
testpaths = ["tests"]
python_files = ["test_*.py", "*_test.py"]
python_classes = ["Test*"]
python_functions = ["test_*"]
markers = [
"slow: marks tests as slow (deselect with '-m \"not slow\"')",
"integration: marks tests as integration tests",
"unit: marks tests as unit tests",
]
[tool.coverage.run]
source = ["ast_mcp_server"]
omit = [
"tests/*",
"*/tests/*",
"*/test_*.py",
"*/*_test.py",
"vendor/*",
"examples/*",
]
[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",
]