Lets agents fetch GitLab merge requests and issues, read their details and add comments.
Setup
Choose your client, copy the config, then fill in any required environment variables.
claude mcp add gitlab-mr --env MR_MCP_GITLAB_TOKEN='<MR_MCP_GITLAB_TOKEN>' --env MR_MCP_GITLAB_HOST='<MR_MCP_GITLAB_HOST>' -- npx -y @kopfrechner/gitlab-mr-mcp~/.codex/config.toml
[mcp_servers.gitlab-mr]
command = "npx"
args = ["-y", "@kopfrechner/gitlab-mr-mcp"]
env = { MR_MCP_GITLAB_TOKEN = "<MR_MCP_GITLAB_TOKEN>", MR_MCP_GITLAB_HOST = "<MR_MCP_GITLAB_HOST>" }
# codex mcp add gitlab-mr --env MR_MCP_GITLAB_TOKEN='<MR_MCP_GITLAB_TOKEN>' --env MR_MCP_GITLAB_HOST='<MR_MCP_GITLAB_HOST>' -- npx -y @kopfrechner/gitlab-mr-mcp~/.cursor/mcp.json
{
"mcpServers": {
"gitlab-mr": {
"command": "npx",
"args": [
"-y",
"@kopfrechner/gitlab-mr-mcp"
],
"env": {
"MR_MCP_GITLAB_TOKEN": "<MR_MCP_GITLAB_TOKEN>",
"MR_MCP_GITLAB_HOST": "<MR_MCP_GITLAB_HOST>"
}
}
}
}.vscode/mcp.json
{
"servers": {
"gitlab-mr": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@kopfrechner/gitlab-mr-mcp"
],
"env": {
"MR_MCP_GITLAB_TOKEN": "<MR_MCP_GITLAB_TOKEN>",
"MR_MCP_GITLAB_HOST": "<MR_MCP_GITLAB_HOST>"
}
}
}
}~/.gemini/settings.json
{
"mcpServers": {
"gitlab-mr": {
"command": "npx",
"args": [
"-y",
"@kopfrechner/gitlab-mr-mcp"
],
"env": {
"MR_MCP_GITLAB_TOKEN": "<MR_MCP_GITLAB_TOKEN>",
"MR_MCP_GITLAB_HOST": "<MR_MCP_GITLAB_HOST>"
}
}
}
}claude_desktop_config.json
{
"mcpServers": {
"gitlab-mr": {
"command": "npx",
"args": [
"-y",
"@kopfrechner/gitlab-mr-mcp"
],
"env": {
"MR_MCP_GITLAB_TOKEN": "<MR_MCP_GITLAB_TOKEN>",
"MR_MCP_GITLAB_HOST": "<MR_MCP_GITLAB_HOST>"
}
}
}
}.trae/mcp.json
{
"mcpServers": {
"gitlab-mr": {
"command": "npx",
"args": [
"-y",
"@kopfrechner/gitlab-mr-mcp"
],
"env": {
"MR_MCP_GITLAB_TOKEN": "<MR_MCP_GITLAB_TOKEN>",
"MR_MCP_GITLAB_HOST": "<MR_MCP_GITLAB_HOST>"
}
}
}
}Environment variables
MR_MCP_GITLAB_TOKENMR_MCP_GITLAB_HOST
Replace the placeholders with your own credentials and keep them out of version control.