@bossforce.ai/mcp-gitlab
v0.1.0
Published
MCP server for the **GitLab REST API v4**, authenticated with a personal access token (`Authorization: Bearer <token>`). Browse projects, read repository files, and manage issues and merge requests. Works against GitLab.com by default and any self-managed
Readme
@bossforce.ai/mcp-gitlab
MCP server for the GitLab REST API v4, authenticated with a personal access
token (Authorization: Bearer <token>). Browse projects, read repository files,
and manage issues and merge requests. Works against GitLab.com by default and any
self-managed instance via an optional base URL.
Credentials
| Env | How to obtain |
| ----------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- |
| GITLAB_TOKEN | Create a personal access token in GitLab (User Settings → Access Tokens) with the api scope. |
| GITLAB_BASE_URL | Optional. API base URL for a self-managed instance, e.g. https://gitlab.example.com/api/v4. Defaults to https://gitlab.com/api/v4. |
The api scope grants full read/write; use read_api for read-only access. The
token is read lazily, so the server boots and answers tools/list without it;
calls fail with an auth error until it is set.
Tools
| Tool | Arguments | Returns |
| ---------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------- |
| list_projects | search?, owned?, simple?, order_by?, sort?, per_page?, page? | { items: [...] } |
| list_issues | project_id, state?, labels?, search?, per_page?, page? | { items: [...] } |
| create_issue | project_id, title, description?, labels?, assignee_ids?, milestone_id?, confidential? | the created issue |
| get_file | project_id, file_path, ref | the file (Base64 content) |
| create_merge_request | project_id, source_branch, target_branch, title, description?, assignee_ids?, reviewer_ids?, labels?, remove_source_branch?, target_project_id? | the created merge request |
Responses are GitLab's native JSON payloads, returned as structuredContent.
Endpoints that return a bare array (list_projects, list_issues) are wrapped
under items.
Working with projects
project_id is either the numeric project ID or the URL-encoded
namespace/project path (e.g. mygroup/myrepo); it is encoded for you, so pass
it unescaped. Use list_projects to discover a project ID first. For get_file,
the returned content is Base64-encoded — decode it to read the file. Page
through list_projects and list_issues with per_page and page.
Develop
pnpm --filter @bossforce.ai/mcp-gitlab build
pnpm --filter @bossforce.ai/mcp-gitlab testRegenerate the tools/list snapshot after an intentional signature change:
UPDATE_SNAPSHOTS=1 pnpm --filter @bossforce.ai/mcp-gitlab test