How I made Claude write commits and handle Merge Requests — even on GitLab’s free tier
Automation used to mean “run my tests and deploy my code.”
Now it means “let the AI handle the boring stuff while I focus on the real problems.”
But there’s one challenge — if you’re using the free version of GitLab, you’ll need to wire things together yourself.
That’s exactly what I did.
The setup that worked for me
To make Claude interact with GitLab, I used two components:
An MCP server – a middleware that allows AI agents to safely talk to external APIs.
For GitLab, there’s a ready-made module: @zereight/mcp-gitlab. 1.
A webhook handler – a lightweight FastAPI service that listens for GitLab events (ne…
How I made Claude write commits and handle Merge Requests — even on GitLab’s free tier
Automation used to mean “run my tests and deploy my code.”
Now it means “let the AI handle the boring stuff while I focus on the real problems.”
But there’s one challenge — if you’re using the free version of GitLab, you’ll need to wire things together yourself.
That’s exactly what I did.
The setup that worked for me
To make Claude interact with GitLab, I used two components:
An MCP server – a middleware that allows AI agents to safely talk to external APIs.
For GitLab, there’s a ready-made module: @zereight/mcp-gitlab. 1.
A webhook handler – a lightweight FastAPI service that listens for GitLab events (new issues, comments, MRs) and triggers the AI workflow.
What I learned
- On average, each task costs about $1 in Claude API usage — mostly due to code scanning.
 - Occasionally, the CI pipeline behaves unpredictably: the agent might forget to commit changes or stop mid-task.
 
Still, this kind of automation is becoming a core part of modern development.
The agent handles repetitive chores so humans can focus on design, logic, and innovation.
How to improve the setup
Switch to Cursor CLI – it’s not only more stable and better at model selection,
but its basic subscription already includes a generous token allowance and native MCP support,
so you can integrate AI workflows without worrying about API limits. 1.
Add loop control – restrict the number of iterations the agent can run to avoid runaway tasks. 1.
Run post-checks after the agent finishes:
bash
npm run lint --fix
npm test
git add . && git commit -m "AI fixes" && git push