# GitLab Python MCP Server This MCP server provides integration with GitLab through the python-gitlab library. It allows LLM agents to interact with GitLab repositories and resources using the GitLab API directly (no CLI required). ## Features - Find GitLab projects by name and retrieve their IDs - Search for GitLab issues with various filters - Create new GitLab issues - (More features to be added in the future) ## Prerequisites - Python 3.11 or higher - GitLab account and personal access token ## Configuration The server will attempt to discover GitLab settings in the following order: - **Server URL**: Parsed from the current git remote, or from the `GITLAB_URL` environment variable. - **Token**: Parsed from `~/.config/glab-cli/config.yml` (YAML), or from the `GITLAB_TOKEN` environment variable. ## Installation ```bash # Clone the repository cd dawids-mcp-servers ``` ## Usage ### Running from repository root (recommended) ```bash uv --directory /path-to-repo/dawids-mcp-servers/servers/gitlab_python run mcp-gitlab-python --transport stdio uv --directory /path-to-repo/dawids-mcp-servers/servers/gitlab_python run mcp-gitlab-python --transport remote --host 0.0.0.0 --port 8080 ``` ### Alternative: Running from server directory ```bash cd servers/gitlab_python uv run mcp-gitlab-python --transport stdio uv run mcp-gitlab-python --transport remote --host 0.0.0.0 --port 8080 ``` ## Available Tools ### find_project Finds GitLab projects by name and returns their details. ### search_issues Search for GitLab issues with various filters. ### create_issue Creates a new GitLab issue and returns its URL. ## Development ### Running Tests ```bash cd /path/to/servers/gitlab_python uv run pytest ``` ## License MIT