azzarri/gitlab-mcp
3.2
If you are the rightful owner of gitlab-mcp and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to dayong@mcphub.com.
The GitLab MCP Server is a simple Model Context Protocol server designed to interact with the GitLab API, supporting both self-hosted GitLab instances and gitlab.com.
Tools
21
Resources
0
Prompts
0
GitLab MCP Server
En enkel Model Context Protocol (MCP) server för GitLab API. Fungerar med självhostade GitLab-instanser och gitlab.com.
Snabbstart med Docker
# Bygg imagen
docker build -t gitlab-mcp .
# Kör
docker run -i --rm \
-e GITLAB_URL="https://din-gitlab.example.com" \
-e GITLAB_TOKEN="din-token" \
gitlab-mcp
Konfiguration
| Miljövariabel | Beskrivning | Default |
|---|---|---|
GITLAB_URL | GitLab-instansens URL | https://gitlab.com |
GITLAB_TOKEN | Personal Access Token | (krävs) |
Skapa token
- Gå till User Settings → Access Tokens
- Skapa token med scopes:
api(full access)read_repositorywrite_repository
Tillgängliga verktyg
| Verktyg | Beskrivning |
|---|---|
list_projects | Lista projekt |
get_project | Hämta projektinfo |
create_project | Skapa projekt |
get_file | Läs fil |
create_file | Skapa fil |
update_file | Uppdatera fil |
delete_file | Ta bort fil |
list_files | Lista filer/mappar |
list_branches | Lista branches |
create_branch | Skapa branch |
list_issues | Lista issues |
get_issue | Hämta issue |
create_issue | Skapa issue |
update_issue | Uppdatera issue |
list_merge_requests | Lista MRs |
get_merge_request | Hämta MR |
create_merge_request | Skapa MR |
list_pipelines | Lista pipelines |
get_pipeline | Hämta pipeline |
list_commits | Lista commits |
get_current_user | Visa inloggad användare |
Testa
# Lista verktyg
echo '{"jsonrpc":"2.0","id":1,"method":"tools/list"}' | \
docker run -i --rm \
-e GITLAB_URL="https://din-gitlab.example.com" \
-e GITLAB_TOKEN="din-token" \
gitlab-mcp
# Testa ett tool
echo '{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"get_current_user","arguments":{}}}' | \
docker run -i --rm \
-e GITLAB_URL="https://din-gitlab.example.com" \
-e GITLAB_TOKEN="din-token" \
gitlab-mcp
Licens
MIT