summaryrefslogtreecommitdiff
path: root/servers/gitlab_glab/README.md
blob: 21f40cb20d7e423da9ee77327bd3535ac7c89671 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
# GitLab CLI MCP Server

This MCP server provides integration with GitLab through the GitLab CLI (`glab`) tool. It allows LLM agents to interact with GitLab repositories and resources using the GitLab API.

## Features

- Check if the GitLab CLI is available and accessible
- Find GitLab projects by name and retrieve their IDs
- More features to be added in the future

## Prerequisites

- Python 3.11 or higher
- GitLab CLI (`glab`) installed and accessible in the system PATH
- GitLab account with proper authentication set up via `glab auth login`

## Installation

```bash
# Clone the repository
git clone https://github.com/yourusername/dawids-mcp-servers.git
cd dawids-mcp-servers

# Install the server
cd servers/gitlab_glab
uv pip install -e .
```

## Usage

### Running the server with stdio transport (for local development)

```bash
mcp-gitlab-glab --transport stdio
```

### Running the server with remote transport

```bash
mcp-gitlab-glab --transport remote --host 0.0.0.0 --port 8080
```

## Available Tools

### check_glab_availability

Checks if the GitLab CLI tool is installed and accessible.

```python
result = use_mcp_tool(
    server_name="gitlab_glab",
    tool_name="check_glab_availability",
    arguments={}
)
```

### find_project

Finds a GitLab project by name and returns its ID and other details.

```python
result = use_mcp_tool(
    server_name="gitlab_glab",
    tool_name="find_project",
    arguments={
        "project_name": "my-project"
    }
)
```

## Development

### Running tests

```bash
cd servers/gitlab_glab
uv run pytest
```

### Running tests with coverage

```bash
cd servers/gitlab_glab
uv run pytest --cov=mcp_server_gitlab_glab
```

## License

This project is licensed under the MIT License - see the LICENSE file for details.