Skip to main content
Glama
ZephyrDeng

mcp-server-gitlab

by ZephyrDeng

中文版

Build Status Node Version License

Downloads npm version

mcp-gitlab MCP Server (English)

A GitLab integration server built on the fastmcp framework, providing various GitLab RESTful API tools. Supports integration with Claude, Smithery, and other platforms.

Features

  • GitlabSearchUserProjectsTool: Search users and their active projects by username

  • GitlabGetUserTasksTool: Get current user's pending tasks

  • GitlabSearchProjectDetailsTool: Search projects and details

  • GitlabCreateMRCommentTool: Add comments to merge requests

  • GitlabAcceptMRTool: Accept and merge merge requests

  • GitlabUpdateMRTool: Update merge request assignee, reviewers, title, description, and labels

  • GitlabCreateMRTool: Create a new merge request with assignee and reviewers

  • GitlabRawApiTool: Call any GitLab API with custom parameters

Related MCP server: gitlab-mcp

Quick Start

Stdio Mode (Default)

# Install dependencies
bun install

# Build the project
bun run build

# Start the server with stdio transport (default)
bun run start

HTTP Stream Mode (Server Deployment)

# Install dependencies
bun install

# Build the project
bun run build

# Start the server with HTTP stream transport
MCP_TRANSPORT_TYPE=httpStream MCP_PORT=3000 bun run start

# Or using command line flag
bun dist/index.js --http-stream

Environment Variables

# Required for all modes (optional for httpStream mode - can be provided via HTTP headers)
GITLAB_API_URL=https://your-gitlab-instance.com

# Required for stdio mode, optional for httpStream mode
# (can be provided via HTTP headers in httpStream mode)
GITLAB_TOKEN=your_access_token

# Optional: Provide a mapping from usernames to user IDs (JSON string)
# This can reduce API calls, especially when referencing the same users frequently
# Example: '{"username1": 123, "username2": 456}'
GITLAB_USER_MAPPING={"username1": 123, "username2": 456}

# Optional: Provide a mapping from project names to project IDs (JSON string)
# Project IDs can be numbers or strings (e.g., 'group/project')
# This can reduce API calls and ensure the correct project is used
# Example: '{"project-name-a": 1001, "group/project-b": "group/project-b"}'
GITLAB_PROJECT_MAPPING={"project-name-a": 1001, "group/project-b": "group/project-b"}

# MCP Transport Configuration (Optional)
# Transport type: stdio (default) or httpStream  
MCP_TRANSPORT_TYPE=stdio

# HTTP Stream Configuration (Only used when MCP_TRANSPORT_TYPE=httpStream)
# Server binding address (default: 0.0.0.0 for httpStream, localhost for stdio)
# For Docker deployments, use 0.0.0.0 to allow external access
MCP_HOST=0.0.0.0

# Server port (default: 3000)
MCP_PORT=3000

# API endpoint path (default: /mcp)
MCP_ENDPOINT=/mcp

Usage Examples

Direct HTTP API Usage

You can also interact with the MCP server directly via HTTP requests:

# Example: Get user tasks using Bearer token
curl -X POST http://localhost:3000/mcp \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer your-gitlab-token" \
  -d '{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "tools/call",
    "params": {
      "name": "Gitlab Get User Tasks Tool",
      "arguments": {
        "taskFilterType": "ASSIGNED_MRS",
        "fields": ["id", "title", "source_branch", "target_branch"]
      }
    }
  }'
# Example: Search projects using PRIVATE-TOKEN header
curl -X POST http://localhost:3000/mcp \
  -H "Content-Type: application/json" \
  -H "PRIVATE-TOKEN: your-gitlab-token" \
  -d '{
    "jsonrpc": "2.0",
    "id": 2,
    "method": "tools/call",
    "params": {
      "name": "Gitlab Search Project Details Tool",
      "arguments": {
        "projectName": "my-project",
        "fields": ["id", "name", "description", "web_url"]
      }
    }
  }'
# Example: Use dynamic GitLab instance URL with Bearer token
curl -X POST http://localhost:3000/mcp \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer your-gitlab-token" \
  -H "x-gitlab-url: https://gitlab.company.com" \
  -d '{
    "jsonrpc": "2.0",
    "id": 3,
    "method": "tools/call",
    "params": {
      "name": "Gitlab Get User Tasks Tool",
      "arguments": {
        "taskFilterType": "ASSIGNED_MRS",
        "fields": ["id", "title", "source_branch", "target_branch"]
      }
    }
  }'

Tool Examples

For detailed examples of each tool's parameters, see USAGE.md.

Key benefits of HTTP Stream mode with dynamic authentication:

  • Multi-tenant support: Single server instance can serve multiple users

  • Security: Each request uses its own authentication token and GitLab instance URL

  • Flexibility: Tokens and GitLab URLs can be configured per client without server restart

  • Multi-instance support: Connect to different GitLab instances from the same server

Transport Modes

This server supports two transport modes:

1. Stdio Transport (Default)

  • Best for local development and direct integration with MCP clients

  • Uses stdin/stdout for communication

  • No network configuration needed

2. HTTP Stream Transport

  • Enables server deployment for remote access

  • Uses HTTP POST requests with streaming responses

  • Allows multiple clients to connect to the same server instance

  • Ideal for production deployments

  • Supports dynamic token authentication via HTTP headers

When using HTTP Stream mode, clients can connect to:

POST http://localhost:3000/mcp
Content-Type: application/json

Authentication Methods

HTTP Stream mode supports multiple ways to provide GitLab tokens and instance URLs:

Token Authentication:

1. Bearer Token (Recommended):

POST http://localhost:3000/mcp
Content-Type: application/json
Authorization: Bearer your-gitlab-access-token

2. Private Token Header:

POST http://localhost:3000/mcp
Content-Type: application/json
PRIVATE-TOKEN: your-gitlab-access-token

3. Alternative Private Token Header:

POST http://localhost:3000/mcp
Content-Type: application/json
private-token: your-gitlab-access-token

4. Custom GitLab Token Header:

POST http://localhost:3000/mcp
Content-Type: application/json
x-gitlab-token: your-gitlab-access-token

GitLab Instance URL Configuration:

1. GitLab URL Header (Recommended):

POST http://localhost:3000/mcp
Content-Type: application/json
x-gitlab-url: https://gitlab.company.com

2. Alternative GitLab URL Headers:

POST http://localhost:3000/mcp
Content-Type: application/json
gitlab-url: https://gitlab.company.com
POST http://localhost:3000/mcp
Content-Type: application/json
gitlab-api-url: https://gitlab.company.com

5. Fallback to Environment Variables: If no token or URL is provided in headers, the server will fall back to the GITLAB_TOKEN and GITLAB_API_URL environment variables.

Complete Example:

POST http://localhost:3000/mcp
Content-Type: application/json
Authorization: Bearer your-gitlab-access-token
x-gitlab-url: https://gitlab.company.com

Project Structure

src/
├── server/
│   └── GitlabMCPServer.ts          # MCP server entry point
├── tools/
│   ├── GitlabAcceptMRTool.ts
│   ├── GitlabCreateMRCommentTool.ts
│   ├── GitlabGetUserTasksTool.ts
│   ├── GitlabRawApiTool.ts
│   ├── GitlabSearchProjectDetailsTool.ts
│   ├── GitlabSearchUserProjectsTool.ts
│   └── gitlab/
│       ├── FieldFilterUtils.ts
│       ├── GitlabApiClient.ts
│       └── GitlabApiTypes.ts
├── utils/
│   ├── is.ts
│   └── sensitive.ts
smithery.json                      # Smithery config
USAGE.md                          # Usage examples
package.json
tsconfig.json

Integration

Claude Desktop Client

Stdio Mode (Default)

Add to your config:

{
  "mcpServers": {
    "@zephyr-mcp/gitlab": {
      "command": "npx",
      "args": ["-y", "@zephyr-mcp/gitlab"]
    }
  }
}

HTTP Stream Mode (Server Deployment)

Server Setup: First start the server (note that both GITLAB_TOKEN and GITLAB_API_URL are optional when using HTTP headers):

# On your server - no token or URL required in env vars
MCP_TRANSPORT_TYPE=httpStream MCP_PORT=3000 MCP_HOST=0.0.0.0 npx @zephyr-mcp/gitlab

# Or with Docker
docker run -d \
  -p 3000:3000 \
  -e MCP_TRANSPORT_TYPE=httpStream \
  -e MCP_HOST=0.0.0.0 \
  -e MCP_PORT=3000 \
  gitlab-mcp-server

Client Configuration:

Option 1: With Bearer Token (Recommended)

{
  "mcpServers": {
    "@zephyr-mcp/gitlab": {
      "command": "npx",
      "args": [
        "@modelcontextprotocol/client-cli",
        "http://your-server:3000/mcp",
        "--header", "Authorization: Bearer your-gitlab-access-token"
      ]
    }
  }
}

Option 2: With Private Token Header

{
  "mcpServers": {
    "@zephyr-mcp/gitlab": {
      "command": "npx",
      "args": [
        "@modelcontextprotocol/client-cli",
        "http://your-server:3000/mcp",
        "--header", "PRIVATE-TOKEN: your-gitlab-access-token"
      ]
    }
  }
}

Option 3: With Dynamic GitLab URL and Token

{
  "mcpServers": {
    "@zephyr-mcp/gitlab": {
      "command": "npx",
      "args": [
        "@modelcontextprotocol/client-cli",
        "http://your-server:3000/mcp",
        "--header", "Authorization: Bearer your-gitlab-access-token",
        "--header", "x-gitlab-url: https://gitlab.company.com"
      ]
    }
  }
}

Multi-tenant Usage: Each user can configure their own token and GitLab instance URL in their client configuration, allowing the same server instance to serve multiple users with different GitLab permissions and instances.

Smithery

Use directly on Smithery platform:

smithery add @zephyr-mcp/gitlab

Or search "@zephyr-mcp/gitlab" in Smithery UI and add to your workspace.

Environment variables:

  • GITLAB_API_URL: Base URL of your GitLab API (required for stdio mode, optional for httpStream mode - can be provided via HTTP headers)

  • GITLAB_TOKEN: Access token for GitLab API authentication (required for stdio mode, optional for httpStream mode - can be provided via HTTP headers)

  • MCP_TRANSPORT_TYPE: Transport type (stdio/httpStream)

  • MCP_HOST: Server binding address for HTTP stream mode

  • MCP_PORT: HTTP port for HTTP stream mode

  • MCP_ENDPOINT: HTTP endpoint path for HTTP stream mode

Deployment

Docker Deployment

The repository includes a Dockerfile for easy deployment:

# Build the Docker image
docker build -t gitlab-mcp-server .

# Run with environment variables (both token and URL can be provided via HTTP headers)
docker run -d \
  -p 3000:3000 \
  -e MCP_TRANSPORT_TYPE=httpStream \
  -e MCP_HOST=0.0.0.0 \
  -e MCP_PORT=3000 \
  gitlab-mcp-server

Docker Compose Example

services:
  gitlab-mcp:
    image: node:22.14.0
    container_name: gitlab-mcp
    ports:
      - "3000:3000"
    environment:
      - MCP_TRANSPORT_TYPE=httpStream
      - MCP_HOST=0.0.0.0
      - MCP_PORT=3000
      # Both GITLAB_API_URL and GITLAB_TOKEN are optional when using HTTP headers
      # - GITLAB_API_URL=https://your-gitlab-instance.com
      # - GITLAB_TOKEN=your_gitlab_token
    command: npx -y @zephyr-mcp/gitlab@latest

Important for Docker: When running in Docker containers, make sure to set MCP_HOST=0.0.0.0 to allow external access. The default value for httpStream transport is already 0.0.0.0, but setting it explicitly ensures compatibility.

Manual Deployment

# Install dependencies and build
npm install
npm run build

# Start the server in HTTP stream mode
export GITLAB_API_URL=https://your-gitlab-instance.com
export GITLAB_TOKEN=your_access_token
export MCP_TRANSPORT_TYPE=httpStream
export MCP_PORT=3000

# Run the server
node dist/index.js

Process Manager (PM2)

# Install PM2
npm install -g pm2

# Create ecosystem file
cat > ecosystem.config.js << EOF
module.exports = {
  apps: [{
    name: 'gitlab-mcp-server',
    script: 'dist/index.js',
    env: {
      GITLAB_API_URL: 'https://your-gitlab-instance.com',
      GITLAB_TOKEN: 'your_access_token',
      MCP_TRANSPORT_TYPE: 'httpStream',
      MCP_PORT: 3000
    }
  }]
}
EOF

# Start with PM2
pm2 start ecosystem.config.js
pm2 save
pm2 startup

Available Tools

8 tools
Gitlab Accept MR ToolC

接受并合并指定项目的合并请求,支持自定义合并选项。

ParametersJSON Schema
NameRequiredDescriptionDefault
fieldsNo需要返回的字段路径数组
mergeOptionsNo合并选项
mergeRequestIdYes合并请求 ID
projectIdYes项目 ID

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries full burden. While '接受并合并' implies a write operation that modifies the repository, it doesn't disclose critical behavioral traits: whether this requires specific permissions (e.g., maintainer role), if it's irreversible, potential side effects (e.g., branch deletion), rate limits, or what happens on failure. The mention of '自定义合并选项' (custom merge options) hints at configurability but lacks specifics.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that front-loads the core purpose. It avoids redundancy and wastes no words, though it could be slightly more informative without sacrificing conciseness.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity (a write operation with 4 parameters, nested objects, and no output schema) and lack of annotations, the description is incomplete. It doesn't explain return values, error conditions, or important behavioral context (e.g., merge strategies, permissions). For a tool that performs a significant repository action, this leaves critical gaps for an AI agent.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents all 4 parameters. The description adds minimal value beyond the schema by mentioning '自定义合并选项' (custom merge options), which aligns with the 'mergeOptions' parameter but doesn't elaborate on semantics. With high schema coverage, the baseline is 3.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('接受并合并' - accept and merge) and the resource ('指定项目的合并请求' - specified project's merge request). It distinguishes from sibling tools like 'Gitlab Create MR Tool' and 'Gitlab Update MR Tool' by focusing on finalizing merge requests. However, it doesn't explicitly mention that this is for GitLab specifically (though the tool name implies it).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., merge request must be in a mergeable state), when not to use it (e.g., for draft MRs), or how it differs from sibling tools like 'Gitlab Update MR Tool' which might handle MR modifications without merging.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Gitlab Create MR Comment ToolC

为指定项目的合并请求添加评论。

ParametersJSON Schema
NameRequiredDescriptionDefault
commentYes评论内容
fieldsNo需要返回的字段路径数组
mergeRequestIdYes合并请求 ID
projectIdYes项目 ID

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden for behavioral disclosure. It states the action ('添加评论') which implies a write operation, but doesn't describe permissions required, rate limits, whether comments are editable/deletable, or what happens on success/failure. For a mutation tool with zero annotation coverage, this leaves significant behavioral gaps.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence in Chinese that directly states the tool's purpose without unnecessary words. It's appropriately sized and front-loaded with the core action, making it easy to parse quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a mutation tool with 4 parameters, no annotations, and no output schema, the description is incomplete. It doesn't address behavioral aspects like permissions or error handling, nor does it explain the purpose of the optional 'fields' parameter or what the tool returns. More context is needed given the complexity and lack of structured data.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents all 4 parameters (projectId, mergeRequestId, comment, fields). The description doesn't add any parameter-specific context beyond what's in the schema, such as format examples or constraints. Baseline 3 is appropriate when the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('添加评论' - add comment) and resource ('指定项目的合并请求' - specified project's merge request). It distinguishes from siblings like 'Gitlab Accept MR Tool' or 'Gitlab Update MR Tool' by focusing on commenting rather than merging or modifying the MR itself. However, it doesn't explicitly differentiate from potential commenting alternatives that might exist in other contexts.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., needing an existing MR), exclusions, or comparisons with sibling tools like 'Gitlab Raw API Tool' which might also handle comments. Usage is implied through the action but not explicitly contextualized.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Gitlab Create MR ToolC

创建新的 Merge Request,支持指派 assignee 和 reviewers。

ParametersJSON Schema
NameRequiredDescriptionDefault
assigneeIdNo指派的用户 ID
descriptionNo描述
fieldsNo需要返回的字段路径数组
labelsNo标签数组
projectIdYes项目 ID
reviewerIdsNoReviewer 用户 ID 列表
sourceBranchYes源分支
targetBranchYes目标分支
titleYes标题

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. While '创建新的 Merge Request' implies a write/mutation operation, the description lacks critical details: it doesn't mention authentication requirements, potential side effects (e.g., branch merges), error conditions, or what the tool returns. For a creation tool with zero annotation coverage, this leaves significant gaps in understanding its behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise—a single sentence in Chinese that directly states the tool's core function and key features. It's front-loaded with the primary action and wastes no words, making it easy to parse quickly. Every part of the sentence earns its place by highlighting essential capabilities.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity of creating a Merge Request (a mutation with 9 parameters), no annotations, and no output schema, the description is incomplete. It doesn't explain the return value, error handling, or important behavioral aspects like required permissions or idempotency. While the schema covers parameters well, the overall context for safe and effective use is lacking.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents all 9 parameters thoroughly. The description adds minimal value beyond the schema by mentioning assignee and reviewer support, which aligns with the 'assigneeId' and 'reviewerIds' parameters but doesn't provide additional context like format examples or constraints. This meets the baseline for high schema coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: '创建新的 Merge Request' (create a new Merge Request) with specific capabilities: '支持指派 assignee 和 reviewers' (supports assigning assignee and reviewers). This is a specific verb+resource combination that distinguishes it from siblings like Gitlab Update MR Tool or Gitlab Accept MR Tool. However, it doesn't explicitly differentiate from Gitlab Create MR Comment Tool beyond the core action.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., needing existing branches), compare it to Gitlab Update MR Tool for modifications, or specify scenarios where it's appropriate. The agent must infer usage from the name and parameters alone, which is insufficient for clear decision-making.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Gitlab Get User Tasks ToolC

获取当前用户的待办任务,支持多种过滤条件。

ParametersJSON Schema
NameRequiredDescriptionDefault
fieldsNo需要返回的字段路径数组,支持数组或逗号分隔字符串,用于过滤 API 响应字段。 示例: - ["id", "name", "owner.username"] - "id,name,owner.username" - undefined
taskFilterTypeNo任务过滤类型

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. While it mentions filtering capabilities, it fails to describe critical behavioral aspects such as whether this is a read-only operation (implied but not stated), authentication requirements, rate limits, pagination behavior, or error handling. For a tool with zero annotation coverage, this represents a significant gap in transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise - a single sentence that efficiently communicates the core purpose and key capability. Every word earns its place with no wasted verbiage, and the information is front-loaded appropriately.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with 2 parameters, no annotations, and no output schema, the description is insufficiently complete. While concise, it doesn't compensate for the lack of structured metadata by explaining what the tool returns, how results are formatted, or important behavioral constraints. The agent would need to guess about the output format and operational characteristics.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description mentions '支持多种过滤条件' (supports multiple filtering conditions), which aligns with the two parameters in the schema. However, with 100% schema description coverage (both parameters are well-documented in the schema), the description adds minimal value beyond what's already in the structured data. It doesn't provide additional context about parameter interactions or usage patterns.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('获取' - get/retrieve) and resource ('当前用户的待办任务' - current user's pending tasks), making the purpose immediately understandable. However, it doesn't explicitly differentiate this tool from sibling tools like 'Gitlab Search Project Details Tool' or 'Gitlab Search User Projects Tool' that might also retrieve user-related data, which prevents a perfect score.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description mentions '支持多种过滤条件' (supports multiple filtering conditions), which implies some context for usage, but provides no explicit guidance on when to use this tool versus alternatives like 'Gitlab Search User Projects Tool' or 'Gitlab Raw API Tool'. There are no when-to-use or when-not-to-use statements, leaving the agent to infer usage scenarios.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Gitlab Raw API ToolB

支持自定义调用任意 GitLab REST API,适合调试和高级用法。

ParametersJSON Schema
NameRequiredDescriptionDefault
dataNo请求体
endpointYesGitLab API 路径,如 /projects
fieldsNo需要返回的字段路径数组,支持数组或逗号分隔字符串,用于过滤 API 响应字段。 示例: - ["id", "name", "owner.username"] - "id,name,owner.username" - undefined
methodYesHTTP 方法
paramsNo查询参数

TDQS

B3.4/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden for behavioral disclosure. It only mentions the tool is for '调试和高级用法' (debugging and advanced usage), which hints at flexibility but doesn't disclose critical behavioral traits like authentication requirements, rate limits, error handling, or what happens with destructive operations (DELETE/PUT/PATCH methods). For a generic API tool with 5 parameters including destructive HTTP methods, this is a significant gap.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise with just one sentence in Chinese: '支持自定义调用任意 GitLab REST API,适合调试和高级用法。' (Supports custom calls to any GitLab REST API, suitable for debugging and advanced usage). Every word earns its place - it states the core capability and primary use cases without any fluff or repetition.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given this is a complex, generic API tool with 5 parameters (including destructive HTTP methods), no annotations, and no output schema, the description is insufficiently complete. It doesn't address authentication, error responses, rate limits, or provide guidance on constructing valid API calls. For a tool that essentially provides raw HTTP access to GitLab's API, users need more context about safe usage patterns and limitations.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description adds no parameter-specific information beyond what's already in the schema (which has 100% coverage). It doesn't explain how parameters interact, provide examples beyond what's in schema descriptions, or clarify edge cases. With high schema coverage, the baseline is 3, but the description doesn't compensate with additional semantic context about parameter usage patterns.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: '支持自定义调用任意 GitLab REST API' (supports custom calls to any GitLab REST API). It specifies the verb ('调用' - call/invoke) and resource ('GitLab REST API'), making it clear this is a generic API caller. However, it doesn't explicitly distinguish itself from sibling tools like 'Gitlab Search Project Details Tool' or 'Gitlab Update MR Tool' which are specific API endpoints.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides clear context about when to use this tool: '适合调试和高级用法' (suitable for debugging and advanced usage). This implies it should be used when specific sibling tools don't cover needed functionality or for custom API exploration. However, it doesn't explicitly state when NOT to use it or name specific alternatives among the sibling tools.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Gitlab Update MR ToolC

更新指定项目的 Merge Request,包括指派 assignee 和 reviewers。

ParametersJSON Schema
NameRequiredDescriptionDefault
assigneeIdNo指派的用户 ID
descriptionNo新的描述
fieldsNo需要返回的字段路径数组
labelsNo标签数组
mergeRequestIdYesMerge Request ID
projectIdYes项目 ID
reviewerIdsNoReviewer 用户 ID 列表
titleNo新的标题

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries full burden. It states this is an update operation, implying mutation, but doesn't disclose behavioral traits such as required permissions, whether changes are reversible, rate limits, or what the response looks like (e.g., success/failure indicators). For a mutation tool with zero annotation coverage, this is a significant gap in transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that front-loads the core purpose. It avoids unnecessary words and directly states the tool's function. However, it could be slightly more structured by explicitly listing all updatable fields for clarity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity (mutation tool with 8 parameters), lack of annotations, and no output schema, the description is incomplete. It doesn't cover behavioral aspects like error handling, permissions, or response format, and provides minimal usage guidance. This is inadequate for a tool that modifies resources in a collaborative system like GitLab.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents all 8 parameters thoroughly. The description adds minimal value by mentioning 'assignee 和 reviewers', which maps to 'assigneeId' and 'reviewerIds' parameters, but doesn't provide additional context beyond what's in the schema. This meets the baseline of 3 when schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('更新' meaning update) and resource ('指定项目的 Merge Request'), and specifies what can be updated ('包括指派 assignee 和 reviewers'). However, it doesn't explicitly differentiate from sibling tools like 'Gitlab Create MR Tool' or 'Gitlab Accept MR Tool', which would require more specific scope or condition statements.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., needing an existing MR), exclusions, or compare to siblings like 'Gitlab Create MR Tool' for creation or 'Gitlab Accept MR Tool' for merging. This leaves the agent without context for tool selection.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. 8 tool updatesv1.0.0
    • First observedGitlab Accept MR Tool
    • First observedGitlab Create MR Comment Tool
    • First observedGitlab Create MR Tool
    • First observedGitlab Get User Tasks Tool
    • First observedGitlab Raw API Tool
    • First observedGitlab Search Project Details Tool
    • First observedGitlab Search User Projects Tool
    • First observedGitlab Update MR Tool

TDQS

B3.4/5.0
Disambiguation4/5

Most tools have distinct purposes targeting specific GitLab resources like MRs, projects, users, and tasks. However, 'Gitlab Search Project Details Tool' and 'Gitlab Search User Projects Tool' could be slightly confused as both involve searching with filtering, though one focuses on projects and the other on users. Overall, descriptions clarify boundaries well.

Naming Consistency5/5

Tool names follow a highly consistent pattern: all start with 'Gitlab', use a verb (e.g., Accept, Create, Get, Search, Update) followed by a noun phrase (e.g., MR Tool, User Tasks Tool), and maintain uniform capitalization and structure. This predictability aids agent selection.

Tool Count5/5

With 8 tools, this server is well-scoped for GitLab operations. It covers core workflows like MR management, project/user search, and tasks, without being overly broad or sparse. Each tool serves a clear purpose, making the count appropriate for the domain.

Completeness4/5

The tool set provides good coverage for GitLab interactions, including MR lifecycle (create, update, accept, comment), project/user search, and task management. Minor gaps exist, such as no direct tools for listing repositories or handling issues, but the 'Gitlab Raw API Tool' offers a workaround for advanced or missing operations.

Maintenance

ActivityInactive
ResponsivenessSyncing

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    MCP server for interacting with GitLab API, supporting both self-hosted instances and gitlab.com. Provides tools for managing issues, merge requests, code review, pipelines, milestones, releases, search, and file access.
    302
    MIT

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/ZephyrDeng/mcp-server-gitlab'

If you have feedback or need assistance with the MCP directory API, please join our Discord server