@@ -4,6 +4,44 @@ Gitlab MCP (ModelContextProvider) server
4
4
5
5
---
6
6
7
+ ## 📦 Installation
8
+
9
+ ### Prerequisites
10
+
11
+ - Python 3.11 or higher
12
+ - Running MCP server(s)
13
+ - Cursor as MCP client
14
+ - Podman(If running as containers)
15
+
16
+ ### Method 1: local setup in venv
17
+
18
+ ``` bash
19
+ git clone
[email protected] :redhat-ai-tools/gitlab-mcp.git
20
+ cd gitlab-mcp
21
+ python3 -m venv venv
22
+ source venv/bin/activate
23
+ pip install -r requirements.txt
24
+ ```
25
+ Set MCP env vars, if not set everything else will fallback to default except MCP_GITLAB_TOKEN.
26
+ If everything is set, Test this setup using:
27
+ ```
28
+ python gitlab_mcp_server.py
29
+ INFO:__main__:🔒 Max API calls/hour: 100
30
+ INFO:__main__:🔒 Allowed actions: ['read']
31
+ INFO:__main__:🔒 Allowed repos: [<your allowed repo list>]
32
+ INFO:__main__:🔗 GitLab URL: <if gitlab URL is provided it will show up here, else the default value will appear>
33
+ 🚀 Starting GitLab MCP Server (FastMCP - Read-Only)...
34
+ 📋 Available Tools:
35
+ 🔍 search_repositories - Search/filter repositories
36
+ 📋 list_issues - List project issues
37
+ 🔀 list_merge_requests - List merge requests
38
+ 🏗️ list_pipelines - List CI/CD pipelines
39
+ ⚙️ list_jobs - List pipeline jobs
40
+ ❌ check_latest_failed_jobs - Check failed jobs
41
+ 📝 list_latest_commits - List recent commits
42
+ ```
43
+ Interrupt Ctrl+C, and add this to Cursor config as shown in next steps.
44
+
7
45
## Running locally in a MCP client like cursor
8
46
9
47
To run this MCP server from cursor. Go to cursor settings -> Tools & integrations -> Add MCP server
@@ -13,19 +51,19 @@ To run this MCP server from cursor. Go to cursor settings -> Tools & integration
13
51
"mcpServers" : {
14
52
"gitlab-mcp-local" : {
15
53
"command" : " python" ,
16
- "args" : [" gitlab_mcp_server.py" ],
54
+ "args" : [" <your venv absolute path>/ gitlab_mcp_server.py" ],
17
55
"trust" : true
18
56
}
19
57
}
20
58
}
21
59
```
22
60
23
- ## Building locally
24
-
25
- To build the container image locally using Podman, run:
61
+ ### Method 2: Container build
26
62
27
- ``` sh
28
- podman build -t gitlab-mcp-server:latest -f Containerfile .
63
+ ``` bash
64
+ git clone
[email protected] :redhat-ai-tools/gitlab-mcp.git
65
+ cd gitlab-mcp
66
+ podman build -t gitlab-mcp-server:latest .
29
67
```
30
68
31
69
This will create a local image named ` gitlab-mcp-server:latest ` that you can use to run the server.
0 commit comments