WeCom Bot MCP Server

by loonghao
Verified
MIT License
17
  • Linux
  • Apple
[build-system] requires = ["poetry-core>=1.0.0"] build-backend = "poetry.core.masonry.api" [tool.poetry] name = "wecom-bot-mcp-server" version = "0.6.3" description = "WeCom Bot MCP Server - A Python server for WeCom (WeChat Work) bot following the Model Context Protocol (MCP)" authors = ["longhao <hal.long@outlook.com>"] readme = "README.md" classifiers = [ "Programming Language :: Python :: 3", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", ] [tool.poetry.dependencies] python = ">=3.10,<4.0" mcp = ">=1.3.0" notify-bridge = ">=0.3.0" platformdirs = ">=4.2.0" pydantic = ">=2.6.1" ftfy = ">=6.3.1" httpx = ">=0.28.1" pillow = ">=10.2.0" svglib = ">=1.5.1" tenacity = ">=9.0.0" loguru = ">=0.7.3" aiohttp = ">=3.11.13" [tool.poetry.group.dev.dependencies] pytest = "^7.4.0" pytest-cov = "^6.0.0" pytest-asyncio = "^0.21.1" mypy = "^1.5.1" ruff = "^0.9.0" pyfakefs = "^5.8.0" [tool.poetry.scripts] wecom-bot-mcp-server = "wecom_bot_mcp_server.server:main" [tool.poetry.urls] Homepage = "https://github.com/loonghao/wecom-bot-mcp-server" Issues = "https://github.com/loonghao/wecom-bot-mcp-server/issues" [tool.commitizen] name = "cz_conventional_commits" version = "0.6.3" tag_format = "v$version" version_files = [ "pyproject.toml:version", "src/wecom_bot_mcp_server/__version__.py", "smithery.yaml:version", "marketplace.yaml:version", ] [tool.pytest.ini_options] addopts = "" testpaths = ["tests"] python_files = ["test_*.py"] python_functions = ["test_*"] [tool.pytest-asyncio] mode = "auto" [tool.coverage.run] source = ["wecom_bot_mcp_server"] branch = true [tool.coverage.report] exclude_lines = [ "pragma: no cover", "def __repr__", "if __name__ == .__main__.:", "raise NotImplementedError", "if TYPE_CHECKING:", ] [tool.mypy] python_version = "3.10" strict = true 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 ignore_missing_imports = true disable_error_code = ["type-arg", "misc", "no-any-return"] [tool.ruff] line-length = 120 target-version = "py310" src = ["src", "tests"] [tool.ruff.lint] select = [ "E", # pycodestyle "F", # pyflakes # "I", # isort - 禁用导入排序检查 "D", # pydocstyle "UP", # pyupgrade "RUF", # ruff-specific rules ] ignore = ["D203", "D213", "ARG001", "D107", "D105", "D102", "F811", "I001"] [tool.ruff.lint.per-file-ignores] "__init__.py" = ["F401"] "noxfile.py" = ["E402", "I001"] "tests/*.py" = ["ARG001", "F401", "F811", "D107", "D105", "D102", "E501", "I001"] [tool.ruff.format] quote-style = "double" indent-style = "space" skip-magic-trailing-comma = false line-ending = "auto" [tool.isort] # Enforce import section headers. import_heading_future = "Import future modules" import_heading_stdlib = "Import built-in modules" import_heading_thirdparty = "Import third-party modules" import_heading_firstparty = "Import local modules" profile = "black" line_length = 120 force_sort_within_sections = true force_single_line = true sections = ["FUTURE", "STDLIB", "THIRDPARTY", "FIRSTPARTY", "LOCALFOLDER"] [tool.pyright] include = ["src/wecom_bot_mcp_server"] venvPath = "." venv = ".venv" [tool.nox] sessions = ["lint", "pytest"] python = ["3.10"] reuse_venv = true [tool.nox.session.lint] deps = ["ruff", "mypy", "isort"] commands = [ "mypy --install-types --non-interactive", "ruff check .", "ruff format --check .", "isort --check-only .", "mypy src/wecom_bot_mcp_server --strict" ] [tool.nox.session.lint_fix] deps = ["ruff", "mypy", "isort"] commands = [ "ruff check --fix .", "ruff format .", "isort ." ] [tool.nox.session.pytest] deps = ["pytest", "pytest-cov", "pytest-asyncio", "pillow", "svglib", "reportlab", "httpx"] commands = [ "pytest tests/ --cov=wecom_bot_mcp_server --cov-report=xml:coverage.xml --cov-report=term-missing" ]