mcp-text-editor

by tumf
MIT License
48
  • Apple
  • Linux
[project] name = "mcp-text-editor" dynamic = ["version"] description = "MCP Text Editor Server - Edit text files via MCP protocol" authors = [ { name = "tumf" } ] dependencies = [ "asyncio>=3.4.3", "mcp>=1.1.2", "chardet>=5.2.0", ] requires-python = ">=3.13" readme = "README.md" license = { text = "MIT" } [project.scripts] mcp-text-editor = "mcp_text_editor:run" [project.optional-dependencies] test = [ "pytest>=8.3.4", "pytest-asyncio>=0.24.0", "pytest-env>=1.1.0", "pytest-cov>=6.0.0", "pytest-mock>=3.12.0", ] dev = [ "ruff>=0.0.262", "black>=23.3.0", "isort>=5.12.0", "mypy>=1.2.0", "pre-commit>=3.2.2", ] [build-system] requires = ["hatchling"] build-backend = "hatchling.build" [tool.pytest.ini_options] asyncio_mode = "strict" testpaths = "tests" asyncio_default_fixture_loop_scope = "function" pythonpath = ["src"] [tool.ruff] lint.select = [ "E", # pycodestyle errors "F", # pyflakes "W", # pycodestyle warnings "I", # isort "C", # flake8-comprehensions "B", # flake8-bugbear ] lint.ignore = [ "E501", # line too long, handled by black "B008", # do not perform function calls in argument defaults "C901", # too complex ] lint.extend-select = ["I"] line-length = 88 src = ["src"] [tool.black] line-length = 88 target-version = ['py313'] [tool.isort] profile = "black" line_length = 88 [tool.mypy] python_version = "3.13" ignore_missing_imports = true namespace_packages = true explicit_package_bases = true mypy_path = "src" [tool.hatch.build.targets.wheel] [tool.hatch.version] path = "src/mcp_text_editor/version.py" [tool.coverage.run] source = ["mcp_text_editor"] branch = true [tool.coverage.report] exclude_lines = [ "pragma: no cover", "def __repr__", "raise NotImplementedError", "if __name__ == .__main__.:", "pass", "raise ImportError", "__version__", "if TYPE_CHECKING:", "raise FileNotFoundError", "raise ValueError", "raise RuntimeError", "raise OSError", "except Exception as e:", "except ValueError:", "except FileNotFoundError:", "except OSError as e:", "except Exception:", "if not os.path.exists", "if os.path.exists", "def __init__", ] omit = [ "src/mcp_text_editor/__init__.py", "src/mcp_text_editor/version.py", ]