{"id":32420591,"url":"https://github.com/eshan1347/gitlab-agent-mcp","last_synced_at":"2026-06-18T16:31:45.027Z","repository":{"id":318540087,"uuid":"1071006095","full_name":"eshan1347/gitlab-agent-mcp","owner":"eshan1347","description":"Gitlab MCP server for agents","archived":false,"fork":false,"pushed_at":"2025-10-11T06:23:29.000Z","size":59,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-10-25T17:56:22.094Z","etag":null,"topics":["gemini","gitlab","google-genai","mcp","mcp-server","pydantic","pydantic-ai"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/eshan1347.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-10-06T18:27:01.000Z","updated_at":"2025-10-11T06:23:32.000Z","dependencies_parsed_at":null,"dependency_job_id":"6fc97eb5-1553-459d-af6f-e255844e6510","html_url":"https://github.com/eshan1347/gitlab-agent-mcp","commit_stats":null,"previous_names":["eshan1347/gitlab-agent-mcp"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/eshan1347/gitlab-agent-mcp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eshan1347%2Fgitlab-agent-mcp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eshan1347%2Fgitlab-agent-mcp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eshan1347%2Fgitlab-agent-mcp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eshan1347%2Fgitlab-agent-mcp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eshan1347","download_url":"https://codeload.github.com/eshan1347/gitlab-agent-mcp/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eshan1347%2Fgitlab-agent-mcp/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34499404,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-18T02:00:06.871Z","response_time":128,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["gemini","gitlab","google-genai","mcp","mcp-server","pydantic","pydantic-ai"],"created_at":"2025-10-25T17:56:17.212Z","updated_at":"2026-06-18T16:31:45.007Z","avatar_url":"https://github.com/eshan1347.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Gitlab MCP Server for Agents\n\n## Overview\nThis is a Gitlab MCP Server specifically for Agents (eg: Pydantic AI). This was developed due to incompatibility of the various other gitlab mcp servers , including the official one with pydantic \u0026 llms like google-gemini. \nThis is a wrapper around [gitlab-mcp](https://github.com/zereight/gitlab-mcp) \u0026 provides access to all of the tools present (62 !)\n\n## Key Features\n\n- **Compatible**: Compatible with the latest frameworks \u0026 tools like pydantic , google-gemini . \n- **Extensive Toolset**: Access a wide range of tools for CRUD operations on Merge requests, files, repositories, branches, notes, issues, namespaces, projects ,labels, commits, events.\n- **Validation**: Improved validation for Tool inputs, properties \u0026 JSON schemas.\n- **Connection**: Supports both stdio and streamable HTTPS for flexible and reliable agent communication.\n---\n## Project Structure\n```\n.\n├── server.py  # wrapper class around @zereight/mcp-gitlab to manage it's runtime, async context, list \u0026 call tools.  \n├── server2.py # low level mcp server re-packaging the modified tools.\n├── requirements.txt # Python package requirements\n├── utils.py # Code for replacing references in the json tool input schema with the actual attributes.\n├── utils2.py # Code for further modifying the tool input schema (remove nested dicts, arrays, other not supported keys).\n├── app.py # Example code for how to run the mcp server with a pydantic ai agent.\n└── README.md  # This file\n```\n\n## Usage\n\n### Local usage\n\n1. Clone the repository:\n   ```bash\n   git clone https://github.com/eshan1347/gitlab-agent-mcp.git\n   cd gitlab-agent-mcp\n2. Install requirements :\n   ```bash\n   pip install -r requirements.txt\n3. Set up your environment by creating a `.env` file or exporting the variables directly in your terminal. \n4. Run the mcp server :\n   \n   STDIO :-\n   ```python\n   server = pydantic_ai.mcp.MCPServerStdio(\n    command='python',\n    args=[\n        'server2_stdio.py'\n    ],\n    env={\n        'GITLAB_ACCESS_TOKEN': \"your_gitlab_token\",\n        'GITLAB_PROJECT_ID': \"your_project_id\" //Optional        \n    }\n     )\n   ```\n   Streamable HTTP :-\n   ```bash\n   python ./server2_http\n   \n\n### Environment Variables : \n1. `GITLAB_PERSONAL_ACCESS_TOKEN`: Your GitLab personal access token.\n2. `GITLAB_API_URL`: Your GitLab API URL. (Default: https://gitlab.com/api/v4)\n3. `GITLAB_PROJECT_ID`: Default project ID. If set, Overwrite this value when making an API request.\n4. `GITLAB_ALLOWED_PROJECT_IDS`: Optional comma-separated list of allowed project IDs. When set with a single value, acts as a default project (like the old \"lock\" mode). When set with multiple values, restricts access to only those projects.\n5. `Single` value 123: MCP server can only access project 123 and uses it as default\n6. `Multiple` values 123,456,789: MCP server can access projects 123, 456, and 789 but requires explicit project ID in requests\n7. `GITLAB_READ_ONLY_MODE`: When set to 'true', restricts the server to only expose read-only operations. Useful for enhanced security or when write access is not needed. Also useful for using with Cursor and it's 40 tool limit.\n8. `GITLAB_DENIED_TOOLS_REGEX`: When set as a regular expression, it excludes the matching tools.\n9. `USE_GITLAB_WIKI`: When set to 'true', enables the wiki-related tools (list_wiki_pages, get_wiki_page, create_wiki_page, update_wiki_page, delete_wiki_page). By default, wiki features are disabled.\n10. `USE_MILESTONE`: When set to 'true', enables the milestone-related tools (list_milestones, get_milestone, create_milestone, edit_milestone, delete_milestone, get_milestone_issue, get_milestone_merge_requests, promote_milestone, get_milestone_burndown_events). By default, milestone features are disabled.\n11. `USE_PIPELINE`: When set to 'true', enables the pipeline-related tools (list_pipelines, get_pipeline, list_pipeline_jobs, list_pipeline_trigger_jobs, get_pipeline_job, get_pipeline_job_output, create_pipeline, retry_pipeline, cancel_pipeline, play_pipeline_job, retry_pipeline_job, cancel_pipeline_job). By default, pipeline features are disabled.\n12. `GITLAB_AUTH_COOKIE_PATH`: Path to an authentication cookie file for GitLab instances that require cookie-based authentication. When provided, the cookie will be included in all GitLab API requests.\n13. `GITLAB_COMMIT_FILES_PER_PAGE`: The number of files per page that GitLab returns for commit diffs. This value should match the server-side GitLab setting. Adjust this if your GitLab instance uses a custom per-page value for commit diffs.\n\n## Tools  :\n- `merge_merge_request` - Merge a merge request in a GitLab project\n- `create_or_update_file` - Create or update a single file in a GitLab project\n- `search_repositories` - Search for GitLab projects\n- `create_repository` - Create a new GitLab project\n- `get_file_contents` - Get the contents of a file or directory from a GitLab project\n- `push_files` - Push multiple files to a GitLab project in a single commit\n- `create_issue` - Create a new issue in a GitLab project\n- `create_merge_request` - Create a new merge request in a GitLab project\n- `fork_repository` - Fork a GitLab project to your account or specified namespace\n- `create_branch` - Create a new branch in a GitLab project\n- `get_merge_request` - Get details of a merge request (Either mergeRequestIid or branchName must be provided)\n- `get_merge_request_diffs` - Get the changes/diffs of a merge request (Either mergeRequestIid or branchName must be provided)\n- `list_merge_request_diffs` - List merge request diffs with pagination support (Either mergeRequestIid or branchName must be provided)\n- `get_branch_diffs` - Get the changes/diffs between two branches or commits in a GitLab project\n- `update_merge_request` - Update a merge request (Either mergeRequestIid or branchName must be provided)\n- `create_note` - Create a new note (comment) to an issue or merge request\n- `create_merge_request_thread` - Create a new thread on a merge request\n- `mr_discussions` - List discussion items for a merge request\n- `update_merge_request_note` - Modify an existing merge request thread note\n- `create_merge_request_note` - Add a new note to an existing merge request thread\n- `get_draft_note` - Get a single draft note from a merge request\n- `list_draft_notes` - List draft notes for a merge request\n- `create_draft_note` - Create a draft note for a merge request\n- `update_draft_note` - Update an existing draft note\n- `delete_draft_note` - Delete a draft note\n- `publish_draft_note` - Publish a single draft note\n- `bulk_publish_draft_notes` - Publish all draft notes for a merge request\n- `update_issue_note` - Modify an existing issue thread note\n- `create_issue_note` - Add a new note to an existing issue thread\n- `list_issues` - List issues (default: created by current user only; use scope='all' for all accessible issues)\n- `my_issues` - List issues assigned to the authenticated user (defaults to open issues)\n- `get_issue` - Get details of a specific issue in a GitLab project\n- `update_issue` - Update an issue in a GitLab project\n- `delete_issue` - Delete an issue from a GitLab project\n- `list_issue_links` - List all issue links for a specific issue\n- `list_issue_discussions` - List discussions for an issue in a GitLab project\n- `get_issue_link` - Get a specific issue link\n- `create_issue_link` - Create an issue link between two issues\n- `delete_issue_link` - Delete an issue link\n- `list_namespaces` - List all namespaces available to the current user\n- `get_namespace` - Get details of a namespace by ID or path\n- `verify_namespace` - Verify if a namespace path exists\n- `get_project` - Get details of a specific project\n- `list_projects` - List projects accessible by the current user\n- `list_project_members` - List members of a GitLab project\n- `list_labels` - List labels for a project\n- `get_label` - Get a single label from a project\n- `create_label` - Create a new label in a project\n- `update_label` - Update an existing label in a project\n- `delete_label` - Delete a label from a project\n- `list_group_projects` - List projects in a GitLab group with filtering options\n- `list_wiki_pages` - List wiki pages in a GitLab project\n- `get_wiki_page` - Get details of a specific wiki page\n- `create_wiki_page` - Create a new wiki page in a GitLab project\n- `update_wiki_page` - Update an existing wiki page in a GitLab project\n- `delete_wiki_page` - Delete a wiki page from a GitLab project\n- `get_repository_tree` - Get the repository tree for a GitLab project (list files and directories)\n- `list_pipelines` - List pipelines in a GitLab project with filtering options\n- `get_pipeline` - Get details of a specific pipeline in a GitLab project\n- `list_pipeline_jobs` - List all jobs in a specific pipeline\n- `list_pipeline_trigger_jobs` - List all trigger jobs (bridges) in a specific pipeline that trigger downstream pipelines\n- `get_pipeline_job` - Get details of a GitLab pipeline job number\n- `get_pipeline_job_output` - Get the output/trace of a GitLab pipeline job with optional pagination to limit context window usage\n- `create_pipeline` - Create a new pipeline for a branch or tag\n- `retry_pipeline` - Retry a failed or canceled pipeline\n- `cancel_pipeline` - Cancel a running pipeline\n- `play_pipeline_job` - Run a manual pipeline job\n- `retry_pipeline_job` - Retry a failed or canceled pipeline job\n- `cancel_pipeline_job` - Cancel a running pipeline job\n- `list_merge_requests` - List merge requests in a GitLab project with filtering options\n- `list_milestones` - List milestones in a GitLab project with filtering options\n- `get_milestone` - Get details of a specific milestone\n- `create_milestone` - Create a new milestone in a GitLab project\n- `edit_milestone` - Edit an existing milestone in a GitLab project\n- `delete_milestone` - Delete a milestone from a GitLab project\n- `get_milestone_issue` - Get issues associated with a specific milestone\n- `get_milestone_merge_requests` - Get merge requests associated with a specific milestone\n- `promote_milestone` - Promote a milestone to the next stage\n- `get_milestone_burndown_events` - Get burndown events for a specific milestone\n- `get_users` - Get GitLab user details by usernames\n- `list_commits` - List repository commits with filtering options\n- `get_commit` - Get details of a specific commit\n- `get_commit_diff` - Get changes/diffs of a specific commit\n- `list_group_iterations` - List group iterations with filtering options\n- `upload_markdown` - Upload a file to a GitLab project for use in markdown content\n- `download_attachment` - Download an uploaded file from a GitLab project by secret and filename\n- `list_events` - List all events for the currently authenticated user\n- `get_project_events` - List all visible events for a specified project\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feshan1347%2Fgitlab-agent-mcp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feshan1347%2Fgitlab-agent-mcp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feshan1347%2Fgitlab-agent-mcp/lists"}