{"_id":"@abhaydeshmukh/gitlab-mcp","name":"@abhaydeshmukh/gitlab-mcp","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@abhaydeshmukh/gitlab-mcp","version":"1.0.0","description":"Model Context Protocol (MCP) server for GitLab integration with AI assistants","main":"index.js","type":"module","bin":{"gitlab-mcp-server":"bin/cli.js","mcp-gitlab":"bin/cli.js"},"scripts":{"start":"node index.js","dev":"node --watch index.js","setup":"node bin/setup.js","test":"node test_gitlab.js"},"dependencies":{"@modelcontextprotocol/sdk":"^0.5.0","dotenv":"^16.3.1","strip-ansi":"^7.1.0"},"engines":{"node":">=18.0.0"},"keywords":["mcp","gitlab","ai","context","model-context-protocol","git","cursor","claude","assistant","devops"],"author":{"name":"MCP Servers Community"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/your-org/mcp-servers.git","directory":"packages/gitlab"},"bugs":{"url":"https://github.com/your-org/mcp-servers/issues"},"homepage":"https://github.com/your-org/mcp-servers/tree/main/packages/gitlab#readme","_id":"@abhaydeshmukh/gitlab-mcp@1.0.0","_nodeVersion":"23.11.0","_npmVersion":"10.9.2","dist":{"integrity":"sha512-TVKIBTZtkJG8+4YmphpEdITWHabHlENH0WaUEzOeCX/rRrs5OyGa592t38yNqElZyPIjmVlAdV14Q9SzPQp/2w==","shasum":"d1aa389d5095bd55e5aca9224c00fee15c747f53","tarball":"https://registry.npmjs.org/@abhaydeshmukh/gitlab-mcp/-/gitlab-mcp-1.0.0.tgz","fileCount":19,"unpackedSize":113685,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIGKBwHKjFoS8CrT/812FV/FUqa6BFTq58xmYZH0iOvuzAiBxS9IjfGVfJEUhMGNocRyv/+QxUJAqrUyQupAO0fiOHA=="}]},"_npmUser":{"name":"abhaydeshmukh","email":"contactabhaydeshmukh@gmail.com","actor":{"name":"abhaydeshmukh","email":"contactabhaydeshmukh@gmail.com","type":"user"}},"directories":{},"maintainers":[{"name":"abhaydeshmukh","email":"contactabhaydeshmukh@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/gitlab-mcp_1.0.0_1751955626426_0.9331156298178691"},"_hasShrinkwrap":false}},"time":{"created":"2025-07-08T06:20:26.354Z","1.0.0":"2025-07-08T06:20:26.630Z","modified":"2025-07-08T06:20:26.836Z"},"maintainers":[{"name":"abhaydeshmukh","email":"contactabhaydeshmukh@gmail.com"}],"description":"Model Context Protocol (MCP) server for GitLab integration with AI assistants","homepage":"https://github.com/your-org/mcp-servers/tree/main/packages/gitlab#readme","keywords":["mcp","gitlab","ai","context","model-context-protocol","git","cursor","claude","assistant","devops"],"repository":{"type":"git","url":"git+https://github.com/your-org/mcp-servers.git","directory":"packages/gitlab"},"author":{"name":"MCP Servers Community"},"bugs":{"url":"https://github.com/your-org/mcp-servers/issues"},"license":"MIT","readme":"# @mcp-servers/gitlab\n\nA Model Context Protocol (MCP) server for GitLab integration with AI assistants like Claude, Cursor, and other MCP-compatible tools.\n\n## Features\n\n- 📁 **Repository Management**: Browse files, view diffs, and explore repository structure\n- 🔍 **Code Search**: Search across repositories and files\n- 🐛 **Issue Tracking**: List, view, create, and manage GitLab issues\n- 🔀 **Merge Requests**: Handle MR creation, review, and management\n- 🚀 **CI/CD Pipeline**: Monitor pipelines, jobs, and deployments\n- 👥 **Team Collaboration**: Manage project members and permissions\n- 📊 **Analytics**: Access project insights and metrics\n- 🏷️ **Release Management**: Handle releases, milestones, and tags\n- ⚙️ **Flexible Configuration**: Comprehensive environment variable support\n\n## Installation\n\n### Global Installation (Recommended)\n\n```bash\nnpm install -g @mcp-servers/gitlab\n```\n\n### Local Installation\n\n```bash\nnpm install @mcp-servers/gitlab\n```\n\n## Quick Setup\n\nRun the interactive setup to configure your GitLab connection:\n\n```bash\nnpx @mcp-servers/gitlab setup\n```\n\nThis will:\n1. Guide you through entering your GitLab credentials\n2. Create a `.env` file with your configuration\n3. Generate MCP client configuration\n4. Provide setup instructions for your MCP client\n\n## Manual Configuration\n\n### Environment Variables\n\nCreate a `.env` file or set these environment variables:\n\n```bash\n# Required\nGITLAB_TOKEN=glpat-xxxxxxxxxxxxxxxxxxxx\n\n# Optional (with defaults)\nGITLAB_URL=https://gitlab.com\nGITLAB_DEFAULT_PROJECT=group/project   # Optional default project\nGITLAB_DEFAULT_BRANCH=main\nGITLAB_MAX_RESULTS=50\nGITLAB_REQUEST_TIMEOUT=30000\n```\n\n### Getting a GitLab Access Token\n\n#### Personal Access Token (Recommended)\n1. Go to GitLab → User Settings → Access Tokens\n2. Create a token with these scopes:\n   - `api` - Full API access\n   - `read_repository` - Read repository files\n   - `read_user` - Read user information\n3. Copy the token (starts with `glpat-`)\n\n#### Project Access Token\n1. Go to Project → Settings → Access Tokens\n2. Create a token with Developer role or higher\n3. Select the same scopes as above\n\n## MCP Client Configuration\n\n### Cursor\n\nAdd to `~/.config/cursor/mcp_servers.json`:\n\n```json\n{\n  \"gitlab\": {\n    \"command\": \"npx\",\n    \"args\": [\"@mcp-servers/gitlab\"],\n    \"env\": {\n      \"GITLAB_TOKEN\": \"glpat-xxxxxxxxxxxxxxxxxxxx\",\n      \"GITLAB_URL\": \"https://gitlab.com\",\n      \"GITLAB_DEFAULT_PROJECT\": \"group/project\"\n    }\n  }\n}\n```\n\n### Claude Desktop\n\nAdd to your Claude Desktop MCP settings:\n\n```json\n{\n  \"mcpServers\": {\n    \"gitlab\": {\n      \"command\": \"npx\",\n      \"args\": [\"@mcp-servers/gitlab\"],\n      \"env\": {\n        \"GITLAB_TOKEN\": \"glpat-xxxxxxxxxxxxxxxxxxxx\",\n        \"GITLAB_URL\": \"https://gitlab.com\"\n      }\n    }\n  }\n}\n```\n\n### Self-Hosted GitLab\n\nFor GitLab instances with custom domains:\n\n```json\n{\n  \"gitlab\": {\n    \"command\": \"npx\",\n    \"args\": [\"@mcp-servers/gitlab\"],\n    \"env\": {\n      \"GITLAB_TOKEN\": \"glpat-xxxxxxxxxxxxxxxxxxxx\",\n      \"GITLAB_URL\": \"https://gitlab.company.com\",\n      \"GITLAB_STRICT_SSL\": \"false\"\n    }\n  }\n}\n```\n\n### Other MCP Clients\n\nThe server can be started directly:\n\n```bash\nnpx @mcp-servers/gitlab\n# or if installed globally:\ngitlab-mcp-server\n```\n\n## Available Tools\n\nThe MCP server provides these tools to AI assistants:\n\n### Project & Repository\n- `mcp_Gitlab_list_projects` - List available projects\n- `mcp_Gitlab_get_project` - Get project details\n- `mcp_Gitlab_list_repository_tree` - Browse repository structure\n- `mcp_Gitlab_get_file_content` - Read file contents\n- `mcp_Gitlab_get_file_history` - View file commit history\n\n### Code & Search\n- `mcp_Gitlab_search_code` - Search code across projects\n- `mcp_Gitlab_list_commits` - View commit history\n- `mcp_Gitlab_get_commit_diff` - View commit changes\n- `mcp_Gitlab_list_branches` - List repository branches\n\n### Issues & Planning\n- `mcp_Gitlab_list_issues` - List project issues\n- `mcp_Gitlab_get_issue` - Get issue details\n- `mcp_Gitlab_list_milestones` - View project milestones\n- `mcp_Gitlab_get_milestone` - Get milestone details\n\n### Merge Requests\n- `mcp_Gitlab_list_merge_requests` - List merge requests\n- `mcp_Gitlab_get_merge_request` - Get MR details\n- `mcp_Gitlab_create_merge_request` - Create new MR\n- `mcp_Gitlab_summarize_merge_request` - AI-powered MR summary\n\n### CI/CD & DevOps\n- `mcp_Gitlab_list_pipelines` - View CI/CD pipelines\n- `mcp_Gitlab_get_pipeline` - Get pipeline details\n- `mcp_Gitlab_list_pipeline_jobs` - View pipeline jobs\n- `mcp_Gitlab_get_job_log` - Read job logs\n- `mcp_Gitlab_trigger_pipeline` - Start new pipeline\n\n### Deployment & Operations\n- `mcp_Gitlab_list_deployments` - View deployments\n- `mcp_Gitlab_get_deployment_details` - Get deployment info\n- `mcp_Gitlab_list_environments` - View environments\n- `mcp_Gitlab_rollback_deployment` - Rollback deployments\n\n### Security & Quality\n- `mcp_Gitlab_list_security_findings` - View security scans\n- `mcp_Gitlab_get_code_quality_report` - Code quality metrics\n- `mcp_Gitlab_get_license_compliance_report` - License compliance\n\n### Analytics & Insights\n- `mcp_Gitlab_get_project_insights` - Project analytics\n- `mcp_Gitlab_get_contributor_stats` - Contributor metrics\n- `mcp_Gitlab_get_dora_metrics` - DevOps performance metrics\n\n## Usage Examples\n\nOnce configured with an MCP client, you can ask your AI assistant:\n\n- \"Show me the recent commits in my project\"\n- \"What's in the main branch of project ABC?\"\n- \"Create a merge request for feature branch to main\"\n- \"Show me the failed CI/CD jobs in the latest pipeline\"\n- \"What security vulnerabilities were found in the last scan?\"\n- \"List all open issues assigned to me\"\n- \"Show me the deployment status of the production environment\"\n- \"What's the code quality score for the last pipeline?\"\n\n## Configuration Options\n\n### Default Project\n\nSet `GITLAB_DEFAULT_PROJECT` to avoid specifying project_id in every request:\n\n```bash\nGITLAB_DEFAULT_PROJECT=group/project\n# or use numeric ID\nGITLAB_DEFAULT_PROJECT=12345\n```\n\n### Performance Tuning\n\nAdjust these for your needs:\n\n```bash\nGITLAB_REQUEST_TIMEOUT=60000  # 60 seconds\nGITLAB_MAX_RESULTS=100        # Return more results per query\nGITLAB_RETRY_COUNT=5          # More retry attempts\n```\n\n### Self-Hosted GitLab\n\nFor on-premise GitLab instances:\n\n```bash\nGITLAB_URL=https://gitlab.company.com\nGITLAB_STRICT_SSL=false  # For self-signed certificates\n```\n\n## Development\n\n### Local Development\n\n1. Clone the repository\n2. Install dependencies: `npm install`\n3. Create `.env` file with your configuration\n4. Start the server: `npm start`\n\n### Testing\n\n```bash\nnpm test\n```\n\n## Troubleshooting\n\n### Common Issues\n\n**Authentication Errors**\n- Verify your GitLab token is correct and not expired\n- Ensure the token has necessary scopes (`api`, `read_repository`, `read_user`)\n- Check that your account has access to the projects\n\n**Connection Errors**\n- Verify the GITLAB_URL is correct and accessible\n- For self-hosted instances, check SSL settings\n- Ensure your network can reach the GitLab instance\n\n**Permission Errors**\n- Verify your token has sufficient permissions\n- Check project visibility settings\n- Ensure you're a member of private projects\n\n**Project Not Found**\n- Double-check project ID or path format\n- Ensure the project exists and you have access\n- Try using numeric project ID instead of path\n\n### Debug Mode\n\nSet environment variable for detailed logging:\n\n```bash\nDEBUG=gitlab-mcp:* npx @mcp-servers/gitlab\n```\n\n## Security\n\n- Never commit access tokens to version control\n- Use environment variables or secure secret management\n- Set expiration dates for tokens\n- Use project tokens instead of personal tokens when possible\n- Regularly rotate your access tokens\n- Follow your organization's security policies\n\n## License\n\nMIT\n\n## Contributing\n\nIssues and pull requests are welcome! Please see our contributing guidelines.\n\n## Support\n\n- 📖 [Environment Configuration Guide](./ENVIRONMENT_CONFIG.md)\n- 🐛 [Report Issues](https://github.com/your-org/mcp-servers/issues)\n- 💬 [Discussions](https://github.com/your-org/mcp-servers/discussions)\n\n## Related Packages\n\n- [@mcp-servers/jira](https://www.npmjs.com/package/@mcp-servers/jira) - Jira integration\n- [Model Context Protocol](https://modelcontextprotocol.io/) - Learn more about MCP ","readmeFilename":"README.md","_rev":"1-a93948ad0b5a8bfc27c9aaa8cf92db57"}