[project]
name = "alpaca-mcp-gold-standard"
version = "1.0.0"
description = "Production-ready Alpaca trading MCP server following best practices"
readme = "README.md"
requires-python = ">=3.12"
authors = [
{name = "Alpaca MCP Team", email = "noreply@example.com"}
]
license = {text = "MIT"}
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.12",
"Topic :: Office/Business :: Financial :: Investment",
"Topic :: Software Development :: Libraries :: Python Modules",
]
dependencies = [
"alpaca-py>=0.33.0",
"mcp>=1.0.0",
"python-dotenv>=1.0.0",
"pydantic>=2.0.0,<3.0.0",
"typing-extensions>=4.0.0",
]
[project.optional-dependencies]
dev = [
"pytest>=8.4.1",
"pytest-asyncio>=0.21.0",
"pytest-cov>=4.1.0",
"black>=24.0.0",
"ruff>=0.1.0",
"mypy>=1.7.0",
"safety>=3.0.0",
"bandit>=1.7.0",
]
test = [
"pytest>=8.4.1",
"pytest-asyncio>=0.21.0",
"pytest-cov>=4.1.0",
]
docs = [
"mkdocs>=1.5.0",
"mkdocs-material>=9.0.0",
]
[build-system]
requires = ["hatchling>=1.18.0"]
build-backend = "hatchling.build"
[tool.hatch.build.targets.wheel]
packages = ["src/mcp_server"]
[tool.hatch.version]
path = "src/mcp_server/__init__.py"
[tool.pytest.ini_options]
testpaths = ["tests"]
python_files = ["test_*.py"]
python_classes = ["Test*"]
python_functions = ["test_*"]
asyncio_mode = "auto"
addopts = [
"--strict-markers",
"--strict-config",
"--disable-warnings",
]
[tool.black]
line-length = 88
target-version = ['py312']
include = '\.pyi?$'
extend-exclude = '''
/(
# directories
\.eggs
| \.git
| \.hg
| \.mypy_cache
| \.tox
| \.venv
| build
| dist
)/
'''
[tool.ruff]
line-length = 88
target-version = "py312"
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"UP", # pyupgrade
"N", # pep8-naming
"S", # bandit security
]
ignore = [
"S101", # assert statements (OK in tests)
"S104", # hardcoded bind all interfaces (OK for dev)
"S311", # pseudo-random generators (OK for non-crypto use)
]
[tool.ruff.per-file-ignores]
"tests/*" = ["S101", "S106", "S107"] # Allow asserts and hardcoded passwords in tests
[tool.mypy]
python_version = "3.12"
warn_return_any = true
warn_unused_configs = true
warn_redundant_casts = true
warn_unused_ignores = true
warn_no_return = true
warn_unreachable = true
strict_optional = true
disallow_untyped_defs = false # Relaxed for gradual typing
disallow_incomplete_defs = true
check_untyped_defs = true
disallow_untyped_decorators = false # Relaxed for MCP decorators
no_implicit_optional = true
show_error_codes = true
[[tool.mypy.overrides]]
module = [
"alpaca.*",
"mcp.*",
]
ignore_missing_imports = true
[tool.coverage.run]
source = ["src"]
omit = [
"*/tests/*",
"*/conftest.py",
"*/test_*.py",
]
[tool.coverage.report]
show_missing = true
skip_covered = false
precision = 2
exclude_lines = [
"pragma: no cover",
"def __repr__",
"raise AssertionError",
"raise NotImplementedError",
"if __name__ == .__main__.:",
"if TYPE_CHECKING:",
]
[tool.bandit]
exclude_dirs = ["tests", "build", "dist"]
skips = ["B101", "B601"] # Skip assert_used and shell_injection for dev env