[project]
name = "keyboard-maestro-mcp"
version = "1.0.0"
description = "Keyboard Maestro MCP Server - Advanced macOS automation through Model Context Protocol"
requires-python = ">=3.10"
authors = [
{name = "Agent_1", email = "noreply@anthropic.com"}
]
license = {text = "MIT"}
keywords = ["mcp", "keyboard-maestro", "automation", "macos", "ai-tools"]
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Operating System :: MacOS",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: System :: Systems Administration",
]
dependencies = [
"fastmcp>=0.1.0",
"httpx>=0.25.0",
"pydantic>=2.0.0",
"typing-extensions>=4.8.0",
"dataclasses-json>=0.6.0",
"python-dateutil>=2.8.0",
"tiktoken>=0.9.0",
"openai>=1.93.0",
# ML Dependencies for real analytics
"scikit-learn>=1.3.0",
"pandas>=1.5.0",
"numpy>=1.20.0",
"scipy>=1.9.0",
"statsmodels>=0.14.0",
"pyyaml>=6.0.2",
"defusedxml>=0.7.1",
"pytest-timeout>=2.4.0",
"pytest>=8.4.1",
]
[project.optional-dependencies]
dev = [
"pytest>=7.4.0",
"pytest-asyncio>=0.21.0",
"pytest-cov>=4.1.0",
"ruff>=0.1.0",
"black>=23.0.0",
"mypy>=1.5.0",
"pre-commit>=3.4.0",
]
test = [
"pytest>=7.4.0",
"pytest-asyncio>=0.21.0",
"pytest-cov>=4.1.0",
"hypothesis>=6.88.0", # Property-based testing
"factory-boy>=3.3.0", # Test data generation
]
security = [
"cryptography>=41.0.0",
"pyotp>=2.9.0",
]
ml-advanced = [
"prophet>=1.1.0",
"joblib>=1.3.0", # For efficient model serialization
"matplotlib>=3.5.0", # For data visualization
"seaborn>=0.11.0", # For advanced visualization
]
[project.scripts]
km-mcp-server = "src.server:main"
[project.urls]
Homepage = "https://github.com/anthropics/keyboard-maestro-mcp"
Repository = "https://github.com/anthropics/keyboard-maestro-mcp.git"
Issues = "https://github.com/anthropics/keyboard-maestro-mcp/issues"
Documentation = "https://github.com/anthropics/keyboard-maestro-mcp/blob/main/README.md"
[tool.uv]
dev-dependencies = [
"pytest>=7.4.0",
"pytest-asyncio>=0.21.0",
"pytest-cov>=4.1.0",
"ruff>=0.1.0",
"black>=23.0.0",
"mypy>=1.5.0",
"hypothesis>=6.88.0",
"psutil>=7.0.0",
]
[build-system]
requires = ["hatchling>=1.18.0"]
build-backend = "hatchling.build"
# Tool configurations
[tool.pytest.ini_options]
testpaths = ["tests"]
python_files = ["test_*.py", "*_test.py"]
python_classes = ["Test*"]
python_functions = ["test_*"]
addopts = [
"--strict-markers",
"--strict-config",
"--cov=src",
"--cov-report=term-missing",
"--cov-report=html:htmlcov",
# "--cov-fail-under=15",
]
asyncio_mode = "auto"
asyncio_default_fixture_loop_scope = "function"
markers = [
"slow: marks tests as slow (deselect with '-m \"not slow\"')",
"integration: marks tests as integration tests",
"unit: marks tests as unit tests",
"property: marks tests as property-based tests",
"security: marks tests as security-focused tests",
"performance: marks tests as performance-focused tests",
]
[tool.ruff]
line-length = 88
target-version = "py310"
src = ["src", "tests"]
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"UP", # pyupgrade
"ARG", # flake8-unused-arguments
"SIM", # flake8-simplify
"TCH", # flake8-type-checking
"S", # flake8-bandit (security)
]
ignore = [
"E501", # line too long (black handles this)
"S101", # assert used (OK in tests)
"S603", # subprocess call without shell=True (intentional)
"S311", # Standard pseudo-random generators (OK for simulation/testing)
"S314", # XML parsing (using defusedxml imports)
]
[tool.ruff.lint.per-file-ignores]
"tests/**/*" = ["S101", "ARG", "SIM"]
"src/core/contracts.py" = ["S101"] # Contracts use assertions intentionally
"src/server/tools/**/*" = ["ARG"] # MCP tools have ctx parameters for interface consistency
[tool.black]
line-length = 88
target-version = ['py310', 'py311', 'py312']
include = '\.pyi?$'
extend-exclude = '''
/(
# directories
\.eggs
| \.git
| \.hg
| \.mypy_cache
| \.tox
| \.venv
| build
| dist
)/
'''
[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
disallow_untyped_decorators = true
warn_redundant_casts = true
warn_unused_ignores = true
warn_no_return = true
warn_unreachable = true
strict_equality = true
show_error_codes = true
[[tool.mypy.overrides]]
module = [
"fastmcp.*",
"hypothesis.*",
"factory_boy.*",
]
ignore_missing_imports = true
[tool.coverage.run]
source = ["src"]
omit = [
"*/tests/*",
"*/test_*",
"*/__pycache__/*",
"*/migrations/*",
]
[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",
]
[tool.hatch.build.targets.wheel]
packages = ["src"]
[tool.hatch.build.targets.sdist]
exclude = [
"/.github",
"/docs",
"/tests",
"/.pre-commit-config.yaml",
]