Get the FREE Ultimate OpenClaw Setup Guide →

gitlab

MCP server from Foxhunt/gitlab-mcp-server

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio foxhunt-gitlab-mcp-server node path/to/gitlab-server/build/index.js \
  --env GITLAB_HOST="<GitLab Host URL>" \
  --env GITLAB_API_TOKEN="<Gitlab API Token >"

How to use

This MCP server provides a set of tools to interact with a self-hosted GitLab instance. It exposes capabilities to list projects, fetch issues and their notes, search for projects and issues, retrieve specific issues by ID, and access wiki pages and their contents for given projects. The available tools are: list_projects, get_issues, get_issue_notes, search, get_issue, get_todos, get_wiki_page, and list_wiki_pages. To use these tools, start the server with the configured command above, ensuring you have a valid GitLab API token and host URL set in the environment. Then issue requests to the MCP interface via your client (for example Claude Desktop integrations) to invoke the desired tool and pass required parameters such as project IDs, issue IDs, or search terms. The tools return structured data representing GitLab entities, enabling you to build workflows that compile project lists, issue summaries, comments, and wiki content for consumption in your application.

How to install

Prerequisites:

  • Node.js and npm installed on your machine
  • Access to the target GitLab instance with a valid API token

Installation steps:

  1. Clone or download the MCP server repository for the GitLab integration.
  2. Install dependencies: npm install
  3. Build the server (TypeScript): npm run build
  4. (Optional) Enable auto-rebuild during development: npm run watch
  5. Configure runtime environment variables when starting the server or via the MCP config:
  6. Start the server using the node command as specified in the mcp_config (example): node path/to/gitlab-server/build/index.js
  7. To integrate with Claude Desktop, add the MCP server configuration to your MCP setup as shown in the Installation example, ensuring the env vars are set.

Troubleshooting tips:

  • If you receive authentication errors, verify that GITLAB_API_TOKEN has the correct scopes and that GITLAB_HOST is reachable.
  • Use the MCP Inspector for debugging if you run into issues with stdio communication.

Additional notes

Notes and tips:

  • The server exposes several read-oriented operations; ensure proper permissions on your GitLab token to access projects, issues, and wiki data.
  • When using search, you can discover both projects and issues matching a query term.
  • For wiki operations, you’ll need the project context (project ID) and the wiki page slug when retrieving specific pages.
  • Debugging MCP on stdout can be challenging; consider using the MCP Inspector tool for a browser-based debugging interface and live URL.
  • If your GitLab instance uses a self-signed certificate or non-standard TLS configuration, ensure the host URL is configured accordingly and network access is permitted.
  • Remember to keep the GitLab API token secret and avoid logging it in plaintext.
  • Environment variables can be extended in the mcp_config if additional runtime settings are required by your deployment.

Related MCP Servers

Sponsor this space

Reach thousands of developers