Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

Contributing to GitLab & MCP: Lessons from a Week of Upstream Open-Source Engineering

Description and use

Adding note editing, exposing user events, consolidating pipeline creation, and fixing session leaks in GitLab’s MCP and language server improved AI assistant stability and CI reliability.

Problem

AI agents could not edit existing comments or refine feedback in-place in GitLab’s Model Context Protocol (MCP), leading to comment sprawl.

Outcome

All enhancements were merged with 100% green CI pipelines, improving MCP functionality, reducing API fragmentation, and eliminating stale state leaks in the language server.

Workflow

  • Introduce update_note mutation and schema changes
  • Add list_user_events MCP tool and date type mapping
  • Consolidate merge‑request pipeline logic into save_pipeline
  • Add parent_iid to list_work_items and improve validation errors
  • Wrap pending wake operations with session IDs in gitlab-lsp
  • Run automated tests and CI to ensure 100% green pipelines

Evidence

The MCP save_note tool allowed AI agents to post comments, reply to discussion threads, and resolve discussions on merge requests and work items. However, agents could not edit their existing comments or refine feedback in-place, leading to comment sprawl.

Source

We introduced the update_note method to save_note

Source

Bound the endpoint as list_user_events in the :core toolset with pagination, action, and target-type filters.

Source

Consolidated the merge request trigger directly into SavePipelineService using an optional merge_request_iid parameter.

Source

Wrapped pending wake operations with session IDs and implemented await flushMicrotasks() during session teardown.

Source

Achieved a 100% green CI pipeline across all 82 jobs.

Source

  • Record date: 2026-11-01T22:28:59.521Z