gitlab-mcp

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övariabelBeskrivningDefault
GITLAB_URLGitLab-instansens URLhttps://gitlab.com
GITLAB_TOKENPersonal Access Token(krävs)

Skapa token

  1. Gå till User Settings → Access Tokens
  2. Skapa token med scopes:
    • api (full access)
    • read_repository
    • write_repository

Tillgängliga verktyg

VerktygBeskrivning
list_projectsLista projekt
get_projectHämta projektinfo
create_projectSkapa projekt
get_fileLäs fil
create_fileSkapa fil
update_fileUppdatera fil
delete_fileTa bort fil
list_filesLista filer/mappar
list_branchesLista branches
create_branchSkapa branch
list_issuesLista issues
get_issueHämta issue
create_issueSkapa issue
update_issueUppdatera issue
list_merge_requestsLista MRs
get_merge_requestHämta MR
create_merge_requestSkapa MR
list_pipelinesLista pipelines
get_pipelineHämta pipeline
list_commitsLista commits
get_current_userVisa 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