pyproject.toml•3.74 kB
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "awesome-mcp-scaffold"
version = "1.0.0"
description = "一站式 MCP 服务器开发脚手架 - 基于 Cursor 的快速开发解决方案"
readme = "README.md"
license = "MIT"
requires-python = ">=3.10"
authors = [
{ name = "WW-AI-Lab", email = "toxingwang@gmail.com" },
]
keywords = [
"mcp",
"model-context-protocol",
"ai",
"llm",
"cursor",
"scaffold",
"fastmcp",
"streamable-http"
]
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",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
]
dependencies = [
"mcp>=1.10.1",
"fastapi>=0.115.14",
"uvicorn[standard]>=0.32.0",
"httpx>=0.25.0",
"pydantic>=2.0.0",
"pydantic-settings>=2.0.0",
]
[project.optional-dependencies]
dev = [
"pytest>=7.0.0",
"pytest-asyncio>=0.21.0",
"pytest-cov>=4.0.0",
"ruff>=0.1.0",
"mypy>=1.5.0",
"pre-commit>=3.0.0",
]
fastmcp = [
"fastmcp>=2.9.0",
]
database = [
"sqlalchemy>=2.0.0",
"asyncpg>=0.28.0",
]
cache = [
"redis>=4.5.0",
]
monitoring = [
"structlog>=23.0.0",
"prometheus-client>=0.17.0",
]
auth = [
"python-jose[cryptography]>=3.3.0",
"passlib[bcrypt]>=1.7.4",
]
all = [
"awesome-mcp-scaffold[dev,fastmcp,database,cache,monitoring,auth]",
]
[project.urls]
Homepage = "https://github.com/WW-AI-Lab/Awesome-MCP-Scaffold"
Documentation = "https://github.com/WW-AI-Lab/Awesome-MCP-Scaffold/blob/main/README.md"
Repository = "https://github.com/WW-AI-Lab/Awesome-MCP-Scaffold"
Issues = "https://github.com/WW-AI-Lab/Awesome-MCP-Scaffold/issues"
[project.scripts]
awesome-mcp = "server:main"
# Ruff 配置
[tool.ruff]
target-version = "py310"
line-length = 88
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"UP", # pyupgrade
]
ignore = [
"E501", # line too long, handled by black
"B008", # do not perform function calls in argument defaults
"C901", # too complex
]
[tool.ruff.per-file-ignores]
"__init__.py" = ["F401"]
[tool.ruff.isort]
known-first-party = ["server"]
# MyPy 配置
[tool.mypy]
python_version = "3.10"
check_untyped_defs = true
disallow_untyped_defs = true
disallow_incomplete_defs = true
disallow_untyped_decorators = true
no_implicit_optional = true
warn_redundant_casts = true
warn_unused_ignores = true
warn_return_any = true
warn_unreachable = true
strict_equality = true
[[tool.mypy.overrides]]
module = [
"mcp.*",
"fastmcp.*",
]
ignore_missing_imports = true
# Pytest 配置
[tool.pytest.ini_options]
minversion = "7.0"
addopts = "-ra -q --strict-markers --strict-config"
testpaths = ["tests"]
asyncio_mode = "auto"
markers = [
"slow: marks tests as slow (deselect with '-m \"not slow\"')",
"integration: marks tests as integration tests",
"unit: marks tests as unit tests",
]
# Coverage 配置
[tool.coverage.run]
source = ["server"]
omit = [
"*/tests/*",
"*/venv/*",
"*/.venv/*",
]
[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",
]