<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: archies-coder</title>
    <description>The latest articles on Forem by archies-coder (@archiescoder).</description>
    <link>https://forem.com/archiescoder</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F206790%2F1bf01063-8743-40b3-8919-9c00195e872e.png</url>
      <title>Forem: archies-coder</title>
      <link>https://forem.com/archiescoder</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/archiescoder"/>
    <language>en</language>
    <item>
      <title>Turning GitLab Merge Requests into MCP-Native Data with gitlabmcp</title>
      <dc:creator>archies-coder</dc:creator>
      <pubDate>Wed, 26 Nov 2025 10:12:40 +0000</pubDate>
      <link>https://forem.com/archiescoder/turning-gitlab-merge-requests-into-mcp-native-data-with-gitlabmcp-5o9</link>
      <guid>https://forem.com/archiescoder/turning-gitlab-merge-requests-into-mcp-native-data-with-gitlabmcp-5o9</guid>
      <description>&lt;h2&gt;
  
  
  Turning GitLab Merge Requests into MCP-Native Data with &lt;code&gt;gitlabmcp&lt;/code&gt;
&lt;/h2&gt;

&lt;p&gt;AI copilots are only as helpful as the context they can reach. Most GitLab reviews still involve tab juggling and copy-pasting links into assistants. So I built &lt;code&gt;@archisbhoir/gitlabmcp&lt;/code&gt;: an MCP server plus npm library that exposes complete merge request context (commits, discussions, pipelines, approvals, diffs, jobs) to any MCP-compatible client with one command.&lt;/p&gt;

&lt;h3&gt;
  
  
  Why a GitLab MCP server?
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Unified MR snapshot&lt;/strong&gt;: GitLab splits data between GraphQL and REST. MCP clients want one payload.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Transport flexibility&lt;/strong&gt;: Some copilots launch stdio servers locally; others prefer HTTP. Supporting both keeps the codebase unified.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Automation hooks&lt;/strong&gt;: Once the data is normalized, I can reuse it from scripts without spinning up a server.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  What the MCP server provides
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;npx @archisbhoir/gitlabmcp@latest&lt;/code&gt; starts either a stdio server (perfect for Claude Desktop) or an HTTP server (&lt;code&gt;gitlabmcp-http&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;Tool catalog includes:

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;get_merge_request&lt;/code&gt; for the full view (commits, diffs, pipelines, approvals, discussions).&lt;/li&gt;
&lt;li&gt;Focused helpers: &lt;code&gt;get_merge_request_commits&lt;/code&gt;, &lt;code&gt;get_merge_request_discussions&lt;/code&gt;, &lt;code&gt;get_merge_request_diffs&lt;/code&gt;, &lt;code&gt;get_merge_request_approvals&lt;/code&gt;, &lt;code&gt;get_merge_requests_by_user&lt;/code&gt;, &lt;code&gt;create_merge_request&lt;/code&gt;, &lt;code&gt;health_check&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Pipeline tooling: &lt;code&gt;get_merge_request_pipelines&lt;/code&gt;, &lt;code&gt;get_pipeline&lt;/code&gt;, &lt;code&gt;get_pipeline_jobs&lt;/code&gt; (with status scoping).&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;Drop-in MCP configs live in the README for Claude Desktop or any MCP client; you can also hit &lt;code&gt;/mcp&lt;/code&gt; via HTTP for remote/browsers.&lt;/li&gt;

&lt;/ul&gt;

&lt;h3&gt;
  
  
  Library mode for scripting
&lt;/h3&gt;

&lt;p&gt;Need MR or pipeline data in a Node script? Install and call the exports directly:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm &lt;span class="nb"&gt;install&lt;/span&gt; @archisbhoir/gitlabmcp
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;getMergeRequestView&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;fetchAllCommits&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;fetchAllDiscussions&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;getMRChangesRest&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;getMRApprovalsRest&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;getMRPipelines&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;getPipeline&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;getPipelineJobs&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;@archisbhoir/gitlabmcp&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;view&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;getMergeRequestView&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;group/project&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;123&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;pipelines&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;getMRPipelines&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;group/project&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;123&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;jobs&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;getPipelineJobs&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;group/project&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;456&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;scope&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;failed&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;All helpers read &lt;code&gt;GITLAB_BASE_URL&lt;/code&gt; and &lt;code&gt;GITLAB_TOKEN&lt;/code&gt; from &lt;code&gt;process.env&lt;/code&gt; (or &lt;code&gt;.env&lt;/code&gt;), so scripts get the same normalization as the MCP server.&lt;/p&gt;

&lt;h3&gt;
  
  
  Quick-start commands
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Stdio MCP server (Claude Desktop, other stdio clients)&lt;/span&gt;
npx @archisbhoir/gitlabmcp@latest

&lt;span class="c"&gt;# HTTP MCP server&lt;/span&gt;
npx &lt;span class="nt"&gt;-p&lt;/span&gt; @archisbhoir/gitlabmcp@latest node dist/server-http.js
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Set the environment variables first:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;export &lt;/span&gt;&lt;span class="nv"&gt;GITLAB_BASE_URL&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;https://gitlab.example.com
&lt;span class="nb"&gt;export &lt;/span&gt;&lt;span class="nv"&gt;GITLAB_TOKEN&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;glpat-your-token-with-read_api-or-api
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Pipelines front and center
&lt;/h3&gt;

&lt;p&gt;Release engineers often ask for pipeline history while reviewing a merge request. Instead of opening GitLab separately, copilots can call:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;get_merge_request_pipelines&lt;/code&gt; → all pipelines tied to an MR.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;get_pipeline&lt;/code&gt; → details on any pipeline (status, SHA, web URL, source).&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;get_pipeline_jobs&lt;/code&gt; → individual jobs filtered by status (&lt;code&gt;running&lt;/code&gt;, &lt;code&gt;failed&lt;/code&gt;, &lt;code&gt;manual&lt;/code&gt;, etc.).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Combine those with MR discussions or diffs to build “summarize failing jobs” workflows entirely inside your MCP client.&lt;/p&gt;

&lt;h3&gt;
  
  
  Visualizing the data flow
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdbgcvqgkc9vb4hdw4l6i.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdbgcvqgkc9vb4hdw4l6i.png" alt="gitlab mcp server data flow graphql, rest" width="800" height="519"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Where to go next
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Docs &amp;amp; code&lt;/strong&gt;: &lt;a href="https://github.com/archisbhoir/gitlabmcp" rel="noopener noreferrer"&gt;https://github.com/archisbhoir/gitlabmcp&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;npm&lt;/strong&gt;: &lt;a href="https://www.npmjs.com/package/@archisbhoir/gitlabmcp" rel="noopener noreferrer"&gt;https://www.npmjs.com/package/@archisbhoir/gitlabmcp&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Ideas welcome&lt;/strong&gt;: I’m eyeing reviewer insights and automated summaries next—let me know what would make your MR reviews easier.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Whether you want your AI assistant to summarize discussions, remind you of pending approvals, or watch pipeline failures, &lt;code&gt;gitlabmcp&lt;/code&gt; keeps GitLab context flowing directly into the MCP ecosystem. Let me know how it works for you and what tooling you’d like layered on top.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>javascript</category>
      <category>git</category>
      <category>tooling</category>
    </item>
  </channel>
</rss>
