[build-system]
requires = ["setuptools>=61.0", "wheel"]
build-backend = "setuptools.build_meta"
[project]
name = "calculator-mcp-server"
version = "1.1.0"
description = "A complete Model Context Protocol (MCP) compliant mathematical calculation server"
readme = "README.md"
authors = [
{name = "Calculator MCP Team", email = "admin@tengmmvp.cn"}
]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Scientific/Engineering :: Mathematics",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: Internet :: WWW/HTTP :: HTTP Servers",
]
requires-python = ">=3.10"
dependencies = [
"fastmcp>=2.13.0",
"pydantic>=2.11.7",
]
[project.optional-dependencies]
dev = [
"pytest>=6.0",
"pytest-asyncio>=0.18",
"pytest-cov>=4.0",
"black>=21.0",
"flake8>=3.8",
"bandit>=1.7",
"safety>=2.0",
"mypy>=1.0",
]
math = [
"sympy>=1.12.0",
"numpy>=1.24.0",
]
test = [
"pytest>=6.0",
"pytest-asyncio>=0.18",
"pytest-cov>=4.0",
"coverage>=7.0",
]
[project.scripts]
calculator-mcp-server = "calculator_mcp.server:cli_main"
[project.urls]
Homepage = "https://github.com/tengmmvp/Calculator_MCP"
Documentation = "https://github.com/tengmmvp/Calculator_MCP#readme"
Repository = "https://github.com/tengmmvp/Calculator_MCP"
"Bug Tracker" = "https://github.com/tengmmvp/Calculator_MCP/issues"
Changelog = "https://github.com/tengmmvp/Calculator_MCP/blob/main/CHANGELOG.md"
[tool.hatch.build.targets.sdist]
include = [
"/calculator_mcp",
"/pyproject.toml",
"/README.md",
"/LICENSE",
"/CHANGELOG.md"
]
[tool.setuptools.packages.find]
include = ["calculator_mcp*"]
[tool.setuptools.package-data]
calculator_mcp = ["py.typed"]
[tool.black]
line-length = 88
target-version = ['py39']
include = '\.pyi?$'
extend-exclude = '''
/(
# directories
\.eggs
| \.git
| \.hg
| \.mypy_cache
| \.tox
| \.venv
| build
| dist
)/
'''
[tool.isort]
profile = "black"
multi_line_output = 3
line_length = 88
known_first_party = ["calculator_mcp_server"]
[tool.flake8]
max-line-length = 88
extend-ignore = ["E203", "W503", "E501"]
exclude = [
".git",
"__pycache__",
"build",
"dist",
".venv",
".eggs",
"*.egg-info",
".pytest_cache",
".mypy_cache",
]
per-file-ignores = [
"__init__.py:F401",
]
[tool.mypy]
python_version = "3.9"
warn_return_any = true
warn_unused_configs = true
disallow_untyped_defs = true
disallow_incomplete_defs = true
check_untyped_defs = true
disallow_untyped_decorators = true
no_implicit_optional = true
warn_redundant_casts = true
warn_unused_ignores = true
warn_no_return = true
warn_unreachable = true
strict_equality = true
ignore_missing_imports = true
[[tool.mypy.overrides]]
module = [
"fastmcp.*",
"mcp.*",
]
ignore_missing_imports = true
[tool.pytest.ini_options]
testpaths = ["tests"]
python_files = ["test_*.py"]
python_classes = ["Test*"]
python_functions = ["test_*"]
addopts = [
"--verbose",
"--tb=short",
"--strict-markers",
"--strict-config",
"--cov=src",
"--cov-report=term-missing",
"--cov-report=html",
"--cov-report=xml",
]
markers = [
"unit: Unit tests",
"integration: Integration tests",
"slow: Slow tests",
"mcp_compliance: MCP compliance tests",
]
[tool.coverage.run]
source = ["src"]
omit = [
"*/tests/*",
"*/test_*",
"setup.py",
"*/__pycache__/*",
]
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"def __repr__",
"raise AssertionError",
"raise NotImplementedError",
"if __name__ == .__main__.:",
"if TYPE_CHECKING:",
"if 0:",
"class .*\\bProtocol\\):",
"@(abc\\.)?abstractmethod",
]
show_missing = true
precision = 2
fail_under = 80
[tool.coverage.html]
directory = "htmlcov"
[tool.bandit]
exclude_dirs = ["tests", "test_*"]
skips = ["B101", "B601"]