@structured-world/gitlab-mcp 6.0.0 → 6.2.0
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.
- package/README.md +54 -102
- package/dist/src/entities/mrs/registry.js +187 -511
- package/dist/src/entities/mrs/registry.js.map +1 -1
- package/dist/src/entities/mrs/schema-readonly.d.ts +114 -0
- package/dist/src/entities/mrs/schema-readonly.js +202 -183
- package/dist/src/entities/mrs/schema-readonly.js.map +1 -1
- package/dist/src/entities/mrs/schema.d.ts +262 -0
- package/dist/src/entities/mrs/schema.js +235 -165
- package/dist/src/entities/mrs/schema.js.map +1 -1
- package/dist/src/entities/workitems/registry.js +240 -252
- package/dist/src/entities/workitems/registry.js.map +1 -1
- package/dist/src/entities/workitems/schema-readonly.d.ts +25 -1
- package/dist/src/entities/workitems/schema-readonly.js +33 -6
- package/dist/src/entities/workitems/schema-readonly.js.map +1 -1
- package/dist/src/entities/workitems/schema.d.ts +35 -0
- package/dist/src/entities/workitems/schema.js +32 -1
- package/dist/src/entities/workitems/schema.js.map +1 -1
- package/dist/structured-world-gitlab-mcp-6.2.0.tgz +0 -0
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +2 -1
- package/dist/structured-world-gitlab-mcp-6.0.0.tgz +0 -0
package/README.md
CHANGED
|
@@ -461,9 +461,10 @@ When OAuth is enabled, the following endpoints are available:
|
|
|
461
461
|
- `USE_MILESTONE`: When set to 'true', enables the milestone-related tools (list_milestones, get_milestone, create_milestone, edit_milestone, delete_milestone, get_milestone_issue, get_milestone_merge_requests, promote_milestone, get_milestone_burndown_events). By default, milestone features are disabled.
|
|
462
462
|
- `USE_PIPELINE`: When set to 'true', enables the pipeline-related tools (list_pipelines, get_pipeline, list_pipeline_jobs, list_pipeline_trigger_jobs, get_pipeline_job, get_pipeline_job_output, create_pipeline, retry_pipeline, cancel_pipeline, play_pipeline_job, retry_pipeline_job, cancel_pipeline_job). By default, pipeline features are disabled.
|
|
463
463
|
- `USE_LABELS`: When set to 'true', enables the label-related tools (list_labels, get_label, create_label, update_label, delete_label). By default, label features are enabled.
|
|
464
|
-
- `USE_MRS`: When set to 'true', enables the merge request-related tools (
|
|
465
|
-
- `USE_FILES`: When set to 'true', enables the file-related tools (
|
|
464
|
+
- `USE_MRS`: When set to 'true', enables the merge request-related tools (browse_merge_requests, browse_mr_discussions, manage_merge_request, manage_mr_discussion, manage_draft_notes). These 5 CQRS tools consolidate all MR operations. By default, merge request features are enabled.
|
|
465
|
+
- `USE_FILES`: When set to 'true', enables the file-related tools (browse_files, manage_files). These 2 CQRS tools consolidate all file operations. By default, file operation features are enabled.
|
|
466
466
|
- `USE_VARIABLES`: When set to 'true', enables the CI/CD variables-related tools (list_variables, get_variable, create_variable, update_variable, delete_variable). Supports both project-level and group-level variables. By default, variables features are enabled.
|
|
467
|
+
- `USE_WORKITEMS`: When set to 'true', enables the work items-related tools (browse_work_items, manage_work_item). These 2 CQRS tools consolidate all work item operations using GitLab GraphQL API. By default, work items features are enabled.
|
|
467
468
|
- `GITLAB_AUTH_COOKIE_PATH`: Path to an authentication cookie file for GitLab instances that require cookie-based authentication. When provided, the cookie will be included in all GitLab API requests.
|
|
468
469
|
- `SKIP_TLS_VERIFY`: When set to 'true', skips TLS certificate verification for all GitLab API requests (both REST and GraphQL). **WARNING**: This bypasses SSL certificate validation and should only be used for testing with self-signed certificates or trusted internal GitLab instances. Never use this in production environments.
|
|
469
470
|
- `SSL_CERT_PATH`: Path to PEM certificate file for direct HTTPS/TLS termination. Requires `SSL_KEY_PATH` to also be set.
|
|
@@ -502,7 +503,7 @@ export GITLAB_TOOL_GET_FILE_CONTENTS="Read source code files from the repository
|
|
|
502
503
|
# Multiple customizations
|
|
503
504
|
export GITLAB_TOOL_LIST_PROJECTS="List user projects"
|
|
504
505
|
export GITLAB_TOOL_GET_PROJECT="Get project details including settings"
|
|
505
|
-
export
|
|
506
|
+
export GITLAB_TOOL_MANAGE_WORK_ITEM="Create and manage tickets for our sprint planning"
|
|
506
507
|
```
|
|
507
508
|
|
|
508
509
|
#### Usage in Configuration Files
|
|
@@ -532,13 +533,14 @@ export GITLAB_TOOL_CREATE_WORK_ITEM="Create tickets for our sprint planning"
|
|
|
532
533
|
- **Case Sensitivity**: Tool names in environment variables must be UPPERCASE (e.g., `LIST_PROJECTS` not `list_projects`)
|
|
533
534
|
- **Invalid Names**: Invalid tool names in environment variables are ignored with a warning in debug logs
|
|
534
535
|
- **Content Guidelines**: Descriptions can be any valid string but should be kept concise for better UX
|
|
535
|
-
- **Scope**: Works with all
|
|
536
|
+
- **Scope**: Works with all 58 available tools across all entities (Core, Work Items, Merge Requests, Files, etc.)
|
|
536
537
|
|
|
537
538
|
## Tools 🛠️
|
|
538
539
|
|
|
539
|
-
**
|
|
540
|
+
**58 Tools Available** - Organized by entity and functionality below.
|
|
540
541
|
|
|
541
542
|
### Key Features:
|
|
543
|
+
- **CQRS Pattern** - Consolidated action-based tools: `browse_*` for reads, `manage_*` for writes
|
|
542
544
|
- **Modular Entity Architecture** - Separate entities for Labels, Merge Requests, Files, Pipelines, etc.
|
|
543
545
|
- **Environment-Gated Features** - Enable/disable tool groups with USE_* environment variables
|
|
544
546
|
- **Work Items Management** - Modern GraphQL API for Issues, Epics, Tasks, and more
|
|
@@ -546,70 +548,39 @@ export GITLAB_TOOL_CREATE_WORK_ITEM="Create tickets for our sprint planning"
|
|
|
546
548
|
- **Tier-based Feature Detection** - Automatically enables features based on your GitLab tier
|
|
547
549
|
- **Read-only Mode Support** - Safe operation mode for production environments
|
|
548
550
|
|
|
549
|
-
### Migration from v2.0:
|
|
550
|
-
All issue management has been migrated to the Work Items GraphQL API. The legacy REST API issue tools (`create_issue`, `update_issue`, etc.) have been removed. Use the Work Items tools (`create_work_item`, `update_work_item`, etc.) instead for better performance and more features.
|
|
551
|
-
|
|
552
|
-
<details>
|
|
553
|
-
<summary>Removed/Migrated Tools from v2.0</summary>
|
|
554
|
-
|
|
555
|
-
The following issue-related tools have been removed and replaced by Work Items GraphQL API:
|
|
556
|
-
|
|
557
|
-
- `create_issue` → Use `create_work_item` instead
|
|
558
|
-
- `update_issue` → Use `update_work_item` instead
|
|
559
|
-
- `delete_issue` → Use `delete_work_item` instead
|
|
560
|
-
- `list_issues` → Use `list_work_items` instead
|
|
561
|
-
- `my_issues` → Use `list_work_items` with assignee filter
|
|
562
|
-
- `get_issue` → Use `get_work_item` instead
|
|
563
|
-
- `create_issue_link` → Use `update_work_item` with LINKED_ITEMS widget
|
|
564
|
-
- `delete_issue_link` → Use `update_work_item` with LINKED_ITEMS widget
|
|
565
|
-
- `update_issue_note` → Use `update_work_item` with NOTES widget
|
|
566
|
-
- `create_issue_note` → Use `update_work_item` with NOTES widget
|
|
567
|
-
- `list_issue_links` → Use Work Items GraphQL API
|
|
568
|
-
- `list_issue_discussions` → Use Work Items GraphQL API
|
|
569
|
-
- `get_issue_link` → Use Work Items GraphQL API
|
|
570
|
-
|
|
571
|
-
</details>
|
|
572
|
-
|
|
573
551
|
## Complete Tool Reference
|
|
574
552
|
|
|
575
553
|
### Legend
|
|
576
554
|
- 📖 = Read-only tool (available in GITLAB_READ_ONLY_MODE)
|
|
577
555
|
- ✏️ = Read/Write tool (disabled in GITLAB_READ_ONLY_MODE)
|
|
578
556
|
|
|
579
|
-
### Core Tools (
|
|
580
|
-
Core GitLab functionality always available.
|
|
557
|
+
### Core Tools (13 tools)
|
|
558
|
+
Core GitLab functionality always available. Uses CQRS pattern with consolidated action-based tools.
|
|
581
559
|
|
|
582
560
|
#### Repository & Project Management
|
|
583
|
-
-
|
|
584
|
-
-
|
|
585
|
-
- 📖 **`
|
|
586
|
-
- 📖 **`search_repositories`**: Search for GitLab projects
|
|
587
|
-
- 📖 **`list_project_members`**: List members of a GitLab project
|
|
588
|
-
|
|
589
|
-
#### Branch Management
|
|
590
|
-
- ✏️ **`create_branch`**: Create a new branch in a GitLab project
|
|
591
|
-
- 📖 **`get_branch_diffs`**: Get the changes/diffs between two branches or commits in a GitLab project
|
|
592
|
-
- ✏️ **`fork_repository`**: Fork a GitLab project to your account or specified namespace
|
|
561
|
+
- 📖 **`browse_projects`**: PROJECT DISCOVERY: Find, browse, or inspect GitLab projects. Actions: "search" finds projects by name/topic, "list" browses accessible projects, "get" retrieves full details.
|
|
562
|
+
- ✏️ **`manage_repository`**: REPOSITORY MANAGEMENT: Create or fork GitLab projects. Actions: "create" starts new project, "fork" creates your copy of existing project.
|
|
563
|
+
- 📖 **`list_project_members`**: List members of a GitLab project with access levels.
|
|
593
564
|
|
|
594
|
-
####
|
|
595
|
-
-
|
|
596
|
-
-
|
|
565
|
+
#### Namespaces & Groups
|
|
566
|
+
- 📖 **`browse_namespaces`**: NAMESPACE OPERATIONS: Explore groups and user namespaces. Actions: "list" discovers namespaces, "get" retrieves details, "verify" checks if path exists.
|
|
567
|
+
- ✏️ **`create_group`**: Create a new GitLab group/namespace. Can create subgroups with parent_id.
|
|
597
568
|
|
|
598
569
|
#### Commits & History
|
|
599
|
-
- 📖 **`
|
|
600
|
-
-
|
|
601
|
-
- 📖 **`list_commits`**: List repository commits with filtering options
|
|
602
|
-
|
|
603
|
-
#### Namespaces & Users
|
|
604
|
-
- 📖 **`get_namespace`**: Get details of a namespace by ID or path
|
|
605
|
-
- 📖 **`list_namespaces`**: List all namespaces available to the current user
|
|
606
|
-
- 📖 **`verify_namespace`**: Verify if a namespace path exists
|
|
607
|
-
- 📖 **`get_users`**: Get GitLab user details by usernames
|
|
570
|
+
- 📖 **`browse_commits`**: COMMIT HISTORY: Explore repository commit history. Actions: "list" browses commits with filters, "get" retrieves commit metadata, "diff" shows code changes.
|
|
571
|
+
- ✏️ **`create_branch`**: Create a new branch in a GitLab project from existing ref.
|
|
608
572
|
|
|
609
573
|
#### Events & Activity
|
|
610
|
-
- 📖 **`
|
|
611
|
-
- 📖 **`
|
|
612
|
-
|
|
574
|
+
- 📖 **`browse_events`**: ACTIVITY FEED: Track GitLab activity. Actions: "user" shows your activity, "project" monitors project activity. Filter by date/action type.
|
|
575
|
+
- 📖 **`list_group_iterations`**: List group iterations/sprints for agile planning. Requires GitLab Premium.
|
|
576
|
+
|
|
577
|
+
#### Users & Utilities
|
|
578
|
+
- 📖 **`get_users`**: Search GitLab users with smart pattern detection. Auto-detects emails, usernames, or names.
|
|
579
|
+
- 📖 **`download_attachment`**: Download file attachments from issues/MRs by secret and filename.
|
|
580
|
+
|
|
581
|
+
#### Todos (Task Queue)
|
|
582
|
+
- 📖 **`list_todos`**: View your GitLab todos (notifications requiring action). Filter by state, action type, or target type.
|
|
583
|
+
- ✏️ **`manage_todos`**: Manage todo items. Actions: "mark_done" completes single todo, "mark_all_done" clears queue, "restore" undoes completed todo.
|
|
613
584
|
|
|
614
585
|
### Labels Management (5 tools)
|
|
615
586
|
Requires USE_LABELS=true environment variable (enabled by default). Supports both project and group labels.
|
|
@@ -620,41 +591,23 @@ Requires USE_LABELS=true environment variable (enabled by default). Supports bot
|
|
|
620
591
|
- 📖 **`get_label`**: Get a single label from a project or group
|
|
621
592
|
- 📖 **`list_labels`**: List labels for a project or group
|
|
622
593
|
|
|
623
|
-
### Merge Requests Management (
|
|
624
|
-
Requires USE_MRS=true environment variable (enabled by default).
|
|
625
|
-
|
|
626
|
-
#### Merge Request
|
|
627
|
-
-
|
|
628
|
-
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
-
|
|
632
|
-
-
|
|
633
|
-
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
-
|
|
639
|
-
- ✏️ **`
|
|
640
|
-
|
|
641
|
-
#### MR Draft Notes
|
|
642
|
-
- ✏️ **`create_draft_note`**: Create a draft note for a merge request
|
|
643
|
-
- ✏️ **`update_draft_note`**: Update an existing draft note
|
|
644
|
-
- ✏️ **`delete_draft_note`**: Delete a draft note
|
|
645
|
-
- ✏️ **`publish_draft_note`**: Publish a single draft note
|
|
646
|
-
- ✏️ **`bulk_publish_draft_notes`**: Publish all draft notes for a merge request
|
|
647
|
-
- 📖 **`get_draft_note`**: Get a single draft note from a merge request
|
|
648
|
-
- 📖 **`list_draft_notes`**: List draft notes for a merge request
|
|
649
|
-
|
|
650
|
-
### File Operations (5 tools)
|
|
651
|
-
Requires USE_FILES=true environment variable (enabled by default).
|
|
652
|
-
|
|
653
|
-
- ✏️ **`create_or_update_file`**: Create or update a single file in a GitLab project
|
|
654
|
-
- ✏️ **`push_files`**: Push multiple files to a GitLab project in a single commit
|
|
655
|
-
- 📖 **`get_file_contents`**: Get the contents of a file or directory from a GitLab project
|
|
656
|
-
- 📖 **`get_repository_tree`**: Get the repository tree for a GitLab project (list files and directories)
|
|
657
|
-
- ✏️ **`upload_markdown`**: Upload a file to a GitLab project for use in markdown content
|
|
594
|
+
### Merge Requests Management (5 CQRS tools)
|
|
595
|
+
Requires USE_MRS=true environment variable (enabled by default). Uses CQRS pattern with action-based tools.
|
|
596
|
+
|
|
597
|
+
#### Merge Request Browsing (Query)
|
|
598
|
+
- 📖 **`browse_merge_requests`**: BROWSE merge requests. Actions: "list" shows MRs with filtering, "get" retrieves single MR by IID or branch, "diffs" shows file changes, "compare" diffs two branches/commits.
|
|
599
|
+
- 📖 **`browse_mr_discussions`**: BROWSE MR discussions and draft notes. Actions: "list" shows all discussion threads, "drafts" lists unpublished draft notes, "draft" gets single draft note.
|
|
600
|
+
|
|
601
|
+
#### Merge Request Management (Command)
|
|
602
|
+
- ✏️ **`manage_merge_request`**: MANAGE merge requests. Actions: "create" creates new MR, "update" modifies existing MR, "merge" merges approved MR into target branch.
|
|
603
|
+
- ✏️ **`manage_mr_discussion`**: MANAGE MR discussions. Actions: "comment" adds comment to issue/MR, "thread" starts new discussion, "reply" responds to existing thread, "update" modifies note.
|
|
604
|
+
- ✏️ **`manage_draft_notes`**: MANAGE draft notes. Actions: "create" creates draft note, "update" modifies draft, "publish" publishes single draft, "publish_all" publishes all drafts, "delete" removes draft.
|
|
605
|
+
|
|
606
|
+
### File Operations (2 CQRS tools)
|
|
607
|
+
Requires USE_FILES=true environment variable (enabled by default). Uses CQRS pattern with action-based tools.
|
|
608
|
+
|
|
609
|
+
- 📖 **`browse_files`**: BROWSE repository files. Actions: "tree" lists files/folders with pagination, "content" reads file contents. Use for exploring project structure or reading source code.
|
|
610
|
+
- ✏️ **`manage_files`**: MANAGE repository files. Actions: "single" creates/updates one file, "batch" commits multiple files atomically, "upload" adds markdown attachments.
|
|
658
611
|
|
|
659
612
|
### CI/CD Variables (5 tools)
|
|
660
613
|
Requires USE_VARIABLES=true environment variable (enabled by default). Supports both project-level and group-level variables.
|
|
@@ -665,14 +618,14 @@ Requires USE_VARIABLES=true environment variable (enabled by default). Supports
|
|
|
665
618
|
- ✏️ **`update_variable`**: Update an existing CI/CD variable's value, security settings, or configuration in a project or group
|
|
666
619
|
- ✏️ **`delete_variable`**: Remove a CI/CD variable from a project or group
|
|
667
620
|
|
|
668
|
-
### Work Items (
|
|
669
|
-
Modern GraphQL API for issues, epics, tasks, and more. Requires USE_WORKITEMS=true (enabled by default).
|
|
621
|
+
### Work Items (2 CQRS tools)
|
|
622
|
+
Modern GraphQL API for issues, epics, tasks, and more. Requires USE_WORKITEMS=true (enabled by default). Uses CQRS pattern with action-based tools.
|
|
623
|
+
|
|
624
|
+
#### Work Item Browsing (Query)
|
|
625
|
+
- 📖 **`browse_work_items`**: BROWSE work items. Actions: "list" shows work items with filtering (groups return epics, projects return issues/tasks), "get" retrieves single work item by ID with full widget details.
|
|
670
626
|
|
|
671
|
-
|
|
672
|
-
- ✏️ **`
|
|
673
|
-
- ✏️ **`delete_work_item`**: Delete a work item
|
|
674
|
-
- 📖 **`get_work_item`**: Get details of a specific work item by ID
|
|
675
|
-
- 📖 **`list_work_items`**: List work items from a GitLab group with optional filtering by type
|
|
627
|
+
#### Work Item Management (Command)
|
|
628
|
+
- ✏️ **`manage_work_item`**: MANAGE work items. Actions: "create" creates new work item (Epics need GROUP namespace, Issues/Tasks need PROJECT), "update" modifies properties/widgets, "delete" permanently removes.
|
|
676
629
|
|
|
677
630
|
### Wiki Management (5 tools)
|
|
678
631
|
Requires USE_GITLAB_WIKI=true environment variable. Supports both project-level and group-level wikis.
|
|
@@ -823,9 +776,9 @@ For rapid testing of individual MCP tools:
|
|
|
823
776
|
|
|
824
777
|
```bash
|
|
825
778
|
# Test specific tools directly
|
|
826
|
-
./scripts/test_mcp.sh '{"name": "
|
|
827
|
-
./scripts/test_mcp.sh '{"name": "
|
|
828
|
-
./scripts/test_mcp.sh '{"name": "
|
|
779
|
+
./scripts/test_mcp.sh '{"name": "browse_work_items", "arguments": {"action": "list", "namespace": "test"}}'
|
|
780
|
+
./scripts/test_mcp.sh '{"name": "browse_work_items", "arguments": {"action": "get", "id": "gid://gitlab/WorkItem/123"}}'
|
|
781
|
+
./scripts/test_mcp.sh '{"name": "manage_work_item", "arguments": {"action": "create", "namespace": "test", "workItemType": "EPIC", "title": "Test Epic"}}'
|
|
829
782
|
```
|
|
830
783
|
|
|
831
784
|
The `test_mcp.sh` script automatically:
|
|
@@ -865,4 +818,3 @@ This GitLab MCP Server is developed and maintained with care for the community.
|
|
|
865
818
|
|
|
866
819
|
**Maintained with ❤️ by [Dmitry Prudnikov](https://github.com/polaz)**
|
|
867
820
|
**Original work by [zereight](https://github.com/zereight) - Thank you for the foundation!**
|
|
868
|
-
# Version 5.0.0
|