cutover-mcp 1.8.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (63) hide show
  1. cutover_mcp-1.8.0/.dockerignore +33 -0
  2. cutover_mcp-1.8.0/.env.example +21 -0
  3. cutover_mcp-1.8.0/.github/dependabot.yml +33 -0
  4. cutover_mcp-1.8.0/.github/pull_request_template.md +31 -0
  5. cutover_mcp-1.8.0/.github/release-config.yml +33 -0
  6. cutover_mcp-1.8.0/.github/workflows/test.yml +35 -0
  7. cutover_mcp-1.8.0/.gitignore +22 -0
  8. cutover_mcp-1.8.0/.pre-commit-config.yaml +23 -0
  9. cutover_mcp-1.8.0/AGENTS.md +71 -0
  10. cutover_mcp-1.8.0/Dockerfile +31 -0
  11. cutover_mcp-1.8.0/LICENSE +21 -0
  12. cutover_mcp-1.8.0/PKG-INFO +795 -0
  13. cutover_mcp-1.8.0/README.md +761 -0
  14. cutover_mcp-1.8.0/claude_desktop_config.json.example +13 -0
  15. cutover_mcp-1.8.0/mcp.json.example +22 -0
  16. cutover_mcp-1.8.0/pyproject.toml +110 -0
  17. cutover_mcp-1.8.0/server.json +45 -0
  18. cutover_mcp-1.8.0/src/cutover_mcp/__init__.py +10 -0
  19. cutover_mcp-1.8.0/src/cutover_mcp/app.py +48 -0
  20. cutover_mcp-1.8.0/src/cutover_mcp/clients/__init__.py +1 -0
  21. cutover_mcp-1.8.0/src/cutover_mcp/clients/api.py +421 -0
  22. cutover_mcp-1.8.0/src/cutover_mcp/models.py +516 -0
  23. cutover_mcp-1.8.0/src/cutover_mcp/resources/__init__.py +1 -0
  24. cutover_mcp-1.8.0/src/cutover_mcp/server.py +54 -0
  25. cutover_mcp-1.8.0/src/cutover_mcp/tools/__init__.py +1 -0
  26. cutover_mcp-1.8.0/src/cutover_mcp/tools/action_log.py +93 -0
  27. cutover_mcp-1.8.0/src/cutover_mcp/tools/activities.py +80 -0
  28. cutover_mcp-1.8.0/src/cutover_mcp/tools/comments.py +90 -0
  29. cutover_mcp-1.8.0/src/cutover_mcp/tools/custom_fields.py +486 -0
  30. cutover_mcp-1.8.0/src/cutover_mcp/tools/data_sources.py +65 -0
  31. cutover_mcp-1.8.0/src/cutover_mcp/tools/folders.py +41 -0
  32. cutover_mcp-1.8.0/src/cutover_mcp/tools/runbook_types.py +152 -0
  33. cutover_mcp-1.8.0/src/cutover_mcp/tools/runbooks.py +544 -0
  34. cutover_mcp-1.8.0/src/cutover_mcp/tools/streams.py +142 -0
  35. cutover_mcp-1.8.0/src/cutover_mcp/tools/task_types.py +115 -0
  36. cutover_mcp-1.8.0/src/cutover_mcp/tools/tasks.py +309 -0
  37. cutover_mcp-1.8.0/src/cutover_mcp/tools/teams.py +47 -0
  38. cutover_mcp-1.8.0/src/cutover_mcp/tools/users.py +46 -0
  39. cutover_mcp-1.8.0/src/cutover_mcp/tools/workspaces.py +68 -0
  40. cutover_mcp-1.8.0/tests/__init__.py +1 -0
  41. cutover_mcp-1.8.0/tests/conftest.py +33 -0
  42. cutover_mcp-1.8.0/tests/unit/__init__.py +1 -0
  43. cutover_mcp-1.8.0/tests/unit/clients/__init__.py +0 -0
  44. cutover_mcp-1.8.0/tests/unit/clients/test_api.py +645 -0
  45. cutover_mcp-1.8.0/tests/unit/test_models.py +59 -0
  46. cutover_mcp-1.8.0/tests/unit/test_version.py +46 -0
  47. cutover_mcp-1.8.0/tests/unit/tools/__init__.py +1 -0
  48. cutover_mcp-1.8.0/tests/unit/tools/test_action_log.py +366 -0
  49. cutover_mcp-1.8.0/tests/unit/tools/test_activities.py +198 -0
  50. cutover_mcp-1.8.0/tests/unit/tools/test_comments.py +244 -0
  51. cutover_mcp-1.8.0/tests/unit/tools/test_custom_field_admin.py +402 -0
  52. cutover_mcp-1.8.0/tests/unit/tools/test_custom_fields.py +391 -0
  53. cutover_mcp-1.8.0/tests/unit/tools/test_data_sources.py +76 -0
  54. cutover_mcp-1.8.0/tests/unit/tools/test_folders.py +141 -0
  55. cutover_mcp-1.8.0/tests/unit/tools/test_runbook_types.py +354 -0
  56. cutover_mcp-1.8.0/tests/unit/tools/test_runbooks.py +1181 -0
  57. cutover_mcp-1.8.0/tests/unit/tools/test_streams.py +355 -0
  58. cutover_mcp-1.8.0/tests/unit/tools/test_task_types.py +355 -0
  59. cutover_mcp-1.8.0/tests/unit/tools/test_tasks.py +916 -0
  60. cutover_mcp-1.8.0/tests/unit/tools/test_teams.py +151 -0
  61. cutover_mcp-1.8.0/tests/unit/tools/test_users.py +161 -0
  62. cutover_mcp-1.8.0/tests/unit/tools/test_workspaces.py +216 -0
  63. cutover_mcp-1.8.0/uv.lock +1563 -0
@@ -0,0 +1,33 @@
1
+ .git/
2
+ .venv/
3
+ venv/
4
+ .env*
5
+ __pycache__/
6
+ *.py[cod]
7
+ .pytest_cache/
8
+ .ruff_cache/
9
+ .coverage
10
+ build/
11
+ dist/
12
+ *.egg-info/
13
+ *.egg
14
+ *.so
15
+ .Python
16
+ htmlcov/
17
+ .tox/
18
+ *.cover
19
+ .hypothesis/
20
+ .mypy_cache/
21
+ node_modules/
22
+ *.log
23
+ *.bak
24
+ *.swp
25
+ *.swo
26
+ *~
27
+ .DS_Store
28
+ .vscode/
29
+ .idea/
30
+ .gitattributes
31
+ docs/
32
+ .github/
33
+ tests/
@@ -0,0 +1,21 @@
1
+ # Environment variables for Cutover MCP.
2
+ # CUTOVER_CORE_URL / CUTOVER_API_TOKEN / CUTOVER_BASE_URL are resolved in this order per request:
3
+ # 1. Core-Url / Authorization / Base-Url HTTP headers (streamable-http, per-user)
4
+ # 2. These env vars (stdio / local development)
5
+ # 3. An interactive prompt to the connected client, if it supports elicitation
6
+
7
+ # Your Cutover instance URL. Replace YOUR-INSTANCE-NAME with your instance's name.
8
+ CUTOVER_CORE_URL=https://YOUR-INSTANCE-NAME.cutover.com
9
+
10
+ # See README "Generating an API Token".
11
+ CUTOVER_API_TOKEN=your_token_here
12
+
13
+ # The Cutover API host. Leave unset to derive it from CUTOVER_CORE_URL (https://api.cutover.net
14
+ # for production instances). Set it only for a single-tenant instance with its own API host,
15
+ # or for local public-api (http://localhost:9292).
16
+ # CUTOVER_BASE_URL=https://api.cutover.net
17
+
18
+ # Transport configuration (stdio for local, streamable-http for containerized/remote deployments)
19
+ # MCP_TRANSPORT=streamable-http
20
+ # MCP_HOST=0.0.0.0
21
+ # MCP_PORT=8000
@@ -0,0 +1,33 @@
1
+ # Enable Dependabot for security updates and version bumps.
2
+ #
3
+ # Every merge to main is a release (see release.yml), so version bumps are batched into one
4
+ # grouped PR per week rather than one PR, one release and one hosted-instance restart per package.
5
+ version: 2
6
+ updates:
7
+ - package-ecosystem: "uv"
8
+ directory: "/"
9
+ schedule:
10
+ interval: "weekly"
11
+ day: "monday"
12
+ allow:
13
+ - dependency-type: "all"
14
+ # Patch updates are included: the weekly group absorbs the churn they used to cause, and
15
+ # ignore rules also apply to security updates, so skipping patches could hide a fix.
16
+ cooldown:
17
+ default-days: 7
18
+ groups:
19
+ # All routine version bumps land together in a single "fix(deps): bump the dependencies group" PR.
20
+ dependencies:
21
+ applies-to: version-updates
22
+ patterns: ["*"]
23
+ # Security updates ignore the weekly schedule and arrive as soon as an advisory is published,
24
+ # but still as one PR rather than one per package.
25
+ security:
26
+ applies-to: security-updates
27
+ patterns: ["*"]
28
+ open-pull-requests-limit: 5
29
+ commit-message:
30
+ prefix: "fix"
31
+ include: "scope"
32
+ labels:
33
+ - "dependencies"
@@ -0,0 +1,31 @@
1
+ ## Description
2
+
3
+ Please include a summary of the changes and the related issue. Please also include relevant motivation and context.
4
+
5
+ See https://cutover.atlassian.net/browse/AI-
6
+
7
+ ## Type of change
8
+
9
+ Tick what applies. The matching label (`bug` / `enhancement` / `breaking-change` / `security` / `documentation`) is applied automatically and drives the version bump and release notes; the "Require a release label" check fails until one is present. Ticked boxes are the source of truth for those labels, so change the box rather than the label.
10
+
11
+ - [ ] Bug fix (non-breaking change which fixes an issue)
12
+ - [ ] New feature (non-breaking change which adds functionality)
13
+ - [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
14
+ - [ ] Security fix
15
+ - [ ] Documentation update
16
+
17
+ ## Checklist
18
+
19
+ - [ ] **I have added tests for any new tools I've created**
20
+ - [ ] **I have added tests for any modifications to existing tools**
21
+
22
+ ## Testing
23
+
24
+ Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce.
25
+
26
+ - [ ] Test A
27
+ - [ ] Test B
28
+
29
+ ## Additional context
30
+
31
+ Add any other context or screenshots about the pull request here.
@@ -0,0 +1,33 @@
1
+ name-template: "v$RESOLVED_VERSION"
2
+ tag-template: "$RESOLVED_VERSION"
3
+ version-template: "$MAJOR.$MINOR.$PATCH"
4
+
5
+ # Let the last prerelease be the comparison baseline when nothing stable is newer, so the first
6
+ # stable release lists the PRs merged since the last `0.0.1-dev.N` instead of "No changes".
7
+ include-pre-releases: true
8
+
9
+ categories:
10
+ - title: "🚀 Enhancements"
11
+ semver-increment: "minor"
12
+ when:
13
+ label: "enhancement"
14
+ - title: "🐛 Bug Fixes"
15
+ semver-increment: "patch"
16
+ when:
17
+ labels:
18
+ - "bug"
19
+ - "security"
20
+ - title: "🤖 Dependency Updates"
21
+ semver-increment: "patch"
22
+ when:
23
+ label: "dependencies"
24
+ - type: "version-resolver"
25
+ semver-increment: "major"
26
+ when:
27
+ label: "breaking-change"
28
+ - type: "version-resolver"
29
+ semver-increment: "patch"
30
+
31
+ change-template: "- $TITLE @$AUTHOR (#$NUMBER)"
32
+ template: |
33
+ $CHANGES
@@ -0,0 +1,35 @@
1
+ name: Run Unit Tests
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+ branches: [main]
8
+
9
+ jobs:
10
+ test:
11
+ runs-on: ubuntu-latest
12
+
13
+ steps:
14
+ - name: Checkout code
15
+ uses: actions/checkout@v4
16
+
17
+ - name: Build Docker image
18
+ run: docker build -t cutover-mcp-test .
19
+
20
+ - name: Run tests with coverage in Docker
21
+ run: |
22
+ docker run --rm \
23
+ -v ${{ github.workspace }}:/app \
24
+ -w /app \
25
+ -e SETUPTOOLS_SCM_PRETEND_VERSION=0.0.0 \
26
+ cutover-mcp-test \
27
+ bash -c "uv sync --extra dev && uv run pytest --cov=cutover_mcp --cov-report=xml --cov-report=html --cov-report=term-missing -v"
28
+
29
+ - name: Upload coverage HTML report
30
+ uses: actions/upload-artifact@v4
31
+ if: always()
32
+ with:
33
+ name: coverage-report
34
+ path: htmlcov/
35
+ retention-days: 7
@@ -0,0 +1,22 @@
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[cod]
4
+ *.so
5
+
6
+ # Virtual environments
7
+ env/
8
+ .venv/
9
+
10
+ # Environment variables
11
+ .env
12
+
13
+ # Poetry
14
+ poetry.lock
15
+
16
+ # VSCode
17
+ .vscode/
18
+
19
+ .DS_Store
20
+ mcp.json
21
+
22
+ .coverage
@@ -0,0 +1,23 @@
1
+ # See https://pre-commit.com for more information
2
+ # See https://pre-commit.com/hooks.html for more hooks
3
+ repos:
4
+ - repo: https://github.com/astral-sh/ruff-pre-commit
5
+ # Ruff version.
6
+ rev: v0.8.5
7
+ hooks:
8
+ # Run the linter.
9
+ - id: ruff
10
+ args: [--fix]
11
+ # Run the formatter.
12
+ - id: ruff-format
13
+
14
+ - repo: https://github.com/pre-commit/pre-commit-hooks
15
+ rev: v5.0.0
16
+ hooks:
17
+ - id: trailing-whitespace
18
+ - id: end-of-file-fixer
19
+ - id: check-yaml
20
+ - id: check-added-large-files
21
+ - id: check-toml
22
+ - id: check-merge-conflict
23
+ - id: debug-statements
@@ -0,0 +1,71 @@
1
+ # AGENTS.md
2
+
3
+ Guidance for AI coding agents working in this repository. For human-oriented detail (FAQs, troubleshooting, MCP client configuration), see `README.md`.
4
+
5
+ ## What this is
6
+
7
+ An MCP server for interacting with the Cutover API, powered by FastMCP. Source lives in `src/cutover_mcp/`.
8
+
9
+ ## Prerequisites
10
+
11
+ - [`uv`](https://github.com/astral-sh/uv) for dependency and environment management (`brew install uv` on macOS).
12
+ - Python 3.13+ — `uv` installs and manages this automatically, no separate install needed.
13
+
14
+ ## Setup
15
+
16
+ End users don't clone this repository: each release is published to PyPI and MCP clients run it as `uvx cutover-mcp` with credentials in the client's `env` block (see `mcp.json.example` / `claude_desktop_config.json.example`). The steps below are for working on the server itself.
17
+
18
+ 1. Copy `.env.example` to `.env` and fill in the required values (see "Environment variables" below).
19
+ 2. Install dependencies:
20
+ ```sh
21
+ uv sync
22
+ ```
23
+
24
+ ## Environment variables
25
+
26
+ Three variables, all read from `.env` at runtime (see `src/cutover_mcp/clients/api.py`):
27
+
28
+ - `CUTOVER_CORE_URL` (required for hosted instances) — the instance's own URL, e.g. `https://your-instance.cutover.com`. Sent as the `Core-Url` request header so the API routes to that instance. Leave blank only for local public-api, or when `CUTOVER_BASE_URL` already identifies a single instance.
29
+ - `CUTOVER_API_TOKEN` (required) — an API token for that instance. On hosted instances, generate via Access Management (an admin generates a token for a specific user) or My Details → User App Tokens (self-service).
30
+ - `CUTOVER_BASE_URL` (optional) — the Cutover API host. Derived from `CUTOVER_CORE_URL` when unset (`https://api.cutover.net` for production instances; other environments get `https://api.<environment domain>`). Only Cutover-hosted instance URLs are derived; anything else (e.g. a local `core` on `localhost`) raises a `ValueError` asking for `CUTOVER_BASE_URL`. Set it for a single-tenant instance with its own API host, or for local public-api (`http://localhost:9292`).
31
+
32
+ If you don't have real credentials available, ask the user for values rather than inventing them — the first tool call raises a clear `ValueError` if `CUTOVER_API_TOKEN` is missing, or if neither `CUTOVER_CORE_URL` nor `CUTOVER_BASE_URL` is set.
33
+
34
+ ## Running the server
35
+
36
+ ```sh
37
+ uv run cutover-mcp
38
+ ```
39
+
40
+ This is the `cutover-mcp` console script (`cutover_mcp.server:main`, declared in `pyproject.toml`) that `uvx cutover-mcp` and the Docker image run; `uv run python src/cutover_mcp/server.py` is equivalent.
41
+
42
+ ## Running via Docker
43
+
44
+ Optional — prefer "Running the server" above unless the user specifically asks for Docker.
45
+
46
+ ```sh
47
+ docker build -t cutover-mcp .
48
+ docker run -i --rm --env-file .env cutover-mcp
49
+ ```
50
+
51
+ `.env` is excluded from the build context via `.dockerignore` — always pass credentials at run time with `--env-file`, never bake them into the image.
52
+
53
+ ## Tests
54
+
55
+ ```sh
56
+ uv run pytest
57
+ ```
58
+
59
+ ## Project structure
60
+
61
+ - `src/cutover_mcp/clients/` — API client
62
+ - `src/cutover_mcp/resources/` — Resource definitions (MCP endpoints)
63
+ - `src/cutover_mcp/tools/` — Tool logic
64
+ - `src/cutover_mcp/server.py` — FastMCP server entrypoint
65
+ - `server.json` — MCP Registry entry (`io.github.gocutover/cutover-mcp`); `.github/workflows/publish.yml` stamps the release version in and publishes it after the PyPI upload
66
+ - `tests/` — Tests
67
+
68
+ ## Conventions
69
+
70
+ - Formatting/linting via `ruff` (see `pyproject.toml`); a pre-commit config (`.pre-commit-config.yaml`) enforces this.
71
+ - If a change adds, removes, renames, or changes the parameters/behavior of a `@mcp.tool()` in `src/cutover_mcp/tools/`, update the **Capabilities** section in both `README.md` and `README-PUBLIC.md` in the same PR — the group table, the tool's own `<details>` entry, and the tool/group counts in the section's opening sentence. Keep the two files in sync with each other (see [Project Structure](README.md#project-structure) for how they relate).
@@ -0,0 +1,31 @@
1
+ FROM public.ecr.aws/docker/library/python:3.13.4-slim
2
+
3
+ # Version metadata, passed by build.yml. VERSION is the git tag being built: hatch-vcs cannot
4
+ # read git inside the image because .git is dockerignored, so the tag is handed in explicitly
5
+ # (empty -> the fallback-version in pyproject.toml). GIT_SHA is reported by /health.
6
+ ARG VERSION
7
+ ARG GIT_SHA
8
+
9
+ # Install uv (dependency manager)
10
+ RUN pip install --no-cache-dir uv
11
+
12
+ # Set the working directory
13
+ WORKDIR /app
14
+
15
+ # Install dependencies first so this layer only invalidates on lockfile changes
16
+ COPY pyproject.toml uv.lock ./
17
+ RUN uv sync --frozen --no-install-project
18
+
19
+ # Copy the project files
20
+ COPY . /app
21
+
22
+ # Install the project itself
23
+ RUN SETUPTOOLS_SCM_PRETEND_VERSION="${VERSION}" uv sync --frozen
24
+
25
+ ENV CUTOVER_MCP_GIT_SHA=${GIT_SHA}
26
+
27
+ # Expose the port the server runs on
28
+ EXPOSE 8000
29
+
30
+ # Command to run the server: the same console script `uvx cutover-mcp` runs (see pyproject.toml).
31
+ CMD ["/app/.venv/bin/cutover-mcp"]
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Cutover
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.